search for: printexternals

Displaying 6 results from an estimated 6 matches for "printexternals".

2009 Apr 16
2
[LLVMdev] Patch: MSIL backend global pointers initialization
...that. > So what do you think about that: // CallSites have equal signatures bool MSILWriter::cmpCallSite(CallSite A, CallSite B) { return (getCallSiteFType(A)==getCallSiteFType(B) && A.getAttributes()==B.getAttributes()); } // Comparision for std::lower_bound used in MSILWriter::printExternals() bool MSILWriter::compareCallSite(CallSite A, CallSite B) { return getCallSiteFType(A)<getCallSiteFType(B); } // Constructs function type from given CallSite FunctionType* MSILWriter::getCallSiteFType(CallSite CS) { std::vector<const Type *> params; CallSite::arg_iterator AI=CS.arg...
2009 Apr 16
0
[LLVMdev] Patch: MSIL backend global pointers initialization
...getAttributes()==B.getAttributes()); > } As it is impossible to honour argument attributes in MSIL I don't see why you should compare attributes. You seems to have the same MSIL call signature for calls with different param attrs. > // Comparision for std::lower_bound used in MSILWriter::printExternals() > bool MSILWriter::compareCallSite(CallSite A, CallSite B) { >   return getCallSiteFType(A)<getCallSiteFType(B); > } Hrm... You're building type for each comparison, which seems to be quite inefficient. Why don't iterate over all variadic call sites of the function and build a...
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur Minor comments: > +// Comparision for std::lower_bound used in > MSILWriter::printExternals() > +static bool CompareInstructions(Instruction *A,Instruction *B) > +{ Put brace on the same line as function def. > + if ( !F->use_empty() ) // Print only if used > + { Likewise. Plus use "if (foo)" instead of "if ( foo )". All code around uses...
2009 Apr 15
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > The interesting for me part of the CallInst is printf(i8* noalias %0, i32 > 123). > I was diging in doxygen documentation but I really can't see the easy way to > compare those instructions and again finish with reinvented (but working) > wheel ;). Ah, sorry. I missed that you're doing variadic calls, not casting variadic function to definite ones. I think you
2009 Apr 15
2
[LLVMdev] Patch: MSIL backend global pointers initialization
Hello, > So, looking for type of callee (not result, but function type!) you'll > obtain the > real "signature" of callee and if you'll strip all pointer cast you'll > obtain the "declaration" (=variadic) type of the callee. Maybe I misunderstood something but I just get the variadic declaration not the real "signature", like this: const
2009 Apr 03
6
[LLVMdev] Patch: MSIL backend global pointers initialization
Anton Korobeynikov wrote: > Hi, Artur > > >> I'm working on that backend now, so probably I'll send some more patches >> soon. I'd be grateful if you could give me some suggestions how to add >> some test for that backend to the test-suite. On Linux the output code >> could be run on Mono and compared with outputs for other backends but >>