Fix assert during compact IDs pass (#1649)

During the compact IDs optimization pass, the result IDs of some
basic blocks can change. In spite of this, GetPreservedAnalyses
indicated that the CFG was preserved. But the CFG relies on
the basic blocks having the same IDs. Simply removing this flag
resolves the issue by preventing the CFG check.

Also Removes combinators and namemap preserved analyses from
compact IDs pass.
This commit is contained in:
Greg Roth 2018-06-27 17:29:08 -06:00 committed by Lei Zhang
parent 878b3b400b
commit 4717d24e24

View File

@ -31,10 +31,8 @@ class CompactIdsPass : public Pass {
// Return the mask of preserved Analyses. // Return the mask of preserved Analyses.
ir::IRContext::Analysis GetPreservedAnalyses() override { ir::IRContext::Analysis GetPreservedAnalyses() override {
return ir::IRContext::kAnalysisInstrToBlockMapping | return ir::IRContext::kAnalysisInstrToBlockMapping |
ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG |
ir::IRContext::kAnalysisDominatorAnalysis | ir::IRContext::kAnalysisDominatorAnalysis |
ir::IRContext::kAnalysisLoopAnalysis | ir::IRContext::kAnalysisLoopAnalysis;
ir::IRContext::kAnalysisNameMap;
} }
}; };