source: src/ControlStruct/Mutate.cc @ dc33b5b

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since dc33b5b was 25fcb84, checked in by Rob Schluntz <rschlunt@…>, 6 years ago

Reorder if/for initialization hoisting pass

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[51587aa]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[982d63f]7// Mutate.cc --
[51587aa]8//
[843054c2]9// Author           : Rodolfo G. Esteves
[51587aa]10// Created On       : Mon May 18 07:44:20 2015
[4e06c1e]11// Last Modified By : Peter A. Buhr
[8688ce1]12// Last Modified On : Thu Aug  4 11:39:08 2016
13// Update Count     : 9
[51587aa]14//
[a08ba92]15
[d180746]16#include <iterator>                // for back_inserter, inserter
17#include <list>                    // for list
[51b7345]18
[be9288a]19#include "Common/PassVisitor.h"    // for mutateAll
[d180746]20#include "ForExprMutator.h"        // for ForExprMutator
21#include "LabelFixer.h"            // for LabelFixer
[51b7345]22#include "Mutate.h"
[d180746]23#include "SynTree/Declaration.h"   // for Declaration
24#include "SynTree/Mutator.h"       // for mutateAll
[51b7345]25
[d180746]26#include "Common/PassVisitor.h"    // for PassVisitor
27#include "SynTree/Visitor.h"       // for acceptAll
[51b7345]28
29namespace ControlStruct {
[25fcb84]30        void fixLabels( std::list< Declaration * > & translationUnit ) {
[1fbeebd]31                PassVisitor<LabelFixer> lfix;
[25fcb84]32                acceptAll( translationUnit, lfix );
33        }
[a08ba92]34
[25fcb84]35        void hoistControlDecls( std::list< Declaration * > & translationUnit ) {
36                PassVisitor<ForExprMutator> formut;
[145f1fc]37                mutateAll( translationUnit, formut );
[a08ba92]38        }
[51b7345]39} // namespace CodeGen
[a08ba92]40
[51587aa]41// Local Variables: //
42// tab-width: 4 //
43// mode: c++ //
44// compile-command: "make install" //
45// End: //
Note: See TracBrowser for help on using the repository browser.