autovectorization improvement for GCC
Issue
- Enhance the gnu compiler to support attributes with typedefs in this form:
typedef Real_t * __restrict__ __attribute__((align_value (32))) Real_ptr ;
- It can get even better than this with some more compiler help, namely the ability to use assume directives on loop bounds:
__assume(begin%SIMD_WIDTH == 0) ;
__assume(end%SIMD_WIDTH == 0) ;
for (int i=begin; i<end; ++i) {
/* array expressions based on index 'I' */
}
- The above __assume__ directives would ideally allow the compiler to avoid the setup and teardown code for SIMD loops, significantly reducing the executable size, and possibly even eliminating some of the control flow logic.
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.