Skip to content

Commit

Permalink
JIT: defer constant-return merging for debug codegen
Browse files Browse the repository at this point in the history
If we merge constant returns into a common point we may lose track of sequence
points. So inhibit this when we are generating debuggable code.

Fixes #14339.
  • Loading branch information
AndyAyersMS committed Oct 20, 2017
1 parent fbeb7be commit b009b75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8491,7 +8491,10 @@ class MergedReturns
assert(mergingReturns);

BasicBlock* mergedReturnBlock = nullptr;
if ((returnBlock != nullptr) && (maxReturns > 1))

// Do not look for mergable constant returns in debug codegen as
// we may lose track of sequence points.
if ((returnBlock != nullptr) && (maxReturns > 1) && !comp->opts.compDbgCode)
{
// Check to see if this is a constant return so that we can search
// for and/or create a constant return block for it.
Expand Down

0 comments on commit b009b75

Please sign in to comment.