Displaying 4 results from an estimated 4 matches for "comparecallsit".
Did you mean:
comparecallsite
2009 Apr 16
2
[LLVMdev] Patch: MSIL backend global pointers initialization
...bout 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_begin(), AE = CS.arg_end();
for...
2009 Apr 16
0
[LLVMdev] Patch: MSIL backend global pointers initialization
...t; }
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 single map CS => FunctionType? Also...
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