mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
[PowerPC] Transform a README.txt entry into a FIXME
Remove the README.txt entry regarding register allocation of CR logical ops, and replace it with a FIXME in PPCInstrInfo.td. The text in the README.txt was not really accurate, and thanks goes to Pat Haugen (and Bill Schmidt) from IBM for clarifying what was intended and highlighting the relevant text in the ISA specification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a511d71d15
commit
6b7f3f4b20
@ -2010,6 +2010,15 @@ def MCRF : XLForm_3<19, 0, (outs crrc:$BF), (ins crrc:$BFA),
|
||||
"mcrf $BF, $BFA", IIC_BrMCR>,
|
||||
PPC970_DGroup_First, PPC970_Unit_CRU;
|
||||
|
||||
// FIXME: According to the ISA (section 2.5.1 of version 2.06), the
|
||||
// condition-register logical instructions have preferred forms. Specifically,
|
||||
// it is preferred that the bit specified by the BT field be in the same
|
||||
// condition register as that specified by the bit BB. We might want to account
|
||||
// for this via hinting the register allocator and anti-dep breakers, or we
|
||||
// could constrain the register class to force this constraint and then loosen
|
||||
// it during register allocation via convertToThreeAddress or some similar
|
||||
// mechanism.
|
||||
|
||||
let isCommutable = 1 in {
|
||||
def CRAND : XLForm_1<19, 257, (outs crbitrc:$CRD),
|
||||
(ins crbitrc:$CRA, crbitrc:$CRB),
|
||||
|
@ -203,20 +203,6 @@ _foo:
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
|
||||
On the G5, logical CR operations are more expensive in their three
|
||||
address form: ops that read/write the same register are half as expensive as
|
||||
those that read from two registers that are different from their destination.
|
||||
|
||||
We should model this with two separate instructions. The isel should generate
|
||||
the "two address" form of the instructions. When the register allocator
|
||||
detects that it needs to insert a copy due to the two-addresness of the CR
|
||||
logical op, it will invoke PPCInstrInfo::convertToThreeAddress. At this point
|
||||
we can convert to the "three address" instruction, to save code space.
|
||||
|
||||
This only matters when we start generating cr logical ops.
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
|
||||
We should compile these two functions to the same thing:
|
||||
|
||||
#include <stdlib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user