[llvm] 9a7519f - Revert "[NFC][AMDGPU][Attributor] Exit earlier if entry CC (#114177)"
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 21:53:51 PDT 2024
Author: Shilei Tian
Date: 2024-10-30T00:53:43-04:00
New Revision: 9a7519fdb39f21a807189e1ed06826b43db929e1
URL: https://github.com/llvm/llvm-project/commit/9a7519fdb39f21a807189e1ed06826b43db929e1
DIFF: https://github.com/llvm/llvm-project/commit/9a7519fdb39f21a807189e1ed06826b43db929e1.diff
LOG: Revert "[NFC][AMDGPU][Attributor] Exit earlier if entry CC (#114177)"
This reverts commit 922a0d3dfe2db7a2ef50e8cef4537fa94a7b95bb.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
index 04d3e482359ade..6a69b9d2bfc716 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
@@ -767,17 +767,14 @@ struct AAAMDFlatWorkGroupSize : public AAAMDSizeRangeAttribute {
void initialize(Attributor &A) override {
Function *F = getAssociatedFunction();
-
- if (AMDGPU::isEntryFunctionCC(F->getCallingConv())) {
- indicatePessimisticFixpoint();
- return;
- }
-
auto &InfoCache = static_cast<AMDGPUInformationCache &>(A.getInfoCache());
unsigned MinGroupSize, MaxGroupSize;
std::tie(MinGroupSize, MaxGroupSize) = InfoCache.getFlatWorkGroupSizes(*F);
intersectKnown(
ConstantRange(APInt(32, MinGroupSize), APInt(32, MaxGroupSize + 1)));
+
+ if (AMDGPU::isEntryFunctionCC(F->getCallingConv()))
+ indicatePessimisticFixpoint();
}
ChangeStatus updateImpl(Attributor &A) override {
@@ -836,12 +833,6 @@ struct AAAMDWavesPerEU : public AAAMDSizeRangeAttribute {
void initialize(Attributor &A) override {
Function *F = getAssociatedFunction();
-
- if (AMDGPU::isEntryFunctionCC(F->getCallingConv())) {
- indicatePessimisticFixpoint();
- return;
- }
-
auto &InfoCache = static_cast<AMDGPUInformationCache &>(A.getInfoCache());
if (const auto *AssumedGroupSize = A.getAAFor<AAAMDFlatWorkGroupSize>(
@@ -856,6 +847,9 @@ struct AAAMDWavesPerEU : public AAAMDSizeRangeAttribute {
ConstantRange Range(APInt(32, Min), APInt(32, Max + 1));
intersectKnown(Range);
}
+
+ if (AMDGPU::isEntryFunctionCC(F->getCallingConv()))
+ indicatePessimisticFixpoint();
}
ChangeStatus updateImpl(Attributor &A) override {
More information about the llvm-commits
mailing list