[all-commits] [llvm/llvm-project] 5ab6fa: Revert "[MIR] Target specific MIR formating and pa...

Daniel Sanders via All-commits all-commits at lists.llvm.org
Wed Jan 8 18:48:16 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ab6fa7b7011b00e8955168c5bbcb46e9712afa9
      https://github.com/llvm/llvm-project/commit/5ab6fa7b7011b00e8955168c5bbcb46e9712afa9
  Author: Daniel Sanders <daniel_l_sanders at apple.com>
  Date:   2020-01-08 (Wed, 08 Jan 2020)

  Changed paths:
    R llvm/include/llvm/CodeGen/MIRFormatter.h
    M llvm/include/llvm/CodeGen/MIRParser/MIParser.h
    M llvm/include/llvm/CodeGen/MachineMemOperand.h
    M llvm/include/llvm/CodeGen/MachineOperand.h
    M llvm/include/llvm/CodeGen/PseudoSourceValue.h
    M llvm/include/llvm/CodeGen/TargetInstrInfo.h
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MIRPrinter.cpp
    M llvm/lib/CodeGen/MachineInstr.cpp
    M llvm/lib/CodeGen/MachineOperand.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.format.f16.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.format.f32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.image.load.1d.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.image.sample.1d.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.raw.buffer.load.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.struct.buffer.load.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.struct.buffer.store.ll
    M llvm/test/CodeGen/AMDGPU/buffer-intrinsics-mmo-offsets.ll
    M llvm/test/CodeGen/AMDGPU/extract_subvector_vec4_vec3.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.barrier.ll
    M llvm/unittests/CodeGen/MachineOperandTest.cpp

  Log Message:
  -----------
  Revert "[MIR] Target specific MIR formating and parsing"

Forgot to credit Peng in the commit message.

This reverts commit be841f89d0014b1e0246a4feae941b2f74abd908.


  Commit: 3ef05d85be8c3666ebfa3ad986eb334da5195a47
      https://github.com/llvm/llvm-project/commit/3ef05d85be8c3666ebfa3ad986eb334da5195a47
  Author: Peng Guo <peng_guo at apple.com>
  Date:   2020-01-08 (Wed, 08 Jan 2020)

  Changed paths:
    A llvm/include/llvm/CodeGen/MIRFormatter.h
    M llvm/include/llvm/CodeGen/MIRParser/MIParser.h
    M llvm/include/llvm/CodeGen/MachineMemOperand.h
    M llvm/include/llvm/CodeGen/MachineOperand.h
    M llvm/include/llvm/CodeGen/PseudoSourceValue.h
    M llvm/include/llvm/CodeGen/TargetInstrInfo.h
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MIRPrinter.cpp
    M llvm/lib/CodeGen/MachineInstr.cpp
    M llvm/lib/CodeGen/MachineOperand.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.format.f16.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.format.f32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.store.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.image.load.1d.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.image.sample.1d.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.raw.buffer.load.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.struct.buffer.load.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.struct.buffer.store.ll
    M llvm/test/CodeGen/AMDGPU/buffer-intrinsics-mmo-offsets.ll
    M llvm/test/CodeGen/AMDGPU/extract_subvector_vec4_vec3.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.barrier.ll
    M llvm/unittests/CodeGen/MachineOperandTest.cpp

  Log Message:
  -----------
  [MIR] Target specific MIR formating and parsing

Summary:
Added MIRFormatter for target specific MIR formating and parsing with
immediate and custom pseudo source values. Target machine can subclass
MIRFormatter and implement custom logic for printing and parsing
immediate and custom pseudo source values for better readability.

* Target specific immediate mnemonic need to start with "." follows by
  identifier string. When MIR parser sees immediate it will call target
  specific parsing function.

* Custom pseudo source value need to start with custom follows by
  double-quoted string. MIR parser will pass the quoted string to target
  specific PSV parsing function.

* MIRFormatter have 2 helper functions to facilitate LLVM value printing
  and parsing for custom PSV if they refers LLVM values.

Patch by Peng Guo

Reviewers: dsanders, arsenm

Reviewed By: dsanders

Subscribers: wdng, jvesely, nhaehnle, hiraditya, jfb, llvm-commits

Tags: #llvm

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


Compare: https://github.com/llvm/llvm-project/compare/d44a0743175f...3ef05d85be8c


More information about the All-commits mailing list