[PATCH] D59852: [IR] Create new method in the Function class (NFC)

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 11:54:56 PDT 2019


evandro marked an inline comment as done.
evandro added inline comments.


================
Comment at: llvm/include/llvm/IR/Function.h:594
+  /// Do not optimize this function (-O0).
+  bool optForNaught() const { return hasFnAttribute(Attribute::OptimizeNone); }
+
----------------
spatel wrote:
> evandro wrote:
> > spatel wrote:
> > > I understand that we're trying to mimic the existing 'optForSize' naming, but "optForNaught" is not obvious.
> > > How about "isOptNone()"?
> > `optForNone()`?  Though I don't feel strongly about it.  
> I'm still not reading that as obvious. When I see this in IR, I'm used to seeing the string "optnone", so it makes more sense to me that the query includes that string exactly. If others disagree, I won't block it though.
In an OCD way, I'm trying to preserve the existing pattern for such methods. 😌


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59852





More information about the llvm-commits mailing list