LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
regallocator.hh
Go to the documentation of this file.
1 
6 #ifndef REGALLOC_REGALLOCATOR_HH
7 # define REGALLOC_REGALLOCATOR_HH
8 
9 # include <temp/temp.hh>
10 # include <assem/fwd.hh>
11 # include <assem/visitor.hh>
12 # include <target/fwd.hh>
13 # include <misc/timer.hh>
14 
15 namespace regalloc
16 {
17 
20  : public assem::Visitor
21  {
22  public:
24  using super_type::operator();
27  public:
30  const temp::TempMap& tempmap,
31  bool coalesce_p = true, bool trace_p = false);
34  public:
36  virtual void operator()(assem::ProcFrag& frag) override;
40  const misc::timer& timer_get() const;
41 
42  private:
43  /* \brief Remove useless moves i.e. each Move which have the same
44  register as source and destination. */
45  void remove_useless_moves(assem::Instrs& instrs);
46 
54  bool trace_p_;
57  };
58 
59 } // namespace regalloc
60 
61 #endif // !REGALLOC_REGALLOCATOR_HH