[PATCH] D86663: [test][Inliner] Make always-inline.ll work with NPM

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 16:58:09 PDT 2020


aeubanks created this revision.
aeubanks added reviewers: ychen, asbirlea.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
aeubanks requested review of this revision.

The NPM doesn't support call-site alwaysinline as described in the comments.

Also make NPM runs more similar to legacy PM runs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86663

Files:
  llvm/test/Transforms/Inline/always-inline.ll


Index: llvm/test/Transforms/Inline/always-inline.ll
===================================================================
--- llvm/test/Transforms/Inline/always-inline.ll
+++ llvm/test/Transforms/Inline/always-inline.ll
@@ -1,15 +1,17 @@
-; RUN: opt < %s -inline-threshold=0 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=0 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
 ;
 ; Ensure the threshold has no impact on these decisions.
-; RUN: opt < %s -inline-threshold=20000000 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
-; RUN: opt < %s -inline-threshold=-20000000 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=20000000 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=-20000000 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
 ;
 ; The new pass manager doesn't re-use any threshold based infrastructure for
 ; the always inliner, but test that we get the correct result. The new PM
 ; always inliner also doesn't support inlining call-site alwaysinline
 ; annotations. It isn't clear that this is a reasonable use case for
 ; 'alwaysinline'.
-; RUN: opt < %s -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=0 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=20000000 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=-20000000 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
 
 define internal i32 @inner1() alwaysinline {
 ; CHECK-NOT: @inner1(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86663.288140.patch
Type: text/x-patch
Size: 1854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200826/624f20ee/attachment.bin>


More information about the llvm-commits mailing list