[PATCH] D15668: [attrs] Split off the forced attributes utility into its own pass that can be potentially run much earlier than FuncitonAttrs proper.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 19 13:55:06 PST 2015

sanjoy added a subscriber: sanjoy.
sanjoy added a comment.

Added some minor drive by comments inline.

Comment at: include/llvm/Transforms/IPO/ForceFunctionAttrs.h:10
@@ +9,3 @@
+// This pass loops over all of the functions in the input module, looking for
+// dead declarations and removes them. Dead declarations are declarations of
The comments seem out of sync (possibly from StripDeadPrototypes)?

Comment at: lib/Transforms/IPO/ForceFunctionAttrs.cpp:81
@@ +80,3 @@
+    }
+    if (F.hasFnAttribute(Kind))
+      continue;
Minor, but might be clearer as

if (!F.hasFnAttribute(Kind))

(unless you plan to add more things to the non `continue;` branch later)


More information about the llvm-commits mailing list