diff options
author | Nate Begeman <natebegeman@mac.com> | 2006-03-16 22:37:48 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2006-03-16 22:37:48 +0000 |
commit | 1ad9b3a3cc27c1cf960bd3f72ca8c6b39954b451 (patch) | |
tree | 2c49a766af7819952e4fc5ad532d8a1cf2f97b04 /lib/Target/PowerPC/README.txt | |
parent | be80fc8d0951d6976881bb449d0354b30ae688ad (diff) | |
download | llvm-1ad9b3a3cc27c1cf960bd3f72ca8c6b39954b451.tar.gz llvm-1ad9b3a3cc27c1cf960bd3f72ca8c6b39954b451.tar.bz2 llvm-1ad9b3a3cc27c1cf960bd3f72ca8c6b39954b451.tar.xz |
Notes on how to kill the eeevil brtwoway, and make ppc branch selector
more target independant, generate better code, and be less conservative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/README.txt')
-rw-r--r-- | lib/Target/PowerPC/README.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt index 28e6d3ded0..0024fabf86 100644 --- a/lib/Target/PowerPC/README.txt +++ b/lib/Target/PowerPC/README.txt @@ -18,6 +18,34 @@ unconditional branch, so we don't end up with things like: This occurs in SPASS. +The power of diet coke came up with a solution to this today: + +We know the only two cases that can happen here are either: +a) we have a conditional branch followed by a fallthrough to the next BB +b) we have a conditional branch followed by an unconditional branch + +We also invented the BRTWOWAY node to model (b). + +Currently, these are modeled by the PPC_BRCOND node which is a 12-byte pseudo +that codegens to + bccinv false +true: + b truebb +false: + b falsebb + +However, realizing that for (a), we can bccinv directly to the fallthrough +block, and for (b) we will already have another unconditional branch after +the conditional branch (see SPASS case above), then we know that we don't need +BRTWOWAY at all, and can just codegen PPC_BRCOND as + +bccinv +8 +b truebb + +This will also allow us to selectively not run the ppc branch selector, by just +selecting PPC_BRCOND pseudo directly to the correct conditional branch +instruction for small functions. + ===-------------------------------------------------------------------------=== * Codegen this: |