[PATCH] D78275: [CallSite removal][CodeGen] Remove CallSite use from BasicTTIImpl.h. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 11:10:22 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c7d917701f9: [CallSite removal][CodeGen] Remove CallSite use from BasicTTIImpl.h. NFC (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78275/new/
https://reviews.llvm.org/D78275
Files:
llvm/include/llvm/CodeGen/BasicTTIImpl.h
Index: llvm/include/llvm/CodeGen/BasicTTIImpl.h
===================================================================
--- llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -29,7 +29,6 @@
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
@@ -479,20 +478,17 @@
return;
// Scan the loop: don't unroll loops with calls.
- for (Loop::block_iterator I = L->block_begin(), E = L->block_end(); I != E;
- ++I) {
- BasicBlock *BB = *I;
-
- for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); J != JE; ++J)
- if (isa<CallInst>(J) || isa<InvokeInst>(J)) {
- ImmutableCallSite CS(&*J);
- if (const Function *F = CS.getCalledFunction()) {
+ for (BasicBlock *BB : L->blocks()) {
+ for (Instruction &I : *BB) {
+ if (isa<CallInst>(I) || isa<InvokeInst>(I)) {
+ if (const Function *F = cast<CallBase>(I).getCalledFunction()) {
if (!static_cast<T *>(this)->isLoweredToCall(F))
continue;
}
return;
}
+ }
}
// Enable runtime and partial unrolling up to the specified size.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78275.258102.patch
Type: text/x-patch
Size: 1354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/10ce4fe8/attachment.bin>
More information about the llvm-commits
mailing list