diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-07-09 10:52:46 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-07-09 11:00:37 -0700 |
commit | 5dbcc7e0c9c12f4a4042fb4a226654aee927999c (patch) | |
tree | b316a3370e9286cb4e6f81b2f9d8bd8b54ce5123 /lib/Target/ARM/ARMTargetMachine.cpp | |
parent | 86dc97be9ac3b4804528e087b04b4f4192cdee54 (diff) |
LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)
(only non-new files; new files in git 4f429c8b)
Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 9aa8308920..99ed63293d 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -28,6 +28,13 @@ EnableGlobalMerge("global-merge", cl::Hidden, cl::desc("Enable global merge pass"), cl::init(true)); +// @LOCALMOD-START +namespace llvm { +cl::opt<bool> FlagSfiDisableCP("sfi-disable-cp", + cl::desc("disable arm constant island pools")); +} +// @LOCALMOD-END + extern "C" void LLVMInitializeARMTarget() { // Register the target. RegisterTargetMachine<ARMTargetMachine> X(TheARMTarget); @@ -189,8 +196,24 @@ bool ARMPassConfig::addPreEmitPass() { addPass(UnpackMachineBundlesID); } + // @LOCALMOD-START + // Note with FlagSfiDisableCP we effectively disable the + // ARMConstantIslandPass and rely on movt/movw to eliminate the need + // for constant islands + if (FlagSfiDisableCP) { + assert(getARMSubtarget().useMovt()); + } + // @LOCALMOD-END + PM->add(createARMConstantIslandPass()); + // @LOCALMOD-START + // This pass does all the heavy sfi lifting. + if (getARMSubtarget().isTargetNaCl()) { + PM->add(createARMNaClRewritePass()); + } + // @LOCALMOD-END + return true; } |