llvm-project/llvm/lib
Bangtian Liu cf638d793c 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
2020-12-15 23:32:29 +00:00
..
Analysis [SCEV] Add missing type check into getRangeForAffineNoSelfWrappingAR 2020-12-15 14:50:32 +07:00
AsmParser [clang][IR] Add support for leaf attribute 2020-12-14 14:48:17 -08:00
BinaryFormat [AIX][XCOFF] emit traceback table for function in aix 2020-12-11 17:50:25 -05:00
Bitcode [clang][IR] Add support for leaf attribute 2020-12-14 14:48:17 -08:00
Bitstream llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
CodeGen RegisterCoalescer: Remove phi-only subranges when erasing identity copies 2020-12-15 17:36:32 -05:00
DWARFLinker [dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general. 2020-12-10 14:57:08 +03:00
DebugInfo fix typos to cycle bots 2020-12-12 20:19:33 -05:00
Demangle llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
ExecutionEngine Re-apply 8904ee8ac7 with missing header included this time. 2020-12-14 13:39:33 +11:00
Extensions llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
FileCheck Revert "[build] normalize components dependencies" 2020-11-18 19:23:11 +01:00
Frontend [OpenMPIRBuilder] Various changes required for tileLoops. 2020-12-11 11:37:45 -06:00
FuzzMutate llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Fuzzer
IR Ensure SplitEdge to return the new block between the two given blocks 2020-12-15 23:32:29 +00:00
IRReader static const char *const foo => const char foo[] 2020-12-01 10:33:18 -08:00
InterfaceStub [lib/Object, tools] - Make ELFObjectFile::getELFFile return reference. 2020-12-04 16:02:29 +03:00
LTO [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth. 2020-12-03 07:53:59 -08:00
LineEditor llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Linker [ThinLTO] Import symver directives for imported symbols (PR48214) 2020-12-02 14:56:43 +01:00
MC [MC][ELF] Accept abbreviated form with sh_flags and sh_entsize 2020-12-11 16:45:45 +00:00
MCA [llvm-mca] Fix processing thumb instruction set 2020-11-24 18:27:59 +03:00
Object [AIX][XCOFF] emit traceback table for function in aix 2020-12-11 17:50:25 -05:00
ObjectYAML [WebAssembly] Add support for named data sections in wasm binaries 2020-12-09 12:57:07 -08:00
Option Remove memory allocation with string 2020-12-05 15:14:44 -08:00
Passes Revert "[DDG] Data Dependence Graph - DOT printer" 2020-12-14 16:54:20 -05:00
ProfileData [llvm-cov gcov] Replace Donald B. Johnson's cycle enumeration with iterative cycle finding 2020-12-11 18:28:16 -08:00
Remarks llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Support [YAML] Support extended spellings when parsing bools. 2020-12-12 12:50:34 +00:00
TableGen [TableGen] Don't dereference from dyn_cast<> - use cast<> instead. NFCI. 2020-12-14 12:12:08 +00:00
Target [X86] Add REX prefix for GOTTPOFF/TLSDESC relocs in x32 mode 2020-12-15 23:07:34 +00:00
Testing [llvm][NFC] Remove unnecessary vector creation in Annotations 2020-11-14 15:55:09 +00:00
TextAPI llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
ToolDrivers llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Transforms Ensure SplitEdge to return the new block between the two given blocks 2020-12-15 23:32:29 +00:00
WindowsManifest llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
XRay [lib/Object, tools] - Make ELFObjectFile::getELFFile return reference. 2020-12-04 16:02:29 +03:00
CMakeLists.txt llvmbuildectomy - support disabled native target 2020-11-13 15:50:13 +01:00