[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 14:50:22 PDT 2023


ilovepi wrote:

As for the current state of the patch, it seems fine to me to support both modes, as long as its clear/well documented how to choose between them. I think it would be good to clarify which flags control this behavior, and include that both in the summary and documentation.

Since the default was brought up, I have a few thoughts/concerns, but no hard objections.

First, absolute paths are probably fine/nice for local development, but I suspect lots of tooling expects relative paths, e.g. for things in CI, or for project specific analysis. That's something we've been meaning to do for Fuchsia, for a while now: emit, store, and analyze optimization remarks for size and performance. If possible, I'd like to be able to keep things relative to the project root, since most of our tooling/infrastructure assumes/makes use of that convention. 

Since I haven't even started that work for Fuchsia, it isn't a huge issue to work around for me (probably) but I think it makes things a bit more straightforward if I can collect remarks (either locally or on a bot), and colleagues can directly use/reference/visualize them, e.g. with `opt-remark-viewer`.

That said, I'm not sure if other projects will depend on the existing behaviors, so it probably makes sense to find out before we change the default. If we are, then we should probably at least post an FYI on discourse, and document that in the patch notes. We may even want to gate the new behavior for a bit.


https://github.com/llvm/llvm-project/pull/68027


More information about the llvm-commits mailing list