[LLVMdev] SimplifyLibCalls pass and int type width...

Rodolphe Suescun rsu.medal at dolphin.fr
Fri Jul 18 04:56:08 PDT 2014


Hi,

We are developing an LLVM target for a 16 bits micro-controller, and
noticed that the SimplifyLibCalls pass assumes that the "int" C type
used by the library functions has 32 bits width (which is not the
case for our target).
Is this true for existing targets whose "int" type is 16 bits (like
MSP430) or is that pass just skipped ?

Does anyone have hints about the correct way of modifying that pass
so that it emits suitable library calls for our target (without
breaking others of course) ? I guess this would require methods
that return "int", "size_t" (, ...) types to be used instead of
IRBuilder::getInt32Ty in BuildLibCalls.cpp, but did not find
such methods and have no idea where they should be defined (in
TargetLibraryInfo maybe ?).

Thanks a lot in advance,
Rod



More information about the llvm-dev mailing list