aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-28 04:00:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-28 04:00:49 +0000
commit540f7d60181d64ce25fa277de51ac7e3ded8acae (patch)
tree1f9441feb1769b1b03b49365e2d2e96f9eade728
parent2a05c8e260bb4a3cb54c825371317e4e6164075d (diff)
Run the verifier pass after all the other passes rather than before them.
This catches mistakes in the passes rather than just verifying the bytecode input to llc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22534 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/llc/llc.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 9643f1e2e0..2a68686a01 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -123,11 +123,6 @@ int main(int argc, char **argv) {
PassManager Passes;
Passes.add(new TargetData(TD));
-#ifndef NDEBUG
- if(!NoVerify)
- Passes.add(createVerifierPass());
-#endif
-
// Create a new pass for each one specified on the command line
for (unsigned i = 0; i < LLCPassList.size(); ++i) {
const PassInfo *aPass = LLCPassList[i];
@@ -141,6 +136,10 @@ int main(int argc, char **argv) {
}
}
+#ifndef NDEBUG
+ if(!NoVerify)
+ Passes.add(createVerifierPass());
+#endif
// Figure out where we are going to send the output...
std::ostream *Out = 0;