[PATCH] D115785: [M68k][GlobalISel] Add basic support for function call in GlobalISel

Sheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 23:05:19 PST 2021


0x59616e created this revision.
Herald added subscribers: hiraditya, kristof.beyls, rovka.
0x59616e requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

With this patch, GlobalISel in M68k can support basic function call.

Here's some notes:

- Handling return value needs to deal with 'COPY'. Looking at the code

in AArch64, selecting 'COPY' seems not trivial. I want to take care of it
later.

- Handling argument passing needs to tackle 'G_PTR_ADD'. I want to

handle it in complex pattern. But there are other instructions using
complex pattern too, so I want to tackle them together.

There are still a lot of work to do. But I want to make sure I'm on the right
way. I think this is a good point for review.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115785

Files:
  llvm/lib/Target/M68k/GISel/M68kCallLowering.cpp
  llvm/lib/Target/M68k/GISel/M68kCallLowering.h
  llvm/lib/Target/M68k/GISel/M68kInstructionSelector.cpp
  llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
  llvm/lib/Target/M68k/GISel/M68kRegisterBankInfo.cpp
  llvm/lib/Target/M68k/M68kInstrData.td
  llvm/lib/Target/M68k/M68kInstrInfo.td
  llvm/lib/Target/M68k/M68kTargetMachine.cpp
  llvm/test/CodeGen/M68k/GlobalISel/c-call.ll
  llvm/test/CodeGen/M68k/GlobalISel/irtranslator-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115785.394469.patch
Type: text/x-patch
Size: 19664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211215/c81a2314/attachment-0001.bin>


More information about the llvm-commits mailing list