summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2018-03-29 08:48:15 +0000
committerDavid Green <david.green@arm.com>2018-03-29 08:48:15 +0000
commitb0aa36f9c20e0816951912d99dcd19d090056f4c (patch)
tree448eb425070c0464215e5fb0f8a9ca5f809bff6d /llvm/lib/Target
parent6b995a4a7ed67241a672eb631c0a3b87dceffed1 (diff)
downloadbcm5719-llvm-b0aa36f9c20e0816951912d99dcd19d090056f4c.tar.gz
bcm5719-llvm-b0aa36f9c20e0816951912d99dcd19d090056f4c.zip
[LoopRotate] Restructuring LoopRotation.cpp to create Loop Rotation Pass with Loop Rotation Utility Interface
The existing LoopRotation.cpp is implemented as one of loop passes instead of being a utility. The user cannot easily perform the loop rotation selectively (or on demand) under different optimization level. For example, the loop rotation is needed as part of the logic to convert a loop into a loop with bottom test for a transformation. If the loop rotation is simply added as a loop pass before the transformation, the pass is skipped if it is compiled at –O0 or if it is explicitly disabled by the user, causing the compiler to generate incorrect code. Furthermore, as a loop pass it will rotate all loops instead of just the relevant loops. We provide a utility interface for the loop rotation so that the loop rotation can be called on demand. The changeset is as follows: - Create a new file lib/Transforms/Utils/LoopRotationUtils.cpp and move the main implementation of class LoopRotate into this file. - Create a new file llvm/include/Transform/Utils/LoopRotationUtils.h with the interface LoopRotation(...). - Original LoopRotation.cpp is changed to use the utility function LoopRotation in LoopRotationUtils.cpp. This is done in the same way community did for mem-to-reg implementation. Patch by Jin Lin! Differential Revision: https://reviews.llvm.org/D44595 llvm-svn: 328766
Diffstat (limited to 'llvm/lib/Target')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud