[PATCH] D112178: [LazyCallGraph] Skip blockaddresses

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 13:55:12 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/lib/Analysis/LazyCallGraph.cpp:1986
-      // referred to function, we don't need to insert a cycle.
-      if (llvm::all_of(BA->users(), [&](User *U) {
-            if (Instruction *I = dyn_cast<Instruction>(U))
----------------
nickdesaulniers wrote:
> I pulled in `"llvm/ADT/STLExtras.h"` for `llvm::all_of` in D58260. Can that header now not be included?
there are other instances of `all_of` in this file


================
Comment at: llvm/test/Analysis/LazyCallGraph/blockaddress.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes="cgscc(function(sccp,simplifycfg))" < %s -S | FileCheck %s
+
----------------
nickdesaulniers wrote:
> I think you can drop `<`?
I think it's generally added to prevent the file name from being leaked to opt, but usually doesn't really matter


================
Comment at: llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll:37
 define internal void @bar(i32* nocapture %pc) nounwind readonly {
-; IS__CGSCC_OPM: Function Attrs: nounwind readonly
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar
----------------
nickdesaulniers wrote:
> Can we remove `IS__CGSCC_OPM` from the `RUN` lines, too? Looks like this change removes all references? Perhaps we can get rid of the OPM RUN lines? And pre-commit that?
will do


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112178



More information about the llvm-commits mailing list