[cfe-dev] How to expose LLVM options to Clang?

Paul Kirth via cfe-dev cfe-dev at lists.llvm.org
Tue Aug 6 17:34:20 PDT 2019


Is there guidance on how to expose LLVM options to clang?

Specifically, I'd like to access the (Un)LikelyBranchWeight options from
LowerExpectIntrinsic.cpp. I'm building a validation tool for the use of
__builtin_expect, and I would like to set the thresholds used in validation
to be consistent with the values through this option.

If possible, I'd like to avoid adding extra options that mirror an existing
option or that overwrite the option passed to the backend, unless that is
the standard procedure. There is a note in LowerExpectIntrinsic.cpp about
hoisting that option to share w/ another LLVM component, however I'm not
sure that strategy is relevant for me, since my changes are based in the
frontend.

-- 
Paul Kirth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190806/85641161/attachment.html>


More information about the cfe-dev mailing list