Skip to content

Commit

Permalink
[PowerPC][NFC] Cleanup some of the Darwin mentions in the README.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
mandlebug committed Feb 20, 2020
1 parent 3f78521 commit da181d4
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions llvm/lib/Target/PowerPC/README.txt
Expand Up @@ -118,67 +118,6 @@ http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00133.html

===-------------------------------------------------------------------------===

Darwin Stub removal:

We still generate calls to foo$stub, and stubs, on Darwin. This is not
necessary when building with the Leopard (10.5) or later linker, as stubs are
generated by ld when necessary. Parameterizing this based on the deployment
target (-mmacosx-version-min) is probably enough. x86-32 does this right, see
its logic.

Note: Since Darwin support has been removed, this item is no longer valid for
Darwin specfically.

===-------------------------------------------------------------------------===

Darwin Stub LICM optimization:

Loops like this:

for (...) bar();

Have to go through an indirect stub if bar is external or linkonce. It would
be better to compile it as:

fp = &bar;
for (...) fp();

which only computes the address of bar once (instead of each time through the
stub). This is Darwin specific and would have to be done in the code generator.
Probably not a win on x86.

===-------------------------------------------------------------------------===

Simple IPO for argument passing, change:
void foo(int X, double Y, int Z) -> void foo(int X, int Z, double Y)

the Darwin ABI specifies that any integer arguments in the first 32 bytes worth
of arguments get assigned to r3 through r10. That is, if you have a function
foo(int, double, int) you get r3, f1, r6, since the 64 bit double ate up the
argument bytes for r4 and r5. The trick then would be to shuffle the argument
order for functions we can internalize so that the maximum number of
integers/pointers get passed in regs before you see any of the fp arguments.

Instead of implementing this, it would actually probably be easier to just
implement a PPC fastcc, where we could do whatever we wanted to the CC,
including having this work sanely.

===-------------------------------------------------------------------------===

Fix Darwin FP-In-Integer Registers ABI

Darwin passes doubles in structures in integer registers, which is very very
bad. Add something like a BITCAST to LLVM, then do an i-p transformation that
percolates these things out of functions.

Check out how horrible this is:
http://gcc.gnu.org/ml/gcc/2005-10/msg01036.html

This is an extension of "interprocedural CC unmunging" that can't be done with
just fastcc.

===-------------------------------------------------------------------------===

Fold add and sub with constant into non-extern, non-weak addresses so this:

static int a;
Expand Down

0 comments on commit da181d4

Please sign in to comment.