[PATCH] D129370: [SimplifyCFG] Allow SimplifyCFG hoisting to skip over non-matching instructions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 03:09:22 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1584
+ if (C1->isMustTailCall() != C2->isMustTailCall())
+ return Changed;
+
----------------
chill wrote:
> chill wrote:
> > foad wrote:
> > > Leaving these `return` instructions in the `isIdenticalToWhenDefined` case seems wrong, since it means that instructions that are identical but fail this check are treated more pessimistically than instructions that are not identical.
> > You mean ,in that case we should enter that part where we skip over those calls, increment
> > `NumSkipped` and continue (i.e. the part that starts at line 1638 below)?
> >
> > Yeah, makes sense.
> OTOH, a `musttail` call can only be followed by a `ret` or a `bitcast`.
>
> I guess I don't understand what we are missing here ...
I didn't really mean this specific `return`, I meant all of the `return`s from here down to line 1595. D149365 fixes them all and shows a case where it improves handling of convergent calls.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129370/new/
https://reviews.llvm.org/D129370
More information about the llvm-commits
mailing list