summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-04-18 06:48:23 +0000
committerLang Hames <lhames@gmail.com>2014-04-18 06:48:23 +0000
commitbc876017c2b9725f2b7792737baea7d086e63ac9 (patch)
tree7843be5836bf88e29188a84e396063103929a501 /llvm/lib/ExecutionEngine/JIT
parentd48665b1fd0827f511d62162496a181c385cfab2 (diff)
downloadbcm5719-llvm-bc876017c2b9725f2b7792737baea7d086e63ac9.tar.gz
bcm5719-llvm-bc876017c2b9725f2b7792737baea7d086e63ac9.zip
[ExecutionEngine] Allow JIT clients to enable/disable module verification.
Previously module verification was always enabled, with no way to turn it off. As of this commit, module verification is on by default in Debug builds, and off by default in release builds. The default behaviour can be overridden by calling setVerifyModules(bool) on the JIT instance (this works for both the old JIT, and MCJIT). <rdar://problem/16150008> llvm-svn: 206561
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index d3ad77b7276..76101927d24 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -157,7 +157,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
// Turn the machine code intermediate representation into bytes in memory that
// may be executed.
- if (TM.addPassesToEmitMachineCode(PM, *JCE)) {
+ if (TM.addPassesToEmitMachineCode(PM, *JCE, !getVerifyModules())) {
report_fatal_error("Target does not support machine code emission!");
}
@@ -190,7 +190,7 @@ void JIT::addModule(Module *M) {
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
- if (TM.addPassesToEmitMachineCode(PM, *JCE)) {
+ if (TM.addPassesToEmitMachineCode(PM, *JCE, !getVerifyModules())) {
report_fatal_error("Target does not support machine code emission!");
}
@@ -222,7 +222,7 @@ bool JIT::removeModule(Module *M) {
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
- if (TM.addPassesToEmitMachineCode(PM, *JCE)) {
+ if (TM.addPassesToEmitMachineCode(PM, *JCE, !getVerifyModules())) {
report_fatal_error("Target does not support machine code emission!");
}
OpenPOWER on IntegriCloud