How to use Whirl and code generation phase profile/feedback?
Profile/feedback is based on a compile time instrumentation, training run and collection of feedback data followed by another compilation/optimization based on feedback data. There are two feedback phases in ORC implemented. Each phase will add one extra compilation pass. The two phases are Whirl feedback phase and code generation feedback phase.Whirl feedback will help primarily IPA for better inlining and other optimizations at Whirl level. Please note that currently Whirl profiling is only enabled at -O3. Code generation phase feedback will help optimizations during code generation. To utilize both Whirl profiling and code generation phase profiling, the entire process then becomes a three pass compilation/run process. First pass will instrument Whirl.Second pass will read feedback data due to Whirl instrumentation, at the same time, do instrumentation in code generation time. Third pass will read feedback data generated from instrumentation of Whirl as well as from code generation