From c3c70881cf7457535182add96d0ea96a3a12e9f2 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 20 Mar 2007 22:22:38 +0000 Subject: [PATCH] Potential spiller improvement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35228 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/README.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/CodeGen/README.txt diff --git a/lib/CodeGen/README.txt b/lib/CodeGen/README.txt new file mode 100644 index 00000000000..3f295126fb3 --- /dev/null +++ b/lib/CodeGen/README.txt @@ -0,0 +1,27 @@ +Common register allocation / spilling problem: + + mul lr, r4, lr + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + ldr r4, [sp, #+52] + mla r4, r3, lr, r4 + +can be: + + mul lr, r4, lr + mov r4, lr + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + mla r4, r3, lr, r4 + +and then "merge" mul and mov: + + mul r4, r4, lr + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + mla r4, r3, lr, r4 + +It also increase the likelyhood the store may become dead. -- 2.34.1