[all-commits] [llvm/llvm-project] c93bc5: Revert "Revert "[GlobalISel][IRTranslator] Emit tr...

Amara Emerson via All-commits all-commits at lists.llvm.org
Mon Oct 4 18:10:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c93bc508ee446d17f9d5d59b48d98aef15f22d52
      https://github.com/llvm/llvm-project/commit/c93bc508ee446d17f9d5d59b48d98aef15f22d52
  Author: Amara Emerson <amara at apple.com>
  Date:   2021-10-04 (Mon, 04 Oct 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-unreachable.ll

  Log Message:
  -----------
  Revert "Revert "[GlobalISel][IRTranslator] Emit trap intrinsic for "unreachable"""

This reverts commit d95cd81141a4e398e0d3337cb2e6617281d06278.

The selector sometimes leaves unreachable blocks unselected because it uses a
postorder traversal for the block ordering.

With the trap intrinsics now being emitted, these blocks are no longer empty and
the unselected G_INTRINSIC instructions survive past selection. To fix this,
keep track of which blocks are selected and later delete any blocks that weren't
selected.




More information about the All-commits mailing list