[PATCH] D62604: [CodeGen] Generic Hardware Loop Support
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 08:53:05 PDT 2019
samparker created this revision.
samparker added reviewers: hfinkel, inouehrs, lei, markus, JonChesterfield.
Herald added subscribers: jsji, jfb, kbarton, mgorny, nemanjai.
Patch which introduces a target-independent framework for generating hardware loops at the IR level. Most of the code has been taken from PowerPC CTRLoops and PowerPC has been ported over to use this generic pass. The target dependent parts have been moved into TargetTransformInfo, via isHardwareLoopProfitable, with HardwareLoopInfo introduced to transfer information from the backend.
Three generic intrinsics have been introduced:
- void @llvm.set_loop_iterations. Takes as a single operand, the number of iterations to be executed.
- anyint @llvm.loop_decrement(anyint). Takes the maximum number of elements processed in an iteration of the loop body. Returns the number of elements that remain to be processed.
- anyint @llvm.loop_decrement_reg(anyint, anyint). Takes the number of elements remaining to be processed as well as the maximum number of elements processed in an iteration of the loop body. Returns the updated number of elements remaining.
https://reviews.llvm.org/D62604
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/CodeGen/Passes.h
include/llvm/IR/Intrinsics.td
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/HardwareLoops.cpp
lib/Target/PowerPC/PPCCTRLoops.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.h
test/CodeGen/PowerPC/ctrloop-intrin.ll
test/CodeGen/PowerPC/ppc-passname.ll
test/Transforms/HardwareLoops/scalar-while.ll
tools/llc/llc.cpp
tools/opt/opt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62604.201940.patch
Type: text/x-patch
Size: 70698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190529/a1c0291b/attachment-0001.bin>
More information about the llvm-commits
mailing list