aeubanks added a comment.

sounds good for the purposes of going back to what we had before, but we should 
reconsider the attribute support



================
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
----------------
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


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


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117965

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to