[PATCH] D63046: [Attributor] Deduce "willreturn" function attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 8 08:38:40 PDT 2019


jdoerfert added a comment.

Can you clang format the code?

What about the test changes?



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1037
+
+struct AAWillReturnFunction : AbstractAttribute, BooleanState {
+
----------------
Please create an AAWillReturn interface in the header so it is easier to query the attribute.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1095
+    Visited.insert(BB);
+    for (auto *SuccBB : make_range(succ_begin(BB), succ_end(BB))) {
+      if (Visited.count(SuccBB)) {
----------------
`for (BasicBlock *SuccBB : successors(BB)) {`


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1098
+        return true;
+      }
+    }
----------------
No braces around `return`


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

https://reviews.llvm.org/D63046





More information about the llvm-commits mailing list