Brian Gaeke
45f3af8d88
Update lists of failing benchmarks (except C++...something is the
...
matter with my sparcv8 libstdc++.a) and to-do list.
llvm-svn: 18755
2004-12-10 08:39:27 +00:00
Chris Lattner
ead42a768e
This is the initial implementation of IPSCCP, as requested by Brian.
...
This implements SCCP/ipsccp-basic.ll, rips apart Olden/mst (as described in
PR415), and does other nice things.
There is still more to come with this, but it's a start.
llvm-svn: 18752
2004-12-10 08:02:06 +00:00
Brian Gaeke
1da3720799
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Alkis Evlogimenos
9b02192468
Fix writer to properly quote label names when they don't contain
...
simple characters.
llvm-svn: 18744
2004-12-10 05:41:10 +00:00
Alkis Evlogimenos
189fdf11db
Do not allow empty label names.
...
llvm-svn: 18743
2004-12-10 05:40:19 +00:00
Chris Lattner
e0936a0bd3
Implement test/Feature/escaped_label.ll
...
llvm-svn: 18741
2004-12-10 05:27:29 +00:00
Brian Gaeke
91cf4fe1ca
Add SparcV8 target back into the build
...
llvm-svn: 18738
2004-12-10 04:54:21 +00:00
Brian Gaeke
5c8cefdf9a
Adjust paths: Sparc/V8 --> SparcV8
...
llvm-svn: 18737
2004-12-10 04:48:57 +00:00
Brian Gaeke
262fe40da0
Make this file self-contained.
...
llvm-svn: 18736
2004-12-10 04:46:30 +00:00
Brian Gaeke
ef7289195a
Update list of failing MultiSource benchmarks. It works out to +5 -5, but I
...
think some of these might be the CFE's fault; a rebuild should come soon.
llvm-svn: 18735
2004-12-10 04:42:46 +00:00
Brian Gaeke
999a5ba9ba
When FpMOVDs appeared in pairs, we were mistakenly skipping over the latter of
...
each pair. I think this fixes that.
One of these days, I swear I'm going to get the hang of C++ iterators.
Really.
llvm-svn: 18734
2004-12-10 04:42:45 +00:00
Brian Gaeke
a196f80d71
We're continuing to make progress on MultiSource.
...
llvm-svn: 18714
2004-12-09 18:54:31 +00:00
Brian Gaeke
706a0c3988
Bytes and shorts are aligned differently from words.
...
llvm-svn: 18713
2004-12-09 18:51:02 +00:00
Brian Gaeke
43cb9ee8a4
Fix asm-printing directives (how did we not see this before...apparently,
...
everything was an int!)
llvm-svn: 18712
2004-12-09 18:51:01 +00:00
Chris Lattner
f5962a7d6c
note to self: Do not check in debugging code!
...
llvm-svn: 18693
2004-12-09 07:15:52 +00:00
Chris Lattner
1e2b3fd343
Implement trivial sinking for load instructions. This causes us to sink 567 loads in spec
...
llvm-svn: 18692
2004-12-09 07:14:34 +00:00
Chris Lattner
c5f6c3fd48
Remove a dead field, make the map go to integer type ID to hash better and
...
avoid a getType.
llvm-svn: 18691
2004-12-09 06:19:44 +00:00
Jeff Cohen
2d53514c83
Fix residual Visual Studio build problems
...
llvm-svn: 18688
2004-12-09 05:51:11 +00:00
Chris Lattner
565d505b28
Remove #include inadvertently added
...
llvm-svn: 18686
2004-12-09 04:53:17 +00:00
Chris Lattner
23b2d6fd82
Eliminate this ugly hack. This was put back in when replaceAllUsesOf used
...
a different algorithm that was extremely inefficient for instructions with
many operands.
This reduces the time of this code snippet from .23s for 176.gcc to 0.03s
in a debug build, which speeds up total llvm-dis time just barely.
It's more of a code cleanup than a speedup.
llvm-svn: 18685
2004-12-09 04:51:50 +00:00
Alkis Evlogimenos
8547388d22
Add testcase and fix for yet another case where we query the size an
...
abstract type.
llvm-svn: 18678
2004-12-08 23:56:15 +00:00
Chris Lattner
8529319568
Do extremely simple sinking of instructions when they are only used in a
...
successor block. This turns cases like this:
x = a op b
if (c) {
use x
}
into:
if (c) {
x = a op b
use x
}
This triggers 3965 times in spec, and is tested by
Regression/Transforms/InstCombine/sink_instruction.ll
This appears to expose a bug in the X86 backend for 177.mesa, which I'm
looking in to.
llvm-svn: 18677
2004-12-08 23:43:58 +00:00
Alkis Evlogimenos
b00f884344
Add testcase and fix for another case where we query the size an
...
abstract type.
llvm-svn: 18676
2004-12-08 23:42:11 +00:00
Alkis Evlogimenos
fe549f46e1
Fix this regression and remove the XFAIL from this test.
...
llvm-svn: 18674
2004-12-08 23:10:30 +00:00
Chris Lattner
62e3f533f3
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
...
llvm-svn: 18670
2004-12-08 22:20:34 +00:00
Chris Lattner
31ba7367aa
Move method out of line for better ICC support
...
Add some ifdefs for some stuff I like to be able to toggle easily
llvm-svn: 18665
2004-12-08 21:03:56 +00:00
Chris Lattner
458286d514
Properly extern this.
...
llvm-svn: 18664
2004-12-08 21:00:59 +00:00
Chris Lattner
0cfaa02448
Turn this error back into a warning, fixing the povray regression
...
llvm-svn: 18655
2004-12-08 20:01:10 +00:00
Chris Lattner
a7a804efdb
Work correctly with MSVC and ICC, patch contributed by Bjørn Wennberg
...
llvm-svn: 18631
2004-12-08 16:22:48 +00:00
Chris Lattner
6ebc142507
Work correctly with ICC, Patch contributed by Bjørn Wennberg
...
llvm-svn: 18630
2004-12-08 16:22:26 +00:00
Chris Lattner
dabf541efb
Add support for compilers with arg dependent name lookup, contributed by
...
Bjørn Wennberg
llvm-svn: 18628
2004-12-08 16:13:53 +00:00
Chris Lattner
8ecbc96420
Add support for compilers without argument dependent name lookup, contributed
...
by Bjørn Wennberg
llvm-svn: 18627
2004-12-08 16:12:20 +00:00
Chris Lattner
aa0eee9e3e
Make this work with the ICC compiler, contributed by Bjørn Wennberg
...
llvm-svn: 18626
2004-12-08 16:10:52 +00:00
Chris Lattner
2f52add966
Remove unneeded class qualifier, contributed by Bjørn Wennberg
...
llvm-svn: 18625
2004-12-08 16:05:02 +00:00
Chris Lattner
722af6cfde
Revert this disgusting hack, John has a much nicer solution
...
llvm-svn: 18611
2004-12-08 03:31:14 +00:00
Chris Lattner
ad4056c178
Add a disgusting hack to work around a libstdc++ issue. This code should
...
be removed when PR400 is resolved.
llvm-svn: 18610
2004-12-08 03:28:51 +00:00
Reid Spencer
f929fb661d
For PR387:\
...
Add doInitialization method to avoid overloaded virtuals
llvm-svn: 18602
2004-12-07 08:11:36 +00:00
Reid Spencer
d0d846cd06
For PR387:\
...
Add getModRefInfo method to avoid overloaded virtuals
llvm-svn: 18601
2004-12-07 08:11:24 +00:00
Reid Spencer
657b3137a9
Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
...
of them seem to work everywhere.
llvm-svn: 18598
2004-12-07 07:38:08 +00:00
Reid Spencer
66a5217325
Provide a missing header file.
...
llvm-svn: 18597
2004-12-07 07:08:08 +00:00
Reid Spencer
0db7313146
Fix some comments.
...
llvm-svn: 18596
2004-12-07 07:06:47 +00:00
Alkis Evlogimenos
3bcde892c3
Fix check for valid floats. Also use and HUGE_VALF instead
...
of std::numeric_limits, because they work in more platforms.
llvm-svn: 18593
2004-12-07 06:46:50 +00:00
Nate Begeman
85a2e38a56
Move virtual function call out of loop to speed up getFreePhysReg by about
...
20%, shaving 0.1s off hbd compile time on my g5. Yay.
llvm-svn: 18592
2004-12-07 05:25:53 +00:00
Reid Spencer
d50c86f078
For PR387:\
...
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual
llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Reid Spencer
25b1f95558
For PR409: \
...
Test the range of float constants to ensure we are not attempting to create a \
float constant using a double value that is out of range for a float
llvm-svn: 18585
2004-12-06 22:18:37 +00:00
Reid Spencer
d505b99715
For PR409: \
...
Make sure to check isValueValidForType on floating point constants and give \
an error if the value is not valid, otherwise it would assert in the VMCore
llvm-svn: 18584
2004-12-06 22:18:25 +00:00
Reid Spencer
98eb4c8d05
Fix PR139: \
...
Implement LinkItems and BuildLinkItems interfaces.
llvm-svn: 18547
2004-12-05 19:14:55 +00:00
Chris Lattner
fd2cb25d5f
Properly implement a fix for PR475
...
llvm-svn: 18537
2004-12-05 07:19:16 +00:00
Chris Lattner
0f2cf7324c
Revert this patch, it broke a ton of programs.
...
llvm-svn: 18535
2004-12-05 06:59:59 +00:00
Chris Lattner
bf9258ba8b
Move lower intrinsics before FP constant emission, in case
...
intrinsic lowering ever introduces constants.
Rename local symbols before printing function bodies, fixing 255.vortex
with the CBE!!!
llvm-svn: 18534
2004-12-05 06:49:44 +00:00
Chris Lattner
9c390fa13f
When printing out a function, make sure that local and global symbols
...
don't conflict. This fixes Assembler/2004-12-05-LocalGlobalSymtabConflict.ll
llvm-svn: 18532
2004-12-05 06:44:09 +00:00
Chris Lattner
cdcd7126f1
Add a new method
...
llvm-svn: 18531
2004-12-05 06:43:27 +00:00
Alkis Evlogimenos
687155333f
Fix PR475.
...
llvm-svn: 18515
2004-12-05 01:51:20 +00:00
Reid Spencer
7d7b54310d
Distribute headers and license files too
...
llvm-svn: 18505
2004-12-04 22:34:21 +00:00
Reid Spencer
8cddd97526
Provide more information in the error message that occurs when there are
...
unresolved constants remaining.
llvm-svn: 18502
2004-12-04 22:19:53 +00:00
Chris Lattner
8f849baa59
Check in some patches for better assertions
...
llvm-svn: 18500
2004-12-04 21:28:47 +00:00
Chris Lattner
17ebff094f
This patch prevents an infinite recursion while compiling 103.su2cor.
...
All SPEC CFP 95 programs now work, though the JIT isn't loading -lf2c right
so they aren't testing correctly.
llvm-svn: 18499
2004-12-04 20:54:32 +00:00
Chris Lattner
32d0c4ce02
Fix linkage of mismatched weak globals. This unbreaks 300.twolf
...
llvm-svn: 18494
2004-12-04 18:54:48 +00:00
Chris Lattner
8bd875f0de
Do not allow bytecode files with unresolved references to be read. Doing
...
so lets wierd ConstantPlaceholder objects sneak into the system which
confuses it greatly.
llvm-svn: 18487
2004-12-04 05:28:27 +00:00
Chris Lattner
66d0cdd8ec
Fix compilation error on Darwin.
...
llvm-svn: 18485
2004-12-04 04:17:20 +00:00
Alkis Evlogimenos
7202acacf7
Check if a block has a terminator first before calling front() on
...
it. If a block has a terminator then it is certainly non-empty so the
verifier will not crash on it.
llvm-svn: 18484
2004-12-04 02:30:42 +00:00
Alkis Evlogimenos
edf490b75e
Make error msg reflect what exactly went wrong.
...
llvm-svn: 18478
2004-12-04 01:25:06 +00:00
Chris Lattner
9245823389
Prevent accessing past the end of the intervals vector, this fixes
...
Prolang-C/bison in the JIT
llvm-svn: 18477
2004-12-04 01:22:09 +00:00
Chris Lattner
cfb8e1d6c8
Remove darwin specific majik
...
llvm-svn: 18467
2004-12-03 23:02:55 +00:00
Chris Lattner
c8009d368d
Move darwin-specific majik here.
...
llvm-svn: 18466
2004-12-03 23:02:42 +00:00
Chris Lattner
5d27646680
Significantly rework linker support for global variables, allowing it to
...
correctly link globals whose LLVM types do not match.
This fixes several of the F2C SPEC FP benchmarks, which were failing this
due to the implementation of common blocks used by f2c.
llvm-svn: 18465
2004-12-03 22:18:41 +00:00
Chris Lattner
40e7175e44
Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
...
PR472
llvm-svn: 18459
2004-12-03 17:19:10 +00:00
Chris Lattner
a5a08f5484
Implement stripping of debug symbols, making the --strip-debug options in
...
gccas/gccld more than just a noop.
llvm-svn: 18456
2004-12-03 16:22:08 +00:00
Chris Lattner
378036ed74
Do not look here for elegance.
...
This fixes the ugly darwin "cannot find symbols starting with __" issue.
Thanks for Owen/resistor for testing this out for me.
llvm-svn: 18454
2004-12-03 07:16:51 +00:00
Brian Gaeke
cabac53133
This code rotted - change it to call abort() until someone wants
...
to rewrite this to use relocations.
llvm-svn: 18453
2004-12-03 06:57:14 +00:00
Tanya Lattner
d24558ac54
When writing kernel, save the branches til the end. They are still put in the "right place" in the schedule, but sometimes when folding to make a kernel instructions are added between branches. This is wrong. To avoid this, we handle branches special.
...
llvm-svn: 18450
2004-12-03 05:25:22 +00:00
Chris Lattner
99c8cf8ef8
Fix a regression caused by the previous patch
...
llvm-svn: 18449
2004-12-03 05:13:15 +00:00
Chris Lattner
45529acebd
Initial reimplementation of the -strip pass, with a stub for implementing
...
-S
llvm-svn: 18440
2004-12-02 21:25:03 +00:00
Chris Lattner
d742c10964
This pass is moving to lib IPO
...
llvm-svn: 18439
2004-12-02 21:24:40 +00:00
Chris Lattner
eb18ce7a43
The stripping pass as we know it is about to disappear
...
llvm-svn: 18436
2004-12-02 21:05:01 +00:00
John Criswell
faf1e07531
Reverting revision 1.209.
...
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.
llvm-svn: 18435
2004-12-02 19:02:49 +00:00
Chris Lattner
316f923a9c
Spill/restore X86 floating point stack registers with 64-bits of precision
...
instead of 80-bits of precision. This fixes PR467.
This change speeds up fldry on X86 with LLC from 7.32s on apoc to 4.68s.
llvm-svn: 18433
2004-12-02 18:17:31 +00:00
Chris Lattner
dfdd49b7af
Consider 64-bit registers to be FP as well.
...
llvm-svn: 18432
2004-12-02 17:57:21 +00:00
Reid Spencer
356384fbdb
PR466:
...
* Make the linker find lib*.bca files now instead of lib*.bc since those
are what the makefiles now generate for bytecode archives.
* Make sure the linker only links archives when LinkLibraries is called.
Previously if it found a lib*.bc file and that file was a bytecode file,
it would link in the entire bytecode. This could make -lc -lc fail with
duplicate symbols error but it shouldn't as searching multiple libraries,
even the same one more than once, is permitted.
* Now that the above problems are corrected, implement the dependent libs
feature. After the module is linked with all specified libraries, the
LinkLibraries function will obtain the set of dependent libraries from
the linked modules and attemp to find and link against those libraries.
llvm-svn: 18428
2004-12-02 09:52:10 +00:00
Reid Spencer
f16e254d8a
Fix seriously broken implementation of GetMagicNumber.
...
llvm-svn: 18422
2004-12-02 09:09:48 +00:00
Tanya Lattner
01adb68f38
Reworked branch adding in prologue. Added check for infinite loops which are not modulo scheduled.
...
llvm-svn: 18419
2004-12-02 07:22:15 +00:00
Chris Lattner
afb31cf723
Implement a FIXME by checking to make sure that a malloc is not being used
...
in scary and unknown ways before we promote it. This fixes the miscompilation
of 188.ammp that has been plauging us since a globalopt patch went in.
Thanks a ton to Tanya for helping me diagnose the problem!
llvm-svn: 18418
2004-12-02 07:11:07 +00:00
Chris Lattner
fd541d4228
Fix a minor bug where we set a var to initialized on malloc, not on store.
...
This doesn't fix anything that I'm aware of, just noticed it by inspection
llvm-svn: 18417
2004-12-02 06:25:58 +00:00
Tanya Lattner
893f987574
Reverting this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021428.html
It broke Mutlisource/Applications/obsequi
llvm-svn: 18407
2004-12-01 18:27:03 +00:00
Chris Lattner
a94cee5109
Initial support for packed types, contributed by Morten Ofstad
...
llvm-svn: 18406
2004-12-01 17:14:28 +00:00
Chris Lattner
e4350af487
Remove unneeded cast.
...
llvm-svn: 18405
2004-12-01 17:13:05 +00:00
Chris Lattner
08d8b2ecaa
Get GEP's working with packed types. Contributed by Morten Ofstad!
...
llvm-svn: 18404
2004-12-01 17:12:16 +00:00
Reid Spencer
af68e19395
Revert version 1.39. It breaks the ordering of the library processing.
...
llvm-svn: 18399
2004-11-30 22:54:48 +00:00
Chris Lattner
0abd8109fa
Do not let GCC emit a warning for INT64_MIN
...
llvm-svn: 18398
2004-11-30 21:33:58 +00:00
Brian Gaeke
48f8e8b05a
Sparcs behave better if we use <alloca.h> and avoid messing with __builtin_alloca.
...
llvm-svn: 18397
2004-11-30 21:27:01 +00:00
Chris Lattner
1196903800
Fix the JIT when being used from llvm-db
...
llvm-svn: 18391
2004-11-30 17:41:49 +00:00
Chris Lattner
23c9c1bb62
This pass is completely broken.
...
llvm-svn: 18387
2004-11-30 17:09:06 +00:00
Chris Lattner
d6020eabef
RevisionNum is read by error(), initialize it early.
...
llvm-svn: 18386
2004-11-30 16:58:18 +00:00
Brian Gaeke
289f3d3cc4
Update list of failing benchmarks.
...
llvm-svn: 18384
2004-11-30 08:15:44 +00:00
Brian Gaeke
2d52bbf6eb
If we're about to emit something like:
...
%f0 = fmovs %f0
%f1 = fmovs %f1
then just delete the FpMOVD pseudo-instruction instead. Also, add
statistics and debug printouts.
llvm-svn: 18383
2004-11-30 08:15:15 +00:00
Chris Lattner
c58bc8d96e
Squelch warning
...
llvm-svn: 18381
2004-11-30 07:47:34 +00:00
Chris Lattner
2231d21dad
Fix several bugs in 'op x, imm' handling. Foremost is that we now emit
...
addi r3, r3, -1
instead of
addi r3, r3, 1
for 'sub int X, 1'.
Secondarily, this fixes several cases where we could crash given an unsigned
constant. And fixes a couple of minor missed optimization cases, such as
xor X, ~0U -> not X
llvm-svn: 18379
2004-11-30 07:30:20 +00:00
Reid Spencer
b392dd6861
Up the compression threshold to 64K so we avoid it for all but the largest
...
bytecode files. This should help linking substantially.
llvm-svn: 18378
2004-11-30 07:13:34 +00:00
Chris Lattner
537e5a6b50
Fix test/Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx
...
This only fails on darwin or on X86 under valgrind.
llvm-svn: 18377
2004-11-30 07:01:15 +00:00
Chris Lattner
1e093bfb2b
Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.ll
...
llvm-svn: 18376
2004-11-30 06:40:04 +00:00
Chris Lattner
629965fbe0
Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll
...
llvm-svn: 18374
2004-11-30 06:36:11 +00:00
Chris Lattner
23a2a6e5d3
Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll
...
llvm-svn: 18371
2004-11-30 06:29:10 +00:00
Chris Lattner
25b93fea2a
Alkis noticed that this variable is dead. Thanks!
...
llvm-svn: 18369
2004-11-30 04:01:44 +00:00
Chris Lattner
e561ef0261
Add method
...
llvm-svn: 18368
2004-11-30 02:51:53 +00:00
Chris Lattner
b237a19a78
If we have something like this:
...
if (x) {
code
...
} else {
code
...
}
Turn it into:
code
if (x) {
...
} else {
...
}
This reduces code size and in some common cases allows us to completely
eliminate the conditional. This turns several if/then/else blocks in loops
into straightline code in 179.art, turning the loops into single basic blocks
(good for modsched even!).
Maybe now brg will leave me alone ;-)
llvm-svn: 18366
2004-11-30 00:29:14 +00:00
Chris Lattner
679cc8deab
Remove extraneous namespacification. In particular, don't define llvm::llvm::createInternalGlobalMapperPass
...
llvm-svn: 18365
2004-11-30 00:22:59 +00:00
Chris Lattner
ba782edfb7
Allow hoisting loads of globals and alloca's in conditionals.
...
llvm-svn: 18363
2004-11-29 21:26:12 +00:00
Reid Spencer
e978501448
Functionality moved to portable lib/System/DynamicLibrary.cpp
...
implementation
llvm-svn: 18358
2004-11-29 14:11:41 +00:00
Reid Spencer
74b17227a5
Use System/DynamicLibrary instead of Support/DynamicLinker
...
llvm-svn: 18357
2004-11-29 14:11:29 +00:00
Reid Spencer
e4efcbf807
Use System/DynamicLibrary instead of Support/DynamicLinker to implement.
...
llvm-svn: 18356
2004-11-29 14:07:46 +00:00
Reid Spencer
66b4a250cf
Implement two new functions: LoadLibraryPermanently and
...
SearchForAddressOfSymbol.
llvm-svn: 18355
2004-11-29 13:33:28 +00:00
Reid Spencer
e76c012f3a
Shared library extension is now in LTDL_SHLIB_EXT
...
llvm-svn: 18353
2004-11-29 12:40:21 +00:00
Reid Spencer
c0b0d036b3
We just use ltdl's implementation for this abstraction now. Its portable to
...
more platforms than LLVM supports.
llvm-svn: 18352
2004-11-29 12:39:10 +00:00
Reid Spencer
e498308615
Mods for compilation with llvm.
...
llvm-svn: 18346
2004-11-29 12:04:27 +00:00
Reid Spencer
42ceb789ad
Original version of ltdl.h from libtool 1.5.10
...
llvm-svn: 18345
2004-11-29 12:02:48 +00:00
Reid Spencer
93069daab2
Original version of ltdl.c from libtool 1.5.10
...
llvm-svn: 18344
2004-11-29 12:02:25 +00:00
Reid Spencer
9e369115fc
Implement the default constructor which causes the current program to be
...
opened as if it was a dynamic library so its symbols can be searched too.
llvm-svn: 18341
2004-11-29 10:39:46 +00:00
Chris Lattner
9c400f3b28
Revamp long/ulong comparisons to use a much more efficient sequence (thanks
...
to Brian and the Sun compiler for pointing out that the obvious works :)
This also enables folding all long comparisons into setcc and branch
instructions: before we could only do == and !=
For example, for:
void test(unsigned long long A, unsigned long long B) {
if (A < B) foo();
}
We now generate:
test:
subl $4, %esp
movl %esi, (%esp)
movl 8(%esp), %eax
movl 12(%esp), %ecx
movl 16(%esp), %edx
movl 20(%esp), %esi
subl %edx, %eax
sbbl %esi, %ecx
jae .LBBtest_2 # UnifiedReturnBlock
.LBBtest_1: # then
call foo
movl (%esp), %esi
addl $4, %esp
ret
.LBBtest_2: # UnifiedReturnBlock
movl (%esp), %esi
addl $4, %esp
ret
Instead of:
test:
subl $12, %esp
movl %esi, 8(%esp)
movl %ebx, 4(%esp)
movl 16(%esp), %eax
movl 20(%esp), %ecx
movl 24(%esp), %edx
movl 28(%esp), %esi
cmpl %edx, %eax
setb %al
cmpl %esi, %ecx
setb %bl
cmove %ax, %bx
testb %bl, %bl
je .LBBtest_2 # UnifiedReturnBlock
.LBBtest_1: # then
call foo
movl 4(%esp), %ebx
movl 8(%esp), %esi
addl $12, %esp
ret
.LBBtest_2: # UnifiedReturnBlock
movl 4(%esp), %ebx
movl 8(%esp), %esi
addl $12, %esp
ret
llvm-svn: 18330
2004-11-29 05:55:24 +00:00
Tanya Lattner
4b705a5897
Reworked branching so we don't handle BAs specially. It just updates the branchTO regardless of what type of branch it is.
...
llvm-svn: 18322
2004-11-29 04:39:47 +00:00
Tanya Lattner
819de3ccd4
Fixed bug where instructions in the kernel were not ordered right to preserve dependencies in a cycle.
...
llvm-svn: 18314
2004-11-28 23:36:15 +00:00
Reid Spencer
dd287f7758
Fix for PR454:
...
* Make sure we handle signed to unsigned conversion correctly
* Move this visitSetCondInst case to its own method.
llvm-svn: 18312
2004-11-28 21:31:15 +00:00
Chris Lattner
1de5cd0fd0
The LLVM bool type shall have 1 byte alignment on PPC.
...
llvm-svn: 18311
2004-11-28 21:16:45 +00:00
Chris Lattner
7301399232
Make DSE potentially more aggressive by being more specific about alloca sizes.
...
llvm-svn: 18309
2004-11-28 20:44:37 +00:00
Chris Lattner
e65724d6eb
Fix DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll
...
llvm-svn: 18308
2004-11-28 20:30:15 +00:00
Chris Lattner
c3750aa2a3
Fix SingleSource/UnitTests/2004-11-28-GlobalBoolLayout.c, and hopefully
...
PR449
llvm-svn: 18306
2004-11-28 17:56:47 +00:00
Chris Lattner
bf49c461ef
Fix PR463
...
llvm-svn: 18303
2004-11-28 16:45:45 +00:00
Reid Spencer
49f3fe5d81
Compute the firstFileOffset correctly after reading the LLVM symbol table.
...
llvm-svn: 18300
2004-11-28 03:13:02 +00:00
Chris Lattner
3c35e1e02b
When merging to alias sets, if they are both must alias, the result is not
...
a must alias set unless all of the pointers in the resultant set are must
aliased together.
llvm-svn: 18275
2004-11-27 18:37:42 +00:00
Chris Lattner
2c4161fc57
Implement Regression/Transforms/InstCombine/getelementptr_cast.ll, which
...
occurs many times in crafty
llvm-svn: 18273
2004-11-27 17:55:46 +00:00
Nate Begeman
6048139b1f
Remove the ISel->AsmPrinter link via the TargetMachine that was put in
...
place to help bring up the PowerPC back end on Darwin. This code is no
longer serves any purpose now that the AsmPrinter does the right thing
all the time printing GlobalValues. --Cruft.
llvm-svn: 18267
2004-11-27 04:45:11 +00:00
Chris Lattner
ab36efe42b
Add a new interface
...
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner
8715ef738f
Provide size information when checking to see if we can LICM a load, this
...
allows us to hoist more loads in some cases.
llvm-svn: 18265
2004-11-26 21:20:09 +00:00
Chris Lattner
fca424bb51
When evaluating an AA, pass in size info
...
llvm-svn: 18264
2004-11-26 21:05:39 +00:00
Chris Lattner
47987cf373
There is no reason to store <x,x>, just store <x>.
...
llvm-svn: 18263
2004-11-26 20:25:17 +00:00
Chris Lattner
aecb6daf08
The trick with globals actually works with allocas and malloc too
...
llvm-svn: 18262
2004-11-26 20:01:48 +00:00
Chris Lattner
e076e608d8
A store or load cannot alias a global if the accessed amount is larger then
...
the global.
This implements Regression/Analysis/BasicAA/global-size.ll
llvm-svn: 18261
2004-11-26 19:20:01 +00:00
Reid Spencer
55435b0e39
Add bzip2 subdirectory
...
llvm-svn: 18251
2004-11-25 19:38:28 +00:00
Reid Spencer
04f1391e49
Remove zlib support in favor of our own bzip2 library
...
llvm-svn: 18250
2004-11-25 19:38:16 +00:00
Reid Spencer
d841d33637
Adjust to Compressor interface change
...
llvm-svn: 18249
2004-11-25 19:38:05 +00:00
Reid Spencer
3d3a296606
Revise to LLVM makefile standards.
...
llvm-svn: 18246
2004-11-25 16:12:25 +00:00
Reid Spencer
be86b4d506
Initial Version from bzip2 Release 1.0.2.
...
llvm-svn: 18245
2004-11-25 16:11:36 +00:00
Reid Spencer
8cf334425d
Implement dependent library linking. It is no longer required that -lstdc++
...
-lstdsup++ no -lc be passed on the command line to llvm linkers if the
progam being linked was compiled with the C/C++ Front End or Stacker.
llvm-svn: 18243
2004-11-25 09:32:08 +00:00
Reid Spencer
c7b5efd4b9
Remove blank comment lines for uniformity.
...
Make sure lines don't exceed 80 cols.
llvm-svn: 18242
2004-11-25 09:29:44 +00:00
Nate Begeman
6405f5e9b3
Enable optimization suggested by Chris Lattner to not emit reloc stubs for
...
static global variables whose addresses are taken. This allows us to
convert the following code for taking the address of a static function foo
addis r2, r30, ha16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")
lwz r3, lo16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")(r2)
which also includes linker stub code emitted at the end of the .s file not
shown here, and replace it with this:
addis r2, r30, ha16(l1__2E_foo_2-"L00001$pb")
la r3, lo16(l1__2E_foo_2-"L00001$pb")(r2)
which in addition to not needing linker help, also has no load instruction.
For those not up on PowerPC mnemonics, la is shorthand for add immediate.
llvm-svn: 18239
2004-11-25 07:09:01 +00:00
Chris Lattner
98ddaa680d
Fix the build on non ppc machines
...
llvm-svn: 18235
2004-11-25 06:14:45 +00:00
Chris Lattner
026387ccbc
The JIT works enough
...
llvm-svn: 18228
2004-11-25 04:14:54 +00:00
Chris Lattner
671d625e17
Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.
...
All of Olden passes now! :)
llvm-svn: 18227
2004-11-25 04:11:07 +00:00
Chris Lattner
1f6882a401
Fix encoding of fneg instruction
...
llvm-svn: 18226
2004-11-25 03:53:44 +00:00
Chris Lattner
1a5a39e9ec
Fix encoding of swari, fixing several programs, including Olden/mst
...
llvm-svn: 18225
2004-11-25 03:40:20 +00:00
Chris Lattner
01269e6ad3
There is not a 1-1 mappign between llvm blocks and PPC blocks, do not use
...
LLVM blocks as the keys for the branch rewriter. This fixes treeadd and
many other programs with the JIT.
llvm-svn: 18223
2004-11-25 00:33:57 +00:00
Chris Lattner
ebbfaa3db8
* Rename existing relocations to be more specific
...
* Add relocations for refernces to non-lazy darwin stubs and implement
them correctly.
With this change, we can correctly references external globals, and now
all but two UnitTests and all but 1 Regression/C tests pass.
More importantly, bugpoint-jit will start giving us useful testcases,
instead of always telling us that references to external globals don't
work :)
llvm-svn: 18222
2004-11-24 22:30:08 +00:00
Nate Begeman
e9b752c4e3
Add the same optimization that we do loading from fixed alloca slots to
...
storing to fixed alloca slots.
llvm-svn: 18221
2004-11-24 21:53:14 +00:00
Chris Lattner
4b48c12388
Write CompilationCallback as an explicit assembly stub to avoid getting GCC's
...
prolog.
llvm-svn: 18220
2004-11-24 21:01:46 +00:00
Chris Lattner
961fae4d82
When rewriting the original call instruction, make sure to rewrite it to
...
call the right address.
llvm-svn: 18213
2004-11-24 18:00:02 +00:00
Chris Lattner
8cd0215f14
Force the intregs ptr into R2 and the FPregs ptr into R3. This fixes a really
...
obscure problem where we were doing:
lmw r3,0(r9)
which is undefined on PPC. Now we do:
lmw r3,0(r2)
by force, not relying on the GCC register allocator for luck :)
llvm-svn: 18212
2004-11-24 17:42:55 +00:00
Reid Spencer
1c55479db5
Implement and document prefix options with arbitrary values including an
...
= sign. This needed to support -DNAME=value options as pass-through in
llvmc.
llvm-svn: 18203
2004-11-24 06:13:42 +00:00
Brian Gaeke
8d69439f39
Update list of failing benchmarks.
...
llvm-svn: 18202
2004-11-24 04:07:42 +00:00
Brian Gaeke
3bb57935a7
Fix bug in emitGEPOperation with large struct-member offsets.
...
llvm-svn: 18201
2004-11-24 04:07:33 +00:00
Chris Lattner
de6bb17359
Fix a few more tests by encoding the extsb and other XForm11 instructions
...
correctly.
llvm-svn: 18200
2004-11-24 03:52:02 +00:00
Chris Lattner
338b1b4634
Fix the encoding of ORi and other DForm4 instructions. This brings us to
...
36/42 SingleSource/UnitTests passing!
llvm-svn: 18199
2004-11-24 02:15:41 +00:00
Chris Lattner
2c1b140d62
Loads are relocatable too
...
llvm-svn: 18198
2004-11-24 02:03:44 +00:00
Chris Lattner
ef7794a7c6
Calls do not need a MovPCtoLR instruction
...
llvm-svn: 18197
2004-11-24 02:00:06 +00:00
Chris Lattner
9e59b1f3b5
Get constant pools working. This fixes even more programs, allowing us to
...
pass 24/42 in UnitTests (up from 20).
llvm-svn: 18196
2004-11-24 01:56:12 +00:00
Tanya Lattner
1d440e4782
Forced branches to be first to be scheduled.
...
llvm-svn: 18195
2004-11-24 01:49:10 +00:00
Chris Lattner
a4fd491b8d
Rewrite branches more closely to correct. This makes more stuff pass, and
...
stops the infinite loops!
llvm-svn: 18194
2004-11-24 01:35:12 +00:00
Chris Lattner
a8184a2882
Branch instructions explicitly represent CRx in them. bEcause of this, encode
...
them explicitly as well.
llvm-svn: 18193
2004-11-24 01:15:19 +00:00
Nate Begeman
f8b9f49dc8
Fix encoding of bctrl, and remove some unused instructions
...
llvm-svn: 18192
2004-11-24 00:16:37 +00:00
Reid Spencer
da5beb436a
Allow reading of member names that begin with an _ character.
...
llvm-svn: 18179
2004-11-23 22:35:39 +00:00
Chris Lattner
f50b42adc1
Fix encoding of blr and bctr
...
llvm-svn: 18178
2004-11-23 22:06:24 +00:00
Nate Begeman
9b9c78b3e2
Use the correct register class as a constaint to gcc's inline assembly, so
...
that we don't end up trying to use r0 as a base register.
llvm-svn: 18176
2004-11-23 21:37:22 +00:00
Nate Begeman
7ae4c39fc6
Save/Restore arg regs and nonvolatile regs the compiler might use during
...
CompilationCallback
llvm-svn: 18175
2004-11-23 21:34:18 +00:00
Chris Lattner
08eb9d0d18
Fix the encoding of OR, AND and many other instructions
...
llvm-svn: 18174
2004-11-23 21:17:35 +00:00
Brian Gaeke
ce245ef743
Support shr long/ulong.
...
llvm-svn: 18173
2004-11-23 21:10:50 +00:00
Brian Gaeke
29093f7ec7
Support printing ConstantAggregateZeros.
...
llvm-svn: 18172
2004-11-23 21:10:49 +00:00
Brian Gaeke
371faf708f
Update failing SingleSource test-case list.
...
llvm-svn: 18171
2004-11-23 21:10:48 +00:00
Chris Lattner
04a25df638
Remove argtype and argcount magic, which was used by the old asmprinter.
...
llvm-svn: 18170
2004-11-23 20:41:34 +00:00
Chris Lattner
9a57aafc94
Get rid of flags that are dead
...
llvm-svn: 18169
2004-11-23 20:37:41 +00:00
Chris Lattner
88fcda18b8
Fix encoding of rlwinm?
...
llvm-svn: 18165
2004-11-23 19:23:32 +00:00
Chris Lattner
512b1d6c2a
Fix encodings
...
llvm-svn: 18164
2004-11-23 19:23:18 +00:00
Chris Lattner
cb15c858c2
Enumerate CR registers
...
llvm-svn: 18162
2004-11-23 18:59:59 +00:00
Chris Lattner
4cad3e8fbc
Initial implementation of exiting CompilationCallback
...
This should save all argument registers on entry and restore on exit, despite
that, simple things seem to work!!!
llvm-svn: 18161
2004-11-23 18:49:46 +00:00
Chris Lattner
141a71cf32
This method is dead
...
llvm-svn: 18160
2004-11-23 18:47:55 +00:00
Chris Lattner
9554912215
Remove this method.
...
llvm-svn: 18159
2004-11-23 18:47:42 +00:00
Chris Lattner
aa5a51292c
Squelch a bogus warning
...
llvm-svn: 18157
2004-11-23 15:57:01 +00:00
Chris Lattner
e8e62c5431
Squelch a bogus warning.
...
llvm-svn: 18156
2004-11-23 15:56:38 +00:00
Nate Begeman
f096183b46
Don't return value from void function. This is only temporary anyway while
...
the JIT is made to work!
llvm-svn: 18155
2004-11-23 10:04:49 +00:00
Brian Gaeke
b63c34a9f9
pseudocode for 64-bit lshr.
...
llvm-svn: 18154
2004-11-23 08:14:09 +00:00
Chris Lattner
b8eb5dabd7
Fix a minor bug
...
llvm-svn: 18153
2004-11-23 06:56:31 +00:00
Chris Lattner
30c5ade43e
Be really paranoid about not breaking stuff yet
...
llvm-svn: 18152
2004-11-23 06:56:18 +00:00
Chris Lattner
8bb3fbffa3
Implement the first hunk of CompilationCallback. The pieces missing are the
...
ones noted, which require funny PPC specific inline assembly.
If some angel felt the desire to help me, I think this is that last bit missing
for JIT support (however, generic code emitter might night work right with
the constant pool yet).
llvm-svn: 18151
2004-11-23 06:55:05 +00:00
Brian Gaeke
398eb11ede
Add more known-failing tests.
...
llvm-svn: 18149
2004-11-23 06:39:50 +00:00
Brian Gaeke
218b5b5c65
Add the rest of the logical instructions.
...
llvm-svn: 18148
2004-11-23 06:39:37 +00:00
Chris Lattner
ec9138be44
Implement the stub needed to get into compilation callback.
...
llvm-svn: 18147
2004-11-23 06:27:02 +00:00
Chris Lattner
5ac6f7a36d
Simplify code a bit
...
llvm-svn: 18146
2004-11-23 06:05:44 +00:00
Chris Lattner
37a72a9ef2
Initial implementation of the JIT interfaces. Relocation is done and stubs
...
for external functions work. CompilationCallback has not been written, and
stubs for internal functions are not generated yet. This means you can call
printf and exit, and use global variables, but cannot call functions local to
a module yet.
llvm-svn: 18145
2004-11-23 06:02:06 +00:00
Chris Lattner
2f47d181d8
Emit relocations for the global variable using instructions. This gets us
...
LA, LOADHiAddr, CALLpcrel, and MovePCtoLR working, though the constant pool
probably is not right.
llvm-svn: 18144
2004-11-23 05:59:53 +00:00
Chris Lattner
17d87ca91f
Implement all of the methods
...
llvm-svn: 18142
2004-11-23 05:57:57 +00:00
Chris Lattner
068ade1373
Initial checkin of the 32-bit PPC relocation types
...
llvm-svn: 18141
2004-11-23 05:57:38 +00:00
Chris Lattner
e74f5f8a4e
Move JITInfo from PPCTM to PPC32TM
...
llvm-svn: 18140
2004-11-23 05:56:40 +00:00
Chris Lattner
8e3800acc9
Do not provide the non-specialized PowerPCJITInfo object, it is pretty useless.
...
Instead, let derived classes provide specialized ones.
llvm-svn: 18139
2004-11-23 05:55:38 +00:00