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

Amara Emerson amara.emerson at arm.com
Wed Oct 2 03:24:36 PDT 2013

We've done some internal review of this code and we're satisfied that it's
architecturally correct. I'll commit this later today if we have no

On a related note, we are interested in the community's thoughts on adding a
long_tests option in the LLVM regression tests, much like the clang
counterpart. This would allow more extensive tests which may substantially
increase the runtime of the suite, but could be a bridge between the normal
tests and something large like LNT.


-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Artyom Skrobov
Sent: 01 October 2013 09:27
To: Artyom Skrobov; llvm-commits at cs.uiuc.edu
Subject: RE: [PATCH] Warn on deprecated IT blocks in v8 AArch32 assembly


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>

More information about the llvm-commits mailing list