[PATCH] D71217: Fix incorrect logic in maintaining the side-effect of compiler generated outliner functions

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 11:17:13 PST 2020


paquette added a comment.

The reason you weren't getting outlined functions is probably because there were attributes missing on the function.

I think that we should be able to simplify it further like this:

  # RUN: llc -mtriple=aarch64 -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
  
  # The test checks whether the compiler updates the side effect of function @OUTLINED_FUNCTION_0 by adding the use of register x20.
  
  --- |
    declare void @spam() local_unnamed_addr
    define void @baz() optsize minsize noredzone { ret void }
  ...
  ---
  name:            baz
  tracksRegLiveness: true
  body:             |
    bb.0:
      liveins: $x0, $x20
  
      $x0 = COPY renamable $x20
      BL @spam, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp, implicit-def $x0
      renamable $x21 = COPY $x0
  
      $x0 = COPY renamable $x20
      BL @spam, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp, implicit-def $x0
      renamable $x22 = COPY $x0
  
      $x0 = COPY killed renamable $x20
      BL @spam, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp, implicit-def $x0
      renamable $x3 = COPY $x0
  
      RET_ReallyLR
  
  ...
  
  # CHECK: BL @OUTLINED_FUNCTION_0, {{.*}}, implicit $x20, {{.*}}


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

https://reviews.llvm.org/D71217





More information about the llvm-commits mailing list