From 81e8097377529dc3b666f33bb525c49cfbac3f51 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Fri, 17 Mar 2006 01:40:33 +0000 Subject: Remove BRTWOWAY* Make the PPC backend not dependent on BRTWOWAY_CC and make the branch selector smarter about the code it generates, fixing a case in the readme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26814 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/README.txt | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'lib/Target/PowerPC/README.txt') diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt index 0024fab..c4cf303 100644 --- a/lib/Target/PowerPC/README.txt +++ b/lib/Target/PowerPC/README.txt @@ -10,41 +10,8 @@ still a codesize win. ===-------------------------------------------------------------------------=== -Should hint to the branch select pass that it doesn't need to print the second -unconditional branch, so we don't end up with things like: - b .LBBl42__2E_expand_function_8_674 ; loopentry.24 - b .LBBl42__2E_expand_function_8_42 ; NewDefault - b .LBBl42__2E_expand_function_8_42 ; NewDefault - -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. +Teach the .td file to pattern match PPC::BR_COND to appropriate bc variant, so +we don't have to always run the branch selector for small functions. ===-------------------------------------------------------------------------=== -- cgit v1.1