[PATCH] D67871: [Attributor] Use abstract call sites for call site callback

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 15:29:45 PDT 2019


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

LGTM



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:597-598
+    const IRPosition &ACSArgPos = IRPosition::callsite_argument(ACS, ArgNo);
+    // Check if a coresponding argument was found or if it is on not associated
+    // (which can happen for callback calls).
+    if (ACSArgPos.getPositionKind() == IRPosition::IRP_INVALID)
----------------
jdoerfert wrote:
> uenoku wrote:
> > I couldn't understand this. Could you show me an example?
> In the test case, the first two arguments of `t0_callback_callee` are not mapped to the call site in `t0_caller` but the values are provided by `t0_callback_broker`. That means we cannot deduce anything for them. The test is constructed in a way to make sure we do not propagate information into these arguments, e.g., we do not replace the first with `null` and we do not add the `128` alignment to the second. These deductions would happen if we just looked at the call site with the same argument number but since we use the abstract call site it returns "no corresponding position found" instead.
> 
> Does that make some sense?
I understand. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67871





More information about the llvm-commits mailing list