[LLVMdev] type attributes
Duncan Sands
baldrick at free.fr
Wed Apr 9 00:29:43 PDT 2008
Hi Zach,
> Does the bitcode representation retain any information about gcc attributes
> placed on types?
yes it does, at least for some of them. For example, suppose you specify
that a type should be 16 byte aligned. This will not change the LLVM type,
instead every time an object of your type is created the object creation
operation (eg: an alloca) will ensure that the object is 16 byte aligned.
Volatile types are another example: types are not volatile in LLVM, only
load and store operations are. Loads and stores to an object for which the
gcc type was volatile are marked volatile. In LLVM the general rule is that
operations have attributes, not types. It is the job of llvm-gcc to output
the right operation given the attributes on the gcc type. Which attributes
are you interested in?
Ciao,
Duncan.
More information about the llvm-dev
mailing list