You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
679 B

#include <vector>
#include <llvm/IR/BasicBlock.h>
namespace evmcc
{
using ProgramCounter = uint64_t;
class BasicBlock
{
public:
using State = std::vector<llvm::Value*>;
static const char* NamePrefix;
explicit BasicBlock(ProgramCounter _beginInstIdx, llvm::Function* _mainFunc);
BasicBlock(const BasicBlock&) = delete;
void operator=(const BasicBlock&) = delete;
operator llvm::BasicBlock*() { return m_llvmBB; }
llvm::BasicBlock* llvm() { return m_llvmBB; }
State& getState() { return m_state; }
private:
ProgramCounter m_beginInstIdx;
llvm::BasicBlock* m_llvmBB;
/// Basic black state vector - current/end values and their positions
State m_state;
};
}