summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-02-12 01:30:21 +0000
committerBob Wilson <bob.wilson@apple.com>2010-02-12 01:30:21 +0000
commit0827e040e0071bdc59b26d6a8936459e1304f682 (patch)
treed8d9684a14be1f90db7bb4e46528cf641140ec05 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parentd7e9212e2d33bfe528b6996c4e7f722dff808c76 (diff)
downloadbcm5719-llvm-0827e040e0071bdc59b26d6a8936459e1304f682.tar.gz
bcm5719-llvm-0827e040e0071bdc59b26d6a8936459e1304f682.zip
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. llvm-svn: 95951
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 40e015067f4..3c12afaacf6 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud