Investigate libav inline assembly
libav uses inline assembly for a range of basic operations including:
* MULH (smmul)
* MUL16 (smulbb)
* MAC16 (smlabb)
* av_clip_
* av_bswap{16,32} (rev16, rev)
and some mildly more involved operations:
* av_clipl_int32
* FASTDIV
Some helpers are used for unaligned access:
* AV_{R,W}N{16,32,64} (ldr, str)
Shifting these out of inline assembly lets the compiler perform more optimisations and gives the vectoriser more to work with.
Investigate these, how well GCC does with plain C, and spawn into blueprints covering the improvements to be done.
Blueprint information
- Status:
- Not started
- Approver:
- Michael Hope
- Priority:
- High
- Drafter:
- Michael Hope
- Direction:
- Approved
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- Accepted for 4.6
- Implementation:
- Informational
- Milestone target:
- backlog
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
We at least don't recognise MULH and bswap16.
2012-04-23 michaelh1:
Checked av_bswap32. GCC recognises the C version and converts it to rev. libav only uses the inline assembly version for GCC 4.4 and earlier.
GCC detects 32 and 64 bit swaps but not 16 bit. 4.8 adds a __builtin_
74bdbe96e400ab6
[2013-05-21 matthew-
Work Items
Dependency tree
* Blueprints in grey have been implemented.