Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4998,6 +4998,10 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
//
DoPhase(this, PHASE_DFS_BLOCKS_WASM, &Compiler::fgDfsBlocksAndRemove);

// Repair any multiple-entry try regions back to single entry.
//
DoPhase(this, PHASE_WASM_REPAIR_TRY_ENTRIES, &Compiler::fgWasmRepairTryEntries);

// Transform any strongly connected components into reducible flow.
//
DoPhase(this, PHASE_WASM_TRANSFORM_SCCS, &Compiler::fgWasmTransformSccs);
Expand Down
29 changes: 8 additions & 21 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,6 @@ class FlowGraphTryRegion
jitstd::vector<BasicBlock*> m_unreachableBlocks;

bool m_requiresRuntimeResumption;
bool m_hasSideEntry;

FlowGraphTryRegion(EHblkDsc* ehDsc, FlowGraphTryRegions* regions);

Expand All @@ -2370,11 +2369,6 @@ class FlowGraphTryRegion
m_requiresRuntimeResumption = true;
}

void SetHasSideEntry()
{
m_hasSideEntry = true;
}

bool IsMutualProtectWith(FlowGraphTryRegion* other) const
{
return EHblkDsc::ebdIsSameTry(this->m_ehDsc, other->m_ehDsc);
Expand Down Expand Up @@ -2415,13 +2409,6 @@ class FlowGraphTryRegion
return m_requiresRuntimeResumption;
}

// True if control can enter the try via some block other than the header block.
//
bool HasSideEntry() const
{
return m_hasSideEntry;
}

FlowGraphTryRegion* EnclosingRegion() const;

BasicBlock* GetHeaderBlock() const
Expand Down Expand Up @@ -2450,12 +2437,12 @@ class FlowGraphTryRegions
unsigned m_numRegions;
unsigned m_numTryCatchRegions;
bool m_tryRegionsIncludeHandlerBlocks;
bool m_hasMultipleEntryTryRegions;
bool m_hasSideEntry;
BitVecTraits m_traits;

void SetHasMultipleEntryTryRegions()
void SetHasSideEntry()
{
m_hasMultipleEntryTryRegions = true;
m_hasSideEntry = true;
}

public:
Expand Down Expand Up @@ -2493,11 +2480,10 @@ class FlowGraphTryRegions

bool TryRegionsIncludeHandlerBlocks() const { return m_tryRegionsIncludeHandlerBlocks; }

bool HasMultipleEntryTryRegions() const { return m_hasMultipleEntryTryRegions; }

void AddMultipleEntryRegionEdges(ArrayStack<FlowEdge*>& edges);

void RemoveMultipleEntryRegionEdges(ArrayStack<FlowEdge*>& edges);
// True if some try region is entered at a block other than its header.
// fgWasmRepairTryEntries should have removed all of these.
//
bool HasSideEntry() const { return m_hasSideEntry; }

#ifdef DEBUG
static void Dump(FlowGraphTryRegions* regions);
Expand Down Expand Up @@ -6887,6 +6873,7 @@ class Compiler
void fgWasmEhTransformTry(ArrayStack<BasicBlock*>* catchRetBlocks, unsigned regionIndex, unsigned catchRetIndexLocalNum);
PhaseStatus fgWasmControlFlow();
PhaseStatus fgWasmTransformSccs();
PhaseStatus fgWasmRepairTryEntries();
PhaseStatus fgWasmVirtualIP();
PhaseStatus fgWasmSpillRefs();
#ifdef DEBUG
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/jit/compphases.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ CompPhaseNameMacro(PHASE_REPAIR_PROFILE_PRE_LAYOUT, "Repair profile pre-layout"

CompPhaseNameMacro(PHASE_DFS_BLOCKS_WASM, "Wasm remove unreachable blocks", false, -1, false)
CompPhaseNameMacro(PHASE_WASM_EH_FLOW, "Wasm eh control flow", false, -1, false)
CompPhaseNameMacro(PHASE_WASM_REPAIR_TRY_ENTRIES, "Wasm repair try entries", false, -1, false)
CompPhaseNameMacro(PHASE_WASM_TRANSFORM_SCCS, "Wasm transform sccs", false, -1, false)
CompPhaseNameMacro(PHASE_WASM_CONTROL_FLOW, "Wasm control flow", false, -1, false)
CompPhaseNameMacro(PHASE_WASM_SPILL_REFS, "Wasm spill refs", false, -1, false)
Expand Down
Loading
Loading