From c26866ee741d6674e43f74f3eb779ebcf958d5bc Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 27 Mar 2018 14:09:53 -0400 Subject: [PATCH] Preserve analyses after copy propagate arrays Contributes to #1430. --- source/opt/copy_prop_arrays.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/opt/copy_prop_arrays.h b/source/opt/copy_prop_arrays.h index 36d3284d5..ac77f33b0 100644 --- a/source/opt/copy_prop_arrays.h +++ b/source/opt/copy_prop_arrays.h @@ -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