[PATCH] D129370: [SimplifyCFG] Allow SimplifyCFG hoisting to skip over non-matching instructions
Momchil Velikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 02:07:18 PDT 2023
chill added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1584
+ if (C1->isMustTailCall() != C2->isMustTailCall())
+ return Changed;
+
----------------
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 ...
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