mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 11:49:50 +00:00
[AMDGPU] Throw away more dead code. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79eefe9ee2
commit
33778b7f13
@ -35,8 +35,6 @@ private:
|
||||
|
||||
bool addFeatureAttributes(Function &F);
|
||||
|
||||
void addAttrToCallers(Function &Intrin, StringRef AttrName);
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
@ -255,20 +253,6 @@ bool AMDGPUAnnotateKernelFeatures::addFeatureAttributes(Function &F) {
|
||||
return Changed;
|
||||
}
|
||||
|
||||
void AMDGPUAnnotateKernelFeatures::addAttrToCallers(Function &Intrin,
|
||||
StringRef AttrName) {
|
||||
SmallPtrSet<Function *, 4> SeenFuncs;
|
||||
|
||||
for (User *U : Intrin.users()) {
|
||||
// CallInst is the only valid user for an intrinsic.
|
||||
CallInst *CI = cast<CallInst>(U);
|
||||
|
||||
Function *CallingFunction = CI->getParent()->getParent();
|
||||
if (SeenFuncs.insert(CallingFunction).second)
|
||||
CallingFunction->addFnAttr(AttrName);
|
||||
}
|
||||
}
|
||||
|
||||
bool AMDGPUAnnotateKernelFeatures::runOnSCC(CallGraphSCC &SCC) {
|
||||
Module &M = SCC.getCallGraph().getModule();
|
||||
Triple TT(M.getTargetTriple());
|
||||
|
Loading…
Reference in New Issue
Block a user