diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-13 23:58:05 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-13 23:58:05 +0000 |
commit | 363bbc011045a9f5710569cc191c520ec25b2907 (patch) | |
tree | 65a3fc4dc01b1d6c8142eaf7fddaf4f6a4f695cd /lib/CodeGen/README.txt | |
parent | 68cf03a314f19935d9096ad22dfe7d4fdcbb5c19 (diff) |
Add a few README.txt items.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/README.txt')
-rw-r--r-- | lib/CodeGen/README.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/CodeGen/README.txt b/lib/CodeGen/README.txt index 64374ce137..8e9ead7f66 100644 --- a/lib/CodeGen/README.txt +++ b/lib/CodeGen/README.txt @@ -206,3 +206,32 @@ Stack coloring improvments: not spill slots. 2. Reorder objects to fill in gaps between objects. e.g. 4, 1, <gap>, 4, 1, 1, 1, <gap>, 4 => 4, 1, 1, 1, 1, 4, 4 + +//===---------------------------------------------------------------------===// + +The scheduler should be able to sort nearby instructions by their address. For +example, in an expanded memset sequence it's not uncommon to see code like this: + + movl $0, 4(%rdi) + movl $0, 8(%rdi) + movl $0, 12(%rdi) + movl $0, 0(%rdi) + +Each of the stores is independent, and the scheduler is currently making an +arbitrary decision about the order. + +//===---------------------------------------------------------------------===// + +Another opportunitiy in this code is that the $0 could be moved to a register: + + movl $0, 4(%rdi) + movl $0, 8(%rdi) + movl $0, 12(%rdi) + movl $0, 0(%rdi) + +This would save substantial code size, especially for longer sequences like +this. It would be easy to have a rule telling isel to avoid matching MOV32mi +if the immediate has more than some fixed number of uses. It's more involved +to teach the register allocator how to do late folding to recover from +excessive register pressure. + |