1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/include/llvm/Transforms
Sidharth Baveja de093310b0 [SplitEdge] Update SplitCriticalEdge to return a nullptr only when the edge is not critical
Summary:
The function SplitCriticalEdge (called by SplitEdge) can return a nullptr in
cases where the edge is a critical. SplitEdge uses SplitCriticalEdge assuming it
can always split all critical edges, which is an incorrect assumption.

The three cases where the function SplitCriticalEdge will return a nullptr is:
1. DestBB is an exception block
2. Options.IgnoreUnreachableDests is set to true and
isa(DestBB->getFirstNonPHIOrDbgOrLifetime()) is not equal to a nullptr
3. LoopSimplify form must be preserved (Options.PreserveLoopSimplify is true)
and it cannot be maintained for a loop due to indirect branches

For each of these situations they are handled in the following way:
1. Modified the function ehAwareSplitEdge originally from
llvm/lib/Transforms/Coroutines/CoroFrame.cpp to handle the cases when the DestBB
is an exception block. This function is called directly in SplitEdge.
SplitEdge does not call SplitCriticalEdge in this case
2. Options.IgnoreUnreachableDests is set to false by default, so this situation
does not apply.
3. Return a nullptr in this situation since the SplitCriticalEdge also returned
nullptr. Nothing we can do in this case.

Reviewed By: asbirlea

Differential Revision:https://reviews.llvm.org/D94619
2021-04-06 21:24:40 +00:00
..
AggressiveInstCombine [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Coroutines [Coroutine] [Debug] Insert dbg.declare to entry.resume to print alloca in the coroutine frame under O2 2021-03-31 10:37:06 +08:00
InstCombine [NFC][InstCombine] Extract freelyInvertAllUsersOf() out of canonicalizeICmpPredicate() 2021-01-22 17:23:53 +03:00
Instrumentation [InstrProfiling] Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used on ELF 2021-03-03 11:32:24 -08:00
IPO [CSSPGO] Top-down processing order based on full profile. 2021-03-30 10:42:22 -07:00
Scalar Plumb AssumeInst through operand bundle apis [nfc] 2021-04-06 12:53:53 -07:00
Utils [SplitEdge] Update SplitCriticalEdge to return a nullptr only when the edge is not critical 2021-04-06 21:24:40 +00:00
Vectorize [SLP]Improve vectorization of the CmpInst instructions. 2021-04-05 06:22:51 -07:00
CFGuard.h
Coroutines.h [Coroutine] [Debug] Insert dbg.declare to entry.resume to print alloca in the coroutine frame under O2 2021-03-31 10:37:06 +08:00
Instrumentation.h [SanitizerCoverage] Drop !associated on metadata sections 2021-02-25 11:59:23 -08:00
IPO.h [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
ObjCARC.h [NewPM] Run ObjC ARC passes 2021-01-08 15:47:11 -08:00
Scalar.h Revert "[Passes] Add relative lookup table converter pass" 2021-03-30 14:13:37 +02:00
Utils.h Remove original implementation of UniqueInternalLinkageNames pass. 2021-03-10 11:57:40 -08:00
Vectorize.h