diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-10-20 16:56:33 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-10-20 16:56:33 +0000 |
commit | 3818aeaeb9337d5880e9c4ecea05f68f52d09117 (patch) | |
tree | 5daf3b7cfd12c43e0f1826ceab155a89c2116eb3 /llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp | |
parent | b6b617b7d85096a89659e17e8c2fb3b1ac02e437 (diff) | |
download | bcm5719-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.cpp | 2 |
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); |