aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Object/ELFObjectFileTest.cpp
diff options
context:
space:
mode:
authorBangtian Liu <bangtian@cs.toronto.edu>2020-12-15 23:28:42 +0000
committerWhitney Tsang <whitneyt@ca.ibm.com>2020-12-15 23:32:29 +0000
commitcf638d793c489632bbcf0ee0fbf9d0f8c76e1f48 (patch)
tree4502edf8be4973694375706e0c9435062495f013 /llvm/unittests/Object/ELFObjectFileTest.cpp
parent0dd8f6f9035408fc18b4351ae4096a2852aa8fb5 (diff)
downloadllvm-cf638d793c489632bbcf0ee0fbf9d0f8c76e1f48.zip
llvm-cf638d793c489632bbcf0ee0fbf9d0f8c76e1f48.tar.gz
llvm-cf638d793c489632bbcf0ee0fbf9d0f8c76e1f48.tar.bz2
Ensure SplitEdge to return the new block between the two given blocks
This PR implements the function splitBasicBlockBefore to address an issue that occurred during SplitEdge(BB, Succ, ...), inside splitBlockBefore. The issue occurs in SplitEdge when the Succ has a single predecessor and the edge between the BB and Succ is not critical. This produces the result ‘BB->Succ->New’. The new function splitBasicBlockBefore was added to splitBlockBefore to handle the issue and now produces the correct result ‘BB->New->Succ’. Below is an example of splitting the block bb1 at its first instruction. /// Original IR bb0: br bb1 bb1: %0 = mul i32 1, 2 br bb2 bb2: /// IR after splitEdge(bb0, bb1) using splitBasicBlock bb0: br bb1 bb1: br bb1.split bb1.split: %0 = mul i32 1, 2 br bb2 bb2: /// IR after splitEdge(bb0, bb1) using splitBasicBlockBefore bb0: br bb1.split bb1.split br bb1 bb1: %0 = mul i32 1, 2 br bb2 bb2: Differential Revision: https://reviews.llvm.org/D92200
Diffstat (limited to 'llvm/unittests/Object/ELFObjectFileTest.cpp')
0 files changed, 0 insertions, 0 deletions