[llvm] [AMDGPU][NFC] Minor source cleanups in SIInsertWaitcnts (PR #181095)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 02:00:11 PST 2026
================
@@ -2972,7 +2973,7 @@ bool WaitcntBrackets::mergeAsyncMarks(ArrayRef<MergeInfo> MergeInfos,
// pending async operations at this checkpoint" and acts as the identity
// element for max() during merging. We pad at the beginning since the marks
// need to be aligned in most-recent order.
- CounterValueArray ZeroMark{};
+ constexpr CounterValueArray ZeroMark{};
----------------
ssahasra wrote:
Then you missed the point. My justification for pushing back is that this really really is a really really minor corner case and not worth the effort. It's just noise in the grand scheme of things. Just your saying so does not make it necessary that I change it. If you can demonstrate a noticeable improvement in compilation benchmarks, then I am ready to consider it.
In general, I am opposed to using `static` as a way to manage storage unless it is really important. I would rather let the compiler decide, especially with a constexpr with a zero initializer that the compiler clearly understands. If the initializer was expensive, that would have been sufficient reason to consider making it static.
I am also very explicitly and strongly opposed to these sort of micro-changes that don't really move the needle on anything at all. I will always actively discourage this practice. All of our limited energy can and should be spent on more important things.
https://github.com/llvm/llvm-project/pull/181095
More information about the llvm-commits
mailing list