[PATCH] D147408: [AMDGPU] Enable AMDGPU Atomic Optimizer Pass by default.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 06:45:43 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:609
Op == AtomicRMWInst::Sub ? AtomicRMWInst::Add : Op;
- if (!NeedResult && ST->hasPermLaneX16()) {
- // On GFX10 the permlanex16 instruction helps us build a reduction without
- // too many readlanes and writelanes, which are generally bad for
- // performance.
- NewV = buildReduction(B, ScanOp, NewV, Identity);
+ if (IsGraphicsShader) {
+ // First we need to set all inactive invocations to the identity value, so
----------------
cdevadas wrote:
> I'm not sure if this should get enabled for all graphics CCs. @foad can you confirm?
I think part of the point of doing this is to stop special casing graphics usage. Semantically the shaderiness shouldn't matter. A strategy switch would be a separate control if we wanted such a thing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147408/new/
https://reviews.llvm.org/D147408
More information about the llvm-commits
mailing list