diff options
| author | Louis Gerbarg <lgg@apple.com> | 2014-04-14 21:05:02 +0000 |
|---|---|---|
| committer | Louis Gerbarg <lgg@apple.com> | 2014-04-14 21:05:02 +0000 |
| commit | 6d2e3c638f32e9b2e83a589f997d315235c24fc7 (patch) | |
| tree | 71fc9c6b2921bd9de70b62ed930fe8bff4207281 /llvm/lib/Target/ARM64 | |
| parent | 82dce550c805f079ecf025e94f16df947b7433fb (diff) | |
| download | bcm5719-llvm-6d2e3c638f32e9b2e83a589f997d315235c24fc7.tar.gz bcm5719-llvm-6d2e3c638f32e9b2e83a589f997d315235c24fc7.zip | |
Add a flag to disable the ARM64DeadRegisterDefinitionsPass
This patch adds a -arm64-dead-def-elimination flag so that it is possible to
disable dead definition elimination. Includes test case.
llvm-svn: 206207
Diffstat (limited to 'llvm/lib/Target/ARM64')
| -rw-r--r-- | llvm/lib/Target/ARM64/ARM64TargetMachine.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp b/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp index 101dc25839e..f4a79963790 100644 --- a/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp +++ b/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp @@ -39,6 +39,14 @@ EnableCollectLOH("arm64-collect-loh", cl::Hidden, " optimization hints (LOH)"), cl::init(true)); +static cl::opt<bool> +EnableDeadRegisterElimination("arm64-dead-def-elimination", cl::Hidden, + cl::desc("Enable the pass that removes dead" + " definitons and replaces stores to" + " them with stores to the zero" + " register"), + cl::init(true)); + extern "C" void LLVMInitializeARM64Target() { // Register the target. RegisterTargetMachine<ARM64TargetMachine> X(TheARM64Target); @@ -135,7 +143,8 @@ bool ARM64PassConfig::addPreRegAlloc() { bool ARM64PassConfig::addPostRegAlloc() { // Change dead register definitions to refer to the zero register. - addPass(createARM64DeadRegisterDefinitions()); + if (EnableDeadRegisterElimination) + addPass(createARM64DeadRegisterDefinitions()); return true; } |

