[PATCH] D85586: Force Function Attributes

Nathan Lanza via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 15:22:15 PDT 2020


lanza added a reviewer: jmolloy.
lanza added a comment.

Adding `jmolloy`, he seems to be the original author.



================
Comment at: llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp:22
 
-static cl::list<std::string>
-    ForceAttributes("force-attribute", cl::Hidden,
-                    cl::desc("Add an attribute to a function. This should be a "
-                             "pair of 'function-name:attribute-name', for "
-                             "example -force-attribute=foo:noinline. This "
-                             "option can be specified multiple times."));
+static cl::list<std::string> ForceAddAttributes(
+    "force-add-attribute", cl::Hidden,
----------------
kyulee wrote:
> plotfi wrote:
> > plotfi wrote:
> > > Hmm, do we care that we are changing the command line flag? Should -force-attribute imply -force-add-attribute? 
> > @chandlerc Do you think -force-attribute  should be preserved for any existing scripts or automation that may assume this?
> @chandlerc @plotfi I could preserve the original name. Then I think we can have these two - `force-attribute` and `remove-attribute`.
> I don't mind either direction about naming. Let me know.
I think the renaming isn't necessary -- it'll break any downstream users with no benefit. `-force-attribute` and `-force-remove-attribute` are a satisfactory pairing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85586



More information about the llvm-commits mailing list