summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-29 22:51:22 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-29 22:51:22 +0000
commit73e7dced3892f2abb4344526147d4df0f62aee61 (patch)
tree50421d085c033990e15663273d045974402d7c95 /lib/CodeGen/PHIElimination.cpp
parent05bce0beee87512e52428d4b80f5a8e79a949576 (diff)
downloadllvm-73e7dced3892f2abb4344526147d4df0f62aee61.tar.gz
llvm-73e7dced3892f2abb4344526147d4df0f62aee61.tar.bz2
llvm-73e7dced3892f2abb4344526147d4df0f62aee61.tar.xz
Add an isSSA() flag to MachineRegisterInfo.
This flag is true from isel to register allocation when the machine function is required to be in SSA form. The TwoAddressInstructionPass and PHIElimination passes clear the flag. The SSA flag wil be used by the machine code verifier to check for SSA form, and eventually an assertion can enforce it in +Asserts builds. This will catch the common target error of creating machine code with multiple defs of a virtual register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r--lib/CodeGen/PHIElimination.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index af65f13bf0..6994aa58fb 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -109,6 +109,9 @@ bool PHIElimination::runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
+ // This pass takes the function out of SSA form.
+ MRI->leaveSSA();
+
// Split critical edges to help the coalescer
if (!DisableEdgeSplitting) {
if (LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>()) {