summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/Environment.cpp
diff options
context:
space:
mode:
authorFilip Pizlo <fpizlo@apple.com>2013-05-01 22:58:00 +0000
committerFilip Pizlo <fpizlo@apple.com>2013-05-01 22:58:00 +0000
commit85e0d2731b27b7cf6358347237ee777a8d893abf (patch)
treea43a222f35472aa34cab85a02e093b7e83d28343 /clang/lib/StaticAnalyzer/Core/Environment.cpp
parentd2d42f1b2d4cb3f7e2f4ce5e60f7928f5302c514 (diff)
downloadbcm5719-llvm-85e0d2731b27b7cf6358347237ee777a8d893abf.tar.gz
bcm5719-llvm-85e0d2731b27b7cf6358347237ee777a8d893abf.zip
This exposes more MCJIT options via the C API:
CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like. Previously it was only possible to create an MCJIT that used CodeModel::JITDefault. EnableFastISel: It's now possible to turn on the fast instruction selector. The CodeModel option required some trickery. The problem is that previously, we were ensuring future binary compatibility in the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the bindings then bzero the remaining bits. This works great but assumes that the bitwise zero equivalent of any field is a sensible default value. But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model. In both of those, the default for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero. Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp illustrates the change, as does the comment in ExecutionEngine.h. llvm-svn: 180893
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud