[all-commits] [llvm/llvm-project] a87fcc: [AArch64] Lower calls with rv_marker attribute .

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Dec 11 11:46:14 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a87fccb3ff9c11986d3110d9f77fb0ccea0daf79
      https://github.com/llvm/llvm-project/commit/a87fccb3ff9c11986d3110d9f77fb0ccea0daf79
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-12-11 (Fri, 11 Dec 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/call-rv-marker.ll
    A llvm/test/CodeGen/AArch64/expand-blr-rvmarker-pseudo.mir

  Log Message:
  -----------
  [AArch64] Lower calls with rv_marker attribute .

This patch adds support for lowering function calls with the
rv_marker attribute. The goal is to expand such calls to the
following sequence of instructions:

    BL @fn
    mov x29, x29

This sequence of instructions triggers Objective-C runtime optimizations,
hence we want to ensure no instructions get moved in between them.
This patch achieves that by adding a new CALL_RVMARKER ISD node,
which gets turned into the BLR_RVMARKER pseudo, which eventually gets
expanded into the sequence mentioned above. The sequence is then marked
as instruction bundle, to avoid anything being moved in between.

@ahatanak is working on using this attribute in the front- & middle-end.

Together with the front- & middle-end changes, this should address
PR31925 for AArch64.

Reviewed By: t.p.northover

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




More information about the All-commits mailing list