Vuo  1.0.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Static Public Member Functions | List of all members
VuoCompilerCodeGenUtilities Class Reference

Description

Handy methods for generating code.

Static Public Member Functions

static GlobalVariable * generateAllocationForSemaphore (Module *module, string identifier)
 Generates code that allocates a dispatch_semaphore_t.
 
static void generateInitializationForSemaphore (Module *module, BasicBlock *block, GlobalVariable *semaphoreVariable, int initialValue=1)
 Generates code that initializes a dispatch_semaphore_t.
 
static Value * generateWaitForSemaphore (Module *module, BasicBlock *block, GlobalVariable *semaphoreVariable)
 Generates code that waits for and claims a dispatch_semaphore_t, with a timeout of DISPATCH_TIME_FOREVER.
 
static Value * generateWaitForSemaphore (Module *module, BasicBlock *block, GlobalVariable *semaphoreVariable, int64_t timeoutInNanoseconds)
 Generates code that waits for and claims a dispatch_semaphore_t.
 
static void generateSignalForSemaphore (Module *module, BasicBlock *block, GlobalVariable *semaphoreVariable)
 Generates code that signals a dispatch_semaphore_t.
 
static AllocaInst * generateAllocationForDispatchGroup (Module *module, BasicBlock *block, string identifier)
 Generates code that allocates a dispatch_group_t.
 
static void generateInitializationForDispatchGroup (Module *module, BasicBlock *block, AllocaInst *dispatchGroupVariable)
 Generates code that initializes a dispatch_group_t.
 
static void generateSubmissionForDispatchGroup (Module *module, BasicBlock *block, AllocaInst *dispatchGroupVariable, Function *workerFunction, Value *contextValue)
 Generates code that submits a function for asynchronous execution on the global dispatch queue and associates the function with a dispatch_group_t.
 
static void generateWaitForDispatchGroup (Module *module, BasicBlock *block, AllocaInst *dispatchGroupVariable, dispatch_time_t timeout=DISPATCH_TIME_FOREVER)
 Generates code that waits on a dispatch_group_t.
 
static GlobalVariable * generateAllocationForDispatchQueue (Module *module, string identifier)
 Generates code that allocates a dispatch_queue_t.
 
static void generateInitializationForDispatchQueue (Module *module, BasicBlock *block, GlobalVariable *dispatchQueueVariable, string dispatchQueueName)
 Generates code that initializes a dispatch_queue_t.
 
static void generateAsynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, GlobalVariable *dispatchQueueVariable, Function *workerFunction, Value *contextValue)
 Generates code that submits a function for asynchronous execution on a dispatch queue.
 
static void generateSynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, GlobalVariable *dispatchQueueVariable, Function *workerFunction, Value *contextValue)
 Generates code that submits a function for synchronous execution on a dispatch queue.
 
static void generateRetainForDispatchObject (Module *module, BasicBlock *block, Value *dispatchObjectVariable)
 Generates code that retains a dispatch_object_t (dispatch_queue_t, dispatch_group_t, dispatch_semaphore_t, etc.).
 
static void generateFinalizationForDispatchObject (Module *module, BasicBlock *block, Value *dispatchObjectVariable)
 Generates code that releases a dispatch_object_t (dispatch_queue_t, dispatch_group_t, dispatch_semaphore_t, etc.).
 
static Value * generatePointerToValue (BasicBlock *block, Value *value)
 Generates code that creates a pointer to value (on the stack), and returns the pointer.
 
static Constant * generatePointerToConstantString (Module *module, string stringValue, string globalVariableName="")
 Generates code that creates a global string variable.
 
static Constant * generatePointerToConstantArrayOfStrings (Module *module, vector< string > stringValues, string globalVariableName="")
 Generates code that creates a global array-of-strings variable.
 
static void generateStringMatchingCode (Module *module, Function *function, BasicBlock *initialBlock, BasicBlock *finalBlock, Value *inputStringValue, map< string, pair< BasicBlock *, BasicBlock * > > blocksForString)
 Generates a series of if-else statements for testing if an input string is equal to any of a set of constant strings, and executing the corresponding block of code if it is.
 
static Value * generateFormattedString (Module *module, BasicBlock *block, string formatString, vector< Value * > replacementValues)
 Generates code that allocates a buffer to hold the composite string, then calls snprintf to combine the format string and replacement values into the composite string.
 
static Value * generateStringConcatenation (Module *module, BasicBlock *block, vector< Value * > stringsToConcatenate)
 Generates code that allocates a buffer to hold the composite string, then concatenates each member of stringsToConcatenate into the composite string.
 
