[llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt
Nate Begeman
natebegeman at mac.com
Thu Mar 16 14:38:00 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
README.txt updated: 1.72 -> 1.73
---
Log message:
Notes on how to kill the eeevil brtwoway, and make ppc branch selector
more target independant, generate better code, and be less conservative.
---
Diffs of the changes: (+28 -0)
README.txt | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+)
Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.72 llvm/lib/Target/PowerPC/README.txt:1.73
--- llvm/lib/Target/PowerPC/README.txt:1.72 Thu Mar 16 16:25:55 2006
+++ llvm/lib/Target/PowerPC/README.txt Thu Mar 16 16:37:48 2006
@@ -18,6 +18,34 @@
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:
More information about the llvm-commits
mailing list