LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
traces.hh
Go to the documentation of this file.
1 
6 #ifndef CANON_TRACES_HH
7 # define CANON_TRACES_HH
8 
9 # include <map>
10 # include <canon/basic-block.hh>
11 
12 namespace canon
13 {
15  class Traces : public std::unary_function<tree::rTree, tree::rTree>
16  {
17  public:
18  Traces(bool trace_p = false);
19 
21  tree::rStm operator()(const tree::rStm& tree);
22 
23  private:
24  /*----------------------.
25  | Making Basic Blocks. |
26  `----------------------*/
27 
29  typedef std::map <temp::Label, BasicBlock*> block_map;
30 
36  block_map
37  make_basic_blocks(const tree::rStm& tree,
38  const temp::Label& entry_label,
39  const temp::Label& epilogue_label);
40 
44  make_trace(block_map& blocks,
45  const temp::Label& entry_label,
46  const temp::Label& epilogue_label);
47 
48 
49  /*-------------------------.
50  | Removing useless jumps. |
51  `-------------------------*/
52 
55  bool useless_jump_p(tree::tree_list_type::iterator begin,
56  tree::tree_list_type::iterator end);
57 
65 
66  private:
67  bool trace_p_;
68  };
69 }
70 
71 #endif // !CANON_TRACES_HH