aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-10-07 20:22:28 +0000
committerOwen Anderson <resistor@mac.com>2008-10-07 20:22:28 +0000
commitbac9ae29c7009e75c4efb9283b9f0a21d1d34356 (patch)
treebd2cf50595adb1345d767124b9f529511c09147c /lib/CodeGen/TwoAddressInstructionPass.cpp
parent320c148375723e6e2f850f5e9909da26391a0119 (diff)
downloadexternal_llvm-bac9ae29c7009e75c4efb9283b9f0a21d1d34356.tar.gz
external_llvm-bac9ae29c7009e75c4efb9283b9f0a21d1d34356.tar.bz2
external_llvm-bac9ae29c7009e75c4efb9283b9f0a21d1d34356.zip
Add an option to enable StrongPHIElimination, for ease of testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index dbfd770b73..7d9e44ab20 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -37,6 +37,7 @@
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/BitVector.h"
@@ -76,7 +77,10 @@ namespace {
AU.addPreserved<LiveVariables>();
AU.addPreservedID(MachineLoopInfoID);
AU.addPreservedID(MachineDominatorsID);
- AU.addPreservedID(PHIEliminationID);
+ if (StrongPHIElim)
+ AU.addPreservedID(StrongPHIEliminationID);
+ else
+ AU.addPreservedID(PHIEliminationID);
MachineFunctionPass::getAnalysisUsage(AU);
}