[llvm-commits] [llvm] r51134 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll test/Transforms/InstCombine/fp-ret-bitcast.ll

Duncan Sands baldrick at free.fr
Fri May 16 04:57:24 PDT 2008


> >> In this case, the ObjC front-end is doing something bizarre, but ok.
> >> The issue here is that LLVM should be ok in the face of declarations
> >> that don't match their definitions.  If we just see a call to a cast
> >> of a declaration, we shouldn't change the call (which determines the
> >> ABI) just because of a declaration. If the callee was a cast of a
> >> definition, changing it would be ok.
> >
> > then isn't the correct fix to not do this transformation at all  
> > (including
> > transforming parameters) unless the definition is available?
> 
> The important case for this xform is for making varargs arguments  
> explicit, as when you forget to use a prototype in C.

Not sure if you are agreeing or disagreeing here!  Also, it might
be nice to do the following transform: if all uses of a function
declaration are bitcasts to some function type, change the type
of the declaration to that function type.

Ciao,

Duncan.



More information about the llvm-commits mailing list