1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

19223 Commits

Author SHA1 Message Date
Andrew Lenharth
b6f81cea2f Handle more imm forms, and load small negative i32 constants without hitting memory (should do the same for arbitrary zero extended small negative constants)
llvm-svn: 22505
2005-07-22 22:24:01 +00:00
Andrew Lenharth
c87d7f8593 I know PowerPC wishes it could be alpha, but it cannot. so there
llvm-svn: 22504
2005-07-22 22:00:24 +00:00
Andrew Lenharth
3f4c4133e5 make sure we always handle small negatives well
llvm-svn: 22503
2005-07-22 21:53:35 +00:00
Andrew Lenharth
5732bc768f finally found the gcc defined constants
llvm-svn: 22502
2005-07-22 21:00:30 +00:00
Andrew Lenharth
b77c3f2f18 Alpha has JIT
llvm-svn: 22501
2005-07-22 20:54:01 +00:00
Andrew Lenharth
ba955f96e3 Alpha JIT (beta)
llvm-svn: 22500
2005-07-22 20:52:16 +00:00
Andrew Lenharth
653f21b2cd simpilfy instruction encoding (and make the lines way shorter, aka Misha happification)
llvm-svn: 22499
2005-07-22 20:50:29 +00:00
Andrew Lenharth
0e1c0e7c79 update interface
llvm-svn: 22498
2005-07-22 20:49:37 +00:00
Andrew Lenharth
8a56432457 the JIT memory manager will construct a GOT if you want it too. Also, it places the constants in the allocated memory, rather than a malloc area
llvm-svn: 22497
2005-07-22 20:48:12 +00:00
Andrew Lenharth
8fc535e9bd allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
llvm-svn: 22496
2005-07-22 20:46:42 +00:00
Chris Lattner
df5e211e12 new testcase for PR602
llvm-svn: 22495
2005-07-21 21:55:08 +00:00
Nate Begeman
7259cc60c4 Support building non-PIC
Remove the LoadHiAddr pseudo-instruction.
Optimization of stores to and loads from statics.
Force JIT to use new non-PIC codepaths.

llvm-svn: 22494
2005-07-21 20:44:43 +00:00
Chris Lattner
1766305e60 revert to using 4-byte alignment for doubles, as specified by the ABI
llvm-svn: 22493
2005-07-21 19:17:18 +00:00
Chris Lattner
d19bed2fc0 llvm.sqrt somehow escaped documentation.
llvm-svn: 22490
2005-07-21 01:29:16 +00:00
Nate Begeman
95421ab212 Support assembling fsqrt on darwin. This will be implemented better when
PowerPC gets subtarget support up.

llvm-svn: 22489
2005-07-21 01:25:49 +00:00
Chris Lattner
408aab3fd9 If errno doesn't matter (e.g. in -ffast-math scenarios), sqrt* should be
compiled to llvm.sqrt.

llvm-svn: 22488
2005-07-21 01:09:27 +00:00
Nate Begeman
ae843fcefe Generate mfocrf when targeting g5. Generate fsqrt/fsqrts when targetin g5.
8-byte align doubles.

llvm-svn: 22486
2005-07-20 22:42:00 +00:00
Misha Brukman
9c80f41fe7 * "GNU Compiler Collection's gcc tool" is redundant
* Made bullet points start with a verb and lowercase, since they are not
  complete sentences
* Cleaned up grammar, removed extraneous verbosity

llvm-svn: 22485
2005-07-20 21:06:37 +00:00
Chris Lattner
85f898e908 Allow this to pass on non-linux systems as well, such as darwin
llvm-svn: 22484
2005-07-20 19:12:00 +00:00
Chris Lattner
faa90d30f5 Do not let MaskedValueIsZero consider undef to be zero, for reasons
explained in the comment.

This fixes UnitTests/2003-09-18-BitFieldTest on darwin

