Preserve analyses after copy propagate arrays

Contributes to #1430.
This commit is contained in:
Steven Perron 2018-03-27 14:09:53 -04:00 committed by Steven Perron
parent 0a2ee65f57
commit c26866ee74

View File

@ -40,6 +40,15 @@ class CopyPropagateArrays : public MemPass {
const char* name() const override { return "copy-propagate-arrays"; }
Status Process(ir::IRContext*) override;
ir::IRContext::Analysis GetPreservedAnalyses() override {
return ir::IRContext::kAnalysisDefUse | ir::IRContext::kAnalysisCFG |
ir::IRContext::kAnalysisInstrToBlockMapping |
ir::IRContext::kAnalysisLoopAnalysis |
ir::IRContext::kAnalysisDecorations |
ir::IRContext::kAnalysisDominatorAnalysis |
ir::IRContext::kAnalysisNameMap;
}
private:
// The class used to identify a particular memory object. This memory object
// will be owned by a particular variable, meaning that the memory is part of