Skip to content

Commit a58b62b

Browse files
committed
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOperand(). I also made a few cleanups in here. For example, to removes use of getElementType on a pointer when we could just use getFunctionType from the call. Differential Revision: https://reviews.llvm.org/D78882
1 parent 756ba35 commit a58b62b

File tree

71 files changed

+161
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+161
-173
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,10 +2701,10 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
27012701

27022702
bool doRetainAutorelease;
27032703

2704-
if (call->getCalledValue() == CGF.CGM.getObjCEntrypoints().objc_retain) {
2704+
if (call->getCalledOperand() == CGF.CGM.getObjCEntrypoints().objc_retain) {
27052705
doRetainAutorelease = true;
2706-
} else if (call->getCalledValue() == CGF.CGM.getObjCEntrypoints()
2707-
.objc_retainAutoreleasedReturnValue) {
2706+
} else if (call->getCalledOperand() ==
2707+
CGF.CGM.getObjCEntrypoints().objc_retainAutoreleasedReturnValue) {
27082708
doRetainAutorelease = false;
27092709

27102710
// If we emitted an assembly marker for this call (and the
@@ -2720,8 +2720,8 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
27202720
assert(prev);
27212721
}
27222722
assert(isa<llvm::CallInst>(prev));
2723-
assert(cast<llvm::CallInst>(prev)->getCalledValue() ==
2724-
CGF.CGM.getObjCEntrypoints().retainAutoreleasedReturnValueMarker);
2723+
assert(cast<llvm::CallInst>(prev)->getCalledOperand() ==
2724+
CGF.CGM.getObjCEntrypoints().retainAutoreleasedReturnValueMarker);
27252725
InstsToKill.push_back(prev);
27262726
}
27272727
} else {
@@ -2764,8 +2764,8 @@ static llvm::Value *tryRemoveRetainOfSelf(CodeGenFunction &CGF,
27642764
// Look for a retain call.
27652765
llvm::CallInst *retainCall =
27662766
dyn_cast<llvm::CallInst>(result->stripPointerCasts());
2767-
if (!retainCall ||
2768-
retainCall->getCalledValue() != CGF.CGM.getObjCEntrypoints().objc_retain)
2767+
if (!retainCall || retainCall->getCalledOperand() !=
2768+
CGF.CGM.getObjCEntrypoints().objc_retain)
27692769
return nullptr;
27702770

27712771
// Look for an ordinary load of 'self'.

clang/lib/CodeGen/CGObjC.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,8 @@ llvm::Value *CodeGenFunction::EmitARCRetainBlock(llvm::Value *value,
21602160
if (!mandatory && isa<llvm::Instruction>(result)) {
21612161
llvm::CallInst *call
21622162
= cast<llvm::CallInst>(result->stripPointerCasts());
2163-
assert(call->getCalledValue() == CGM.getObjCEntrypoints().objc_retainBlock);
2163+
assert(call->getCalledOperand() ==
2164+
CGM.getObjCEntrypoints().objc_retainBlock);
21642165

21652166
call->setMetadata("clang.arc.copy_on_escape",
21662167
llvm::MDNode::get(Builder.getContext(), None));

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ void CodeGenFunction::emitAlignmentAssumptionCheck(
24642464
llvm::Value *OffsetValue, llvm::Value *TheCheck,
24652465
llvm::Instruction *Assumption) {
24662466
assert(Assumption && isa<llvm::CallInst>(Assumption) &&
2467-
cast<llvm::CallInst>(Assumption)->getCalledValue() ==
2467+
cast<llvm::CallInst>(Assumption)->getCalledOperand() ==
24682468
llvm::Intrinsic::getDeclaration(
24692469
Builder.GetInsertBlock()->getParent()->getParent(),
24702470
llvm::Intrinsic::assume) &&

lldb/source/Expression/IRInterpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ bool IRInterpreter::Interpret(llvm::Module &module, llvm::Function &function,
13711371

13721372
// Find the address of the callee function
13731373
lldb_private::Scalar I;
1374-
const llvm::Value *val = call_inst->getCalledValue();
1374+
const llvm::Value *val = call_inst->getCalledOperand();
13751375

13761376
if (!frame.EvaluateValue(I, val, module)) {
13771377
error.SetErrorToGenericError();

lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class ObjcObjectChecker : public Instrumenter {
465465
}
466466

467467
static llvm::Function *GetCalledFunction(llvm::CallInst *inst) {
468-
return GetFunction(inst->getCalledValue());
468+
return GetFunction(inst->getCalledOperand());
469469
}
470470

471471
bool InspectInstruction(llvm::Instruction &i) override {

lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ bool IRForTarget::RemoveCXAAtExit(BasicBlock &basic_block) {
13951395
if (func && func->getName() == "__cxa_atexit")
13961396
remove = true;
13971397

1398-
llvm::Value *val = call->getCalledValue();
1398+
llvm::Value *val = call->getCalledOperand();
13991399

14001400
if (val && val->getName() == "__cxa_atexit")
14011401
remove = true;

llvm/include/llvm-c/Core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,8 +3252,8 @@ LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C);
32523252
* This expects an LLVMValueRef that corresponds to a llvm::CallInst or
32533253
* llvm::InvokeInst.
32543254
*
3255-
* @see llvm::CallInst::getCalledValue()
3256-
* @see llvm::InvokeInst::getCalledValue()
3255+
* @see llvm::CallInst::getCalledOperand()
3256+
* @see llvm::InvokeInst::getCalledOperand()
32573257
*/
32583258
LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr);
32593259

llvm/include/llvm/CodeGen/FastISel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class FastISel {
127127
const CallBase &Call,
128128
unsigned FixedArgs = ~0U) {
129129
RetTy = ResultTy;
130-
Callee = Call.getCalledValue();
130+
Callee = Call.getCalledOperand();
131131
Symbol = Target;
132132

133133
IsInReg = Call.hasRetAttr(Attribute::InReg);

llvm/include/llvm/IR/AbstractCallSite.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,16 @@ class AbstractCallSite {
201201
}
202202

203203
/// Return the pointer to function that is being called.
204-
Value *getCalledValue() const {
204+
Value *getCalledOperand() const {
205205
if (isDirectCall())
206-
return CB->getCalledValue();
206+
return CB->getCalledOperand();
207207
return CB->getArgOperand(getCallArgOperandNoForCallee());
208208
}
209209

210210
/// Return the function being called if this is a direct call, otherwise
211211
/// return null (if it's an indirect call).
212212
Function *getCalledFunction() const {
213-
Value *V = getCalledValue();
213+
Value *V = getCalledOperand();
214214
return V ? dyn_cast<Function>(V->stripPointerCasts()) : nullptr;
215215
}
216216
};

llvm/include/llvm/IR/InstrTypes.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,10 +1286,6 @@ class CallBase : public Instruction {
12861286

12871287
Value *getCalledOperand() const { return Op<CalledOperandOpEndIdx>(); }
12881288

1289-
// DEPRECATED: This routine will be removed in favor of `getCalledOperand` in
1290-
// the near future.
1291-
Value *getCalledValue() const { return getCalledOperand(); }
1292-
12931289
const Use &getCalledOperandUse() const { return Op<CalledOperandOpEndIdx>(); }
12941290
Use &getCalledOperandUse() { return Op<CalledOperandOpEndIdx>(); }
12951291

llvm/lib/Analysis/AliasAnalysisEvaluator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void AAEvaluator::runInternal(Function &F, AAResults &AA) {
114114
Stores.insert(&*I);
115115
Instruction &Inst = *I;
116116
if (auto *Call = dyn_cast<CallBase>(&Inst)) {
117-
Value *Callee = Call->getCalledValue();
117+
Value *Callee = Call->getCalledOperand();
118118
// Skip actual functions for direct function calls.
119119
if (!isa<Function>(Callee) && isInterestingPointer(Callee))
120120
Pointers.insert(Callee);

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5407,7 +5407,7 @@ static Value *simplifyIntrinsic(CallBase *Call, const SimplifyQuery &Q) {
54075407
}
54085408

54095409
Value *llvm::SimplifyCall(CallBase *Call, const SimplifyQuery &Q) {
5410-
Value *Callee = Call->getCalledValue();
5410+
Value *Callee = Call->getCalledOperand();
54115411

54125412
// musttail calls can only be simplified if they are also DCEd.
54135413
// As we can't guarantee this here, don't simplify them.

llvm/lib/Analysis/Lint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void Lint::visitFunction(Function &F) {
220220
}
221221

222222
void Lint::visitCallBase(CallBase &I) {
223-
Value *Callee = I.getCalledValue();
223+
Value *Callee = I.getCalledOperand();
224224

225225
visitMemoryReference(I, Callee, MemoryLocation::UnknownSize, 0, nullptr,
226226
MemRef::Callee);

llvm/lib/Analysis/MemorySSA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class MemoryLocOrCall {
167167
if (!IsCall)
168168
return Loc == Other.Loc;
169169

170-
if (Call->getCalledValue() != Other.Call->getCalledValue())
170+
if (Call->getCalledOperand() != Other.Call->getCalledOperand())
171171
return false;
172172

173173
return Call->arg_size() == Other.Call->arg_size() &&
@@ -203,7 +203,7 @@ template <> struct DenseMapInfo<MemoryLocOrCall> {
203203

204204
hash_code hash =
205205
hash_combine(MLOC.IsCall, DenseMapInfo<const Value *>::getHashValue(
206-
MLOC.getCall()->getCalledValue()));
206+
MLOC.getCall()->getCalledOperand()));
207207

208208
for (const Value *Arg : MLOC.getCall()->args())
209209
hash = hash_combine(hash, DenseMapInfo<const Value *>::getHashValue(Arg));

llvm/lib/Analysis/ModuleSummaryAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static void computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
316316
if (HasLocalsInUsedOrAsm && CI && CI->isInlineAsm())
317317
HasInlineAsmMaybeReferencingInternal = true;
318318

319-
auto *CalledValue = CB->getCalledValue();
319+
auto *CalledValue = CB->getCalledOperand();
320320
auto *CalledFunction = CB->getCalledFunction();
321321
if (CalledValue && !CalledFunction) {
322322
CalledValue = CalledValue->stripPointerCasts();

llvm/lib/Analysis/StackSafetyAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ bool StackSafetyLocalAnalysis::analyzeAllUses(const Value *Ptr, UseInfo &US) {
353353
// Do not follow aliases, otherwise we could inadvertently follow
354354
// dso_preemptable aliases or aliases with interposable linkage.
355355
const GlobalValue *Callee =
356-
dyn_cast<GlobalValue>(CB.getCalledValue()->stripPointerCasts());
356+
dyn_cast<GlobalValue>(CB.getCalledOperand()->stripPointerCasts());
357357
if (!Callee) {
358358
US.updateRange(UnknownRange);
359359
return false;

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,7 +2775,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
27752775

27762776
case Instruction::Invoke: {
27772777
const InvokeInst *II = cast<InvokeInst>(&I);
2778-
const Value *Callee = II->getCalledValue();
2778+
const Value *Callee = II->getCalledOperand();
27792779
FunctionType *FTy = II->getFunctionType();
27802780

27812781
if (II->hasOperandBundles())
@@ -2851,7 +2851,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
28512851
}
28522852
case Instruction::CallBr: {
28532853
const CallBrInst *CBI = cast<CallBrInst>(&I);
2854-
const Value *Callee = CBI->getCalledValue();
2854+
const Value *Callee = CBI->getCalledOperand();
28552855
FunctionType *FTy = CBI->getFunctionType();
28562856

28572857
if (CBI->hasOperandBundles())
@@ -3029,7 +3029,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
30293029
Vals.push_back(Flags);
30303030

30313031
Vals.push_back(VE.getTypeID(FTy));
3032-
pushValueAndType(CI.getCalledValue(), InstID, Vals); // Callee
3032+
pushValueAndType(CI.getCalledOperand(), InstID, Vals); // Callee
30333033

30343034
// Emit value #'s for the fixed parameters.
30353035
for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) {

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ bool CodeGenPrepare::optimizeCallInst(CallInst *CI, bool &ModifiedDT) {
18891889
// Lower inline assembly if we can.
18901890
// If we found an inline asm expession, and if the target knows how to
18911891
// lower it to normal LLVM code, do so now.
1892-
if (isa<InlineAsm>(CI->getCalledValue())) {
1892+
if (CI->isInlineAsm()) {
18931893
if (TLI->ExpandInlineAsm(CI)) {
18941894
// Avoid invalidating the iterator.
18951895
CurInstIterator = BB->begin();
@@ -4636,7 +4636,7 @@ static bool FindAllMemoryUses(
46364636
continue;
46374637
}
46384638

4639-
InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledValue());
4639+
InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledOperand());
46404640
if (!IA) return true;
46414641

46424642
// If this is a memory operand, we're cool, otherwise bail out.

llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, const CallBase &CB,
5252

5353
// Try looking through a bitcast from one function type to another.
5454
// Commonly happens with calls to objc_msgSend().
55-
const Value *CalleeV = CB.getCalledValue()->stripPointerCasts();
55+
const Value *CalleeV = CB.getCalledOperand()->stripPointerCasts();
5656
if (const Function *F = dyn_cast<Function>(CalleeV))
5757
Info.Callee = MachineOperand::CreateGA(F, 0);
5858
else

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ bool IRTranslator::translateCallBase(const CallBase &CB,
16071607
// scan is done to check if any instructions are calls.
16081608
bool Success =
16091609
CLI->lowerCall(MIRBuilder, CB, Res, Args, SwiftErrorVReg,
1610-
[&]() { return getOrCreateVReg(*CB.getCalledValue()); });
1610+
[&]() { return getOrCreateVReg(*CB.getCalledOperand()); });
16111611

16121612
// Check if we just inserted a tail call.
16131613
if (Success) {
@@ -1712,9 +1712,8 @@ bool IRTranslator::translateInvoke(const User &U,
17121712
const BasicBlock *ReturnBB = I.getSuccessor(0);
17131713
const BasicBlock *EHPadBB = I.getSuccessor(1);
17141714

1715-
const Value *Callee = I.getCalledValue();
1716-
const Function *Fn = dyn_cast<Function>(Callee);
1717-
if (isa<InlineAsm>(Callee))
1715+
const Function *Fn = I.getCalledFunction();
1716+
if (I.isInlineAsm())
17181717
return false;
17191718

17201719
// FIXME: support invoking patchpoint and statepoint intrinsics.

llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void InlineAsmLowering::anchor() {}
3232
bool InlineAsmLowering::lowerInlineAsm(MachineIRBuilder &MIRBuilder,
3333
const CallBase &Call) const {
3434

35-
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledValue());
35+
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledOperand());
3636
StringRef ConstraintStr = IA->getConstraintString();
3737

3838
bool HasOnlyMemoryClobber = false;

llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static bool lowerLoadRelative(Function &F) {
3939
for (auto I = F.use_begin(), E = F.use_end(); I != E;) {
4040
auto CI = dyn_cast<CallInst>(I->getUser());
4141
++I;
42-
if (!CI || CI->getCalledValue() != &F)
42+
if (!CI || CI->getCalledOperand() != &F)
4343
continue;
4444

4545
IRBuilder<> B(CI);

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ bool FastISel::lowerCall(const CallInst *CI) {
12901290
IsTailCall = false;
12911291

12921292
CallLoweringInfo CLI;
1293-
CLI.setCallee(RetTy, FuncTy, CI->getCalledValue(), std::move(Args), *CI)
1293+
CLI.setCallee(RetTy, FuncTy, CI->getCalledOperand(), std::move(Args), *CI)
12941294
.setTailCall(IsTailCall);
12951295

12961296
return lowerCallTo(CLI);
@@ -1300,7 +1300,7 @@ bool FastISel::selectCall(const User *I) {
13001300
const CallInst *Call = cast<CallInst>(I);
13011301

13021302
// Handle simple inline asms.
1303-
if (const InlineAsm *IA = dyn_cast<InlineAsm>(Call->getCalledValue())) {
1303+
if (const InlineAsm *IA = dyn_cast<InlineAsm>(Call->getCalledOperand())) {
13041304
// If the inline asm has side effects, then make sure that no local value
13051305
// lives across by flushing the local value map.
13061306
if (IA->hasSideEffects())

llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
183183

184184
// Look for inline asm that clobbers the SP register.
185185
if (auto *Call = dyn_cast<CallBase>(&I)) {
186-
if (isa<InlineAsm>(Call->getCalledValue())) {
186+
if (Call->isInlineAsm()) {
187187
unsigned SP = TLI->getStackPointerRegisterToSaveRestore();
188188
const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
189189
std::vector<TargetLowering::AsmOperandInfo> Ops =

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static void diagnosePossiblyInvalidConstraint(LLVMContext &Ctx, const Value *V,
346346

347347
const char *AsmError = ", possible invalid constraint for vector type";
348348
if (const CallInst *CI = dyn_cast<CallInst>(I))
349-
if (isa<InlineAsm>(CI->getCalledValue()))
349+
if (isa<InlineAsm>(CI->getCalledOperand()))
350350
return Ctx.emitError(I, ErrMsg + AsmError);
351351

352352
return Ctx.emitError(I, ErrMsg);
@@ -2776,7 +2776,7 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
27762776
LLVMContext::OB_cfguardtarget}) &&
27772777
"Cannot lower invokes with arbitrary operand bundles yet!");
27782778

2779-
const Value *Callee(I.getCalledValue());
2779+
const Value *Callee(I.getCalledOperand());
27802780
const Function *Fn = dyn_cast<Function>(Callee);
27812781
if (isa<InlineAsm>(Callee))
27822782
visitInlineAsm(I);
@@ -2856,7 +2856,7 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
28562856
{LLVMContext::OB_deopt, LLVMContext::OB_funclet}) &&
28572857
"Cannot lower callbrs with arbitrary operand bundles yet!");
28582858

2859-
assert(isa<InlineAsm>(I.getCalledValue()) &&
2859+
assert(isa<InlineAsm>(I.getCalledOperand()) &&
28602860
"Only know how to handle inlineasm callbr");
28612861
visitInlineAsm(I);
28622862
CopyToExportRegsIfNeeded(&I);
@@ -7476,7 +7476,7 @@ bool SelectionDAGBuilder::visitBinaryFloatCall(const CallInst &I,
74767476

74777477
void SelectionDAGBuilder::visitCall(const CallInst &I) {
74787478
// Handle inline assembly differently.
7479-
if (isa<InlineAsm>(I.getCalledValue())) {
7479+
if (I.isInlineAsm()) {
74807480
visitInlineAsm(I);
74817481
return;
74827482
}
@@ -7648,7 +7648,7 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
76487648
LLVMContext::OB_cfguardtarget}) &&
76497649
"Cannot lower calls with arbitrary operand bundles!");
76507650

7651-
SDValue Callee = getValue(I.getCalledValue());
7651+
SDValue Callee = getValue(I.getCalledOperand());
76527652

76537653
if (I.countOperandBundlesOfType(LLVMContext::OB_deopt))
76547654
LowerCallSiteWithDeoptBundle(&I, Callee, nullptr);
@@ -7949,7 +7949,7 @@ class ExtraFlags {
79497949

79507950
public:
79517951
explicit ExtraFlags(const CallBase &Call) {
7952-
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledValue());
7952+
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledOperand());
79537953
if (IA->hasSideEffects())
79547954
Flags |= InlineAsm::Extra_HasSideEffects;
79557955
if (IA->isAlignStack())
@@ -7982,7 +7982,7 @@ class ExtraFlags {
79827982

79837983
/// visitInlineAsm - Handle a call to an InlineAsm object.
79847984
void SelectionDAGBuilder::visitInlineAsm(const CallBase &Call) {
7985-
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledValue());
7985+
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledOperand());
79867986

79877987
/// ConstraintOperands - Information about all of the constraints.
79887988
SDISelAsmOperandInfoVector ConstraintOperands;
@@ -8656,7 +8656,7 @@ void SelectionDAGBuilder::visitStackmap(const CallInst &CI) {
86568656
SmallVector<SDValue, 32> Ops;
86578657

86588658
SDLoc DL = getCurSDLoc();
8659-
Callee = getValue(CI.getCalledValue());
8659+
Callee = getValue(CI.getCalledOperand());
86608660
NullPtr = DAG.getIntPtrConstant(0, DL, true);
86618661

86628662
// The stackmap intrinsic only records the live variables (the arguments

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4321,7 +4321,7 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
43214321
const CallBase &Call) const {
43224322
/// Information about all of the constraints.
43234323
AsmOperandInfoVector ConstraintOperands;
4324-
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledValue());
4324+
const InlineAsm *IA = cast<InlineAsm>(Call.getCalledOperand());
43254325
unsigned maCount = 0; // Largest number of multiple alternative constraints.
43264326

43274327
// Do a prepass over the constraints, canonicalizing them, and building up the

0 commit comments

Comments
 (0)