rustc: Run the llvm verifier pass before optimization. Closes #376
The optimization passes were hiding some codegen errors so now we run the verifier both before and after optimization.
This commit is contained in:
parent
8637c09cf9
commit
2505a2312e
1 changed files with 4 additions and 0 deletions
|
|
@ -115,6 +115,10 @@ mod write {
|
|||
}
|
||||
}
|
||||
|
||||
if (opts.verify) {
|
||||
llvm::LLVMAddVerifierPass(pm.llpm);
|
||||
}
|
||||
|
||||
// FIXME: This is mostly a copy of the bits of opt's -O2 that are
|
||||
// available in the C api.
|
||||
// FIXME2: We might want to add optimization levels like -O1, -O2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue