[cfe-dev] preventing bitcast in generated code

Jochen Wilhelmy j.wilhelmy at arcor.de
Mon May 10 13:29:19 PDT 2010


Hi!

Now I have implemented my TargetInfo which derives from clang::TargetInfo
to define type widths and alignment, but there is no ABI lowering.
clang still generates (in unoptimized code) a llvm.memcpy.p0i8.p0i8.i32
to copy my struct. Is this hard coded or are there other classes I have
to override?

By the way in TargetInfo.h there are lines like
unsigned getBoolWidth(bool isWide = false) const { return 8; }  // FIXME
unsigned getBoolAlign(bool isWide = false) const { return 8; }  // FIXME

Later on I'd like to define bool as 1 bit, therefore would it be 
possible to fix this?

-Jochen




More information about the cfe-dev mailing list