We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60b6f43 commit 351a4b2Copy full SHA for 351a4b2
llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
@@ -65,10 +65,7 @@ static const Function *getCalleeFunction(const MachineOperand &Op) {
65
assert(Op.getImm() == 0);
66
return nullptr;
67
}
68
- const GlobalValue *GV = Op.getGlobal();
69
- while (auto *GA = dyn_cast<GlobalAlias>(GV))
70
- GV = cast<GlobalValue>(GA->getOperand(0));
71
- return cast<Function>(GV);
+ return cast<Function>(Op.getGlobal()->stripPointerCastsAndAliases());
72
73
74
static bool hasAnyNonFlatUseOfReg(const MachineRegisterInfo &MRI,
0 commit comments