// TODO: Should BBF_RUN_RARELY be added to BBF_SPLIT_GAINED ?
-#define BBF_SPLIT_GAINED (BBF_DONT_REMOVE | BBF_HAS_LABEL | \
+#define BBF_SPLIT_GAINED (BBF_DONT_REMOVE | BBF_HAS_LABEL | \
BBF_HAS_JMP | BBF_BACKWARD_JUMP | \
- BBF_HAS_INDX | BBF_HAS_NEWARRAY | \
- BBF_PROF_WEIGHT | \
+ BBF_HAS_INDX | BBF_HAS_NEWARRAY | \
+ BBF_PROF_WEIGHT | BBF_HAS_NEWOBJ | \
BBF_KEEP_BBJ_ALWAYS)
#ifndef __GNUC__ // GCC doesn't like C_ASSERT at global scope
stmtAfter = fgInsertStmtListAfter(iciBlock,
stmtAfter,
InlineeCompiler->fgFirstBB->bbTreeList);
+
+ // Copy inlinee bbFlags to caller bbFlags.
+ const unsigned int inlineeBlockFlags = InlineeCompiler->fgFirstBB->bbFlags;
+ noway_assert((inlineeBlockFlags & BBF_HAS_JMP) == 0);
+ noway_assert((inlineeBlockFlags & BBF_KEEP_BBJ_ALWAYS) == 0);
+ iciBlock->bbFlags |= inlineeBlockFlags;
}
#ifdef DEBUG
if (verbose)