Home | History | Annotate | Download | only in Renderscript

Lines Matching refs:Function

23 #include <llvm/IR/Function.h>
42 * ForEach-able function to be invoked over the appropriate data cells of the
44 * support doing this for any ForEach-able compute kernels. The new function
45 * name is the original function name followed by ".expand". Note that we
46 * still generate code for the original function.
60 uint32_t getRootSignature(llvm::Function *F) {
66 for (llvm::Function::arg_iterator B = F->arg_begin(),
86 // hard-coded to look at only the first such function.
158 /* Performs the actual optimization on a selected function. On success, the
159 * Module will contain a new function of the name "<NAME>.expand" that
162 bool ExpandFunction(llvm::Function *F, uint32_t Signature) {
163 ALOGV("Expanding ForEach-able Function %s", F->getName().str().c_str());
168 // We couldn't determine how to expand this function based on its
169 // function signature.
210 /* Create the function signature for our expanded function.
223 llvm::Function *ExpandedFunc =
224 llvm::Function::Create(FT,
228 // Create and name the actual arguments to this expanded function.
230 for (llvm::Function::arg_iterator B = ExpandedFunc->arg_begin(),
238 ALOGE("Incorrect number of arguments to function: %zu",
257 // Construct the actual function body.
268 llvm::Function::arg_iterator Args = F->arg_begin();
389 bool ExpandKernel(llvm::Function *F, uint32_t Signature) {
391 ALOGV("Expanding kernel Function %s", F->getName().str().c_str());
430 /* Create the function signature for our expanded function.
443 llvm::Function *ExpandedFunc =
444 llvm::Function::Create(FT,
448 // Create and name the actual arguments to this expanded function.
450 for (llvm::Function::arg_iterator B = ExpandedFunc->arg_begin(),
458 ALOGE("Incorrect number of arguments to function: %zu",
477 // Construct the actual function body.
488 llvm::Function::arg_iterator Args = F->arg_begin();
624 llvm::Function *kernel = M.getFunction(name);
637 return "ForEach-able Function Expansion";