[PATCH] D74691: [Attributor] Detect possibly unbounded cycles in functions
omar ahmed via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 8 13:20:32 PDT 2020
omarahmed marked an inline comment as done.
omarahmed added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2388-2394
+ // Check whether there is Irreducible control then the function contains
+ // non-loop cycles.
+ using RPOTraversal = ReversePostOrderTraversal<const Function *>;
+ RPOTraversal FuncRPOT(&F);
+ if (containsIrreducibleCFG<const BasicBlock *, const RPOTraversal,
+ const LoopInfo>(FuncRPOT, *LI))
+ return true;
----------------
baziotis wrote:
> omarahmed wrote:
> > baziotis wrote:
> > > As @jdoerfert mentioned, you can replace this with [[ https://github.com/llvm/llvm-project/blob/master/llvm/lib/Analysis/MustExecute.cpp#L487 | mayContainIrreducibleControl ]]
> > I found that the function is in mustExcute.cpp only and not available in the header file mustExcute.h so how could i use it in this case i guess it should be added to the header :)
> Yep, true, it's `static`. Please add it to the header. :)
i tried to erase static as static means that it will only used in the cpp file also i have put the definition in the header file but that resulted in an error in linking so how could we do that here ? I guess also that all the functions i saw was only static in the cpp file or they are belong to a class in the .h or cpp file but no function that is implemented alone so I think that getting this 3 lines is more clean or what do you think ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74691/new/
https://reviews.llvm.org/D74691
More information about the llvm-commits
mailing list