rjmccall added a comment.

In D92808#2521042 <https://reviews.llvm.org/D92808#2521042>, @rsmith wrote:

> This change violates layering by including an Analysis header from IR; I'll 
> be landing a revert as soon as I've finished testing it.

Should the header just be in IR?  We'd like to avoid duplicating constant 
strings unnecessarily between IRGen and IR passes.



================
Comment at: llvm/lib/IR/Instruction.cpp:580
+    if (auto *CB = dyn_cast<CallBase>(this))
+      return objcarc::hasRetainRVOrClaimRVAttr(CB);
+    return false;
----------------
nikic wrote:
> This change looks pretty fishy. Objective C shouldn't be hijacking LLVMs core 
> instruction model in this way. If it writes to memory, this should either be 
> reflected in the attributes, or modeled using operand bundles.
> 
> @fhahn Did you review these changes? If not, I'd suggest to revert this patch 
> and get a review on the LLVM changes.
This could definitely be an operand bundle, and I suppose the presence of a 
bundle does force a conservative assumption on passes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808

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

Reply via email to