Improve SMS on code with memory dependencies

Registered by Michael Hope

Investigate whether SMS can use the rtl loop infrastructure to avoid unnecessary memory dependencies.

Blueprint information

Status:
Complete
Approver:
Michael Hope
Priority:
High
Drafter:
Michael Hope
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
Accepted for 4.6
Implementation:
Informational Informational
Milestone target:
milestone icon backlog
Started by
Michael Hope
Completed by
Matthew Gretton-Dann

Related branches

Sprints

Whiteboard

SMS is currently unable to handle loops such as:

    for (i = 0; i < n; i+= 2)
      a[i] = a[i] * a[i + 1];

in which there are reads and writes to the same area of memory. It also uses very conservative alias analysis.

The first problem can be tackled directly by hooking SMS into GCC's existing induction-variable analysis. Doing so also helps with the second problem (although this is more an indirect benefit).

The purpose of this work is to allow SMS to be applied to more loops. It is therefore very much dependent on how well SMS is working in general.

The proposed change allows several more EEMBC and libav loops to be "SMSed". SMS with our current patches (from sms-register-scheduling) already does a good job with some of these newly-optimisable loops, meaning that they run faster with SMS than without. However, SMS currently makes several other loops worse. A lot of the problems seem to be caused by excess register pressure, so this blueprint depends on sms-register-pressure.

Status:

Patches written, but we need to complete the dependent blueprints before submitting upstream..

Blocked on the SMS register pressure issues. Turning this on enables SMS more often, which will expose the register pressure problems more often.

Patch posted here:

    http://lists.linaro.org/pipermail/linaro-toolchain/2011-December/001948.html

[2011-12-21] michaelh1 took this from Richard and put it in the backlog

[2013-05-21 matthew-gretton-dann] Card has been superseded by: http://cards.linaro.org/browse/TCWG-66

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.