summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/Passes.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-25 18:12:18 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-25 18:12:18 +0000
commiteb49566447ba2ef4e9be32f32e896e3e1cee0b54 (patch)
treea728c2bae6c816dba42dd5e25fb8795994233df8 /llvm/lib/CodeGen/Passes.cpp
parent7b5a716f3d5ed19b45853d6861e0029f5fce1ee4 (diff)
downloadbcm5719-llvm-eb49566447ba2ef4e9be32f32e896e3e1cee0b54.tar.gz
bcm5719-llvm-eb49566447ba2ef4e9be32f32e896e3e1cee0b54.zip
Run ProcessImplicitDefs on SSA form where it can be much simpler.
Implicitly defined virtual registers can simply have the <undef> bit set on all uses, and copies can be turned into implicit defs recursively. Physical registers are a bit trickier. We handle the common case where a physreg def is used by a nearby instruction in the same basic block. For more complicated cases, just leave the IMPLICIT_DEF instruction in. llvm-svn: 159149
Diffstat (limited to 'llvm/lib/CodeGen/Passes.cpp')
-rw-r--r--llvm/lib/CodeGen/Passes.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp
index 8ee97e6c1b5..b166dbe7432 100644
--- a/llvm/lib/CodeGen/Passes.cpp
+++ b/llvm/lib/CodeGen/Passes.cpp
@@ -572,6 +572,8 @@ void TargetPassConfig::addFastRegAlloc(FunctionPass *RegAllocPass) {
/// optimized register allocation, including coalescing, machine instruction
/// scheduling, and register allocation itself.
void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
+ addPass(ProcessImplicitDefsID);
+
// LiveVariables currently requires pure SSA form.
//
// FIXME: Once TwoAddressInstruction pass no longer uses kill flags,
@@ -590,12 +592,6 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
}
addPass(TwoAddressInstructionPassID);
- // FIXME: Either remove this pass completely, or fix it so that it works on
- // SSA form. We could modify LiveIntervals to be independent of this pass, But
- // it would be even better to simply eliminate *all* IMPLICIT_DEFs before
- // leaving SSA.
- addPass(ProcessImplicitDefsID);
-
if (EnableStrongPHIElim)
addPass(StrongPHIEliminationID);
OpenPOWER on IntegriCloud