[PATCH] D34367: CodeGen: Fix address space of indirect function argument

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 7 08:38:05 PST 2018


yaxunl marked 20 inline comments as done.
yaxunl added inline comments.


================
Comment at: lib/CodeGen/CGCall.h:248
+      return HasLV ? LV.getAddress() : RV.getAggregateAddress();
+    }
+
----------------
rjmccall wrote:
> Part of my thinking in suggesting this representation change was that the current representation was prone to a certain kind of bug where clients blindly use the RValue without realizing that it's actually something they need to copy from instead of using directly. That is generally a bug because indirect arguments are expected to be independent slots and are not permitted to alias. The new representation implicitly fixes these bugs by pushing users towards using one of these approaches.
> 
> All of this is to say that I'm not thrilled about having a getAggregateAddress here.
I see. I will remove getAggregateAddress.


https://reviews.llvm.org/D34367





More information about the cfe-commits mailing list