[PATCH] D94333: [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it

Wenlei He via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 12:59:44 PST 2021


wenlei added inline comments.


================
Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:412
+
+  Remark << ";";
 }
----------------
modimo wrote:
> wenlei wrote:
> > nit: any special reason for adding this? doesn't seem consistent with other remarks we have.
> If you grab the remark outputs via `-Rpass=inline` you'll get additional suffix information:
> ```
> inline.cpp:8:12: remark: _Z3foov inlined into main with (cost=0, threshold=375) at callsite main:2:12; [-Rpass=inline]
>     return foo();
> ```
> 
> The semicolon is to separate the remark from any additional output at the end so when replaying we can match the correct callsite. Something like this would be unneeded for yaml replay but for the current implementation it's necessary for correctness.
> 
By correctness, did you mean the fact that you rely on `split(";")` in parsing, or something else?

This is not a big deal, but if no other remarks end with `;`, it would be good to be consistent. Using `split(";")` for parsing is just one way of implementing it, and IMO could be changed to favor consistency in remarks output.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94333/new/

https://reviews.llvm.org/D94333



More information about the cfe-commits mailing list