source:
src/ControlStruct/Mutate.cc@
ab84e8a
      
      | Last change on this file since ab84e8a was 8688ce1, checked in by , 9 years ago | |
|---|---|
| 
 | |
| File size: 1.3 KB | |
| Rev | Line | |
|---|---|---|
| [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 | |
| [51b73452] | 16 | #include <algorithm> | 
| 17 | #include <iostream> | |
| 18 | #include <cassert> | |
| 19 | #include <list> | |
| 20 | ||
| 21 | #include "Mutate.h" | |
| 22 | #include "LabelFixer.h" | |
| 23 | #include "MLEMutator.h" | |
| 24 | #include "ForExprMutator.h" | |
| 25 | #include "LabelTypeChecker.h" | |
| 26 | //#include "ExceptMutator.h" | |
| 27 | ||
| [d3b7937] | 28 | #include "Common/utility.h" | 
| [51b73452] | 29 | |
| 30 | #include "SynTree/Visitor.h" | |
| 31 | ||
| 32 | using namespace std; | |
| 33 | ||
| 34 | namespace ControlStruct { | |
| [a08ba92] | 35 | void mutate( std::list< Declaration * > translationUnit ) { | 
| [145f1fc] | 36 | // hoist initialization out of for statements | 
| 37 | ForExprMutator formut; | |
| [4162aea9] | 38 | |
| [4e06c1e] | 39 | // normalizes label definitions and generates multi-level exit labels | 
| [a08ba92] | 40 | LabelFixer lfix; | 
| [4162aea9] | 41 | |
| [a08ba92] | 42 | //ExceptMutator exc; | 
| 43 | // LabelTypeChecker lbl; | |
| 44 | ||
| [145f1fc] | 45 | mutateAll( translationUnit, formut ); | 
| [982d63f] | 46 | acceptAll( translationUnit, lfix ); | 
| [a08ba92] | 47 | //mutateAll( translationUnit, exc ); | 
| 48 | //acceptAll( translationUnit, lbl ); | |
| 49 | } | |
| [51b73452] | 50 | } // namespace CodeGen | 
| [a08ba92] | 51 | |
| [51587aa] | 52 | // Local Variables: // | 
| 53 | // tab-width: 4 // | |
| 54 | // mode: c++ // | |
| 55 | // compile-command: "make install" // | |
| 56 | // End: // | 
  Note:
 See   TracBrowser
 for help on using the repository browser.
    