summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.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
commit9760f04ef9a30509817a24a4b27cb48e537a1242 (patch)
treebaf1c8ba66f763e97e46b33ef61cba63a7971beb /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
parentaf8ee2cdeeb2ed35fdf0db8f7c06254c5d333ac4 (diff)
downloadbcm5719-llvm-9760f04ef9a30509817a24a4b27cb48e537a1242.tar.gz
bcm5719-llvm-9760f04ef9a30509817a24a4b27cb48e537a1242.zip
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. llvm-svn: 136532
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 6d6244e4f87..dfd258d592e 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1041,6 +1041,9 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
DEBUG(dbgs() << "********** Function: "
<< MF.getFunction()->getName() << '\n');
+ // This pass takes the function out of SSA form.
+ MRI->leaveSSA();
+
// ReMatRegs - Keep track of the registers whose def's are remat'ed.
BitVector ReMatRegs(MRI->getNumVirtRegs());
OpenPOWER on IntegriCloud