[PATCH] D157599: [AMDGPU] Do not release VGPRs at -O0
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 03:52:47 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1039
if (ST->getGeneration() >= AMDGPUSubtarget::GFX11 &&
+ MI.getMF()->getTarget().getOptLevel() != CodeGenOpt::None &&
ScoreBrackets.getScoreRange(VS_CNT) != 0 &&
----------------
arsenm wrote:
> foad wrote:
> > arsenm wrote:
> > > should also account for optnone on the function
> > Is there a helper I can use that takes both of these into account? In the whole of the backend I only see one explicit check for F.hasOptNone(), in AMDGPURegBankSelect.
> I'm not sure, we don't have many of these skip optimizations in mandatory passes types of checks. Usually optnone is considered by skipFunction at the start of the pass, and the pass isn't added at -O0 to begin with
I'd just add an optnone member and set it at the start of the function from optnone/opt level
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157599/new/
https://reviews.llvm.org/D157599
More information about the llvm-commits
mailing list