New entry.
[oota-llvm.git] / lib / Target / ARM / README-Thumb.txt
1 //===---------------------------------------------------------------------===//
2 // Random ideas for the ARM backend (Thumb specific).
3 //===---------------------------------------------------------------------===//
4
5 * Add support for compiling functions in both ARM and Thumb mode, then taking
6   the smallest.
7 * Add support for compiling individual basic blocks in thumb mode, when in a 
8   larger ARM function.  This can be used for presumed cold code, like paths
9   to abort (failure path of asserts), EH handling code, etc.
10
11 * Thumb doesn't have normal pre/post increment addressing modes, but you can
12   load/store 32-bit integers with pre/postinc by using load/store multiple
13   instrs with a single register.
14
15 * Make better use of high registers r8, r10, r11, r12 (ip). Some variants of add
16   and cmp instructions can use high registers. Also, we can use them as
17   temporaries to spill values into.
18
19 * If we know function size is less than (1 << 16) * 2 bytes, we can use 16-bit
20   jumptable entries (e.g. (L1 - L2) >> 1). Or even smaller entries if the
21   function is even smaller. This also applies to ARM.