How to expose LLVM options to Clang?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to expose LLVM options to Clang?

Nathan Ridge via cfe-dev
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

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev