[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:
Davide Italiano 2017-07-14 21:20:29 +00:00
parent 79eefe9ee2
commit 33778b7f13

View File

@ -35,8 +35,6 @@ private:
bool addFeatureAttributes(Function &F); bool addFeatureAttributes(Function &F);
void addAttrToCallers(Function &Intrin, StringRef AttrName);
public: public:
static char ID; static char ID;
@ -255,20 +253,6 @@ bool AMDGPUAnnotateKernelFeatures::addFeatureAttributes(Function &F) {
return Changed; 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) { bool AMDGPUAnnotateKernelFeatures::runOnSCC(CallGraphSCC &SCC) {
Module &M = SCC.getCallGraph().getModule(); Module &M = SCC.getCallGraph().getModule();
Triple TT(M.getTargetTriple()); Triple TT(M.getTargetTriple());