summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Fibonacci
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-02 02:34:12 +0000
committerChris Lattner <sabre@nondot.org>2005-01-02 02:34:12 +0000
commit9590870a0d2b082587835f6481e277fd837ee56f (patch)
tree2fb4cabdb7738f97abebf0c17d45a2fcadab5988 /llvm/examples/Fibonacci
parent835ae423006a7fd49ef3454709233832feedf99d (diff)
downloadbcm5719-llvm-9590870a0d2b082587835f6481e277fd837ee56f.tar.gz
bcm5719-llvm-9590870a0d2b082587835f6481e277fd837ee56f.zip
Make the 2-address instruction lowering pass smarter in two ways:
1. If we are two-addressing a commutable instruction and the LHS is not the last use of the variable, see if the instruction is the last use of the RHS. If so, commute the instruction, allowing us to avoid a register-register copy in many cases for common instructions like ADD, OR, AND, etc on X86. 2. If #1 doesn't hold, and if this is an instruction that also existing in 3-address form, promote the instruction to a 3-address instruction to avoid the register-register copy. We can do this for several common instructions in X86, including ADDrr, INC, DEC, etc. This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll, overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it. llvm-svn: 19245
Diffstat (limited to 'llvm/examples/Fibonacci')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud