Rodolphe Suescun
2014-Jul-18 11:56 UTC
[LLVMdev] SimplifyLibCalls pass and int type width...
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