This is a follow up patch to D48193. In the previous review an example of poor code generation was given, where the interleave count caused a loop containing a veclib call to generate excessive spills/reloads. The suggested fix was to simply use an IC of 1 when a veclib call is present.
Rather than use an IC of 1 for all platforms, this patch:
- Adds a call register pressure calculation.
- Adds calls to TargetTransformInfo to obtain information about the number of preserved registers.
At present only a basic implementation of the TTI calls is provided for x86. However, the default implementation means that this change will have no affect on other platforms.