Lines Matching +full:gpu +full:- +full:id
1 //===-- AMDGPURemoveIncompatibleFunctions.cpp -----------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// This pass replaces all uses of functions that use GPU features
11 /// incompatible with the current GPU with null then deletes the function.
13 //===----------------------------------------------------------------------===//
24 #define DEBUG_TYPE "amdgpu-remove-incompatible-functions"
30 AMDGPUFeatureKV[AMDGPU::NumSubtargetFeatures - 1];
39 static char ID;
42 : ModulePass(ID), TM(TM) {
56 assert(TM->getTargetTriple().isAMDGCN());
65 F->replaceAllUsesWith(ConstantPointerNull::get(F->getType()));
66 F->eraseFromParent();
140 static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F));
142 // Check the GPU isn't generic or generic-hsa. Generic is used for testing
144 StringRef GPUName = ST->getCPU();
148 // Try to fetch the GPU's info. If we can't, it's likely an unknown processor
154 // Get all the features implied by the current GPU, and recursively expand
160 expandImpliedFeatures(GPUInfo->Implies.getAsBitset());
163 // the chosen GPU, check our list of "suspicious" features.
166 // GPU's feature set. We only check a predetermined set of features.
168 if (ST->hasFeature(Feature) && !GPUFeatureBits.test(Feature)) {
178 if (ST->getGeneration() < AMDGPUSubtarget::GFX10 &&
179 ST->hasFeature(AMDGPU::FeatureWavefrontSize32)) {
189 char AMDGPURemoveIncompatibleFunctions::ID = 0;