[PATCH] D97833: [InstCombine] Move statepoint intrinsic handling from visitCall to visitCallBase
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 3 11:46:56 PST 2021
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2176
+ switch (Call.getIntrinsicID()) {
+ case Intrinsic::experimental_gc_statepoint: {
+ GCStatepointInst &GCSP = *cast<GCStatepointInst>(&Call);
----------------
Add default: break.
Otherwise, you'll get uncovered-switch warnings on many build bots.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2267
+ OperandBundleDef NewBundle("gc-live", NewLiveGc);
+ if (isa<CallInst>(&Call))
+ return CallInst::CreateWithReplacedBundle(cast<CallInst>(&Call),
----------------
OT: It looks like we could sink CreateWithReplacementBundle to the CallSite base and simplify some code here. Might be a good cleanup.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97833/new/
https://reviews.llvm.org/D97833
More information about the llvm-commits
mailing list