[PATCH] D81929: [Attributor] Introduce CallBaseContext to the IRPosition

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 07:41:23 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LGTM with nits.



================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:459
+    return Result;
   }
 
----------------
Nit: If this is not yet upstream, use the proper `R` from the beginning.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:915
   }
-
+#define DEBUG_TYPE "attributor"
   /// The version of getAAFor that allows to omit a querying abstract
----------------
Not needed anymore?


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:997
   }
-
+#undef DEBUG_TYPE
   /// Return the attribute of \p AAType for \p IRP if existing. This also allows
----------------
Not needed anymore.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:937
+#endif
+    IRP =
+        shouldPropagateCallBaseContext(IRP) ? IRP : IRP.stripCallBaseContext();
----------------
jdoerfert wrote:
> Nit: newline
> 
> Now we are in a hybrid solution, should we do `if (should...) IRP = ...` ?
my bad, `if (!should..`), right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81929





More information about the llvm-commits mailing list