[PATCH] Warn on deprecated IT blocks in v8 AArch32 assembly

Artyom Skrobov Artyom.Skrobov at arm.com
Tue Oct 1 01:27:24 PDT 2013


By carefully picking one representative instruction from each 16-bit Thumb
encoding, we have manually reduced the testcase to just 10K lines, taking
about half-second on our development boxes. (The reduced testcase attached.)

Hopefully this should be no problem to commit now?

-----Original Message-----
From: Artyom Skrobov [mailto:Artyom.Skrobov at arm.com] 
Sent: 27 September 2013 09:53
To: llvm-commits at cs.uiuc.edu LLVM
Subject: [PATCH] Warn on deprecated IT blocks in v8 AArch32 assembly


To continue from
html and building upon Joey's new support for deprecated instructions in MC
.html), we want to add deprecation warnings for the IT blocks in ARMv8 Thumb
mode, using the same set of criteria as in the aforementioned CodeGen patch.

Unfortunately, since CodeGen and MC don't share any target-specific C code,
there's no good place to put isV8EligibleForIT() to make it accessible from
both sides.  Our approach is to add a new header
lib/Target/ARM/ARMFeatures.h for the shared CodeGen/MC definitions.  It
would be even neater to have this all in TableGen, with similar "custom
deprecation predicates" to what Joey did.  However, that approach would
require setting up new infrastructure for whitelisting the instructions, as
opposed to Joey's blacklisting;  that's considerably more work (requiring
changes to InstrInfoEmitter.cpp and throughout LLVM) while there won't
likely be any future applications for such infrastructure, besides our case
with IT blocks.

The other thing we're cautious about is the testing.  The patch includes a
98K lines test case, which is why I'm attaching the patch zipped.  That's an
exhaustive test of all valid 16-bit Thumb encodings, taking ~1 min on my
development machine.  The test can be split into a few chunks to run in
parallel, but even that would add considerably to the testing time.  Clang
testing setup supports long_tests feature to enable/disable long-running
html);  do we need the same support added into LLVM testing setup?  Do the
existing build bots actually enable long_tests?

The long test case was generated using this simple Python script, using the
bit-masks derived from the "ARMv8 Instruction Set" reference

<script skipped>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v8_IT_test.zip
Type: application/x-zip-compressed
Size: 11993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131001/4f8e883d/attachment.bin>

More information about the llvm-commits mailing list