OSDN Git Service

[Hexagon] Allow redefinition with immediates for hw loop conversion
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 20 Oct 2017 16:56:33 +0000 (16:56 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 20 Oct 2017 16:56:33 +0000 (16:56 +0000)
commitb99a8bcc2b50f7bb879129ce18e144fbc1111a1a
tree2a2ac5e3151f3ffa0405f38e534c1c012a5b7a92
parent268fcddc7a6e4ce87d5e65275e38b289f6d053d5
[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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316218 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonHardwareLoops.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
test/CodeGen/Hexagon/hwloop-redef-imm.mir [new file with mode: 0644]