On Thu, Jul 16, 2015 at 04:21:22PM +0100, Kyrill Tkachov wrote:
> Hi all,
> 
> This patch improves compilation times for code using the arm_neon.h 
> intrinsics.
> The problem there is that since we now wrap all the intrinsics in arm_neon.h 
> inside a pragma,
> the midend will apply the pragma string onto every single intrinsic as an 
> attribute, calling
> the target attribute parsing code thousands of times on the same string.  
> I've seen this cause
> slowdown on large intrinsics programs in the area of 3-5%.
> 
> This patch checks if the ARGS we're supposed to process is the same as the 
> prgma already
> processed by the pragma processing code in aarch64-c.c. If it is, then we 
> know that the correct
> target node is already set in target_option_current_node, so we can just 
> reuse that, saving us
> the trouble of parsing the string.
> 
> This gets compilation times for large intrinsic programs to the previous 
> levels.
> We still get a compile-time hit on small programs due to grokdeclarator in 
> the frontend
> appearing high in the profile due to the pragma use, I presume. But for large 
> programs
> we should be good.  The compilation time will be dominated by the other parts 
> of the compiler.
> In any case, for small programs, garbage collection is at the top of the 
> profile in either case.
> 
> Bootstrapped and tested on aarch64.
> 
> Ok for trunk?

OK.

Thanks,
James

> 2015-07-16  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
> 
>      * config/aarch64/aarch64.c (aarch64_option_valid_attribute_p):
>      Exit early and use target_option_current_node if processing current
>      pragma.


Reply via email to