summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-10-20 16:56:33 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-10-20 16:56:33 +0000
commit3818aeaeb9337d5880e9c4ecea05f68f52d09117 (patch)
tree5daf3b7cfd12c43e0f1826ceab155a89c2116eb3 /llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
parentb6b617b7d85096a89659e17e8c2fb3b1ac02e437 (diff)
downloadbcm5719-llvm-3818aeaeb9337d5880e9c4ecea05f68f52d09117.tar.gz
bcm5719-llvm-3818aeaeb9337d5880e9c4ecea05f68f52d09117.zip
[Hexagon] Allow redefinition with immediates for hw loop conversion
Normally, if the registers holding the induction variable's bounds are redefined inside of the loop's body, the loop cannot be converted to a hardware loop. However, if the redefining instruction is actually loading an immediate value into the register, this conversion is both possible and legal (since the immediate itself will be used in the loop setup in the preheader). llvm-svn: 316218
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
index 6d7518a5ff3..a66e212a765 100644
--- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
@@ -126,6 +126,7 @@ namespace llvm {
void initializeHexagonEarlyIfConversionPass(PassRegistry&);
void initializeHexagonExpandCondsetsPass(PassRegistry&);
void initializeHexagonGenMuxPass(PassRegistry&);
+ void initializeHexagonHardwareLoopsPass(PassRegistry&);
void initializeHexagonLoopIdiomRecognizePass(PassRegistry&);
void initializeHexagonVectorLoopCarriedReusePass(PassRegistry&);
void initializeHexagonNewValueJumpPass(PassRegistry&);
@@ -184,6 +185,7 @@ extern "C" void LLVMInitializeHexagonTarget() {
initializeHexagonConstExtendersPass(PR);
initializeHexagonEarlyIfConversionPass(PR);
initializeHexagonGenMuxPass(PR);
+ initializeHexagonHardwareLoopsPass(PR);
initializeHexagonLoopIdiomRecognizePass(PR);
initializeHexagonVectorLoopCarriedReusePass(PR);
initializeHexagonNewValueJumpPass(PR);
OpenPOWER on IntegriCloud