[PATCH] D117965: [AlwaysInliner] Enable call site inlining to make flatten attribute working again (#53360)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 12:18:24 PST 2022


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AlwaysInliner.cpp:95
 
-      // Remember to try and delete this function afterward. This both avoids
-      // re-walking the rest of the module and avoids dealing with any iterator
-      // invalidation issues while deleting functions.
-      InlinedFunctions.push_back(&F);
+      if (F.hasFnAttribute(Attribute::AlwaysInline))
+        // Remember to try and delete this function afterward. This both avoids
----------------
aeubanks wrote:
> xbolva00 wrote:
> > avoid DCE of internal functions without always_inline; check test pr2945 in always-inline.ll
> no need to change in this patch, but it looks like that was a past limitation, removing any dead internal function should be fine (subject to comdats). either we should not delete any function or we should attempt to remove any function we can
Thanks for info, changed to delete them.


================
Comment at: llvm/test/Transforms/Inline/always-inline.ll:150
 
+define i32 @outer7b() {
+; CHECK-LABEL: @outer7b(
----------------
aeubanks wrote:
> s/CHECK-CALL/CHECK/g should be good enough? any reason for outer7b? it's exactly the same as outer7a
Yes, simplified.


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

https://reviews.llvm.org/D117965



More information about the llvm-commits mailing list