Permalink
Browse files

updated the usage section in IRBuilder.Rd. CallingConv examples

  • Loading branch information...
1 parent 5cc4c18 commit a6cadeb24a1ebc3e6e13bc43d4b5d4309d750eb4 @duncantl committed Jul 8, 2013
Showing with 86 additions and 4 deletions.
  1. +2 −2 R/Function.R
  2. +77 −1 man/IRBuilder.Rd
  3. +6 −0 man/getCallingConv.Rd
  4. +1 −1 man/getOpcode.Rd
View
4 R/Function.R
@@ -228,12 +228,12 @@ function(vals)
-setClass("CallingConv", contains = "integer")
+#setClass("CallingConv", contains = "integer")
setCallingConv =
function(fun, conv)
.Call("R_Function_setCallingConv", as(fun, "Function"), as(conv, "CallingConv"))
getCallingConv =
function(fun)
- as(.Call("R_Function_setCallingConv", as(fun, "Function")), "CallingConv")
+ as(.Call("R_Function_getCallingConv", as(fun, "Function")), "CallingConv")
View
78 man/IRBuilder.Rd
@@ -58,11 +58,87 @@
}
\usage{
IRBuilder(block = getGlobalContext())
+createBr(builder, block)
+createCall(builder, fun, ..., .args = list(...), id = character())
+createCondBr(builder, cond, true, false)
+createGEP(builder, val, index, id = character())
+createLoad(builder, val, isVolatile = FALSE, id = character())
+createLocalArrayVariable(builder, type, id, size = NULL)
+createLocalVariable(builder, type, id, beforeTerminator = FALSE)
+createNeg(val, id = character(), block = NULL)
+createNot(val, id = character(), block = NULL, builder = NULL)
+createRet(builder, value = NULL)
+createReturn(builder, value = NULL)
+createReturnVoid(builder)
+createRetVoid(builder)
+createSExt(builder, val, type, id = character())
+createStore(builder, val, ptr, volatile = FALSE)
+createBitCast(builder, val, type, id = character())
+createUIToFP(builder, val, type, id = character())
+createSIToFP(builder, val, type, id = character())
+createFPToSI(builder, val, type, id = character())
+createFPToUI(builder, val, type, id = character())
+setInsertPoint(builder, instruction)
+createBranch(builder, block)
+createCast(builder, op, from, to, id = character())
+createCondBranch(builder, cond, true, false)
+createExtractElement(builder, vec, idx)
+createFCmp(builder, op, lhs, rhs, id = character())
+createFNeg(builder, val, id = character())
+createGlobalString(builder, val, id = character())
+createInsertElement(builder, vec, elt, idx)
+createIntCast(builder, val, type, isSigned = TRUE, id = character())
+createSelect(builder, cond, true, false, id = character())
+createStructGEP(builder, value, field)
+createTargetMachine(target, triple, cpu, features = "", options = list())
+createUnreachable(builder, id = character())
+createUnwind(builder, id = character())
+createZExt(builder, val, type, id = character(), Z = TRUE)
+getTrue(ir)
+getFalse(ir)
+getInsertBlock(builder)
+setInsertBlock(builder, block)
+setInsertPoint(builder, instruction)
}
\arguments{
\item{block}{either a \code{Block} object to which instructions will be inserted/added
by default. This can be reset using \code{setInsertPoint}.
- Alternatively, this can be an LLVMContext object.}
+ Alternatively, this can be an LLVMContext object.}
+\item{builder}{}
+\item{fun}{}
+\item{...}{}
+\item{.args}{}
+\item{id}{}
+\item{cond}{}
+\item{true}{}
+\item{false}{}
+\item{val}{}
+\item{index}{}
+\item{isVolatile}{}
+\item{type}{}
+\item{size}{}
+\item{beforeTerminator}{}
+\item{value}{}
+\item{ptr}{}
+\item{volatile}{}
+\item{instruction}{}
+\item{op}{}
+\item{from}{}
+\item{to}{}
+\item{vec}{}
+\item{idx}{}
+\item{lhs}{}
+\item{rhs}{}
+\item{elt}{}
+\item{isSigned}{}
+\item{field}{}
+\item{target}{}
+\item{triple}{}
+\item{cpu}{}
+\item{features}{}
+\item{options}{}
+\item{Z}{}
+\item{ir}{}
}
%\value{}
View
6 man/getCallingConv.Rd
@@ -33,5 +33,11 @@ Duncan Temple Lang
\examples{
f = Function("foo", Int32Type, list(x = Int32Type, y = DoubleType))
getCallingConv(f)
+
+ setCallingConv(f, 'Fast')
+
+ f = Function("kernel", VoidType, list(n = Int32Type, x = FloatPtrType, out = FloatPtrType))
+ setCallingConv(f, 'PTX_Kernel')
+ showModule(f)
}
\keyword{programming}
View
2 man/getOpcode.Rd
@@ -17,7 +17,7 @@ getOpcode(x, ...)
\references{
LLVM Documentation \url{http://llvm.org/docs/}
}
-\author{DTL}
+\author{Duncan Temple Lang}
%\seealso{}
%\examples{}

0 comments on commit a6cadeb

Please sign in to comment.