[PATCH] D94633: [FunctionAttrs] Infer willreturn for functions without loops

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 08:25:12 PST 2021


jdoerfert added a comment.

I still think we should check to enable a light-attributor run in the beginning of the pipeline. The logic seems sound, could be improved since this does initialize the fixpoint computation with a pessimistic starting value. One comment below, the rest is OK for merging.



================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1443
+  if (!Backedges.empty())
+    return false;
+
----------------
I never used this function. Does it handle irreducible control flow properly? Maybe we want a test just to be sure.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94633



More information about the llvm-commits mailing list