[PATCH] Prevent generation of deprecated IT blocks in thumbv8

Artyom Skrobov Artyom.Skrobov at arm.com
Mon Aug 19 04:02:05 PDT 2013


Hello,

"ARMv8 Instruction Set" (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.genc010197a/index.html) has the section 6.1 "Partial Deprecation of IT" which restricts the usage of IT blocks in ARMv8 Thumb mode to a reduced subset of 16-bit Thumb instructions.

The attached patch for the ARM backend implements this change in the predicability of Thumb instructions. In particular, when generating code for ARMv8 targets, Thumb2SizeReduction pass needs to run before IfConverter pass, because 32-bit Thumb instructions are no longer predicable in ARMv8. This has been observed to have very limited adverse side-effects for ARMv7 targets: e.g. 32-bit MOV is reduced to 16-bit MOVS, and is then assumed to affect CPRS, so it can no longer be combined in an IT block with a following instruction. Such cases of missed optimizations don't affect ARMv8, since IT blocks longer than a single instruction are deprecated. Thus, to the best of our knowledge, changing the order of the passes on ARMv8 doesn't introduce any problems.

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130819/5106890f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v8_IT.patch
Type: application/octet-stream
Size: 26509 bytes
Desc: v8_IT.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130819/5106890f/attachment.obj>


More information about the llvm-commits mailing list