[PATCH] D65243: [Attributor] Using liveness in other attributes.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 09:34:56 PDT 2019


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

One minor thing and one change request + test. Other than that, LGTM.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1241
+
+  if (!A.checkForAllCallSites(F, CallSiteCheck, true, this)) {
     indicatePessimisticFixpoint();
----------------
jdoerfert wrote:
> Pass `this` as reference (as we always do in the Attributor).
Please pass this as a reference not pointer.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1721
+        continue;
+
     if (Pred(CS))
----------------
Move the liveness stuff before the `CallSite CS` stuff. If the user is dead, it does not matter if it is a call site, a direct call site, etc., it is dead after all.

Also add a test for this please, e.g., pass the function pointer to a another unknown function or store it away but the instruction that does so is dead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65243





More information about the llvm-commits mailing list