Home | History | Annotate | Download | only in CBackend

Lines Matching refs:Function

91     std::set<Function*> intrinsicPrototypesAlreadyGenerated;
121 bool runOnFunction(Function &F) {
197 void lowerIntrinsics(Function &F);
198 /// Prints the definition of the intrinsic function F. Supports the
200 void printIntrinsicDefinition(const Function &F, raw_ostream &Out);
204 void printFloatingPointConstants(Function &F);
206 void printFunctionSignature(const Function *F, bool Prototype);
208 void printFunction(Function &);
536 // Must be a function ptr cast!
1124 // because their operands were casted to the expected type. This function takes
1176 // type before the operation proceeds. This function does the casting.
1332 // This function takes care of detecting that case and printing the cast
1511 // This is an implementation of the ISO C99 function nan.
1513 // Since ISO C99 defines this function in terms of strtod, which we do
1521 // This function, if given a string literal, is evaluated early enough
1532 // function is suitable for implementing the ISO C99 macro INFINITY.
1581 static void FindStaticTors(GlobalVariable *GV, std::set<Function*> &StaticTors){
1595 if (Function *F = dyn_cast<Function>(FP))
1676 std::set<Function*> StaticCtors, StaticDtors;
1767 // Function declarations
1768 Out << "\n/* Function Declarations */\n";
1774 SmallVector<const Function*, 8> intrinsicsToDefine;
1915 Out << "\n\n/* Function Bodies */\n";
1949 for (SmallVector<const Function*, 8>::const_iterator
1960 void CWriter::printFloatingPointConstants(Function &F) {
1962 // in the function, we want to redirect it here so that we do not depend on
2104 void CWriter::printFunctionSignature(const Function *F, bool Prototype) {
2105 /// isStructReturn - Should this function actually return a struct by-value?
2138 Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end();
2141 // If this is a struct-return function, don't print the hidden
2144 assert(I != E && "Invalid struct return function!");
2173 // If this is a struct-return function, don't print the hidden
2176 assert(I != E && "Invalid struct return function!");
2200 // Finish printing arguments... if this is a vararg function, print the ...,
2210 // Get the return tpe for the function.
2215 // If this is a struct-return function, print the struct-return type.
2234 void CWriter::printFunction(Function &F) {
2235 /// isStructReturn - Should this function actually return a struct by-value?
2241 // If this is a struct return function, handle the result with magic.
2257 // print local variable information for the function
2295 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
2361 // If this is a struct return function, return the temporary struct.
2369 // Don't output a void return if this is the last basic block in the function
2405 if (Function::iterator(Succ) == llvm::next(Function::iterator(SI.getParent())))
2426 if (llvm::next(Function::iterator(From)) != Function::iterator(To))
2764 void CWriter::printIntrinsicDefinition(const Function &F, raw_ostream &Out) {
2828 void CWriter::lowerIntrinsics(Function &F) {
2830 // function. We must generate the prototypes before the function body which
2832 std::vector<Function*> prototypesToGen;
2834 // Examine all the instructions in this function to find the intrinsics that
2836 for (Function::iterator BB = F.begin(), EE = F.end(); BB != EE; ++BB)
2839 if (Function *F = CI->getCalledFunction())
2885 if (Function *NewF = Call->getCalledFunction())
2893 // Emit them now, before the function that uses them is emitted. But,
2895 std::vector<Function*>::iterator I = prototypesToGen.begin();
2896 std::vector<Function*>::iterator E = prototypesToGen.end();
2912 // Handle intrinsic function calls first...
2913 if (Function *F = I.getCalledFunction())
2923 // If this is a call to a struct-return function, assign to the first
2936 // If this is an indirect call to a struct return function, we need to cast
2938 bool NeedsCast = (hasByVal || isStructRet) && !isa<Function>(Callee);
2941 // function pointers if they are in a call (it generates a trap instruction
2943 // the function and the function pointer cast. Unfortunately, we can't just
2948 // that void* and function pointers have the same size. :( To deal with this
2954 if (Function *RF = dyn_cast<Function>(CE->getOperand(0))) {
3022 Function *F = I.getCalledFunction();
3038 // Output the last argument to the enclosing function.