Permalink
Browse files

added several functions

  • Loading branch information...
duncantl committed Jul 6, 2013
1 parent 737cd18 commit f0e3a2b30346693976cc8df076d72560e7880e22
View
@@ -2,6 +2,10 @@ Version 0.6-0
* added setMetadata(), getMetadata() and getNumOperands() & getOperands()
+ * eraseFromParent(), removeFromParent()
+
+ * insertBefore(), insertAfter(), moveBefore()
+
Version 0.5-0
* show() methods for Module, Function, Type to make the
View
@@ -32,4 +32,4 @@ Collate: llvmVersion.R classDefs.R manual_generics.R BinaryOpEnums.R Function.R
declareFunction.R typeName.R
ostream.R targetMachine.R
metadata.R
-
+ opCodeClassMap.R
View
@@ -256,7 +256,7 @@ export(getOpcode)
export(getParent)
export(getBlockInstructions)
-export(eraseFromParent)
+export(eraseFromParent, removeFromParent)
exportMethods("[[<-") # module
@@ -352,6 +352,7 @@ exportClass("Argument")
export(getNumOperands, getOperand)
+exportMethods(getNumOperands, getOperand)
export(getBlocks)
@@ -371,3 +372,9 @@ exportClasses(MDNode, MDString, NamedMDNode)
export(setMetadata, getMetadata)
export(getNumOperands, getOperands)
+exportMethods(length)
+
+export(LLVMAttributes)
+
+export(insertBefore, insertAfter, moveBefore)
+
View
@@ -1,4 +1,4 @@
-Rllvm.pdf:
+Rllvm.pdf: ../explorations/dnorm.tex
JSS_DIR=$(HOME)/Projects/JSS/JSSstyle
@@ -16,4 +16,17 @@ clean:
define run-tex
(export TEXINPUTS=$(JSS_DIR):$(TEXINPUTS):: ; pdflatex $(<F))
-endef
+endef
+
+ifndef DYN_DOCS
+ DYN_DOCS=$(HOME)/Classes/StatComputing/XDynDocs/inst
+endif
+
+USE_DOCBOOK_SHORTHAND=1
+include $(DYN_DOCS)/Make/Makefile
+
+LATEX_STYLE=http://www.omegahat.org/XSL/latex/db2NoPreamble.xsl
+
+
+clean:
+ -rm Rllvm.aux Rllvm.log Rllvm.bbl Rllvm.blg Rllvm.out
View
@@ -0,0 +1,108 @@
+# source("../funcGroups.R")
+# group(setdiff(llvmFuns, unique(xpathSApply(doc, "//r:func", xmlValue))))
+
+[need example] findFunction
+
+Related to .llvm
+ [done] makeRFunction()
+ [ignore] run()
+
+Context
+ getContext(), getGlobalContext()
+
+[ignore] llvmLoadDLL
+[done] llvmAddSymbol
+
+[finish] findFunction to get address of routine in an ExecutionEngine and can pass that to
+ a regular C routine.
+ Example of compiling a routine and passing that to a routine.
+ sort is one example
+ numerical optimization
+
+% Mention in exporting/importing IR code with other languages.
+I/O of code
+{write,read}BitCode, parseIR, parseAssembly
+
+Pass manager
+ getPassManager
+ passManager
+ addPass, addAnalysisPasses
+
+ addPassesToEmitFile, stringRawOstream, rawFDOstream, formattedRawOstream
+
+Different targets:
+ getLLVMTargets
+ getTargetTriple
+ {g,s}etDataLayout
+ lookupTarget
+ targetLibraryInfo
+ InitializeNVPTXTarget, InitializeCppBackendTarget
+
+
+System-level commands
+[done] llvmVersion
+ InitializeNativeTarget - should this be in back-ends
+
+setAlignment
+
+Explain module instance is specific to an execution engine
+
+
+Module
+ Optimize
+ showModule
+ verifyModule
+ declareFunction
+ getModuleFunctions, getModuleGlobals
+ global variables, initializer
+ getGlobalVariables
+ getGlobalValue
+ setInitializer
+
+
+
+Types
+ getType(any Value object)
+
+ pointerType, arrayType, structType, vectorType
+ getIntegerType
+ getTypeID
+ isBasicType, isArrayType, isPointerType, ...
+ sameType
+ getElementType
+
+
+Walk the instructions and blocks
+[done] getOperands, getOperand, getNumOperands
+getCalledFunction and other class-specific functions
+
+[not really very important] is* functions for querying type of instruction
+
+[done] getParent,
+
+[done]getBlocks
+ getName(getBlocks(module$v_dnorm)[[2]])
+ setName(getBlocks(module$dnorm)[[1]], "entry")
+
+[done] block[] or getBlockInstructions
+[done] getOpcode
+[done] getTerminator
+
+may* Functions
+
+[done] setInsertPoint, setInsertBlock
+[done] eraseFromParent, insertBefore, insertAfter, moveBefore
+
+
+Attributes
+ [done] {set,get}FuncAttributes
+ [done]setParamAttributes
+implement getParamAttributes
+
+[done] Metadata
+ {get,set}Metadata
+ hasMetadata (and hasMetadataOtherThanDebugLoc)
+
+ e.g. declare a function a kernel for PTX.
+
+
Oops, something went wrong.

0 comments on commit f0e3a2b

Please sign in to comment.