[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

Paul Kirth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 12:59:15 PDT 2019


paulkirth added a comment.



> So it is possible to handle this completely in the backed, but the diagnostic output is not fantastic when using clang based instrumentation. In particular, we would need to emit the diagnostic in LowerExpectIntrisic.cpp by checking if the branch weight metadata already exists, and processing it there before it is overwritten. For some reason emitting the diagnostic at that point will not also emit the helpful source listing if there is a macro, even though a FullSourceLoc is available. This isn't an issue for either the handling in SampleProfile.cpp or in PGOInstrumentation.cpp.

Actually, I made a mistake evaluating the diagnostic output. I redid my test for handling everything the Clang based instrumentation in LowerExpectIntrinsic.cpp and the output now looks as expected, so I must have had a logic error somewhere.

I think this can be handled 100% in the backend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66324





More information about the cfe-commits mailing list