[PATCH] D74691: [Attributor]Detect functions with unbounded loops
    omar ahmed via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb 24 16:09:17 PST 2020
    
    
  
omarahmed updated this revision to Diff 246332.
omarahmed added a comment.
[Attributor]Detect functions with unbounded loops
This patch changes the approach of containsCycle function of looping on 
the CFG from dfs to bfs as the dfs approach detects if-then-else part in
functions as a loop and that result in wrong behaviour, so bfs solves that
problem by only moving level by level on the CFG and only detects loops when 
there is an edge to a BB in a visited level.
This patch also uses maxTripCount to detect unbounded loops in function.
It also contains some fixed tests and some added tests contain bounded and
unbounded loops.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74691/new/
https://reviews.llvm.org/D74691
Files:
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
  llvm/test/Transforms/Attributor/willreturn.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74691.246332.patch
Type: text/x-patch
Size: 13705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/3a22ae2c/attachment.bin>
    
    
More information about the llvm-commits
mailing list