fgRemovePreds();
}
+ EndPhase(PHASE_IMPORTATION);
+
if (compIsForInlining())
{
/* Quit inlining if fgImport() failed for any reason. */
assert(!compDonotInline());
- EndPhase(PHASE_IMPORTATION);
-
// Maybe the caller was not interested in generating code
if (compIsForImportOnly())
{
/* Massage the trees so that we can generate code out of them */
fgMorph();
- EndPhase(PHASE_MORPH);
+ EndPhase(PHASE_MORPH_END);
/* GS security checks for unsafe buffers */
if (getNeedsGSSecurityCookie())
CompPhaseNameMacro(PHASE_PRE_IMPORT, "Pre-import", "PRE-IMP", false, -1)
CompPhaseNameMacro(PHASE_IMPORTATION, "Importation", "IMPORT", false, -1)
CompPhaseNameMacro(PHASE_POST_IMPORT, "Post-import", "POST-IMP", false, -1)
-CompPhaseNameMacro(PHASE_MORPH, "Morph", "MORPH", false, -1)
+CompPhaseNameMacro(PHASE_MORPH_INIT, "Morph - Init", "MOR-INIT" ,false, -1)
+CompPhaseNameMacro(PHASE_MORPH_INLINE, "Morph - Inlining", "MOR-INL", false, -1)
+CompPhaseNameMacro(PHASE_MORPH_IMPBYREF, "Morph - ByRefs", "MOR-BYREF",false, -1)
+CompPhaseNameMacro(PHASE_STR_ADRLCL, "Morph - Structs/AddrExp", "MOR-STRAL",false, -1)
+CompPhaseNameMacro(PHASE_MORPH_GLOBAL, "Morph - Global", "MOR-GLOB", false, -1)
+CompPhaseNameMacro(PHASE_MORPH_END, "Morph - Finish", "MOR-END", false, -1)
CompPhaseNameMacro(PHASE_GS_COOKIE, "GS Cookie", "GS-COOK", false, -1)
CompPhaseNameMacro(PHASE_COMPUTE_PREDS, "Compute preds", "PREDS", false, -1)
CompPhaseNameMacro(PHASE_MARK_GC_POLL_BLOCKS, "Mark GC poll blocks", "GC-POLL", false, -1)
#if FEATURE_VALNUM_CSE
CompPhaseNameMacro(PHASE_OPTIMIZE_VALNUM_CSES, "Optimize Valnum CSEs", "OPT-CSE", false, -1)
-#endif
+#endif
CompPhaseNameMacro(PHASE_VN_COPY_PROP, "VN based copy prop", "CP-PROP", false, -1)
#if ASSERTION_PROP
fgDebugCheckBBlist(false, false);
#endif // DEBUG
+ EndPhase(PHASE_MORPH_INIT);
+
/* Inline */
fgInline();
#if 0
RecordStateAtEndOfInlining(); // Record "start" values for post-inlining cycles and elapsed time.
+ EndPhase(PHASE_MORPH_INLINE);
+
#ifdef DEBUG
/* Inliner could add basic blocks. Check that the flowgraph data is up-to-date */
fgDebugCheckBBlist(false, false);
/* For x64 and ARM64 we need to mark irregular parameters early so that they don't get promoted */
fgMarkImplicitByRefArgs();
+ EndPhase(PHASE_MORPH_IMPBYREF);
+
/* Promote struct locals if necessary */
fgPromoteStructs();
fgStress64RsltMul();
#endif // DEBUG
+ EndPhase(PHASE_STR_ADRLCL);
+
/* Morph the trees in all the blocks of the method */
fgMorphBlocks();
+ EndPhase(PHASE_MORPH_GLOBAL);
+
#if 0
JITDUMP("trees after fgMorphBlocks\n");
DBEXEC(VERBOSE, fgDispBasicBlocks(true));