Skip to content

Commit

Permalink
Revert again "[AMDGPU] Do not assume stack size for PAL code object i…
Browse files Browse the repository at this point in the history
…ndirect calls"

This reverts commit a22e10e.

The commit caused page faults in Counter Strike 2.

Change-Id: Ieab95f0f9dfaad7d3587f03bfb10eaca03c51155
  • Loading branch information
piotrAMD committed Dec 18, 2023
1 parent 145f893 commit c46f923
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,14 @@ bool AMDGPUResourceUsageAnalysis::runOnModule(Module &M) {

MachineModuleInfo &MMI = getAnalysis<MachineModuleInfoWrapperPass>().getMMI();
const TargetMachine &TM = TPC->getTM<TargetMachine>();
const MCSubtargetInfo &STI = *TM.getMCSubtargetInfo();
bool HasIndirectCall = false;

CallGraph CG = CallGraph(M);
auto End = po_end(&CG);

// By default, for code object v5 and later, track only the minimum scratch
// size
if (AMDGPU::getCodeObjectVersion(M) >= AMDGPU::AMDHSA_COV5 ||
STI.getTargetTriple().getOS() == Triple::AMDPAL) {
if (AMDGPU::getCodeObjectVersion(M) >= AMDGPU::AMDHSA_COV5) {
if (!AssumedStackSizeForDynamicSizeObjects.getNumOccurrences())
AssumedStackSizeForDynamicSizeObjects = 0;
if (!AssumedStackSizeForExternalCall.getNumOccurrences())
Expand Down
17 changes: 0 additions & 17 deletions llvm/test/CodeGen/AMDGPU/resource-usage-pal.ll

This file was deleted.

0 comments on commit c46f923

Please sign in to comment.