llvm-svn: 22483
2005-07-20 18:49:28 +00:00
Chris Lattner
648d6f150e count the number of relocations performed.
llvm-svn: 22480
2005-07-20 16:29:20 +00:00
Chris Lattner
abf3f0819e set the target triple so that we don't fail due to X86 abi issues
llvm-svn: 22479
2005-07-20 03:56:48 +00:00
Nate Begeman
b83789d611 Integrate SelectFPExpr into SelectExpr. This gets PPC32 closer to being
automatically generated from a target description.

llvm-svn: 22470
2005-07-19 16:51:05 +00:00
Nate Begeman
a25a2010e3 Remove unnecessary FP_EXTEND. This causes worse codegen for SSE.
llvm-svn: 22469
2005-07-19 16:50:03 +00:00
Reid Spencer
40c5ebe4eb For: memory operations -> stores
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset,
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations.
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.

llvm-svn: 22468
2005-07-19 04:52:44 +00:00
Chris Lattner
342e3bcd33 remove some sparc-v9-specific information
llvm-svn: 22467
2005-07-19 03:37:48 +00:00
Reid Spencer
5e502ee22d Provide descriptions for the TargetInstrInfo and TargetFrameInfo classes.
llvm-svn: 22466
2005-07-19 01:36:35 +00:00
Chris Lattner
4c9139447d When transforming &A[i] < &A[j] -> i < j, make sure to perform the comparison
as a signed compare.  This patch may fix PR597, but is correct in any case.

llvm-svn: 22465
2005-07-18 23:07:33 +00:00
Chris Lattner
d4f9ab3809 The assertion was wrong: the code only worked for i64. While we're at it,
expand the code to work for all integer datatypes.  This should unbreak
alpha.

llvm-svn: 22464
2005-07-18 04:31:14 +00:00
Reid Spencer
7942e8a63f Add a parameter to the FIND_STD_PROGRAM macro that allows an alternate name
for the command line options. This helps with situations where the executable
name sought is too generic and a more meaningful name needs to be used for
the command line options. It also helps satisfy picky project leaders.

llvm-svn: 22461
2005-07-17 05:30:33 +00:00
Reid Spencer
bd640a379e Add two new checks for use in LLVM configuration files:
* FIND_STD_PROGRAM will find a program in the path or using --with options
  and verify that the path/bin/program is executable. Also allows checking
  for include files and libraries. If found, USE_PROGRAM is set, otherwise
  its not set. Also sets PROGRAM_BIN (bin directory), and PROGRAM_DIR (top
  level directory). If headers are found, sets PROGRAM_INC. If libraries
  are found, sets PROGRAM_LIB.
* CHECK_PROGRAM_SANITY can be used to run a program with some option that
  only produces information output and requires no input. If the output
  matches a regular expression, the program passes the sanity check.
  Otherwise, an error occurs.

llvm-svn: 22458
2005-07-17 00:50:40 +00:00
Chris Lattner
07d79f8aa7 Only get the .bss and .data sections when needed instead of unconditionally.
This allows is to not emit empty sections when .data or .bss is not used.

llvm-svn: 22457
2005-07-16 17:41:06 +00:00
Chris Lattner
5aed419b6d Add two helper methods, adjust a prototype
llvm-svn: 22456
2005-07-16 17:40:34 +00:00
Chris Lattner
60bcec0238 Refactor getSection() method to make it easier to use.
llvm-svn: 22455
2005-07-16 17:36:04 +00:00
Chris Lattner
e40a414500 Add ability to set TYPE and FLAGS field for section trivially
llvm-svn: 22454
2005-07-16 17:35:26 +00:00
Chris Lattner
40fbf63df8 Major refactor of the ELFWriter code. Instead of building up one big
vector that represents the .o file at once, build up a vector for each
section of the .o file.  This is needed because the .o file writer needs
to be able to switch between sections as it emits them (e.g. switch
between the .text section and the .rel section when emitting code).

This patch has no functionality change.

llvm-svn: 22453
2005-07-16 08:01:13 +00:00
Nate Begeman
160c12d896 Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP that
the target natively supports.  This eliminates some special-case code from
the x86 backend and generates better code as well.