static Value * generateMemoryAllocation (Module *module, BasicBlock *block, Type *elementType, Value *elementCountValue)
 Generates code that dynamically allocates memory for an array.
 
static Value * generateTypeCast (Module *module, BasicBlock *block, Value *valueToCast, Type *typeToCastTo)
 Generates code to cast the value to the desired type (if it doesn't already have that type).
 
static void generateAnnotation (Module *module, BasicBlock *block, Value *value, string annotation, string fileName, unsigned int lineNumber)
 Generates a call to llvm.var.annotation, which annotates a value with a string.
 
static void generateRetainCall (Module *module, BasicBlock *block, Value *argument)
 Generates any code needed to retain argument.
 
static void generateReleaseCall (Module *module, BasicBlock *block, Value *argument)
 Generates any code needed to release argument.
 
static Value * generateSerialization (Module *module, BasicBlock *block, Value *valueToSerialize)
 Generates code that creates a string representation of the given value.
 
static void generateUnserialization (Module *module, BasicBlock *block, Value *stringToUnserialize, GlobalVariable *destination)
 Generates code that creates a value of the given type from the given string representation, and stores it in the destination variable.
 
static ICmpInst * generateIsPausedComparison (Module *module, BasicBlock *block)
 Generates code that gets the value of the isPaused global variable as a comparison value.
 
static void generatePrint (Module *module, BasicBlock *block, string formatString, Value *value=NULL)
 Generates code that prints to stderr either a string literal or a formatted string with a value.
 
static Type * getParameterTypeBeforeLowering (Function *function, int parameterIndex, Module *module, string typeName)
 Guesses the type that the function parameter had in the source code, before it was possibly converted ("lowered") to some other type by Clang/LLVM when the module was compiled.
 
static Value * convertArgumentToParameterType (Value *argument, Function *function, int parameterIndex, Value **secondArgument, Module *module, BasicBlock *block)
 If needed, generates code to convert the argument to the (possibly "lowered") type(s) of the function parameter(s).
 
static Value * callFunctionWithStructReturn (Function *function, vector< Value * > args, BasicBlock *block)
 Generates a call to the function, whose first parameter is assumed to have LLVM's sret attribute.
 
static bool isFunctionReturningStructViaParameter (Function *function)
 Returns true if the function's first parameter has LLVM's sret attribute, or in other words, LLVM has transformed struct MyType foo(...) to void foo(struct MyType *, ...).
 
static GlobalVariable * getIsPausedVariable (Module *module)
 Returns a GlobalVariable reference, generating code for the declaration if needed.
 
static StructType * getDispatchObjectType (Module *module)
 Returns a Type reference, generating code for the declaration if needed.
 
static Function * getStrcatFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getStrcmpFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getStrdupFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getStrlenFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSnprintfFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSscanfFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getFprintfFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getPutsFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getMallocFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getFreeFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getAnnotateFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getJsonObjectPutFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getJsonObjectToJsonStringExtFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getJsonTokenerParseFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getCallbackStartFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getCallbackStopFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetInputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetInputPortValueThreadUnsafeFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetOutputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetOutputPortValueThreadUnsafeFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetInputPortSummaryFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetOutputPortSummaryFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSetInputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetPublishedInputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetPublishedOutputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSetPublishedInputPortValueFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSendNodeExecutionStartedFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSendNodeExecutionFinishedFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSendInputPortsUpdatedFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSendOutputPortsUpdatedFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSendEventDroppedFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getTranscodeToGraphvizIdentifierFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getSerializeFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getUnserializeFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getOpenGraphvizGraphFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getCloseGraphvizGraphFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getGetConstantValueFromGraphvizFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 
static Function * getIsNodeInBothCompositionsFunction (Module *module)
 Returns a Function reference, generating code for the declaration if needed.
 

Member Function Documentation

Value * VuoCompilerCodeGenUtilities::callFunctionWithStructReturn ( Function *  function,
vector< Value * >  args,
BasicBlock *  block 
)
static

Generates a call to the function, whose first parameter is assumed to have LLVM's sret attribute.

Value * VuoCompilerCodeGenUtilities::convertArgumentToParameterType ( Value *  argument,
Function *  function,
int  parameterIndex,
Value **  secondArgument,
Module *  module,
BasicBlock *  block 
)
static

If needed, generates code to convert the argument to the (possibly "lowered") type(s) of the function parameter(s).

Parameters
argumentThe argument to be converted.
functionThe function the argument is being passed to.
parameterIndexThe index of the first (and possibly only) function parameter corresponding to argument.
[out]secondArgumentPointer to the second converted argument, to be passed to the second function parameter corresponding to argument. If none, pass NULL.
moduleThe module in which to generate code.
blockThe block in which to generate code.
Returns
The first converted argument, to be passed to the first (and possibly only) function parameter corresponding to argument. May be the same as argument.
AllocaInst * VuoCompilerCodeGenUtilities::generateAllocationForDispatchGroup ( Module *  module,
BasicBlock *  block,
string  identifier 
)
static

Generates code that allocates a dispatch_group_t.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
identifierThe variable name to use for the dispatch_group_t variable.
Returns
The dispatch_group_t variable.
GlobalVariable * VuoCompilerCodeGenUtilities::generateAllocationForDispatchQueue ( Module *  module,
string  identifier 
)
static

Generates code that allocates a dispatch_queue_t.

Parameters
moduleThe module in which to generate code.
identifierThe variable name to use for the dispatch_queue_t variable.
Returns
The dispatch_queue_t variable.
GlobalVariable * VuoCompilerCodeGenUtilities::generateAllocationForSemaphore ( Module *  module,
string  identifier 
)
static

Generates code that allocates a dispatch_semaphore_t.

Parameters
moduleThe module in which to generate code.
identifierThe variable name to use for the dispatch_semaphore_t variable.
Returns
The dispatch_semaphore_t variable.
void VuoCompilerCodeGenUtilities::generateAnnotation ( Module *  module,
BasicBlock *  block,
Value *  value,
string  annotation,
string  fileName,
unsigned int  lineNumber 
)
static

Generates a call to llvm.var.annotation, which annotates a value with a string.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
valueThe value to be annotated.
annotationThe annotation to be associated with the value.
fileNameThe name of the file for the module (or an empty string if no file).
lineNumberThe line number in the file for the module (or 0 if no file).
void VuoCompilerCodeGenUtilities::generateAsynchronousSubmissionToDispatchQueue ( Module *  module,
BasicBlock *  block,
GlobalVariable *  dispatchQueueVariable,
Function *  workerFunction,
Value *  contextValue 
)
static

Generates code that submits a function for asynchronous execution on a dispatch queue.

void VuoCompilerCodeGenUtilities::generateFinalizationForDispatchObject ( Module *  module,
BasicBlock *  block,
Value *  dispatchObjectVariable 
)
static

Generates code that releases a dispatch_object_t (dispatch_queue_t, dispatch_group_t, dispatch_semaphore_t, etc.).

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
dispatchObjectVariableA pointer to the dispatch_object_t (e.g. a GlobalVariable or AllocaInst).
Value * VuoCompilerCodeGenUtilities::generateFormattedString ( Module *  module,
BasicBlock *  block,
string  formatString,
vector< Value * >  replacementValues 
)
static

Generates code that allocates a buffer to hold the composite string, then calls snprintf to combine the format string and replacement values into the composite string.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
formatStringThe format string to be passed to snprintf.
replacementValuesThe replacement values to be passed to snprintf.
Returns
A value containing the address of the composite string.
void VuoCompilerCodeGenUtilities::generateInitializationForDispatchGroup ( Module *  module,
BasicBlock *  block,
AllocaInst *  dispatchGroupVariable 
)
static

Generates code that initializes a dispatch_group_t.

void VuoCompilerCodeGenUtilities::generateInitializationForDispatchQueue ( Module *  module,
BasicBlock *  block,
GlobalVariable *  dispatchQueueVariable,
string  dispatchQueueName 
)
static

Generates code that initializes a dispatch_queue_t.

void VuoCompilerCodeGenUtilities::generateInitializationForSemaphore ( Module *  module,
BasicBlock *  block,
GlobalVariable *  semaphoreVariable,
int  initialValue = 1 
)
static

Generates code that initializes a dispatch_semaphore_t.

ICmpInst * VuoCompilerCodeGenUtilities::generateIsPausedComparison ( Module *  module,
BasicBlock *  block 
)
static

Generates code that gets the value of the isPaused global variable as a comparison value.

Value * VuoCompilerCodeGenUtilities::generateMemoryAllocation ( Module *  module,
BasicBlock *  block,
Type *  elementType,
Value *  elementCountValue 
)
static

Generates code that dynamically allocates memory for an array.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
elementTypeThe type of each array element.
elementCountValueThe number of array elements. Assumed to have type integer.
Returns
A value pointing to the address of the memory.
Constant * VuoCompilerCodeGenUtilities::generatePointerToConstantArrayOfStrings ( Module *  module,
vector< string >  stringValues,
string  globalVariableName = "" 
)
static

Generates code that creates a global array-of-strings variable.

Parameters
moduleThe module in which to generate code.
stringValuesThe strings to be placed in the array.
globalVariableNameThe name to give to the global variable.
Returns
The address of the array.
Constant * VuoCompilerCodeGenUtilities::generatePointerToConstantString ( Module *  module,
string  stringValue,
string  globalVariableName = "" 
)
static

Generates code that creates a global string variable.

Parameters
moduleThe module in which to generate code.
stringValueThe string initializer for the global variable.
globalVariableNameThe name to give to the global variable.
Returns
The address of the string.
Value * VuoCompilerCodeGenUtilities::generatePointerToValue ( BasicBlock *  block,
Value *  value 
)
static

Generates code that creates a pointer to value (on the stack), and returns the pointer.

void VuoCompilerCodeGenUtilities::generatePrint ( Module *  module,
BasicBlock *  block,
string  formatString,
Value *  value = NULL 
)
static

Generates code that prints to stderr either a string literal or a formatted string with a value.

(Useful for debugging.)

void VuoCompilerCodeGenUtilities::generateReleaseCall ( Module *  module,
BasicBlock *  block,
Value *  argument 
)
static

Generates any code needed to release argument.

void VuoCompilerCodeGenUtilities::generateRetainCall ( Module *  module,
BasicBlock *  block,
Value *  argument 
)
static

Generates any code needed to retain argument.

void VuoCompilerCodeGenUtilities::generateRetainForDispatchObject ( Module *  module,
BasicBlock *  block,
Value *  dispatchObjectVariable 
)
static

Generates code that retains a dispatch_object_t (dispatch_queue_t, dispatch_group_t, dispatch_semaphore_t, etc.).

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
dispatchObjectVariableA pointer to the dispatch_object_t (e.g. a GlobalVariable or AllocaInst).
Value * VuoCompilerCodeGenUtilities::generateSerialization ( Module *  module,
BasicBlock *  block,
Value *  valueToSerialize 
)
static

Generates code that creates a string representation of the given value.

Todo:
Handle other primitive types and structs (https://b33p.net/kosada/node/3942)
void VuoCompilerCodeGenUtilities::generateSignalForSemaphore ( Module *  module,
BasicBlock *  block,
GlobalVariable *  semaphoreVariable 
)
static

Generates code that signals a dispatch_semaphore_t.

Value * VuoCompilerCodeGenUtilities::generateStringConcatenation ( Module *  module,
BasicBlock *  block,
vector< Value * >  stringsToConcatenate 
)
static

Generates code that allocates a buffer to hold the composite string, then concatenates each member of stringsToConcatenate into the composite string.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
stringsToConcatenateThe strings to concatenate. Each element should be a value of type pointer-to-char.
Returns
A value containing the address of the composite string.
void VuoCompilerCodeGenUtilities::generateStringMatchingCode ( Module *  module,
Function *  function,
BasicBlock *  initialBlock,
BasicBlock *  finalBlock,
Value *  inputStringValue,
map< string, pair< BasicBlock *, BasicBlock * > >  blocksForString 
)
static

Generates a series of if-else statements for testing if an input string is equal to any of a set of constant strings, and executing the corresponding block of code if it is.

Assumes that none of the blocks passed to this function contain branch instructions. (This function appends branch instructions to all but the final block.)

Example:

if (! strcmp(inputString, string0)) // blockForString[string0] else if (! strcmp(inputString, string1)) // blockForString[string1] ...

Parameters
moduleThe module in which to generate code.
functionThe function in which to generate code.
initialBlockThe block to which the first if-statement will be appended.
finalBlockThe block following the if-else statements.
inputStringValueThe string to compare in each if-statement.
blocksForStringFor each key string, the first block and last block to execute if the input string matches that string. The caller is responsible for branching (directly or indirectly) from the first to the last block.
void VuoCompilerCodeGenUtilities::generateSubmissionForDispatchGroup ( Module *  module,
BasicBlock *  block,
AllocaInst *  dispatchGroupVariable,
Function *  workerFunction,
Value *  contextValue 
)
static

Generates code that submits a function for asynchronous execution on the global dispatch queue and associates the function with a dispatch_group_t.

void VuoCompilerCodeGenUtilities::generateSynchronousSubmissionToDispatchQueue ( Module *  module,
BasicBlock *  block,
GlobalVariable *  dispatchQueueVariable,
Function *  workerFunction,
Value *  contextValue 
)
static

Generates code that submits a function for synchronous execution on a dispatch queue.

Value * VuoCompilerCodeGenUtilities::generateTypeCast ( Module *  module,
BasicBlock *  block,
Value *  valueToCast,
Type *  typeToCastTo 
)
static

Generates code to cast the value to the desired type (if it doesn't already have that type).

Returns
A value of type typeToCastTo (which may be valueToCast).
void VuoCompilerCodeGenUtilities::generateUnserialization ( Module *  module,
BasicBlock *  block,
Value *  stringToUnserialize,
GlobalVariable *  destination 
)
static

Generates code that creates a value of the given type from the given string representation, and stores it in the destination variable.

Todo:
Handle other primitive types and structs (https://b33p.net/kosada/node/3942)
void VuoCompilerCodeGenUtilities::generateWaitForDispatchGroup ( Module *  module,
BasicBlock *  block,
AllocaInst *  dispatchGroupVariable,
dispatch_time_t  timeout = DISPATCH_TIME_FOREVER 
)
static

Generates code that waits on a dispatch_group_t.

Value * VuoCompilerCodeGenUtilities::generateWaitForSemaphore ( Module *  module,
BasicBlock *  block,
GlobalVariable *  semaphoreVariable 
)
static

Generates code that waits for and claims a dispatch_semaphore_t, with a timeout of DISPATCH_TIME_FOREVER.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
semaphoreVariableThe semaphore.
Returns
The return value of dispatch_semaphore_wait().
Value * VuoCompilerCodeGenUtilities::generateWaitForSemaphore ( Module *  module,
BasicBlock *  block,
GlobalVariable *  semaphoreVariable,
int64_t  timeoutInNanoseconds 
)
static

Generates code that waits for and claims a dispatch_semaphore_t.

Parameters
moduleThe module in which to generate code.
blockThe block in which to generate code.
semaphoreVariableThe semaphore.
timeoutInNanosecondsThe timeout to be turned into a dispatch_time_t and passed to dispatch_semaphore_wait().
Returns
The return value of dispatch_semaphore_wait().
Function * VuoCompilerCodeGenUtilities::getAnnotateFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getCallbackStartFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getCallbackStopFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getCloseGraphvizGraphFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

StructType * VuoCompilerCodeGenUtilities::getDispatchObjectType ( Module *  module)
static

Returns a Type reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getFprintfFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getFreeFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetConstantValueFromGraphvizFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetInputPortSummaryFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetInputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetInputPortValueThreadUnsafeFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetOutputPortSummaryFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetOutputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetOutputPortValueThreadUnsafeFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetPublishedInputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getGetPublishedOutputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getIsNodeInBothCompositionsFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

GlobalVariable * VuoCompilerCodeGenUtilities::getIsPausedVariable ( Module *  module)
static

Returns a GlobalVariable reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getJsonObjectPutFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getJsonObjectToJsonStringExtFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getJsonTokenerParseFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getMallocFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getOpenGraphvizGraphFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Type * VuoCompilerCodeGenUtilities::getParameterTypeBeforeLowering ( Function *  function,
int  parameterIndex,
Module *  module,
string  typeName 
)
static

Guesses the type that the function parameter had in the source code, before it was possibly converted ("lowered") to some other type by Clang/LLVM when the module was compiled.

(For example, a struct whose members are all floats may be lowered to a vector of floats.)

Function * VuoCompilerCodeGenUtilities::getPutsFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSendEventDroppedFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSendInputPortsUpdatedFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSendNodeExecutionFinishedFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSendNodeExecutionStartedFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSendOutputPortsUpdatedFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSerializeFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSetInputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSetPublishedInputPortValueFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSnprintfFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getSscanfFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getStrcatFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getStrcmpFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getStrdupFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getStrlenFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getTranscodeToGraphvizIdentifierFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

Function * VuoCompilerCodeGenUtilities::getUnserializeFunction ( Module *  module)
static

Returns a Function reference, generating code for the declaration if needed.

bool VuoCompilerCodeGenUtilities::isFunctionReturningStructViaParameter ( Function *  function)
static

Returns true if the function's first parameter has LLVM's sret attribute, or in other words, LLVM has transformed struct MyType foo(...) to void foo(struct MyType *, ...).


The documentation for this class was generated from the following files: