Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit fe3aaa3

Browse files
authored
Merge pull request #6367 from echesakov/StackAllocation
Fix bug: inlinee did not copy inlinee bbFlags to caller bbFlags.
2 parents 7f4d4f2 + 45cff61 commit fe3aaa3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/jit/block.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ struct BasicBlock
372372

373373
// TODO: Should BBF_RUN_RARELY be added to BBF_SPLIT_GAINED ?
374374

375-
#define BBF_SPLIT_GAINED (BBF_DONT_REMOVE | BBF_HAS_LABEL | \
375+
#define BBF_SPLIT_GAINED (BBF_DONT_REMOVE | BBF_HAS_LABEL | \
376376
BBF_HAS_JMP | BBF_BACKWARD_JUMP | \
377-
BBF_HAS_INDX | BBF_HAS_NEWARRAY | \
378-
BBF_PROF_WEIGHT | \
377+
BBF_HAS_INDX | BBF_HAS_NEWARRAY | \
378+
BBF_PROF_WEIGHT | BBF_HAS_NEWOBJ | \
379379
BBF_KEEP_BBJ_ALWAYS)
380380

381381
#ifndef __GNUC__ // GCC doesn't like C_ASSERT at global scope

src/jit/flowgraph.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22022,6 +22022,12 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo)
2202222022
stmtAfter = fgInsertStmtListAfter(iciBlock,
2202322023
stmtAfter,
2202422024
InlineeCompiler->fgFirstBB->bbTreeList);
22025+
22026+
// Copy inlinee bbFlags to caller bbFlags.
22027+
const unsigned int inlineeBlockFlags = InlineeCompiler->fgFirstBB->bbFlags;
22028+
noway_assert((inlineeBlockFlags & BBF_HAS_JMP) == 0);
22029+
noway_assert((inlineeBlockFlags & BBF_KEEP_BBJ_ALWAYS) == 0);
22030+
iciBlock->bbFlags |= inlineeBlockFlags;
2202522031
}
2202622032
#ifdef DEBUG
2202722033
if (verbose)

0 commit comments

Comments
 (0)