[PATCH] D121341: [SystemZ] implement adjustInliningThreshold()

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 05:59:53 PST 2022


jonpa added inline comments.


================
Comment at: llvm/test/CodeGen/SystemZ/inline-thresh-adjust.ll:1
+; RUN: opt < %s -mtriple=systemz-unknown -mcpu=z15 -inline -disable-output \
+; RUN:   -debug-only=inline 2>&1 | FileCheck %s
----------------
uweigand wrote:
> jonpa wrote:
> > This doesn't check that a particular function is actually inlined, but it can at least make sure that this type of function gets a boosted threshold, so maybe it could still be used, or?
> > 
> How stable are these particular numbers (1012, 1687)?  I don't think it would be a good idea to hard-code those in a test case if they change randomly with any codegen change?
> 
> If we want to test whether the function is inlined, can't we simply verify whether the function name symbol does not exist in the output (because the function was completely eliminated)?
They may change I guess, but the test case is only running the inliner pass and nothing else, so it would not be sensitive to any codegen change.

I think those numbers may change if the inliner heuristics are modified but I was hoping that then it would be trivial to update the test.

I could also try to use the original function and check that it gets inlined, but that may be a little tricky as the cost is adjusted per the context of the call-site. I guess I could just reduce the original imagick file. 




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

https://reviews.llvm.org/D121341



More information about the llvm-commits mailing list