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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 19:11:42 PDT 2019


jdoerfert marked an inline comment as done.
jdoerfert added inline comments.


================
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)
----------------
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?


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