loop unrolling and icp will make the sample profile annotation much harder in the backend. So disable these 2 optimization in the ThinLTO compile phase.
Will add a test in cfe in a separate patch.
Details
Diff Detail
- Build Status
Buildable 4942 Build 4942: arc lint + arc unit
Event Timeline
lib/Transforms/IPO/PassManagerBuilder.cpp | ||
---|---|---|
464 | That makes me worried in some way: we're not expecting ICP and SamplePGO to be complementary from each other? |
lib/Transforms/IPO/PassManagerBuilder.cpp | ||
---|---|---|
464 | Let me try to clarify here.
So in this patch, instead of invoking legacy ICP pass twice, we only invoke it once in backend if it is samplepgo+thinlto build. |
lib/Transforms/IPO/PassManagerBuilder.cpp | ||
---|---|---|
464 | Oh OK I missed that it was just the early ICP. Nevermind then. |
LGTM with one suggestion
lib/Transforms/IPO/PassManagerBuilder.cpp | ||
---|---|---|
465 | All the "!" make this a little difficult to parse. Since you are doing the same check a couple places anyway, I suggest adding a boolean up above like: It's a mouthful, but hopefully clearer. |
That makes me worried in some way: we're not expecting ICP and SamplePGO to be complementary from each other?