[PATCH] D134780: [AMDGPU] Add MIMG NSA threshold configuration attribute
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 05:34:22 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:59
+ cl::desc("Number of addresses from which to enable MIMG NSA."),
+ cl::init(3), cl::Hidden);
+
----------------
On the "don't repeat yourself" principle you could either remove the cl::init here...
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:959
+ if (NSAThreshold.getNumOccurrences() > 0)
+ return std::max(NSAThreshold.getValue(), 2u);
+
----------------
I don't think you need the .getValue().
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:965
+
+ return 3;
+}
----------------
... or return NSAThreshold here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134780/new/
https://reviews.llvm.org/D134780
More information about the llvm-commits
mailing list