diff options
author | Shilei Tian <i@tianshilei.me> | 2024-10-30 00:53:43 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2024-10-30 00:53:43 -0400 |
commit | 9a7519fdb39f21a807189e1ed06826b43db929e1 (patch) | |
tree | aec6c6f0c1febefecff6026a6a55f5f2cd974fb0 | |
parent | 922a0d3dfe2db7a2ef50e8cef4537fa94a7b95bb (diff) | |
download | llvm-9a7519fdb39f21a807189e1ed06826b43db929e1.zip llvm-9a7519fdb39f21a807189e1ed06826b43db929e1.tar.gz llvm-9a7519fdb39f21a807189e1ed06826b43db929e1.tar.bz2 |
Revert "[NFC][AMDGPU][Attributor] Exit earlier if entry CC (#114177)"
This reverts commit 922a0d3dfe2db7a2ef50e8cef4537fa94a7b95bb.
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp index 04d3e48..6a69b9d 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 { |