[llvm] [LoopUnrollPass] Don't use clang specific syntax in optimization remarks (PR #182430)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 18:54:15 PST 2026
================
@@ -1060,9 +1060,8 @@ bool llvm::computeUnrollCount(
return OptimizationRemarkMissed(DEBUG_TYPE,
"UnrollAsDirectedTooLarge",
L->getStartLoc(), L->getHeader())
- << "Unable to unroll loop as directed by unroll(enable) "
- "pragma "
- "because unrolled size is too large.";
+ << "unable to unroll loop as directed by enable unroll "
+ "pragma because unrolled size is too large";
----------------
boomanaiden154 wrote:
Yeah, looking through the diagnostic handling code, Clang can do whatever it wants in its own `DiagnosticHandler`. Given that and that this might come up in other languages (like Rust which doesn't have pragmas), I think metadata is more appropriate.
I guess this is a slight regression in UX for those who don't understand compiler internals, which is unfortunate, but I would expect most users looking at optimization remarks to be able to infer that metadata came from the pragma.
https://github.com/llvm/llvm-project/pull/182430
More information about the llvm-commits
mailing list