aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Stacker.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-08 01:58:35 +0000
committerChris Lattner <sabre@nondot.org>2004-03-08 01:58:35 +0000
commit7dee5daf85b8a2a9ea8f5dc93923afad18dcc6a1 (patch)
treea046c97276dd40e6df6f896ffbf6023dedb4bf22 /docs/Stacker.html
parent721d2d4a6ef5ed154bba896a8215ec709e569785 (diff)
downloadexternal_llvm-7dee5daf85b8a2a9ea8f5dc93923afad18dcc6a1.zip
external_llvm-7dee5daf85b8a2a9ea8f5dc93923afad18dcc6a1.tar.gz
external_llvm-7dee5daf85b8a2a9ea8f5dc93923afad18dcc6a1.tar.bz2
Implement folding explicit load instructions into binary operations. For a
testcase like this: int %test(int* %P, int %A) { %Pv = load int* %P %B = add int %A, %Pv ret int %B } We now generate: test: mov %ECX, DWORD PTR [%ESP + 4] mov %EAX, DWORD PTR [%ESP + 8] add %EAX, DWORD PTR [%ECX] ret Instead of: test: mov %EAX, DWORD PTR [%ESP + 4] mov %ECX, DWORD PTR [%ESP + 8] mov %EAX, DWORD PTR [%EAX] add %EAX, %ECX ret ... saving one instruction, and often a register. Note that there are a lot of other instructions that could use this, but they aren't handled. I'm not really interested in adding them, but mul/div and all of the FP instructions could be supported as well if someone wanted to add them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Stacker.html')
0 files changed, 0 insertions, 0 deletions