diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-02-12 01:30:21 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-02-12 01:30:21 +0000 |
commit | 90b0d5cdd86d7436a92aac43e69b68be8c749dc9 (patch) | |
tree | df0bb339b5cb79a8d22e66430b920e47fae100a5 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | a9dde43626fc35351856fc986f0eabc56bbf4514 (diff) | |
download | external_llvm-90b0d5cdd86d7436a92aac43e69b68be8c749dc9.zip external_llvm-90b0d5cdd86d7436a92aac43e69b68be8c749dc9.tar.gz external_llvm-90b0d5cdd86d7436a92aac43e69b68be8c749dc9.tar.bz2 |
Add a new pass on machine instructions to optimize away PHI cycles that
reduce down to a single value. InstCombine already does this transformation
but DAG legalization may introduce new opportunities. This has turned out to
be important for ARM where 64-bit values are split up during type legalization:
InstCombine is not able to remove the PHI cycles on the 64-bit values but
the separate 32-bit values can be optimized. I measured the compile time
impact of this (running llc on 176.gcc) and it was not significant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 40e0150..3c12afa 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -299,6 +299,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, if (OptLevel != CodeGenOpt::None) { PM.add(createOptimizeExtsPass()); + PM.add(createOptimizePHIsPass()); if (!DisableMachineLICM) PM.add(createMachineLICMPass()); if (!DisableMachineSink) |