[Intermediate Representation] Added skeleton

This commit is contained in:
Philippe Tillet
2018-12-31 22:47:31 -05:00
parent d260aefbd1
commit e7a4e70e22
22 changed files with 729 additions and 484 deletions

29
include/ir/basic_block.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef TDL_INCLUDE_IR_BASIC_BLOCK_H
#define TDL_INCLUDE_IR_BASIC_BLOCK_H
#include <string>
#include "value.h"
namespace tdl{
namespace ir{
class context;
class function;
/* Basic Block */
class basic_block: public value{
public:
function* get_parent();
// Factory functions
static basic_block* create(context &ctx, const std::string &name, function *parent);
private:
context &ctx_;
std::string name_;
function *parent_;
};
}
}
#endif