These intrinsics should be counted in the heuristics in
InstCombine and CallsiteSplit.
They are causing FDO hash mismatches when whole-program-vtables
is enabled in optimized build but not in instrumentation build.
Paths
| Differential D129003
[WPD] Filter out intrinsics inserted from whole-program-vtables Needs RevisionPublic Authored by xur on Jul 1 2022, 9:48 AM.
Details
Diff Detail Event TimelineComment Actions this doesn't seem very principled, it's seemingly adding checks in random places hoping that passes won't look too much at assumes/type tests
Comment Actions In the summary, do you mean 'should not be counted'? Also agree that the test should be cleaned up.
Comment Actions This should be split into a patch for CallSiteSplitting and one for Loads. For CallSiteSplitting, you'll probably want to implement ephemeral value handling along the lines of https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Utils/SimplifyCFG.cpp#L2941. For Loads, we'd want something along the lines of D101553. This revision now requires changes to proceed.Jul 1 2022, 2:18 PM Comment Actions
You may want to spell out the interface changes you think is right more clearly :)
Revision Contents
Diff 441719 llvm/include/llvm/IR/Instruction.h
llvm/lib/Analysis/Loads.cpp
llvm/lib/IR/Instruction.cpp
llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
llvm/test/Transforms/InstCombine/wpvt.ll
|
Add a wrapper interface 'isNopInst()' instead?
These instructions should not be counted in inline size estimation either.