gchatelet accepted this revision.
gchatelet added a comment.

Thx !



================
Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:227
+      const TargetLibraryInfoImpl &Impl,
+      LLVM_ATTRIBUTE_UNUSED Optional<const Function *> F = None)
+      : Impl(&Impl), OverrideAsUnavailable(NumLibFuncs) {
----------------
I don't think you need the `LLVM_ATTRIBUTE_UNUSED` here


================
Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:229
+      : Impl(&Impl), OverrideAsUnavailable(NumLibFuncs) {
+    if (F) {
+      if ((*F)->hasFnAttribute("no-builtins"))
----------------
[optional] rewrite as `if (!F) return;` to reduce nesting depth.


================
Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:236
+        AttributeSet FnAttrs = (*F)->getAttributes().getFnAttributes();
+        std::string Prefix = "no-builtin-";
+        for (const Attribute &Attr : FnAttrs) {
----------------
Inline so you don't allocate the string (`consumeFront` takes a `StringRef`)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67923



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to