1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "pass_driver_me_post_opt.h" 18 19 #include "base/macros.h" 20 #include "post_opt_passes.h" 21 #include "pass_manager.h" 22 23 namespace art { 24 SetupPasses(PassManager * pass_manager)25void PassDriverMEPostOpt::SetupPasses(PassManager* pass_manager) { 26 /* 27 * Create the pass list. These passes are immutable and are shared across the threads. 28 * 29 * Advantage is that there will be no race conditions here. 30 * Disadvantage is the passes can't change their internal states depending on CompilationUnit: 31 * - This is not yet an issue: no current pass would require it. 32 */ 33 // The initial list of passes to be used by the PassDriveMEPostOpt. 34 pass_manager->AddPass(new DFSOrders); 35 pass_manager->AddPass(new BuildDomination); 36 pass_manager->AddPass(new TopologicalSortOrders); 37 pass_manager->AddPass(new InitializeSSATransformation); 38 pass_manager->AddPass(new ClearPhiInstructions); 39 pass_manager->AddPass(new DefBlockMatrix); 40 pass_manager->AddPass(new FindPhiNodeBlocksPass); 41 pass_manager->AddPass(new SSAConversion); 42 pass_manager->AddPass(new PhiNodeOperands); 43 pass_manager->AddPass(new PerformInitRegLocations); 44 pass_manager->AddPass(new TypeInferencePass); 45 pass_manager->AddPass(new FinishSSATransformation); 46 } 47 48 } // namespace art 49