[PATCH] D68579: [HardwareLoops] Optimisation remarks
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 14:06:19 PDT 2019
hiraditya added inline comments.
================
Comment at: llvm/lib/CodeGen/HardwareLoops.cpp:83
+ dbgs() << "HWLoops: " << DebugMsg;
+ if (I != nullptr)
+ dbgs() << " " << *I;
----------------
`if (I)`
================
Comment at: llvm/lib/CodeGen/HardwareLoops.cpp:84
+ if (I != nullptr)
+ dbgs() << " " << *I;
+ else
----------------
nit, ' '
================
Comment at: llvm/lib/CodeGen/HardwareLoops.cpp:254
- if (TTI->isHardwareLoopProfitable(L, *SE, *AC, LibInfo, HWLoopInfo) ||
- ForceHardwareLoops) {
-
- // Allow overriding of the counter width and loop decrement value.
- if (CounterBitWidth.getNumOccurrences())
- HWLoopInfo.CountType =
- IntegerType::get(M->getContext(), CounterBitWidth);
+ if (!TTI->isHardwareLoopProfitable(L, *SE, *AC, LibInfo, HWLoopInfo) &&
+ !ForceHardwareLoops) {
----------------
Checking `ForceHardwareLoops` should be cheaper, so we can check that first.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68579/new/
https://reviews.llvm.org/D68579
More information about the llvm-commits
mailing list