OSDN Git Service
Chris Lattner [Sat, 30 Jul 2005 01:33:38 +0000 (01:33 +0000)]
this tests every fp-to-integer conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22562
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 Jul 2005 00:43:00 +0000 (00:43 +0000)]
fix a typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22561
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 30 Jul 2005 00:21:31 +0000 (00:21 +0000)]
Ack, typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22560
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 Jul 2005 00:17:52 +0000 (00:17 +0000)]
Change the fp to integer code to not perform 2-byte stores followed by
1 byte loads and other operations. This is bad for store-forwarding on
common CPUs. We now do this:
fnstcw WORD PTR [%ESP]
mov %AX, WORD PTR [%ESP]
instead of:
fnstcw WORD PTR [%ESP]
mov %AL, BYTE PTR [%ESP + 1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22559
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 30 Jul 2005 00:15:07 +0000 (00:15 +0000)]
Commit a new LoopStrengthReduce pass that can use scalar evolutions and
target data to decide which loop induction variables to strength reduce
and how to do so. This work is mostly by Chris Lattner, with tweaks by
me to get it working on some of MultiSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22558
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 30 Jul 2005 00:12:19 +0000 (00:12 +0000)]
Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22557
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 Jul 2005 00:05:54 +0000 (00:05 +0000)]
Use a custom expander for all FP to int conversions, as the X86 only has
FP-to-int-in-memory: this exposes the load from the stored slot to the
selection dag, allowing it to be folded into other operaions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22556
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 Jul 2005 00:04:12 +0000 (00:04 +0000)]
Allow targets to have custom expanders for FP_TO_*INT conversions where
both the src and dest values are legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22555
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 29 Jul 2005 23:40:16 +0000 (23:40 +0000)]
support near allocations for the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22554
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 29 Jul 2005 23:32:02 +0000 (23:32 +0000)]
turn off GOT on archs that didn't use it (not that it appeard to harm them much with it on)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Jul 2005 01:00:29 +0000 (01:00 +0000)]
Implement a FIXME: move a bunch of cruft for handling FP_TO_*INT operations
that the X86 does not support to the legalizer. This allows it to be better
optimized, etc, and will help with SSE support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22551
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Jul 2005 00:54:34 +0000 (00:54 +0000)]
Don't forget to diddle with the control word when performing an FISTP64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22550
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Jul 2005 00:40:01 +0000 (00:40 +0000)]
Use a custom expander to compile this:
long %test4(double %X) {
%tmp.1 = cast double %X to long ; <long> [#uses=1]
ret long %tmp.1
}
to this:
_test4:
sub %ESP, 12
fld QWORD PTR [%ESP + 16]
fistp QWORD PTR [%ESP]
mov %EDX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP]
add %ESP, 12
ret
instead of this:
_test4:
sub %ESP, 28
fld QWORD PTR [%ESP + 32]
fstp QWORD PTR [%ESP]
call ___fixdfdi
add %ESP, 28
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Jul 2005 00:33:32 +0000 (00:33 +0000)]
Allow targets to define custom expanders for FP_TO_*INT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 29 Jul 2005 00:11:56 +0000 (00:11 +0000)]
allow a target to request that unknown FP_TO_*INT conversion be promoted to
a larger integer destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Jul 2005 23:31:12 +0000 (23:31 +0000)]
instead of having all conversions be handled by one case value, and then have
subcases inside, break things out earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22546
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Jul 2005 20:18:33 +0000 (20:18 +0000)]
New testcase for PR610
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22545
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 28 Jul 2005 18:14:47 +0000 (18:14 +0000)]
support bsr, and more .td simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22543
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 28 Jul 2005 18:13:59 +0000 (18:13 +0000)]
new is not a valid default anywhere, so make this pure virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22542
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 28 Jul 2005 16:25:57 +0000 (16:25 +0000)]
Fix a problem in getDirectoryContents where sub-directory names were
appended to a path string that didn't end in a slash, yielding invalid
path names.
Path contribute by Nicholas Riley.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22539
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 28 Jul 2005 12:45:20 +0000 (12:45 +0000)]
get lazy JITing working. Some of shootout runs now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22538
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 28 Jul 2005 12:44:13 +0000 (12:44 +0000)]
Like constants, globals on some platforms are GOT relative. This means they have to be allocated
near the GOT, which new doesn't do. So break out the allocate into a new function.
Also move GOT index handling into JITResolver. This lets it update the mapping when a Lazy
function is JITed. It doesn't managed the table, just the mapping. Note that this is
still non-ideal, as any function that takes a function address should also take a GOT
index, but that is a lot of changes. The relocation resolve process updates any GOT entry
it sees is out of date.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22537
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Jul 2005 05:23:43 +0000 (05:23 +0000)]
Eliminate an extra copy from R1 that Nate noticed on function calls that
have to write arguments to the stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22536
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Jul 2005 04:42:11 +0000 (04:42 +0000)]
Specify the correct number of operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22535
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 28 Jul 2005 04:00:49 +0000 (04:00 +0000)]
Run the verifier pass after all the other passes rather than before them.
This catches mistakes in the passes rather than just verifying the bytecode
input to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22534
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 28 Jul 2005 03:02:05 +0000 (03:02 +0000)]
Fold constant adds into loads and stores to frame indices.
For the following code:
double %ext(int %A.0__, long %A.1__) {
%A_addr = alloca %typedef.DComplex ; <%typedef.DComplex*> [#uses=2]
%tmp.1 = cast %typedef.DComplex* %A_addr to int* ; <int*> [#uses=1]
store int %A.0__, int* %tmp.1
%tmp.2 = getelementptr %typedef.DComplex* %A_addr, int 0, uint 1 ; <double*> [#uses=2]
%tmp.3 = cast double* %tmp.2 to long* ; <long*> [#uses=1]
store long %A.1__, long* %tmp.3
%tmp.5 = load double* %tmp.2 ; <double> [#uses=1]
ret double %tmp.5
}
We now generate:
_ext:
.LBB_ext_0: ;
stw r3, -12(r1)
stw r4, -8(r1)
stw r5, -4(r1)
lfd f1, -8(r1)
blr
Instead of:
_ext:
.LBB_ext_0: ;
stw r3, -12(r1)
addi r2, r1, -12
stw r4, 4(r2)
stw r5, 8(r2)
lfd f1, 4(r2)
blr
This also fires hundreds of times on MultiSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22533
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 28 Jul 2005 02:25:30 +0000 (02:25 +0000)]
Make the verifier pass run (in debug mode) in llc. This adds a sanity check
to llc when debugging. Also allow other passes to be run from llc.
Patch contributed by Michael McCracken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22532
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Thu, 28 Jul 2005 02:04:44 +0000 (02:04 +0000)]
Please do not reintroduce tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22531
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 27 Jul 2005 23:11:27 +0000 (23:11 +0000)]
Fix some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22530
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 27 Jul 2005 23:11:25 +0000 (23:11 +0000)]
Fix debug info to not print out recently freed memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22529
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 27 Jul 2005 23:03:38 +0000 (23:03 +0000)]
Print symbolic register names in debug dumps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22528
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 27 Jul 2005 21:58:38 +0000 (21:58 +0000)]
Fix PR608:
Previously the script assumed the version number was the last field, now
it assumes it is the first sequence of digits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22527
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Wed, 27 Jul 2005 06:12:32 +0000 (06:12 +0000)]
Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 27 Jul 2005 06:06:29 +0000 (06:06 +0000)]
Implement the optimization for the Red Zone on Darwin. This removes the
unnecessary SP manipulation in leaf routines that don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22522
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 27 Jul 2005 05:58:01 +0000 (05:58 +0000)]
fix some warnings when compiled with 32-bit hosts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22521
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Wed, 27 Jul 2005 05:53:44 +0000 (05:53 +0000)]
Eliminate tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22520
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Jul 2005 22:08:53 +0000 (22:08 +0000)]
Testcase for PR607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22519
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Jul 2005 19:07:51 +0000 (19:07 +0000)]
add a note about the red zone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22518
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Jul 2005 19:03:27 +0000 (19:03 +0000)]
Wrap some long lines, fix emission of weak global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22517
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 26 Jul 2005 18:59:06 +0000 (18:59 +0000)]
Update the PPC readme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22516
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Jul 2005 16:38:28 +0000 (16:38 +0000)]
ConvertibleToGEP always returns 0, remove some old crufty code which
is actually dead because of this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jul 2005 23:42:58 +0000 (23:42 +0000)]
fix a warning on 32-bit systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22513
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 25 Jul 2005 21:15:28 +0000 (21:15 +0000)]
Fix an optimization put in for accessing static globals. This obviates
the need to build PIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22512
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 25 Jul 2005 20:25:08 +0000 (20:25 +0000)]
Get rid of bash specific syntax for variable dereferencing, replacing it
with the more crufty (but more widely available) "eval" command.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22509
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 23 Jul 2005 07:46:48 +0000 (07:46 +0000)]
fix compile error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22508
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Jul 2005 22:58:34 +0000 (22:58 +0000)]
PowerPC no-pic code is not quite ready for prime-time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22507
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 22 Jul 2005 22:43:40 +0000 (22:43 +0000)]
No, really, it's an Alpha! And you probably thought it was a PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22506
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 22:24:01 +0000 (22:24 +0000)]
Handle more imm forms, and load small negative i32 constants without hitting memory (should do the same for arbitrary zero extended small negative constants)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22505
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 22:00:24 +0000 (22:00 +0000)]
I know PowerPC wishes it could be alpha, but it cannot. so there
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22504
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 21:53:35 +0000 (21:53 +0000)]
make sure we always handle small negatives well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22503
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 21:00:30 +0000 (21:00 +0000)]
finally found the gcc defined constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22502
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:54:01 +0000 (20:54 +0000)]
Alpha has JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22501
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:52:16 +0000 (20:52 +0000)]
Alpha JIT (beta)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22500
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:50:29 +0000 (20:50 +0000)]
simpilfy instruction encoding (and make the lines way shorter, aka Misha happification)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22499
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:49:37 +0000 (20:49 +0000)]
update interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22498
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:48:12 +0000 (20:48 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22497
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 22 Jul 2005 20:46:42 +0000 (20:46 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jul 2005 21:55:08 +0000 (21:55 +0000)]
new testcase for PR602
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22495
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 21 Jul 2005 20:44:43 +0000 (20:44 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jul 2005 19:17:18 +0000 (19:17 +0000)]
revert to using 4-byte alignment for doubles, as specified by the ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jul 2005 01:29:16 +0000 (01:29 +0000)]
llvm.sqrt somehow escaped documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22490
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 21 Jul 2005 01:25:49 +0000 (01:25 +0000)]
Support assembling fsqrt on darwin. This will be implemented better when
PowerPC gets subtarget support up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Jul 2005 01:09:27 +0000 (01:09 +0000)]
If errno doesn't matter (e.g. in -ffast-math scenarios), sqrt* should be
compiled to llvm.sqrt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22488
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 20 Jul 2005 22:42:00 +0000 (22:42 +0000)]
Generate mfocrf when targeting g5. Generate fsqrt/fsqrts when targetin g5.
8-byte align doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22486
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 20 Jul 2005 21:06:37 +0000 (21:06 +0000)]
* "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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22485
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Jul 2005 19:12:00 +0000 (19:12 +0000)]
Allow this to pass on non-linux systems as well, such as darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Jul 2005 18:49:28 +0000 (18:49 +0000)]
Do not let MaskedValueIsZero consider undef to be zero, for reasons
explained in the comment.
This fixes UnitTests/2003-09-18-BitFieldTest on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22483
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Jul 2005 16:29:20 +0000 (16:29 +0000)]
count the number of relocations performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Jul 2005 03:56:48 +0000 (03:56 +0000)]
set the target triple so that we don't fail due to X86 abi issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22479
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 19 Jul 2005 16:51:05 +0000 (16:51 +0000)]
Integrate SelectFPExpr into SelectExpr. This gets PPC32 closer to being
automatically generated from a target description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22470
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 19 Jul 2005 16:50:03 +0000 (16:50 +0000)]
Remove unnecessary FP_EXTEND. This causes worse codegen for SSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22469
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 19 Jul 2005 04:52:44 +0000 (04:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jul 2005 03:37:48 +0000 (03:37 +0000)]
remove some sparc-v9-specific information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22467
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 19 Jul 2005 01:36:35 +0000 (01:36 +0000)]
Provide descriptions for the TargetInstrInfo and TargetFrameInfo classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jul 2005 23:07:33 +0000 (23:07 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jul 2005 04:31:14 +0000 (04:31 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22464
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 17 Jul 2005 05:30:33 +0000 (05:30 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22461
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 17 Jul 2005 00:50:40 +0000 (00:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22458
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 17:41:06 +0000 (17:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 17:40:34 +0000 (17:40 +0000)]
Add two helper methods, adjust a prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22456
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 17:36:04 +0000 (17:36 +0000)]
Refactor getSection() method to make it easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 17:35:26 +0000 (17:35 +0000)]
Add ability to set TYPE and FLAGS field for section trivially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22454
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 08:01:13 +0000 (08:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22453
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 16 Jul 2005 02:02:34 +0000 (02:02 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22452
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 16 Jul 2005 02:00:20 +0000 (02:00 +0000)]
Teach the register allocator that movaps is also a move instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22451
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 16 Jul 2005 01:59:47 +0000 (01:59 +0000)]
A couple more darwinisms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 00:28:20 +0000 (00:28 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Jul 2005 00:19:57 +0000 (00:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jul 2005 22:48:31 +0000 (22:48 +0000)]
You can't use config options without config.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jul 2005 22:43:04 +0000 (22:43 +0000)]
Fix PR595: These error messages should not be looking at CGI.Name, they
should be looking at CGI.TheDef->getName().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22445
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Fri, 15 Jul 2005 19:25:12 +0000 (19:25 +0000)]
Fixed some punctuation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22443
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 15 Jul 2005 00:38:55 +0000 (00:38 +0000)]
Get closer to fully working scalar FP in SSE regs. This gets singlesource
working, and Olden/power.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22441
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 14 Jul 2005 22:52:25 +0000 (22:52 +0000)]
Add support for printing the sse scalar comparison instruction mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22440
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 14 Jul 2005 22:50:30 +0000 (22:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22439
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Thu, 14 Jul 2005 19:56:03 +0000 (19:56 +0000)]
Regression test for PR#596: Make sure that negation of a minus doesn't
turn into a C predecrement operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22438
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Thu, 14 Jul 2005 19:41:16 +0000 (19:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22437
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jul 2005 05:33:13 +0000 (05:33 +0000)]
Make this use the new autoconf support for finding the executables for
gv and Graphviz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22434
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Jul 2005 05:19:12 +0000 (05:19 +0000)]
* Correct the AC_DEFINE for LLVM_PATH_GRAPHVIZ to use AC_DEFINE_UNQUOTED so
we actually get the path and not $GRAPHVIZ as the value.
* Add a #define for the gv program (HAVE_GV) and its value LLVM_PATH_GV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jul 2005 05:17:43 +0000 (05:17 +0000)]
As discussed on IRC, this stuff is just for debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22432
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Jul 2005 02:25:12 +0000 (02:25 +0000)]
Put the path to the Graphviz program in the #defines so it can be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22430
91177308-0d34-0410-b5e6-
96231b3b80d8