[code generation] some more bugfixing with nested control flow

This commit is contained in:
Philippe Tillet
2019-02-18 22:54:08 -05:00
parent f3094a512b
commit 90ec0ae2c0
10 changed files with 102 additions and 71 deletions

View File

@@ -15,6 +15,8 @@ namespace ir {
namespace codegen{
class buffer_info_pass;
class place_shared_copy {
private:
typedef std::pair<unsigned, unsigned> interval_t;
@@ -22,10 +24,14 @@ private:
private:
bool intersect(const interval_vec_t &I, interval_t i);
void add_copies(ir::value *x, ir::builder &builder);
void add_copy(ir::value *x, ir::builder &builder);
public:
place_shared_copy(buffer_info_pass *info): info_(info) { }
void run(ir::module &mod);
private:
buffer_info_pass *info_;
};