[all-commits] [llvm/llvm-project] a524f8: [SelectionDAG][NFCI] Use common logic for identify...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Wed May 3 07:59:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a524f84780297f12d4aba18c002ce3e7b3675011
      https://github.com/llvm/llvm-project/commit/a524f84780297f12d4aba18c002ce3e7b3675011
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2023-05-03 (Wed, 03 May 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
    M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

  Log Message:
  -----------
  [SelectionDAG][NFCI] Use common logic for identifying MMI vars

After function argument lowering, but prior to instruction selection,
dbg declares pointing to function arguments are lowered using special
logic.

Later, during instruction selection (both "fast" and regular ISel), this
logic is "repeated" in order to identify which intrinsics have already
been lowered. This is bad for two reasons:

1. The logic is not _really_ repeated, the code is different, which
could lead to duplicate lowering of the intrinsic.
2. Even if the logic were repeated properly, this is still code
duplication.

This patch addresses these issues by storing all preprocessed
dbg.declare intrinsics in a set inside FuncInfo; the set is queried upon
instruction selection.

Differential Revision: https://reviews.llvm.org/D149682




More information about the All-commits mailing list