Skip to content
Merged
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
13 changes: 7 additions & 6 deletions src/coreclr/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3538,9 +3538,15 @@ const char* sckName(SpecialCodeKind codeKind)
//
void Compiler::fgAddCodeRef(BasicBlock* srcBlk, SpecialCodeKind kind)
{
// Record that the code will call a THROW_HELPER
// so on Windows Amd64 we can allocate the 4 outgoing
// arg slots on the stack frame if there are no other calls.
//
compUsesThrowHelper = true;

if (!fgUseThrowHelperBlocks() && (kind != SCK_FAIL_FAST))
{
// FailFast will still use a thrwo helper, even in debuggable modes.
// FailFast will still use a common throw helper, even in debuggable modes.
//
return;
}
Expand All @@ -3549,11 +3555,6 @@ void Compiler::fgAddCodeRef(BasicBlock* srcBlk, SpecialCodeKind kind)

unsigned const refData = (kind == SCK_FAIL_FAST) ? 0 : bbThrowIndex(srcBlk);

// Record that the code will call a THROW_HELPER
// so on Windows Amd64 we can allocate the 4 outgoing
// arg slots on the stack frame if there are no other calls.
compUsesThrowHelper = true;

// Look for an existing entry that matches what we're looking for
//
AddCodeDsc* add = fgFindExcptnTarget(kind, refData);
Expand Down