[PATCH] D76961: [SelectionDAG] fix predecessor list for INLINEASM_BRs' parent

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 16:17:02 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2950
+  // PHI node fixup on First that SelectionDAGISel::FinishBasicBlock will
+  // perform on Last.
+  if (First->getFirstTerminator()->getOpcode() == TargetOpcode::INLINEASM_BR)
----------------
Maybe it would be better to move this into SelectionDAGISel::FinishBasicBlock?  All the other similar code seems to be there.

If we do keep it here, better to fix the comment to something like "SelectionDAGISel::FinishBasicBlock will add PHI operands for the successors of the fallthrough block.  Here, we add PHI operands for the successors of the INLINEASM_BR block itself".  (It's not obvious at first glance what "first" and "last" refer to.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76961





More information about the llvm-commits mailing list