[PATCH] D15668: [attrs] Split off the forced attributes utility into its own pass that can be potentially run much earlier than FuncitonAttrs proper.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 19 13:56:12 PST 2015
chandlerc added inline comments.
================
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
----------------
sanjoy wrote:
> The comments seem out of sync (possibly from StripDeadPrototypes)?
Yea, sorry, will fix them to be correct.
================
Comment at: lib/Transforms/IPO/ForceFunctionAttrs.cpp:81
@@ +80,3 @@
+ }
+ if (F.hasFnAttribute(Kind))
+ continue;
----------------
sanjoy wrote:
> Minor, but might be clearer as
>
> ```
> if (!F.hasFnAttribute(Kind))
> F.addFnAttr(Kind);
> ```
>
> (unless you plan to add more things to the non `continue;` branch later)
Just moving code around here. I can clean it up in a follow-up patch?
http://reviews.llvm.org/D15668
More information about the llvm-commits
mailing list