[PATCH] D52067: [inline Cost] Don't mark function accessing varargs as non-inlinable

Sameer AbuAsal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 19:15:09 PDT 2018


sabuasal marked an inline comment as done.
sabuasal added inline comments.


================
Comment at: test/Transforms/Inline/inline-func-vaend.ll:1
+; RUN: opt < %s -inline -S | FileCheck %s
+
----------------
fhahn wrote:
> Would it be possible to simplify the test case? I don't think we need most of the loads, stores and the `%struct.__va_list` type. Also I think it would be good to move the test case to the other vararg related test  (inline-varargs.ll IIRC)
I simplified it. I am not sure how I can get rid of va_list; what i am testing is va_start calledin the caller and va_end in the callee. I need to have va_list to pass it from the caller to the callee.

 Any suggestions?


================
Comment at: test/Transforms/Inline/inline-func-vaend.ll:35
+
+; Function Attrs: alwaysinline nounwind
+define void @always_inlined(i32 %n, [1 x i32] %a.coerce) {
----------------
fhahn wrote:
> It looks like the alwaysinline attribute got dropped? I think it would be good to test both with and without the attribute.
added tests with and without alwaysinline.


https://reviews.llvm.org/D52067





More information about the llvm-commits mailing list