aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-08 15:34:50 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-08 15:34:50 +0000
commit803e6ca25b44a8bf77d2debb39e024aabafea05b (patch)
tree48ad29017874b64e482ca7a06b9cddbfa4fcf056 /lib
parent49284e74a5be31b2a2c99c956ba296f978b2e3ab (diff)
downloadexternal_llvm-803e6ca25b44a8bf77d2debb39e024aabafea05b.zip
external_llvm-803e6ca25b44a8bf77d2debb39e024aabafea05b.tar.gz
external_llvm-803e6ca25b44a8bf77d2debb39e024aabafea05b.tar.bz2
Clean out per-function data after the machine code verifier is done with it.
Also don't dereference old pointers after they have been deleted causing random crashes when enabling the machine code verifier. Ahem... I have not included a test case for the crash. It hapened when enabling the verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll. The crash depends on an MBB being allocated at the same address as a previously deleted MBB. I don't think that can be reproduced reliably. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineVerifier.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp
index e6ed180..0b9127f 100644
--- a/lib/CodeGen/MachineVerifier.cpp
+++ b/lib/CodeGen/MachineVerifier.cpp
@@ -220,6 +220,14 @@ MachineVerifier::runOnMachineFunction(MachineFunction &MF)
llvm_report_error(Msg.str());
}
+ // Clean up.
+ regsLive.clear();
+ regsDefined.clear();
+ regsDead.clear();
+ regsKilled.clear();
+ regsLiveInButUnused.clear();
+ MBBInfoMap.clear();
+
return false; // no changes
}