Displaying 2 results from an estimated 2 matches for "m_builder".
Did you mean:
_builder
2008 Dec 30
2
[LLVMdev] Folding vector instructions
...D.
I am reading the code in Gallium-3D driver in a mesa3d branch, which
converts the shader programs (TGSI tokens) to LLVM IR.
For the shader instruction also found in LLVM IR, the conversion is trivial:
<code>
llvm::Value * Instructions::mul(llvm::Value *in1, llvm::Value *in2) {
return m_builder.CreateMul(in1, in2, name("mul")); // m_builder is a
llvm::IRBuilder
}
</code>
However, the special instrucions cannot directly be mapped to LLVM IR, like
"min", the conversion involves in 'extract' the vector, create
less-than-compare, create 'select' inst...
2008 Dec 30
2
[LLVMdev] [Mesa3d-dev] Folding vector instructions
...m-3D driver in a mesa3d branch, which
> converts the shader programs (TGSI tokens) to LLVM IR.
>
> For the shader instruction also found in LLVM IR, the conversion is trivial:
>
> <code>
> llvm::Value * Instructions::mul(llvm::Value *in1, llvm::Value *in2) {
> return m_builder.CreateMul(in1, in2, name("mul")); // m_builder is a
> llvm::IRBuilder
> }
> </code>
>
> However, the special instrucions cannot directly be mapped to LLVM IR, like
> "min", the conversion involves in 'extract' the vector, create
> less-than-co...