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/utils | |
| parent | e7dd145c022d99b8e2652f24f6737f5a6f1e656e (diff) | |
| download | bcm5719-llvm-83bdb38965408ad5b341b08fc7888c28264fc5b4.tar.gz bcm5719-llvm-83bdb38965408ad5b341b08fc7888c28264fc5b4.zip | |
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/utils')
| -rw-r--r-- | llvm/utils/TableGen/DAGISelEmitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 3f86d2dade3..3674a136c9c 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -522,8 +522,8 @@ public: if (NeedCheck) { std::string ParentName(RootName.begin(), RootName.end()-1); - emitCheck("CanBeFoldedBy(" + RootName + ".getNode(), " + ParentName + - ".getNode(), N.getNode())"); + emitCheck("IsLegalAndProfitableToFold(" + RootName + + ".getNode(), " + ParentName + ".getNode(), N.getNode())"); } } } |

