#ifndef TDL_INCLUDE_IR_CODEGEN_STORAGE_ALLOC_H #define TDL_INCLUDE_IR_CODEGEN_STORAGE_ALLOC_H #include #include namespace tdl{ namespace ir{ class value; class function; } namespace codegen{ class layout; class target_tuner; class liveness; class loop_info; class allocation { public: // accessors unsigned get_offset(ir::value *x) const { return offsets_.at(x); } unsigned get_allocated_size() const { return allocated_size_; } // run void run(ir::function &fn); private: std::map offsets_; std::map num_bytes_; size_t allocated_size_; // dependences liveness *liveness_; layout *layout_; loop_info *loop_info_; }; } } #endif