[llvm] 8eae660 - AMDGPU: Remove r600 local id annotations in AMDGPULowerIntrinsics
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 11:56:00 PDT 2023
Author: Matt Arsenault
Date: 2023-06-07T14:55:55-04:00
New Revision: 8eae660ae0bd0eaded7fca2bdc6002a3444aabaf
URL: https://github.com/llvm/llvm-project/commit/8eae660ae0bd0eaded7fca2bdc6002a3444aabaf
DIFF: https://github.com/llvm/llvm-project/commit/8eae660ae0bd0eaded7fca2bdc6002a3444aabaf.diff
LOG: AMDGPU: Remove r600 local id annotations in AMDGPULowerIntrinsics
With these dropped and memory intrinsic moved into a generic pass, we
can drop the whole pass.
No tests fail with this removed. The new amdgcn intrinsics are
annotated in clang up front. Theoretically may regress r600, but that
would need new testing and support work (r600 ideally would also
follow the clang handling). The regression would be any IR passes
making use of known bits between this point and codegen. The DAG
computeKnownBits understand the intrinsics directly now.
If we wanted to refine these values, a better place would be in
AMDGPUAttributor.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
index 93d1eed2cf636..f9b21e07ed6a7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
@@ -36,9 +36,6 @@ static cl::opt<int, true> MemIntrinsicExpandSizeThresholdOpt(
class AMDGPULowerIntrinsics : public ModulePass {
-private:
- bool makeLIDRangeMetadata(Function &F) const;
-
public:
static char ID;
@@ -120,26 +117,6 @@ bool AMDGPULowerIntrinsics::expandMemIntrinsicUses(Function &F) {
return Changed;
}
-bool AMDGPULowerIntrinsics::makeLIDRangeMetadata(Function &F) const {
- auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
- if (!TPC)
- return false;
-
- const TargetMachine &TM = TPC->getTM<TargetMachine>();
- bool Changed = false;
-
- for (auto *U : F.users()) {
- auto *CI = dyn_cast<CallInst>(U);
- if (!CI)
- continue;
-
- Function *Caller = CI->getParent()->getParent();
- const AMDGPUSubtarget &ST = AMDGPUSubtarget::get(TM, *Caller);
- Changed |= ST.makeLIDRangeMetadata(CI);
- }
- return Changed;
-}
-
bool AMDGPULowerIntrinsics::runOnModule(Module &M) {
bool Changed = false;
@@ -154,16 +131,6 @@ bool AMDGPULowerIntrinsics::runOnModule(Module &M) {
if (expandMemIntrinsicUses(F))
Changed = true;
break;
-
- case Intrinsic::r600_read_tidig_x:
- case Intrinsic::r600_read_tidig_y:
- case Intrinsic::r600_read_tidig_z:
- case Intrinsic::r600_read_local_size_x:
- case Intrinsic::r600_read_local_size_y:
- case Intrinsic::r600_read_local_size_z:
- Changed |= makeLIDRangeMetadata(F);
- break;
-
default:
break;
}
More information about the llvm-commits
mailing list