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 | 5a424559e5509e61df7b1d1e124178f8073796dd (patch) | |
tree | eea845867e8c466b91a3bf184a9c9c1df7049e2e /utils | |
parent | e7e5da3e66cf237a697dfb94bcbd0c99668a13e2 (diff) | |
download | external_llvm-5a424559e5509e61df7b1d1e124178f8073796dd.zip external_llvm-5a424559e5509e61df7b1d1e124178f8073796dd.tar.gz external_llvm-5a424559e5509e61df7b1d1e124178f8073796dd.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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 3f86d2d..3674a13 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/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())"); } } } |