This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: auto vectorization in gcc



On Thursday, July 17, 2003, at 2:15 PM, David Edelsohn wrote:


Daniel Berlin writes:

Dan> Especially since it's a matter of just making tree nodes with a vector
Dan> type, and performing standard tree ops on them.


Dan> IE PLUS_EXPR of two trees with types of V4SF_type_node should work just
Dan> fine, and convert to the right vector RTL.


Dan> If it doesn't, we should make it work.

I believe part of the concern is alignment issues.
Then you *definitely* want to work on trees, not RTL.
You can force proper alignment at the tree level, but you don't have the original DECL at the RTL level, so you can't.


 If the code
was not originally written with vector types, we cannot guarantee that
objects will have the appropriate alignment for SIMD instructions.

This is part of the analysis you perform before packing, with the added benefit that we can change alignment if we really want, or generate code to handle misalignment if we can't be sure.



We may
not know this until the storage layout occurs during RTL generation. Once
we have committed to auto-vectorization in the trees and possible skipped
some scalar loop optimizations, how do we roll back once we determine that
the SIMD instructions cannot be generated efficiently?

The issue isn't that we *have to* do auto-vectorization in RTL,
but how do we deal with reality intervening at later compilation stages?


David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]