aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2022-07-27 21:38:11 +0000
committerPaul Kirth <paulkirth@google.com>2022-07-27 21:38:11 +0000
commit6e9bab71b626183211625f150cc25fa22cb0973c (patch)
tree0980e161128b3a6244ef0172d76f70fb38bcc1e5 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent300c9a78819b4608b96bb26f9320bea6b8a0c4d0 (diff)
downloadllvm-6e9bab71b626183211625f150cc25fa22cb0973c.zip
llvm-6e9bab71b626183211625f150cc25fa22cb0973c.tar.gz
llvm-6e9bab71b626183211625f150cc25fa22cb0973c.tar.bz2
Revert "[llvm][NFC] Refactor code to use ProfDataUtils"
This reverts commit 300c9a78819b4608b96bb26f9320bea6b8a0c4d0. We will reland once these issues are ironed out.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index 1c44ccb..023a0af 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -30,7 +30,6 @@
#include "llvm/IR/Dominators.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/ProfDataUtils.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -472,7 +471,7 @@ static void updateLatchBranchWeightsForRemainderLoop(Loop *OrigLoop,
uint64_t TrueWeight, FalseWeight;
BranchInst *LatchBR =
cast<BranchInst>(OrigLoop->getLoopLatch()->getTerminator());
- if (!extractBranchWeights(*LatchBR, TrueWeight, FalseWeight))
+ if (!LatchBR->extractProfMetadata(TrueWeight, FalseWeight))
return;
uint64_t ExitWeight = LatchBR->getSuccessor(0) == OrigLoop->getHeader()
? FalseWeight