Remove Unnecessary Zero/Sign Extensions
Investigate and develop a new pass for GCC which removes unnecessary zero/sign extensions.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Medium
- Drafter:
- Matthew Gretton-Dann
- Direction:
- Needs approval
- Assignee:
- Kugan Vivekanandarajah
- Definition:
- Discussion
- Series goal:
- Accepted for 4.7
- Implementation:
- Informational
- Milestone target:
- backlog
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
The aim of this blueprint is to investigate and develop removal of unecessary sign/zero extensions. We have come across several instances of this recently (bswap generation and https:/
Some initial investigation seems to suggest there are several areas of work that could be beneficial:
* Using ree.c (or a rewritten version) and extending it to recognise code sequences that are 'equivalent' to zero/sign extensions.
* Stop handling promotion mode in the target backend (see https:/
* Change code gen not to generate andsi3 patterns for zero extensions, but instead use the extendsiqi pattern.
[2013-05-28 matthew-
Work Items
Work items:
Investigate nobble-
Investigate & Rework RTL generation in compiler of andsi patterns and translate them to extendsiqi patterns: TODO
Investigate updates required to ree phase: TODO
Update REE phase: TODO
Test: TODO
Document: TODO