|
| | Func (JitModule &J, LLVMContext &Ctx, const std::string &Name, Dispatcher &Dispatch) |
| |
| RetT | operator() (ArgT... Args) |
| |
| void | declArgs () |
| |
| auto | getArgs () |
| |
| template<std::size_t Idx> |
| auto & | getArg () |
| |
| auto | getCompiledFunc () const |
| |
| void | setCompiledFunc (RetT(*CompiledFuncIn)(ArgT...)) |
| |
| JitModule & | getJitModule () |
| |
| LLVMContext & | getContext () |
| |
| std::unique_ptr< ScalarStorage > | createScalarStorage (const std::string &Name, Type *AllocaTy) |
| |
| std::unique_ptr< PointerStorage > | createPointerStorage (const std::string &Name, Type *AllocaTy, Type *ElemTy) |
| |
| std::unique_ptr< ArrayStorage > | createArrayStorage (const std::string &Name, AddressSpace AS, Type *ArrTy) |
| |
| void | setInsertPoint (BasicBlock *BB) |
| |
| void | setInsertPointBegin (BasicBlock *BB) |
| |
| void | setInsertPointAtEntry () |
| |
| void | clearInsertPoint () |
| |
| BasicBlock * | getInsertBlock () |
| |
| std::tuple< BasicBlock *, BasicBlock * > | splitCurrentBlock () |
| |
| BasicBlock * | createBasicBlock (const std::string &Name="", BasicBlock *InsertBefore=nullptr) |
| |
| void | eraseTerminator (BasicBlock *BB) |
| |
| BasicBlock * | getUniqueSuccessor (BasicBlock *BB) |
| |
| Value * | createAdd (Value *LHS, Value *RHS) |
| |
| Value * | createFAdd (Value *LHS, Value *RHS) |
| |
| Value * | createSub (Value *LHS, Value *RHS) |
| |
| Value * | createFSub (Value *LHS, Value *RHS) |
| |
| Value * | createMul (Value *LHS, Value *RHS) |
| |
| Value * | createFMul (Value *LHS, Value *RHS) |
| |
| Value * | createUDiv (Value *LHS, Value *RHS) |
| |
| Value * | createSDiv (Value *LHS, Value *RHS) |
| |
| Value * | createFDiv (Value *LHS, Value *RHS) |
| |
| Value * | createURem (Value *LHS, Value *RHS) |
| |
| Value * | createSRem (Value *LHS, Value *RHS) |
| |
| Value * | createFRem (Value *LHS, Value *RHS) |
| |
| Value * | createAnd (Value *LHS, Value *RHS) |
| |
| Value * | createOr (Value *LHS, Value *RHS) |
| |
| Value * | createXor (Value *LHS, Value *RHS) |
| |
| Value * | createNot (Value *Val) |
| |
| Value * | createICmpEQ (Value *LHS, Value *RHS) |
| |
| Value * | createICmpNE (Value *LHS, Value *RHS) |
| |
| Value * | createICmpSLT (Value *LHS, Value *RHS) |
| |
| Value * | createICmpSGT (Value *LHS, Value *RHS) |
| |
| Value * | createICmpSGE (Value *LHS, Value *RHS) |
| |
| Value * | createICmpSLE (Value *LHS, Value *RHS) |
| |
| Value * | createICmpUGT (Value *LHS, Value *RHS) |
| |
| Value * | createICmpUGE (Value *LHS, Value *RHS) |
| |
| Value * | createICmpULT (Value *LHS, Value *RHS) |
| |
| Value * | createICmpULE (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpOEQ (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpONE (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpOLT (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpOLE (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpOGT (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpOGE (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpULT (Value *LHS, Value *RHS) |
| |
| Value * | createFCmpULE (Value *LHS, Value *RHS) |
| |
| Value * | createAtomicAdd (Value *Addr, Value *Val) |
| |
| Value * | createAtomicSub (Value *Addr, Value *Val) |
| |
| Value * | createAtomicMax (Value *Addr, Value *Val) |
| |
| Value * | createAtomicMin (Value *Addr, Value *Val) |
| |
| Value * | createLoad (Type *Ty, Value *Ptr, const std::string &Name="") |
| |
| void | createStore (Value *Val, Value *Ptr) |
| |
| Value * | createCall (const std::string &FName, Type *RetTy, const std::vector< Type * > &ArgTys, const std::vector< Value * > &Args) |
| |
| Value * | createCall (const std::string &FName, Type *RetTy) |
| |
| Value * | createInBoundsGEP (Type *Ty, Value *Ptr, const std::vector< Value * > IdxList, const std::string &Name="") |
| |
| Value * | createConstInBoundsGEP1_64 (Type *Ty, Value *Ptr, size_t Idx) |
| |
| Value * | createConstInBoundsGEP2_64 (Type *Ty, Value *Ptr, size_t Idx0, size_t Idx1) |
| |
| unsigned | getAddressSpace (Type *Ty) |
| |
| Type * | getPointerType (Type *ElemTy, unsigned AS) |
| |
| Type * | getPointerTypeUnqual (Type *ElemTy) |
| |
| Type * | getInt32Ty () |
| |
| Type * | getInt16Ty () |
| |
| Type * | getInt64Ty () |
| |
| Type * | getFloatTy () |
| |
| bool | isIntegerTy (Type *Ty) |
| |
| bool | isFloatingPointTy (Type *Ty) |
| |
| template<typename From , typename To > |
| Value * | convert (Value *V) |
| |
| llvm::Value * | createIntCast (llvm::Value *V, llvm::Type *DestTy, bool IsSigned) |
| |
| llvm::Value * | createFPCast (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | createSIToFP (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | createUIToFP (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | createFPToSI (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | createFPToUI (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | createBitCast (llvm::Value *V, llvm::Type *DestTy) |
| |
| llvm::Value * | getConstantInt (llvm::Type *Ty, uint64_t Val) |
| |
| llvm::Value * | getConstantFP (llvm::Type *Ty, double Val) |
| |
| Value * | createZExt (Value *V, Type *DestTy) |
| |
| | FuncBase (JitModule &J, const std::string &Name, Type *RetTy, const std::vector< Type * > &ArgTys) |
| |
| | ~FuncBase () |
| |
| TargetModelType | getTargetModel () const |
| |
| Function * | getFunction () |
| |
| Value * | getArg (size_t Idx) |
| |
| AllocaInst * | emitAlloca (Type *Ty, const std::string &Name, AddressSpace AS=AddressSpace::DEFAULT) |
| |
| Value * | emitArrayCreate (Type *Ty, AddressSpace AT, const std::string &Name) |
| |
| template<typename T > |
| Var< T > | declVar (const std::string &Name="var") |
| |
| template<typename T > |
| Var< T > | declVar (size_t NElem, AddressSpace AS=AddressSpace::DEFAULT, const std::string &Name="array_var") |
| |
| template<typename T > |
| Var< T > | defVar (const T &Val, const std::string &Name="var") |
| |
| template<typename T , typename U > |
| Var< T > | defVar (const Var< U > &Val, const std::string &Name="var") |
| |
| template<typename T > |
| Var< const T > | defRuntimeConst (const T &Val, const std::string &Name="run.const.var") |
| |
| template<typename... ArgT> |
| auto | defRuntimeConsts (ArgT &&...Args) |
| |
| void | beginFunction (const char *File=__builtin_FILE(), int Line=__builtin_LINE()) |
| |
| void | endFunction () |
| |
| void | beginIf (const Var< bool > &CondVar, const char *File=__builtin_FILE(), int Line=__builtin_LINE()) |
| |
| void | endIf () |
| |
| template<typename IterT , typename InitT , typename UpperT , typename IncT > |
| void | beginFor (Var< IterT > &IterVar, const Var< InitT > &InitVar, const Var< UpperT > &UpperBound, const Var< IncT > &IncVar, const char *File=__builtin_FILE(), int Line=__builtin_LINE()) |
| |
| void | endFor () |
| |
| template<typename CondLambda > |
| void | beginWhile (CondLambda &&Cond, const char *File=__builtin_FILE(), int Line=__builtin_LINE()) |
| |
| void | endWhile () |
| |
| template<typename Sig > |
| std::enable_if_t<!std::is_void_v< typename FnSig< Sig >::RetT >, Var< typename FnSig< Sig >::RetT > > | call (const std::string &Name) |
| |
| template<typename Sig > |
| std::enable_if_t< std::is_void_v< typename FnSig< Sig >::RetT >, void > | call (const std::string &Name) |
| |
| template<typename Sig , typename... ArgVars> |
| std::enable_if_t<!std::is_void_v< typename FnSig< Sig >::RetT >, Var< typename FnSig< Sig >::RetT > > | call (const std::string &Name, ArgVars &&...ArgsVars) |
| |
| template<typename Sig , typename... ArgVars> |
| std::enable_if_t< std::is_void_v< typename FnSig< Sig >::RetT >, void > | call (const std::string &Name, ArgVars &&...ArgsVars) |
| |
| template<typename BuiltinFuncT > |
| decltype(auto) | callBuiltin (BuiltinFuncT &&BuiltinFunc) |
| |
| template<typename T > |
| std::enable_if_t< std::is_arithmetic_v< T >, Var< T > > | atomicAdd (const Var< T * > &Addr, const Var< T > &Val) |
| |
| template<typename T > |
| std::enable_if_t< std::is_arithmetic_v< T >, Var< T > > | atomicSub (const Var< T * > &Addr, const Var< T > &Val) |
| |
| template<typename T > |
| std::enable_if_t< std::is_arithmetic_v< T >, Var< T > > | atomicMax (const Var< T * > &Addr, const Var< T > &Val) |
| |
| template<typename T > |
| std::enable_if_t< std::is_arithmetic_v< T >, Var< T > > | atomicMin (const Var< T * > &Addr, const Var< T > &Val) |
| |
| template<typename IterT , typename InitT , typename UpperT , typename IncT , typename BodyLambda = EmptyLambda> |
| auto | forLoop (Var< IterT > &Iter, const Var< InitT > &Init, const Var< UpperT > &Upper, const Var< IncT > &Inc, BodyLambda &&Body={}) |
| |
| template<typename... LoopBuilders> |
| auto | buildLoopNest (LoopBuilders &&...Loops) |
| |
| template<typename T > |
| void | ret (const Var< T > &RetVal) |
| |
| void | ret () |
| |
| const std::string & | getName () const |
| |
| void | setName (const std::string &NewName) |
| |
| template<typename U , typename T > |
| std::enable_if_t< std::is_convertible_v< T, U >, Var< U > > | convert (const Var< T > &V) |
| |