Improve constant generation in Thumb-2
Immediate values in Thumb-2 instructions have a limited range. In many cases a shorter version can be synthesised using a combination of the modified immediate constants feature, negation, negating, or splitting into two operations.
Some examples are:
* Decomposing an ADD with constant into two ADDs
* Using modified constants to create the value 0xABABABAB
* Using a NOT to load the value 0xFFFFFF00
This should improve the code size and performance. The value depends on how many new, shorter sequences are generated.
Blueprint information
- Status:
- Complete
- Approver:
- Michael Hope
- Priority:
- High
- Drafter:
- Andrew Stubbs
- Direction:
- Approved
- Assignee:
- Andrew Stubbs
- Definition:
- Approved
- Series goal:
- Accepted for 4.6
- Implementation:
- Implemented
- Milestone target:
- 4.6-2011.09
- Started by
- Michael Hope
- Completed by
- Michael Hope
Related branches
Related bugs
Sprints
Whiteboard
[asac, Sep 14, 2011]: this blueprint makes it hard for outsiders to understand what we get out of it and how to use it or how it improves the world. Writing a nice summary can help; having a more verbose headline would also be a way to improve things. Acceptance criteria I understand TCWG sees as upstreaming and backporting done; it's ok to have that parrt implicit, but if we could go one step back and explicitly document 'what can be done to test this' or 'how does this improvement manifest itself' or 'which code is now better compiled and how do you see that this feature works if you are an outsider' or something alike (be innovative) it would make this blueprint more valuable and easier to consume. Lets talk.
[michaelh1 2011-09-15] Andrew, could you expand the summary please. I've templated it.