[PATCH] D88684: llvm-reduce: Don't replace intrinsic calls with undef
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 12:32:20 PDT 2020
fhahn added a comment.
In D88684#2317697 <https://reviews.llvm.org/D88684#2317697>, @arsenm wrote:
> In D88684#2317657 <https://reviews.llvm.org/D88684#2317657>, @dblaikie wrote:
>
>> what sort of problems manifest from this issue? Does it lead to slower reductions because they spend more time creating a lot of broken reductions?
>
> I think the general strategy of hack on the IR and if it breaks, skip it is a bit insane to begin with, so from that front this reduces the number of times that triggers
+1.
There are plenty of other similar cases, like `llvm.used` metadata which we should probably handle in a special way.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp:33
copy_if(Program->functions(), std::back_inserter(FuncsToRemove),
- [&O](auto &unused) { return !O.shouldKeep(); });
+ [&O](Function &F) { return !F.isIntrinsic() && !O.shouldKeep(); });
----------------
I think a comment here would be good explaining why we exclude intrinsics. Also, should we also remove intrinsics from chunks to start with, to keep the numbering/chunk management consistent?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88684/new/
https://reviews.llvm.org/D88684
More information about the llvm-commits
mailing list