Changeset View
Changeset View
Standalone View
Standalone View
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Line(s) | |||||
758 | 758 | | |||
759 | void SelectionDAGISel::CodeGenAndEmitDAG() { | 759 | void SelectionDAGISel::CodeGenAndEmitDAG() { | ||
760 | StringRef GroupName = "sdag"; | 760 | StringRef GroupName = "sdag"; | ||
761 | StringRef GroupDescription = "Instruction Selection and Scheduling"; | 761 | StringRef GroupDescription = "Instruction Selection and Scheduling"; | ||
762 | std::string BlockName; | 762 | std::string BlockName; | ||
763 | int BlockNumber = -1; | 763 | int BlockNumber = -1; | ||
764 | (void)BlockNumber; | 764 | (void)BlockNumber; | ||
765 | bool MatchFilterBB = false; (void)MatchFilterBB; | 765 | bool MatchFilterBB = false; (void)MatchFilterBB; | ||
766 | | ||||
767 | // Pre-type legalization allow creation of any node types. | ||||
768 | CurDAG->NewNodesMustHaveLegalTypes = false; | ||||
769 | | ||||
766 | #ifndef NDEBUG | 770 | #ifndef NDEBUG | ||
767 | MatchFilterBB = (FilterDAGBasicBlockName.empty() || | 771 | MatchFilterBB = (FilterDAGBasicBlockName.empty() || | ||
768 | FilterDAGBasicBlockName == | 772 | FilterDAGBasicBlockName == | ||
769 | FuncInfo->MBB->getBasicBlock()->getName().str()); | 773 | FuncInfo->MBB->getBasicBlock()->getName().str()); | ||
770 | #endif | 774 | #endif | ||
771 | #ifdef NDEBUG | 775 | #ifdef NDEBUG | ||
772 | if (ViewDAGCombine1 || ViewLegalizeTypesDAGs || ViewLegalizeDAGs || | 776 | if (ViewDAGCombine1 || ViewLegalizeTypesDAGs || ViewLegalizeDAGs || | ||
773 | ViewDAGCombine2 || ViewDAGCombineLT || ViewISelDAGs || ViewSchedDAGs || | 777 | ViewDAGCombine2 || ViewDAGCombineLT || ViewISelDAGs || ViewSchedDAGs || | ||
Show All 30 Lines | 807 | { | |||
804 | NamedRegionTimer T("legalize_types", "Type Legalization", GroupName, | 808 | NamedRegionTimer T("legalize_types", "Type Legalization", GroupName, | ||
805 | GroupDescription, TimePassesIsEnabled); | 809 | GroupDescription, TimePassesIsEnabled); | ||
806 | Changed = CurDAG->LegalizeTypes(); | 810 | Changed = CurDAG->LegalizeTypes(); | ||
807 | } | 811 | } | ||
808 | 812 | | |||
809 | DEBUG(dbgs() << "Type-legalized selection DAG: BB#" << BlockNumber | 813 | DEBUG(dbgs() << "Type-legalized selection DAG: BB#" << BlockNumber | ||
810 | << " '" << BlockName << "'\n"; CurDAG->dump()); | 814 | << " '" << BlockName << "'\n"; CurDAG->dump()); | ||
811 | 815 | | |||
816 | // Only allow creation of legal node types. | ||||
812 | CurDAG->NewNodesMustHaveLegalTypes = true; | 817 | CurDAG->NewNodesMustHaveLegalTypes = true; | ||
813 | 818 | | |||
814 | if (Changed) { | 819 | if (Changed) { | ||
815 | if (ViewDAGCombineLT && MatchFilterBB) | 820 | if (ViewDAGCombineLT && MatchFilterBB) | ||
816 | CurDAG->viewGraph("dag-combine-lt input for " + BlockName); | 821 | CurDAG->viewGraph("dag-combine-lt input for " + BlockName); | ||
817 | 822 | | |||
818 | // Run the DAG combiner in post-type-legalize mode. | 823 | // Run the DAG combiner in post-type-legalize mode. | ||
819 | { | 824 | { | ||
▲ Show 20 Lines • Show All 2960 Lines • Show Last 20 Lines |