XCore target, getPreferredTypeAlign() *MUST* return preferred alignment.

Robert Lytton robert at xmos.com
Mon Oct 14 05:33:02 PDT 2013


Hi

Here is a suggest patch to support the XCore target.

This is required as the the xcore llvm backend does not handle 8 byte alignment viz:
        %BadAlignment = alloca i64, align 8

(llvm will reject the above as an error)


The patch prevents the default behavior running:
    /// getPreferredTypeAlign - Return the "preferred" alignment of the specified
    /// type for the current target in bits.  This can be different than the ABI
    /// alignment in cases where it is beneficial for performance to overalign
    /// a data type.


Robert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131014/a355a796/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PatchPrefAlign
Type: application/octet-stream
Size: 2599 bytes
Desc: PatchPrefAlign
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131014/a355a796/attachment.obj>


More information about the cfe-commits mailing list