[PATCH] D136234: [WIP/RFC][GISel] Add a way to ignore COPY instructions in InstructionSelector

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 01:02:44 PST 2023


Pierre-vh updated this revision to Diff 491247.
Pierre-vh added a comment.

- Add test

@arsenm for the PatFrags it looks like they don't (always) generate a Try block so the system as-is cannot handle them.
I was thinking of making GIM_SetFlag work only per-instruction and be used as a prefix, so instead of having

  GIM_Try ...
    GIM_SetFlag GIMSF_IgnoreCopies

to set flags for a whole block we'd have

  GIM_SetFlag, GIMSF_IgnoreCopies, GIM_Try ... # Sets the flag on the next instruction -> Try saves them in the whole block

Then we could have flags set for a single instruction which would allow us to support PatFrags and virtually anything else
after a bit more backend work:

  GIM_SetFlag, GIMSF_IgnoreCopies, GIM_RecordInsn ...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136234

Files:
  llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  llvm/include/llvm/Target/TargetSelectionDAG.td
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/bfi_int.ll
  llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
  llvm/utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136234.491247.patch
Type: text/x-patch
Size: 21487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230123/8a08b494/attachment.bin>


More information about the llvm-commits mailing list