diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-11-27 00:49:46 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-11-27 00:49:46 +0000 |
commit | 83bdb38965408ad5b341b08fc7888c28264fc5b4 (patch) | |
tree | 066763b7dd90398f9e2c80a7775cda01cebc2b96 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | e7dd145c022d99b8e2652f24f6737f5a6f1e656e (diff) | |
download | llvm-83bdb38965408ad5b341b08fc7888c28264fc5b4.zip llvm-83bdb38965408ad5b341b08fc7888c28264fc5b4.tar.gz llvm-83bdb38965408ad5b341b08fc7888c28264fc5b4.tar.bz2 |
On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax
is 2 bytes shorter than
movl $4, %eax
addl 4(%esp), %eax
llvm-svn: 60139
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions