mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
594f4c69e6
commit
6a250ecc99
@ -11,6 +11,25 @@ still a codesize win.
|
|||||||
|
|
||||||
===-------------------------------------------------------------------------===
|
===-------------------------------------------------------------------------===
|
||||||
|
|
||||||
|
Compile:
|
||||||
|
|
||||||
|
void foo(int *P) {
|
||||||
|
if (P) *P = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
into:
|
||||||
|
|
||||||
|
_foo:
|
||||||
|
cmpwi cr0,r3,0
|
||||||
|
beqlr cr0
|
||||||
|
li r0,0
|
||||||
|
stw r0,0(r3)
|
||||||
|
blr
|
||||||
|
|
||||||
|
This is effectively a simple form of predication.
|
||||||
|
|
||||||
|
===-------------------------------------------------------------------------===
|
||||||
|
|
||||||
Teach the .td file to pattern match PPC::BR_COND to appropriate bc variant, so
|
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.
|
we don't have to always run the branch selector for small functions.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user