aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorDaniil Fukalov <1671137+dfukalov@users.noreply.github.com>2022-08-18 02:34:22 +0300
committerDaniil Fukalov <1671137+dfukalov@users.noreply.github.com>2022-08-26 16:37:32 +0300
commit9c710ebbdb6079b4176c1b89daf525f0f0e6499c (patch)
tree6ddacb1c45a7ab2cd9930cbd271bed35b9607609 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parentaf8477f2bcac2620c4c30c556c4c4f6b5d5b970b (diff)
downloadllvm-9c710ebbdb6079b4176c1b89daf525f0f0e6499c.zip
llvm-9c710ebbdb6079b4176c1b89daf525f0f0e6499c.tar.gz
llvm-9c710ebbdb6079b4176c1b89daf525f0f0e6499c.tar.bz2
[TTI] NFC: Reduce InstructionCost::getValue() usage...
in order to propagate `InstructionCost` value upper. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D103406
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 1d55299..7bb7cea 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -316,7 +316,7 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
L->dump());
return Rotated;
}
- if (*Metrics.NumInsts.getValue() > MaxHeaderSize) {
+ if (Metrics.NumInsts > MaxHeaderSize) {
LLVM_DEBUG(dbgs() << "LoopRotation: NOT rotating - contains "
<< Metrics.NumInsts
<< " instructions, which is more than the threshold ("