aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/HexagonTargetMachine.cpp
diff options
context:
space:
mode:
authorBrendon Cahoon <bcahoon@codeaurora.org>2012-05-11 19:56:59 +0000
committerBrendon Cahoon <bcahoon@codeaurora.org>2012-05-11 19:56:59 +0000
commit6d532d8860c07a3af3b66339f55ab91b4618ca7d (patch)
tree60b50fe7ba7f82abdddb0ac1890cf60ba9319d30 /lib/Target/Hexagon/HexagonTargetMachine.cpp
parente1093e5503060b3031980dc14a141c3236108c50 (diff)
Hexagon constant extender support.
Patch by Jyotsna Verma. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonTargetMachine.cpp')
-rw-r--r--lib/Target/Hexagon/HexagonTargetMachine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/Hexagon/HexagonTargetMachine.cpp b/lib/Target/Hexagon/HexagonTargetMachine.cpp
index 8af95a9c20..cad1473983 100644
--- a/lib/Target/Hexagon/HexagonTargetMachine.cpp
+++ b/lib/Target/Hexagon/HexagonTargetMachine.cpp
@@ -28,6 +28,10 @@ static cl::
opt<bool> DisableHardwareLoops(
"disable-hexagon-hwloops", cl::Hidden,
cl::desc("Disable Hardware Loops for Hexagon target"));
+static cl::
+opt<bool> DisableCExtOpt(
+ "disable-hexagon-cextopt", cl::Hidden,
+ cl::desc("Disable Optimization of Constant Extenders"));
/// HexagonTargetMachineModule - Note that this is used on hosts that
/// cannot link in a library unless there are references into the
@@ -110,6 +114,9 @@ bool HexagonPassConfig::addInstSelector() {
bool HexagonPassConfig::addPreRegAlloc() {
+ if (!DisableCExtOpt) {
+ PM->add(createHexagonOptimizeConstExt(getHexagonTargetMachine()));
+ }
if (!DisableHardwareLoops) {
PM->add(createHexagonHardwareLoops());
}