Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vector ABI] Type size and alignment for vector types. #380

Merged
merged 1 commit into from
Jan 10, 2024

Commits on Jan 10, 2024

  1. [Vector ABI] Type size and alignment for vector types.

    The issue of Vector alignment is discussed in #347. It is mentioned that
    aligning to 128 bytes might deliver better performance on some RISC-V cores,
    but this behavior could lead to considerable stack wastage on zve32 and zve64
    cores. For instance, in order to ensure a vector value in the stack conforms
    to the ABI specification, we could potentially waste up to 96 bits per vector
    object in stack for zve32, and the performance difference isn't always evident
    across all core implementations.
    
    Therefore, this proposal sets the alignment of vector types to element
    alignment, to avoid wasting a significant amount of stack space in zve32 and
    zve64 configurations. Also, since the ABI only specify the minimum alignment
    and doesn't limit the compiler from adopting higher alignment for specific CPUs.
    
    Fix #347.
    kito-cheng committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    6b3f877 View commit details
    Browse the repository at this point in the history