GPUOcelot
|
A translator from PTX to LLVM. More...
#include <PTXToLLVMTranslator.h>
A translator from PTX to LLVM.
typedef std::vector< analysis::DataflowGraph::Register > translator::PTXToLLVMTranslator::RegisterVector [protected] |
typedef std::unordered_set< std::string > translator::PTXToLLVMTranslator::StringSet [protected] |
typedef std::vector< std::string > translator::PTXToLLVMTranslator::StringVector [protected] |
translator::PTXToLLVMTranslator::PTXToLLVMTranslator | ( | OptimizationLevel | l = NoOptimization , |
const ir::ExternalFunctionSet * | s = 0 |
||
) |
translator::PTXToLLVMTranslator::~PTXToLLVMTranslator | ( | ) |
void translator::PTXToLLVMTranslator::_add | ( | const ir::LLVMInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_addAtomicCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addExternalFunctionDeclarations | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addGlobalDeclarations | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addKernelPrefix | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addKernelSuffix | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addLLVMIntrinsics | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addMathCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addMemoryCheckingDeclarations | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addQueryCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addStackAllocations | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addSurfaceCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addTextureCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_addUtilityCalls | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_bitcast | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_bitcast | ( | const ir::PTXOperand & | d, |
const ir::PTXOperand & | s | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_bitcast | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | s, | ||
bool | isSigned = false |
||
) | [protected] |
void translator::PTXToLLVMTranslator::_ceil | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_check | ( | ir::PTXInstruction::AddressSpace | space, |
const ir::LLVMInstruction::Operand & | address, | ||
unsigned int | bytes, | ||
bool | isArgument, | ||
bool | isGlobalLocal, | ||
unsigned int | statement | ||
) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_conditionCodeRegister | ( | const ir::PTXOperand & | op | ) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_context | ( | ) | [static, protected] |
void translator::PTXToLLVMTranslator::_convert | ( | const ir::LLVMInstruction::Operand & | d, |
ir::PTXOperand::DataType | dType, | ||
const ir::LLVMInstruction::Operand & | s, | ||
ir::PTXOperand::DataType | sType, | ||
int | modifier = 0 |
||
) | [protected] |
void translator::PTXToLLVMTranslator::_debug | ( | const analysis::DataflowGraph::Instruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_debug | ( | const analysis::DataflowGraph::Block & | b | ) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_destination | ( | const ir::PTXInstruction & | i, |
bool | pd = false |
||
) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_destinationCC | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_doubleWidth | ( | ir::LLVMInstruction::DataType & | v | ) | [static, protected] |
void translator::PTXToLLVMTranslator::_floatToIntSaturate | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | ftoint, | ||
const ir::LLVMInstruction::Operand & | f, | ||
bool | isSigned | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_floor | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_flushToZero | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_getAddressableGlobalPointer | ( | const ir::PTXOperand & | o | ) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_getAddressableVariablePointer | ( | ir::PTXInstruction::AddressSpace | space, |
const ir::PTXOperand & | o | ||
) | [protected] |
ir::LLVMInstruction::Type translator::PTXToLLVMTranslator::_getCtaContextType | ( | ) | [static, protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_getLoadOrStorePointer | ( | const ir::PTXOperand & | o, |
ir::PTXInstruction::AddressSpace | space, | ||
ir::LLVMInstruction::DataType | type, | ||
unsigned int | vector | ||
) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_getMemoryBasePointer | ( | ir::PTXInstruction::AddressSpace | space, |
bool | isGlobalLocal, | ||
bool | isArgument | ||
) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_getMemoryExtent | ( | ir::PTXInstruction::AddressSpace | space | ) | [protected] |
void translator::PTXToLLVMTranslator::_initializeRegisters | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_insertDebugSymbols | ( | ) | [protected] |
std::string translator::PTXToLLVMTranslator::_loadSpecialRegister | ( | ir::PTXOperand::SpecialRegister | s, |
ir::PTXOperand::VectorIndex | index | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_nearbyint | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_newBlock | ( | const std::string & | name | ) | [protected] |
void translator::PTXToLLVMTranslator::_reportReads | ( | const analysis::DataflowGraph::Instruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_reportWrites | ( | const analysis::DataflowGraph::Instruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_saturate | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_swapAllExceptName | ( | ir::LLVMInstruction::Operand & | o, |
const ir::PTXOperand & | i | ||
) | [protected] |
std::string translator::PTXToLLVMTranslator::_tempRegister | ( | ) | [protected] |
ir::LLVMInstruction::Operand translator::PTXToLLVMTranslator::_translate | ( | const ir::PTXOperand & | o | ) | [protected] |
ir::LLVMInstruction::DataType translator::PTXToLLVMTranslator::_translate | ( | ir::PTXOperand::DataType | type | ) | [static, protected] |
ir::LLVMInstruction::Comparison translator::PTXToLLVMTranslator::_translate | ( | ir::PTXInstruction::CmpOp | op, |
bool | isInt, | ||
bool | isSigned | ||
) | [static, protected] |
void translator::PTXToLLVMTranslator::_translate | ( | const analysis::DataflowGraph::Instruction & | i, |
const analysis::DataflowGraph::Block & | block | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_translate | ( | const ir::PTXInstruction & | i, |
const analysis::DataflowGraph::Block & | block | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_translateAbs | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateAdd | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateAddC | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateAnd | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateAtom | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateBar | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateBfi | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateBfind | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateBra | ( | const ir::PTXInstruction & | i, |
const analysis::DataflowGraph::Block & | block | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_translateBrev | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateBrkpt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCall | ( | const ir::PTXInstruction & | i, |
const analysis::DataflowGraph::Block & | block | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_translateClz | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCNot | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCopySign | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCos | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCvt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateCvta | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateDiv | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateEx2 | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateExit | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateInstructions | ( | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateIsspacep | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateLd | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateLdu | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateLg2 | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMad | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMad24 | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMax | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMembar | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMin | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMov | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMul | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateMul24 | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateNeg | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateNot | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateOr | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translatePmevent | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translatePopc | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translatePrmt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateRcp | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateRed | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateRem | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateRet | ( | const ir::PTXInstruction & | i, |
const analysis::DataflowGraph::Block & | block | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_translateRsqrt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSad | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSelP | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSet | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSetP | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateShl | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateShr | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSin | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSlCt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSqrt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSt | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSub | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSubC | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSuld | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSuq | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSured | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateSust | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateTestP | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateTex | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateTrap | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateTxq | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateVote | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_translateXor | ( | const ir::PTXInstruction & | i | ) | [protected] |
void translator::PTXToLLVMTranslator::_trunc | ( | const ir::LLVMInstruction::Operand & | d, |
const ir::LLVMInstruction::Operand & | a | ||
) | [protected] |
void translator::PTXToLLVMTranslator::_yield | ( | unsigned int | type, |
const ir::LLVMInstruction::Operand & | continuation = ir::LLVMInstruction::Operand() |
||
) | [protected] |
ir::Kernel * translator::PTXToLLVMTranslator::translate | ( | const ir::Kernel * | i | ) | [virtual] |
Translate a kernel from the source ISA to the destination ISA.
i | The input kernel. Must be in the source ISA. |
Note that this will allocate a new kernel and return it to the caller. It is the caller's resposibility to free it.
Implements translator::Translator.
ir::Kernel * translator::PTXToLLVMTranslator::translatedKernel | ( | ) | const |
const ir::ExternalFunctionSet* translator::PTXToLLVMTranslator::_externals [protected] |
const ir::PTXKernel* translator::PTXToLLVMTranslator::_ptx [protected] |
unsigned int translator::PTXToLLVMTranslator::_tempBlockCount [protected] |
unsigned int translator::PTXToLLVMTranslator::_tempCCRegisterCount [protected] |
unsigned int translator::PTXToLLVMTranslator::_tempRegisterCount [protected] |
bool translator::PTXToLLVMTranslator::_usesTextures [protected] |