When generating value profiling instrumentation, ensure the call gets the
correct funclet token, otherwise WinEHPrepare will turn the call (and all
subsequent instructions) into unreachable.
Details
Diff Detail
Event Timeline
Code makes sense and tests look good, but I have a suggestion for how to make it simpler.
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
875–879 | The underlying invariant is that non-intrinsic calls will carry funclet bundles. Intrinsic calls do not. Rather than special casing memop size instrumentation, I think it would be better to:
This logic will be less fragile in the face of future value profiling kinds. |
Can you extract Window's specific code into its own helper function if possible?
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | ||
---|---|---|
627 | Add some comment here about the change. |
Moved logic into support routine, and made it less specific to value profiling of memintrinsics calls.
Add some comment here about the change.