[PATCH] D139437: [SimplifyCFG] Prohibit hoisting from deoptimize blocks

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 23:37:46 PST 2022


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1515
+    return false;
+
   BasicBlock::iterator BB1_Itr = BB1->begin();
----------------
To me it looks like overkill. As far as I understand the problem, the crash happens when we hoist the deoptimize call which is then not followed by return after this hoisting. Hoisting any other instruction is perfectly legal, and it also reduces code size. Let's make the fix as non-invasive as possible.

I still think that the requirement to have deoptimize immediately followed by return is useless and weird, but it's out of scope of this one. Until cancelled, we should sustain it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139437/new/

https://reviews.llvm.org/D139437



More information about the llvm-commits mailing list