112 inline std::ostream& operator<<(std::ostream& os, const std::vector<Type>& types) {
143 LOG(
FATAL) <<
"Invalid pointer type: " <<
static_cast<int>(pointer);
162 LOG(
FATAL) <<
"Invalid pointee type: " <<
static_cast<int>(pointee);
179 virtual ~Value() =
default;
260 const std::vector<std::unique_ptr<Instruction>>&
body()
const {
return body_; }
266 template <
typename Tp,
typename... Args>
268 body_.emplace_back(
new Tp(std::forward<Args>(
args)...));
269 return body_.back().get();
272 template <
typename Tp,
typename... Args>
282 std::vector<std::unique_ptr<Instruction>>
body_;
327 const std::string&
label)
354 const std::string&
label)
412 const std::vector<const Value*>&
arguments,
413 const std::string&
label)
420 const std::vector<const Value*>&
arguments,
421 const std::string&
label)
429 const Type returnType,
430 const std::vector<const Value*>&
arguments,
431 const std::string&
label)
465 const std::vector<const Value*>&
arguments,
466 const std::string&
label)
554 const std::vector<std::unique_ptr<Instruction>>&
body()
const {
return body_; }
564 template <
typename Tp,
typename... Args>
566 body_.emplace_back(
new Tp(std::forward<Args>(
args)...));
567 return body_.back().get();
571 std::vector<std::unique_ptr<Instruction>>
body_;
const std::vector< std::unique_ptr< Constant > > & constants() const
Argument(const Type type, const std::string &label)
const std::vector< NamedArg > & arg_types() const
const Value * size() const
const std::string & name() const
const Value * array_size_
const Value * error_code() const
const std::string & label() const
ExternalCall(const std::string &callee_name, const Type ret_type, const std::vector< const Value * > &arguments, const std::string &label)
const std::vector< const Value * > arguments_
bool always_inline() const
ICmp(const Predicate predicate, const Value *lhs, const Value *rhs, const std::string &label)
const Value * value() const
const Value * rhs() const
const std::string callee_name_
const std::vector< std::unique_ptr< Instruction > > & body() const
std::ostream & operator<<(std::ostream &os, const SessionInfo &session_info)
const std::string callee_name_
void run(ReductionInterpreterImpl *interpreter) override
const std::vector< const Value * > arguments_
Argument * arg(const size_t idx) const
Instruction(const Type type, const std::string &label)
ConstantInt(const int64_t value, const Type target)
Type pointer_type(const Type pointee)
std::vector< std::unique_ptr< Argument > > arguments_
Alloca(const Type element_type, const Value *array_size, const std::string &label)
Constant(const Type type)
BinaryOperator(const BinaryOp op, const Value *lhs, const Value *rhs, const std::string &label)
void run(ReductionInterpreterImpl *interpreter) override
void run(ReductionInterpreterImpl *interpreter) override
const Value * base() const
Value * addConstant(Args &&...args)
Value * add(Args &&...args)
virtual void run(ReductionInterpreterImpl *interpreter)=0
const Value * lhs() const
void set_cached_callee(void *cached_callee) const
void * cached_callee() const
thread_local size_t g_value_id
const Value * source() const
const Value * end() const
const Value * start() const
std::vector< std::unique_ptr< Instruction > > body_
const Value * rhs() const
Call(const std::string &callee_name, const Type returnType, const std::vector< const Value * > &arguments, const std::string &label)
const Value * source() const
ConstantFP(const double value, const Type target)
const Value * dest() const
void run(ReductionInterpreterImpl *interpreter) override
void run(ReductionInterpreterImpl *interpreter) override
Function(const std::string name, const std::vector< NamedArg > &arg_types, const Type ret_type, const bool always_inline)
GetElementPtr(const Value *base, const Value *index, const std::string &label)
const std::vector< NamedArg > arg_types_
Type pointee_type(const Type pointer)
Call(const Function *callee, const std::vector< const Value * > &arguments, const std::string &label)
const std::string & callee_name() const
const std::vector< const Value * > & arguments() const
Value * add(Args &&...args)
void run(ReductionInterpreterImpl *interpreter) override
Value(const Type type, const std::string &label)
MemCpy(const Value *dest, const Value *source, const Value *size)
void * cached_callee() const
const Function * callee() const
const Value * cond() const
const Predicate predicate_
const Value * source() const
std::vector< std::unique_ptr< Instruction > > body_
const Value * error_code_
Cast(const CastOp op, const Value *source, const Type type, const std::string &label)
Load(const Value *source, const std::string &label)
const Value * index() const
const Value * array_size() const
const bool always_inline_
const Value * lhs() const
const std::vector< std::unique_ptr< Instruction > > & body() const
For(const Value *start, const Value *end, const std::string &label)
const Value * iter() const
std::vector< std::unique_ptr< Constant > > constants_
ReturnEarly(const Value *cond, const std::string &label)
void run(ReductionInterpreterImpl *interpreter) override
const std::string & callee_name() const
Predicate predicate() const
void run(ReductionInterpreterImpl *interpreter) override
void run(ReductionInterpreterImpl *interpreter) override
void run(ReductionInterpreterImpl *interpreter) override
Call(const std::string &callee_name, const std::vector< const Value * > &arguments, const std::string &label)
void run(ReductionInterpreterImpl *interpreter) override
void set_cached_callee(void *cached_callee) const
void run(ReductionInterpreterImpl *interpreter) override
ReturnEarly(const Value *cond, const Value *error_code, const std::string &label)
const std::vector< const Value * > & arguments() const