For an i8 to f64 conversion, before & after:

_x87 before:
        subl $2, %esp
        movb 6(%esp), %al
        movsbw %al, %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret

_x87 after:
        subl $2, %esp
        movsbw 6(%esp), %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret

_sse before:
        subl $12, %esp
        movb 16(%esp), %al
        movsbl %al, %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret

_sse after:
        subl $12, %esp
        movsbl 16(%esp), %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret

llvm-svn: 22452
2005-07-16 02:02:34 +00:00
Nate Begeman
7a1bc7318d Teach the register allocator that movaps is also a move instruction
llvm-svn: 22451
2005-07-16 02:00:20 +00:00
Nate Begeman
c93c1c5148 A couple more darwinisms
llvm-svn: 22450
2005-07-16 01:59:47 +00:00
Chris Lattner
79573b1a93 Remove all knowledge of UINT_TO_FP from the X86 backend, relying on the
legalizer to eliminate them.  With this comes the expected code quality
improvements, such as, for this:

double foo(unsigned short X) { return X; }

we now generate this:

_foo:
        subl $4, %esp
        movzwl 8(%esp), %eax
        movl %eax, (%esp)
        fildl (%esp)
        addl $4, %esp
        ret

instead of this:

_foo:
        subl $4, %esp
        movw 8(%esp), %ax
        movzwl %ax, %eax   ;; Load not folded into this.
        movl %eax, (%esp)
        fildl (%esp)
        addl $4, %esp
        ret

-Chris

llvm-svn: 22449
2005-07-16 00:28:20 +00:00
Chris Lattner
10da57bfed Break the code for expanding UINT_TO_FP operations out into its own
SelectionDAGLegalize::ExpandLegalUINT_TO_FP method.

Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request
that UINT_TO_FP operations be promoted to a larger input type.  This is
useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but
not all of them (like X86).

The same should be done with SINT_TO_FP, but this patch does not do that
yet.

llvm-svn: 22447
2005-07-16 00:19:57 +00:00
Chris Lattner
94e486c56e You can't use config options without config.h
llvm-svn: 22446
2005-07-15 22:48:31 +00:00
Chris Lattner
bee317e9b0 Fix PR595: These error messages should not be looking at CGI.Name, they
should be looking at CGI.TheDef->getName().

llvm-svn: 22445
2005-07-15 22:43:04 +00:00
John Criswell
7e59cfe0bf Fixed some punctuation.
llvm-svn: 22443
2005-07-15 19:25:12 +00:00
Nate Begeman
957e0e7c9e Get closer to fully working scalar FP in SSE regs. This gets singlesource
working, and Olden/power.

llvm-svn: 22441
2005-07-15 00:38:55 +00:00
Nate Begeman
8c2dadc92e Add support for printing the sse scalar comparison instruction mnemonics.
llvm-svn: 22440
2005-07-14 22:52:25 +00:00
Nate Begeman
c871411c9d Add support for a TODO; instructions in .td files can now have arguments
printed as part of the opcode.  This allows something like
cmp${cc}ss in the x86 backed to be printed as cmpltss, cmpless, etc.
depending on what the value of $cc is.

llvm-svn: 22439
2005-07-14 22:50:30 +00:00
John Criswell
434270ec55 Regression test for PR#596: Make sure that negation of a minus doesn't
turn into a C predecrement operator.

llvm-svn: 22438
2005-07-14 19:56:03 +00:00
John Criswell
64f658a2f7 Fixed PR#596:
Add parenthesis around the value being negated; that way, if the value
begins with a minus sign (e.g. negative integer), we won't generate a
C predecrement operator by mistake.

llvm-svn: 22437
2005-07-14 19:41:16 +00:00
Chris Lattner
d8eb6ea6da Make this use the new autoconf support for finding the executables for
gv and Graphviz.

llvm-svn: 22434
2005-07-14 05:33:13 +00:00