[PATCH] D24338: [InlineCost] Remove CallPenalty and change MinSizeThreshold to 5
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 27 01:37:31 PDT 2016
echristo added a subscriber: echristo.
echristo added a comment.
Calls on Power are actually slower than a normal instruction, so inlining is even more important for performance. This probably needs some benchmarking and perhaps a way to conditionalize cost. A few more inline comments as well.
Thanks!
-eric
================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:1064
@@ -1063,2 +1063,3 @@
}
+
AddRecCost += 1; /// TODO: This should be a function of the stride.
----------------
Whitespace :)
================
Comment at: test/Transforms/Inline/ephemeral.ll:22
@@ -23,2 +21,3 @@
; @inner() should be inlined for -Oz.
+; CHECK-NOT: call i32 @inner
----------------
Since you're having to change the function here it seems reasonable to document it a bit more with how the structure of the function is affecting the inlining?
================
Comment at: test/Transforms/Inline/inline_minisize.ll:25
@@ -24,3 +24,2 @@
store i32 0, i32* %i, align 4
- store i32 0, i32* %i, align 4
br label %for.cond
----------------
What happened here?
================
Comment at: test/Transforms/Inline/inline_minisize.ll:200
@@ -200,3 +199,3 @@
-define i32 @fct3(i32 %c) nounwind uwtable ssp {
+define i32 @fct3(i32 %c) optsize nounwind uwtable ssp {
entry:
----------------
not minsize?
================
Comment at: test/Transforms/Inline/nonnull.ll:1
@@ -1,2 +1,2 @@
-; RUN: opt -S -inline %s | FileCheck %s
+; RUN: opt -S -inline %s -inline-threshold=20 | FileCheck %s
----------------
Not sure what to do about the tests that need a threshold change here, it seems slightly off to add a threshold to them. Thoughts on alternatives?
Repository:
rL LLVM
https://reviews.llvm.org/D24338
More information about the llvm-commits
mailing list