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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 15:03:20 PDT 2019


spatel 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); }
+
----------------
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.


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