Add new options for context-sensitive PGO.
Refer to https://reviews.llvm.org/D54175
Differential D54176
[PGO] clang part of change for context-sensitive PGO. xur on Nov 6 2018, 12:20 PM. Authored by
Details
Add new options for context-sensitive PGO. Refer to https://reviews.llvm.org/D54175
Diff Detail Event TimelineComment Actions Can you add a summary of this change, i.e., the driver option processing flow for csPGO. Test cases are also missing. Comment Actions Here is the summary of CSPGO options workflow: (1) CSPGO instrumentation. We also add a new instrument kind (csllvm) for cc1 option fprofile-instrument. This is corresponding to a new CodeGen option: CodeGenOptions::ProfileCSIRInstr. The driver option is parsed and translated to cc1 option in addPGOAndCoverageFlags(). cc1 option is converted to CodeGenOpts in setPGOInstrumentor() (CompilerInvocation.cpp). CodeGenOpts is passed into llvm pass manager in BackendUtil.cpp: (2) PGO use CodeGenOpts is handled similarly as in CSPGO instrumentation. (3) lto/thinlto
The change to lib/CodeGen/CodeGenModule.cpp is for llvm profile summary change.
Comment Actions Integrated David's review comments. Also add a test to test the error when both CSInstrumentGen and CSInstrumentUse on.
Comment Actions Clang reviews should mainly go to cfe-commits, not llvm-commits. (all that will happen automagically if one sets the correct repo for the differential..) Comment Actions LGTM except for place noted below where I disagree with a change made earlier. Will let @davidxl chime in if he disagrees with me or has any other comments.
Comment Actions Integrated Teresa's suggestion to change the err() to assert.
|
The comment is not precise.