summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 23:08:57 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-25 23:08:57 +0000
commitd905bba691a96fb3ae4057dfe96c7969a78fda88 (patch)
treea846754f60e0003e9531fa112721fcc6380a59f4 /lib/Bitcode/Reader/BitcodeReader.cpp
parent2bfbbd5d4d45276ea6deac226efe9d35a7f8547b (diff)
downloadllvm-d905bba691a96fb3ae4057dfe96c7969a78fda88.tar.gz
llvm-d905bba691a96fb3ae4057dfe96c7969a78fda88.tar.bz2
llvm-d905bba691a96fb3ae4057dfe96c7969a78fda88.tar.xz
blockfreq: Approximate irreducible control flow
Previously, irreducible backedges were ignored. With this commit, irreducible SCCs are discovered on the fly, and modelled as loops with multiple headers. This approximation specifies the headers of irreducible sub-SCCs as its entry blocks and all nodes that are targets of a backedge within it (excluding backedges within true sub-loops). Block frequency calculations act as if we insert a new block that intercepts all the edges to the headers. All backedges and entries to the irreducible SCC point to this imaginary block. This imaginary block has an edge (with even probability) to each header block. The result is now reasonable enough that I've added a number of testcases for irreducible control flow. I've outlined in `BlockFrequencyInfoImpl.h` ways to improve the approximation. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions