Skip to content

Commit 9a7519f

Browse files
committed
Revert "[NFC][AMDGPU][Attributor] Exit earlier if entry CC (#114177)"
This reverts commit 922a0d3.
1 parent 922a0d3 commit 9a7519f

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -767,17 +767,14 @@ struct AAAMDFlatWorkGroupSize : public AAAMDSizeRangeAttribute {
767767

768768
void initialize(Attributor &A) override {
769769
Function *F = getAssociatedFunction();
770-
771-
if (AMDGPU::isEntryFunctionCC(F->getCallingConv())) {
772-
indicatePessimisticFixpoint();
773-
return;
774-
}
775-
776770
auto &InfoCache = static_cast<AMDGPUInformationCache &>(A.getInfoCache());
777771
unsigned MinGroupSize, MaxGroupSize;
778772
std::tie(MinGroupSize, MaxGroupSize) = InfoCache.getFlatWorkGroupSizes(*F);
779773
intersectKnown(
780774
ConstantRange(APInt(32, MinGroupSize), APInt(32, MaxGroupSize + 1)));
775+
776+
if (AMDGPU::isEntryFunctionCC(F->getCallingConv()))
777+
indicatePessimisticFixpoint();
781778
}
782779

783780
ChangeStatus updateImpl(Attributor &A) override {
@@ -836,12 +833,6 @@ struct AAAMDWavesPerEU : public AAAMDSizeRangeAttribute {
836833

837834
void initialize(Attributor &A) override {
838835
Function *F = getAssociatedFunction();
839-
840-
if (AMDGPU::isEntryFunctionCC(F->getCallingConv())) {
841-
indicatePessimisticFixpoint();
842-
return;
843-
}
844-
845836
auto &InfoCache = static_cast<AMDGPUInformationCache &>(A.getInfoCache());
846837

847838
if (const auto *AssumedGroupSize = A.getAAFor<AAAMDFlatWorkGroupSize>(
@@ -856,6 +847,9 @@ struct AAAMDWavesPerEU : public AAAMDSizeRangeAttribute {
856847
ConstantRange Range(APInt(32, Min), APInt(32, Max + 1));
857848
intersectKnown(Range);
858849
}
850+
851+
if (AMDGPU::isEntryFunctionCC(F->getCallingConv()))
852+
indicatePessimisticFixpoint();
859853
}
860854

861855
ChangeStatus updateImpl(Attributor &A) override {

0 commit comments

Comments
 (0)