John Criswell
1c962223f4
Add PR#566; something I should have done before.
...
llvm-svn: 22118
2005-05-18 15:37:06 +00:00
John Criswell
c1dd9b667a
Updated for LLVM 1.5.
...
llvm-svn: 22117
2005-05-18 14:41:07 +00:00
John Criswell
8e6ae64167
Fix name of LLVM CFE source tarball.
...
llvm-svn: 22110
2005-05-17 21:14:58 +00:00
John Criswell
762895b3f9
Fixed the descriptions of llvmc and llvm-ld to not be version specific.
...
Fixed some typos.
llvm-svn: 22108
2005-05-17 16:57:10 +00:00
John Criswell
6d9c9a176a
Added Linux/Itanium back. Linux/PPC is the platform that we haven't used
...
yet.
llvm-svn: 22107
2005-05-17 16:19:48 +00:00
John Criswell
687343547a
Merged from Mainline.
...
llvm-svn: 22106
2005-05-17 16:09:30 +00:00
John Criswell
4447fc67ef
Merged Misha Modifications from Mainline.
...
llvm-svn: 22105
2005-05-17 16:08:29 +00:00
John Criswell
4d9d10c757
Updated from mainline.
...
llvm-svn: 22104
2005-05-17 16:07:32 +00:00
John Criswell
21c9bf15f5
Merged from mainline.
...
llvm-svn: 22103
2005-05-17 16:07:08 +00:00
John Criswell
033f60f6d4
Removed Linux/Itanium as we don't really know if it works.
...
Made other minor corrections.
llvm-svn: 22102
2005-05-17 16:05:22 +00:00
John Criswell
25b91e4ae0
Updated the version to 1.5.
...
llvm-svn: 22095
2005-05-16 19:30:22 +00:00
CVS to SVN Conversion
f2fed73d14
This commit was manufactured by cvs2svn to create branch 'release_15'.
...
llvm-svn: 22089
2005-05-16 17:13:10 +00:00
Chris Lattner
cb5596d51b
more minor edits
...
llvm-svn: 22088
2005-05-16 17:13:10 +00:00
Chris Lattner
683a847c26
more edits
...
llvm-svn: 22087
2005-05-16 17:06:29 +00:00
Chris Lattner
7e1f26256d
more edits, include stuff from the status update
...
llvm-svn: 22086
2005-05-16 16:56:09 +00:00
Duraid Madina
e5ee0d0730
pretty tiny change (looks like adding the HP-UX detection and line number
...
changes to me)
- not committing autoconf/configure.ac (oops, already committed that!)
- not committing include/llvm/Config/config.h.in (it remains unchanged)
llvm-svn: 22085
2005-05-16 16:33:34 +00:00
Chris Lattner
0ca648f813
flush on the right and indented on the left looks a bit weird.
...
llvm-svn: 22084
2005-05-16 16:30:10 +00:00
John Criswell
88190562e6
Added a note about how the type can be omitted in call instructions.
...
Added a note about how getelementptr can be used to index into structures
or arrays.
Fixed some typos, spelling, etc.
llvm-svn: 22083
2005-05-16 16:17:45 +00:00
Chris Lattner
15c74de0dd
fix a typo duraid noticed
...
llvm-svn: 22082
2005-05-16 15:37:19 +00:00
Duraid Madina
3dbbc88f52
comment the hpux bit
...
llvm-svn: 22081
2005-05-16 06:59:53 +00:00
Chris Lattner
a3ea6446da
more edits
...
llvm-svn: 22080
2005-05-16 06:58:39 +00:00
Duraid Madina
33464ad3a2
HP-UX system headers make a mess of isinf(), so much so that gcc fixincludes
...
can't patch it up for c++ (works in C though)
llvm-svn: 22079
2005-05-16 06:45:57 +00:00
Duraid Madina
60c9a3c171
hp-ux needs this to get through the System/Support libs
...
llvm-svn: 22078
2005-05-16 06:38:09 +00:00
Duraid Madina
5ea2ba8bae
detect HP-UX when configuring
...
llvm-svn: 22077
2005-05-16 05:39:00 +00:00
Chris Lattner
a1a1e93da9
remove deprecated methods
...
llvm-svn: 22076
2005-05-16 01:49:23 +00:00
Chris Lattner
7caf6f6ca7
GCC4 + IA64 = badnews
...
llvm-svn: 22075
2005-05-15 22:26:45 +00:00
Reid Spencer
7ed7930dff
Remove the check for the ffsll function. Its no longer needed by the
...
simplify-libcalls pass (pass now computes it without a call to ffsll).
llvm-svn: 22074
2005-05-15 22:15:11 +00:00
Chris Lattner
b57b28fbbf
Improve statement
...
llvm-svn: 22073
2005-05-15 21:38:32 +00:00
Reid Spencer
f0b186e49e
Don't eliminate a test case, just the form of the test case, from the
...
previous revision.
llvm-svn: 22072
2005-05-15 21:35:26 +00:00
Chris Lattner
847f580c7c
This does not belong
...
llvm-svn: 22071
2005-05-15 21:31:36 +00:00
Reid Spencer
74305a6233
Don't look for __builtin_ffs, we'll never see it from llvm-gcc and there's
...
not reason to include it for other front ends.
llvm-svn: 22070
2005-05-15 21:27:34 +00:00
Reid Spencer
597618f9f8
Add a case with non-constant argument for testing the transform:
...
ffs(x) -> (x == 0 ? 0 : llvm.cttz(0)+1)
llvm-svn: 22069
2005-05-15 21:26:59 +00:00
Reid Spencer
17f7784c5d
Provide this optimization as well:
...
ffs(x) -> (x == 0 ? 0 : 1+llvm.cttz(x))
llvm-svn: 22068
2005-05-15 21:19:45 +00:00
Chris Lattner
4e5a3a6df6
PPC "branch and link" instructions are branches in the PPC sense, but not
...
in the LLVM code generator sense (they are calls). Don't mark them as such,
which fixes the regressions on the ppc tester last night
llvm-svn: 22065
2005-05-15 20:11:44 +00:00
Chris Lattner
0ae9b08916
Fix andrews changes to fit in 80 columns
...
llvm-svn: 22064
2005-05-15 19:54:37 +00:00
Chris Lattner
efa20fab2d
ctlz = most signficant bits, cttz = least sig
...
llvm-svn: 22061
2005-05-15 19:39:26 +00:00
Chris Lattner
04d6ed5ef0
fix warning
...
llvm-svn: 22060
2005-05-15 17:25:14 +00:00
Chris Lattner
7f910cd444
fix compiler warning
...
llvm-svn: 22059
2005-05-15 17:23:19 +00:00
Reid Spencer
3de98ee643
Duh .. you actually have to #include Config/config.h before you can test
...
for one of the values that it defines!
llvm-svn: 22058
2005-05-15 17:20:47 +00:00
Reid Spencer
294715b33e
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
b62a5f0c03
add a sparcv8 section, make this validate
...
llvm-svn: 22056
2005-05-15 16:01:20 +00:00
Chris Lattner
8563e39c01
more edits, add anchors
...
llvm-svn: 22055
2005-05-15 15:33:21 +00:00
Duraid Madina
9f406cb29b
make angry compilers happy again
...
llvm-svn: 22054
2005-05-15 14:44:13 +00:00
Duraid Madina
73c4dbae23
aCC and STLport complained about this, because they're like that
...
llvm-svn: 22053
2005-05-15 13:05:48 +00:00
Chris Lattner
17b2e4837b
edits to the simplify-libcalls element, move it higher in the list.
...
llvm-svn: 22052
2005-05-15 06:09:55 +00:00
Chris Lattner
55f987b45c
add generated code
...
llvm-svn: 22051
2005-05-15 06:07:40 +00:00
Chris Lattner
1a61fa460f
don't reserve space for tailcall arg areas. It explicitly managed.
...
llvm-svn: 22050
2005-05-15 06:07:10 +00:00
Reid Spencer
ea77685e20
Make note of the -simplify-libcalls pass.
...
llvm-svn: 22049
2005-05-15 06:05:11 +00:00
Chris Lattner
6e3decb6ea
add test to check for tail calls
...
llvm-svn: 22048
2005-05-15 05:52:51 +00:00
Chris Lattner
97e3b65652
Teach reginfo how to deal with ADJSTACKPTRri, allowing us to generate:
...
add %ESP, 20
jmp %EDX # TAIL CALL
instead of:
add %ESP, -8
add %ESP, 28
jmp %EDX # TAIL CALL
llvm-svn: 22047
2005-05-15 05:49:58 +00:00
Chris Lattner
dd66a41e0e
Implement proper tail calls in the X86 backend for all fastcc->fastcc
...
tail calls.
llvm-svn: 22046
2005-05-15 05:46:45 +00:00
Chris Lattner
406bddfb3a
Substantial edits for the release notes.
...
llvm-svn: 22045
2005-05-15 05:44:51 +00:00
Chris Lattner
51836bbc82
Add some simplifications for MULH[SU]. This allows us to compile this:
...
long %bar(long %X) {
%Y = mul long %X, 4294967297
ret long %Y
}
to this:
l1_bar:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, %EAX
add %EDX, DWORD PTR [%ESP + 8]
ret
instead of:
l1_bar:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EDX, 1
mov %EAX, %ECX
mul %EDX
add %EDX, %ECX
add %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %ECX
ret
llvm-svn: 22044
2005-05-15 05:39:08 +00:00
Chris Lattner
3f5a98d1f4
Add markers in the asm file for tail calls, add a new ADJSTACKPTRri
...
sorta-pseudo-instruction
llvm-svn: 22042
2005-05-15 03:10:37 +00:00
Chris Lattner
468b9577b6
When inserting callee-save register reloads, make sure to skip over any
...
terminator instructions before the 'ret' in case the target has a
multi-instruction return sequence.
llvm-svn: 22041
2005-05-15 03:09:58 +00:00
Chris Lattner
6b5fa91a63
Yes, calltarget is the operand of the day.
...
llvm-svn: 22040
2005-05-15 01:10:30 +00:00
Chris Lattner
8d1ea49603
Make sure this is not eligible for tail-call-elimination so that we test
...
the correct thing.
llvm-svn: 22039
2005-05-14 23:54:55 +00:00
Chris Lattner
5366c859a7
When emitting the function epilog, check to see if there already a stack
...
adjustment. If so, we merge the adjustment into the existing one. This
allows us to generate:
caller2:
sub %ESP, 12
mov DWORD PTR [%ESP], 0
mov %EAX, 1234567890
mov %EDX, 0
call func2
add %ESP, 8
ret 4
intead of:
caller2:
sub %ESP, 12
mov DWORD PTR [%ESP], 0
mov %EAX, 1234567890
mov %EDX, 0
call func2
sub %ESP, 4
add %ESP, 12
ret 4
for X86/fast-cc-merge-stack-adj.ll
llvm-svn: 22038
2005-05-14 23:53:43 +00:00
Chris Lattner
fe2ebdef4d
new testcase
...
llvm-svn: 22037
2005-05-14 23:52:09 +00:00
Chris Lattner
f0649db870
Add some new instructions
...
llvm-svn: 22036
2005-05-14 23:35:21 +00:00
Chris Lattner
14b780fae5
add x86-64 abi
...
llvm-svn: 22035
2005-05-14 22:06:42 +00:00
Reid Spencer
6ed7d1ea62
* Truncate a long line.
...
* By default, doxygen output formatted for printing on letter size paper
not A4.
llvm-svn: 22034
2005-05-14 20:06:31 +00:00
Reid Spencer
c51ced3e6b
Forgot to commit this earlier. Its part of the simplify-libcalls
...
enhancement for ffs, ffsl, and ffsll optimizations. We can't do the opt
unless we also have the at least ffsll function. Notably SVR4 doesn't.
llvm-svn: 22033
2005-05-14 20:04:19 +00:00
Andrew Lenharth
8ecaa45625
mention the C++ exception problems on alpha
...
llvm-svn: 22029
2005-05-14 17:43:00 +00:00
Reid Spencer
5b3c66676c
Add a test case for testing ffs libcall conversion to constant
...
llvm-svn: 22028
2005-05-14 16:44:43 +00:00
Reid Spencer
b195fcd5ef
Changes for ffs lib call simplification:
...
* Check for availability of ffsll call in configure script
* Support ffs, ffsl, and ffsll conversion to constant value if the argument
is constant.
llvm-svn: 22027
2005-05-14 16:42:52 +00:00
Chris Lattner
e4f71d036f
Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llx
...
llvm-svn: 22026
2005-05-14 13:56:55 +00:00
Chris Lattner
403d1c204c
Preserve calling conv when hacking on calls
...
llvm-svn: 22025
2005-05-14 12:28:32 +00:00
Chris Lattner
05c703ea85
preserve calling conventions when hacking on code
...
llvm-svn: 22024
2005-05-14 12:25:32 +00:00
Chris Lattner
bcefcf8552
Make sure to preserve the calling convention when changing an invoke into
...
a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib
on X86 with -enable-x86-fastcc.
llvm-svn: 22023
2005-05-14 12:21:56 +00:00
Chris Lattner
18b2c2f13c
Pass i64 values correctly split in reg/mem to fastcc calls.
...
This fixes fourinarow with -enable-x86-fastcc.
llvm-svn: 22022
2005-05-14 12:03:10 +00:00
Chris Lattner
1b3520c90b
Use target-specific nodes for calls. This allows the fastcc code to not have
...
to do ugly hackery to avoid emitting code like this:
call foo
mov vreg, EAX
adjcallstackup ...
If foo is a fastcc call and if vreg gets spilled, we might end up with this:
call foo
mov [ESP+offset], EAX ;; Offset doesn't consider the 12!
sub ESP, 12
Which is bad. The previous hacky code to deal with this was A) gross B) not
good enough. In particular, it could miss cases and emit the bad code above.
Now we always emit this:
call foo
adjcallstackup ...
mov vreg, EAX
directly.
This makes fastcc with callees poping the stack work much better. Next
stop (finally!) really is tail calls.
llvm-svn: 22021
2005-05-14 08:48:15 +00:00
Chris Lattner
3268f244e6
allow token chain at start or end of node
...
llvm-svn: 22020
2005-05-14 08:34:53 +00:00
Chris Lattner
865359958b
remove special case hacks for readport/readio from the binary operator
...
codepath
llvm-svn: 22019
2005-05-14 07:45:46 +00:00
Chris Lattner
566307f92a
Implement fixme's by memoizing nodes.
...
llvm-svn: 22018
2005-05-14 07:42:29 +00:00
Chris Lattner
b76fb15aad
add a new map
...
llvm-svn: 22017
2005-05-14 07:36:02 +00:00
Chris Lattner
833a4fbdc5
Turn this into a wrapper for a simpler version of getNode.
...
llvm-svn: 22016
2005-05-14 07:32:14 +00:00
Chris Lattner
96c262e24b
Eliminate special purpose hacks for dynamic_stack_alloc.
...
llvm-svn: 22015
2005-05-14 07:29:57 +00:00
Chris Lattner
669e8c2c9c
Use the general mechanism for creating multi-value nodes instead of using
...
special case hacks.
llvm-svn: 22014
2005-05-14 07:25:05 +00:00
Chris Lattner
024e1922e6
Ensure these casts are done with the hardware fildll instruction
...
llvm-svn: 22013
2005-05-14 07:09:25 +00:00
Chris Lattner
a36117b360
use a target-specific node and custom expander to lower long->FP to FILD64m.
...
This should fix some missing symbols problems on BSD and improve performance
of programs that use that operation.
llvm-svn: 22012
2005-05-14 06:52:07 +00:00
Chris Lattner
006f56b177
Wrap long line, actually add node to the graph.
...
llvm-svn: 22011
2005-05-14 06:42:57 +00:00
Chris Lattner
3eb8693279
legalize target-specific operations
...
llvm-svn: 22010
2005-05-14 06:34:48 +00:00
Chris Lattner
d553133308
add a getNode() version that allows construction of any node type.
...
llvm-svn: 22009
2005-05-14 06:20:26 +00:00
Chris Lattner
71595c95d6
Add a way to construct an arbitrary node, cleanly.
...
llvm-svn: 22008
2005-05-14 06:20:08 +00:00
Chris Lattner
eaff95da8f
add accessors
...
llvm-svn: 22007
2005-05-14 06:19:11 +00:00
Reid Spencer
a27d7a67f7
Some minor adjustments for the 1.5 release.
...
llvm-svn: 22006
2005-05-14 05:52:07 +00:00
Chris Lattner
dbbdd165a6
Pass the dag into LowerOperation
...
llvm-svn: 22005
2005-05-14 05:51:05 +00:00
Chris Lattner
29dcc71d83
LowerOperation takes a dag
...
llvm-svn: 22004
2005-05-14 05:50:48 +00:00
Duraid Madina
9a449003d0
add a bit about the known problems on IA64
...
llvm-svn: 22003
2005-05-14 05:48:13 +00:00
Chris Lattner
c08d786ba5
Print the symbolic register name in a register allocator debug dump.
...
llvm-svn: 22002
2005-05-14 05:34:15 +00:00
Chris Lattner
d3cc996a47
Allow targets to have a custom int64->fp expander if desired
...
llvm-svn: 22001
2005-05-14 05:33:54 +00:00
Chris Lattner
b42e8723b0
this passes
...
llvm-svn: 22000
2005-05-14 02:35:38 +00:00
Chris Lattner
a11e367ae5
Fix this
...
llvm-svn: 21999
2005-05-14 02:33:20 +00:00
Chris Lattner
f47e4c174b
minor changes
...
llvm-svn: 21998
2005-05-14 01:30:15 +00:00
Chris Lattner
48ec173312
user ops are not encoded in the bc format
...
llvm-svn: 21997
2005-05-14 01:26:46 +00:00
Reid Spencer
621fd111b5
Document the pseudo-instruction opcodes in opcode range 56-63. These are
...
used to support things like volatile load/store, tail calls, and calling
conventions without reserving space for the additional information.
llvm-svn: 21996
2005-05-14 00:06:06 +00:00
Chris Lattner
9b29fe2008
Make sure the start of the arg area and the end (after the RA is pushed)
...
is always 8-byte aligned for fastcc
llvm-svn: 21995
2005-05-13 23:49:10 +00:00
Chris Lattner
4e63e3f5c8
fix the assertion
...
llvm-svn: 21994
2005-05-13 23:35:47 +00:00
Chris Lattner
cbefe72fb2
Align doubles on 8-byte boundaries if possible.
...
llvm-svn: 21993
2005-05-13 23:14:17 +00:00
Chris Lattner
77b220f3d5
print stack object alignment in -print-machineinstr dumps
...
llvm-svn: 21992
2005-05-13 22:54:44 +00:00
Chris Lattner
5011ff0179
fix typo
...
llvm-svn: 21991
2005-05-13 22:46:57 +00:00
John Criswell
4a3327eead
Minor fixup of typos.
...
llvm-svn: 21990
2005-05-13 22:25:59 +00:00
Chris Lattner
5900197232
new testcase
...
llvm-svn: 21989
2005-05-13 22:15:26 +00:00
Chris Lattner
2267d67941
Fix the problems with callee popped argument lists
...
llvm-svn: 21988
2005-05-13 22:13:49 +00:00
John Criswell
ca6db82fc4
Removed PPC Linux support, as no one seems to have used it yet.
...
llvm-svn: 21987
2005-05-13 21:55:49 +00:00
Chris Lattner
79e9fa5de1
Don't emit SAR X, 0 in the case of sdiv Y, 2
...
llvm-svn: 21986
2005-05-13 21:50:27 +00:00
Chris Lattner
7d387d207d
Fix UnitTests/2005-05-13-SDivTwo.c
...
llvm-svn: 21985
2005-05-13 21:48:20 +00:00
Chris Lattner
c0e369ed66
switch to having the callee pop stack operands for fastcc. This is currently buggy
...
do not use
llvm-svn: 21984
2005-05-13 21:44:04 +00:00
Chris Lattner
f6fb5e91b2
Tolerate instrs with extra args
...
llvm-svn: 21982
2005-05-13 21:07:15 +00:00
John Criswell
4876135a51
Add a note about SPARC V8.
...
llvm-svn: 21981
2005-05-13 20:54:44 +00:00
Chris Lattner
1a12476531
allow RETI
...
llvm-svn: 21980
2005-05-13 20:46:35 +00:00
Chris Lattner
e4df5e4681
add support for fastcc and friends
...
llvm-svn: 21979
2005-05-13 20:40:52 +00:00
John Criswell
608f4805f3
Minor fixes.
...
llvm-svn: 21978
2005-05-13 20:38:44 +00:00
Chris Lattner
8abab9b0c7
treat TAILCALL nodes identically to CALL nodes
...
llvm-svn: 21977
2005-05-13 20:29:26 +00:00
Chris Lattner
f27e31d690
Build TAILCALL nodes in LowerCallTo, treat them like normal calls everywhere.
...
llvm-svn: 21976
2005-05-13 20:29:13 +00:00
John Criswell
d523492fcd
Added some missing platforms.
...
Fixed some wording to be more accurate (I hope).
llvm-svn: 21975
2005-05-13 20:28:15 +00:00
John Criswell
61617f7843
More typo and wording fixes.
...
llvm-svn: 21974
2005-05-13 20:25:49 +00:00
Chris Lattner
153827b086
Add reassociation, minor cleanups.
...
llvm-svn: 21973
2005-05-13 20:18:49 +00:00
Chris Lattner
e59cddf838
close off B< tag
...
llvm-svn: 21972
2005-05-13 20:14:06 +00:00
Chris Lattner
91a649a28e
remove htmlisms
...
llvm-svn: 21971
2005-05-13 20:13:39 +00:00
Chris Lattner
3ea0d3f6f0
fix typo
...
llvm-svn: 21970
2005-05-13 20:10:13 +00:00
Chris Lattner
d941d9c6a0
note how to disable inlining
...
llvm-svn: 21969
2005-05-13 20:09:33 +00:00
Chris Lattner
4aefdd0f62
fix link to llvm-ar
...
llvm-svn: 21968
2005-05-13 20:08:34 +00:00
Chris Lattner
9b3e5950b2
these don't use passes
...
llvm-svn: 21967
2005-05-13 20:04:33 +00:00
Chris Lattner
2d542fc8c0
this detail is not needed here
...
llvm-svn: 21966
2005-05-13 20:03:17 +00:00
Chris Lattner
6953a6e799
update this manual
...
llvm-svn: 21965
2005-05-13 20:01:11 +00:00
Chris Lattner
88bb4457fc
Capitalize
...
llvm-svn: 21964
2005-05-13 19:49:09 +00:00
Andrew Lenharth
805fcb9f1a
fix regression tests
...
llvm-svn: 21963
2005-05-13 19:49:02 +00:00
Chris Lattner
6fec835461
capitalize
...
llvm-svn: 21962
2005-05-13 19:48:34 +00:00
John Criswell
417cb0aec4
Minor corrections and clarifications.
...
llvm-svn: 21961
2005-05-13 19:48:07 +00:00
Chris Lattner
f4cfcc48f6
clarify that these are v9 options
...
llvm-svn: 21960
2005-05-13 19:45:45 +00:00
Chris Lattner
f9a4d96038
hide this option
...
llvm-svn: 21959
2005-05-13 19:44:21 +00:00
Chris Lattner
2e77db6af6
Add an isTailCall flag to LowerCallTo
...
llvm-svn: 21958
2005-05-13 18:50:42 +00:00
Chris Lattner
d0feb64443
Handle TAILCALL node
...
llvm-svn: 21957
2005-05-13 18:43:43 +00:00
Chris Lattner
46db599b61
add TAILCALL node
...
llvm-svn: 21956
2005-05-13 18:40:17 +00:00
Chris Lattner
57e3597583
This passes on sparc
...
llvm-svn: 21955
2005-05-13 18:37:58 +00:00
Reid Spencer
83745dda88
* Make some warning messages stand out a bit by putting **** at the end
...
* Fix a typo that prevents BuildMode from being printed
llvm-svn: 21954
2005-05-13 18:32:54 +00:00
Reid Spencer
6ab4ba4030
Fix the "stacker doesn't build without llvm-gcc" problem. The configure
...
script was defaulting the LLVMGCC variable to "llvm-gcc" if it couldn't
find llvm-gcc and --with-llvmgccdir was not specified. In this case, there
is no llvm-gcc available on the system so we shouldn't assume that the
user's path will find it any better than configure could. The fix is to
default it to an empty string. If LLVMGCC is empty, the makefiles will
avoid building things that depend on llvm-gcc and give a nice warning
message to that effect.
llvm-svn: 21953
2005-05-13 18:30:13 +00:00
Chris Lattner
e622357fbf
remove test
...
llvm-svn: 21952
2005-05-13 18:19:29 +00:00
Chris Lattner
6e4c2302e6
add 'ret imm' instruction
...
llvm-svn: 21945
2005-05-13 17:56:48 +00:00
Reid Spencer
daeb5f0900
The previous hack didn't work because tools-only isn't defined and isn't
...
a target at this level of build. There shouldn't be a problem with building
the runtime library without llvm-gcc because the Makefile.rules checks
for an empty LLVMGCC variable before building bytecode modules.
llvm-svn: 21942
2005-05-13 17:42:54 +00:00
John Criswell
2d4fc4c676
These tests are currently expected to fail.
...
llvm-svn: 21941
2005-05-13 17:36:00 +00:00
Chris Lattner
5b256d67cc
Force x86 backend
...
llvm-svn: 21940
2005-05-13 16:20:59 +00:00
Chris Lattner
6756f2f795
Realize that we don't support fmod directly, fixing CodeGen/Generic/print-arith-fp.ll
...
llvm-svn: 21939
2005-05-13 16:20:22 +00:00
Reid Spencer
74905e0fb5
Don't build runtime if tools-only :)
...
llvm-svn: 21938
2005-05-13 16:17:58 +00:00
Chris Lattner
0f0e75dfad
fix buggy test
...
llvm-svn: 21937
2005-05-13 15:51:31 +00:00
Chris Lattner
bf33da2952
Fix buggy test
...
llvm-svn: 21936
2005-05-13 15:48:41 +00:00
Chris Lattner
1df9ffa483
let dj run this
...
llvm-svn: 21935
2005-05-13 15:44:55 +00:00
Andrew Lenharth
5dcd5c8896
fixed test case
...
llvm-svn: 21934
2005-05-13 15:42:07 +00:00
Chris Lattner
0b17b45a96
Do not CopyFromReg physregs for live-in values. Instead, create a vreg for
...
each live in, and copy the regs from the vregs. As the very first thing we
do in the function, insert copies from the pregs to the vregs. This fixes
problems where the token chain of CopyFromReg was not enough to allow reordering
of the copyfromreg nodes and other unchained nodes (e.g. div, which clobbers
eax on intel).
llvm-svn: 21932
2005-05-13 07:38:09 +00:00
Chris Lattner
d0b0ecca3f
Emit function entry code after lowering hte arguments.
...
llvm-svn: 21931
2005-05-13 07:33:32 +00:00
Chris Lattner
0220b2952f
Allow targets to emit code into the entry block of each function
...
llvm-svn: 21930
2005-05-13 07:23:21 +00:00
Chris Lattner
d705b39476
add a new method
...
llvm-svn: 21929
2005-05-13 07:23:03 +00:00
Chris Lattner
61d9d81770
calling a function with the wrong CC is undefined, turn it into an unreachable
...
instruction. This is useful for catching optimizers that don't preserve
calling conventions
llvm-svn: 21928
2005-05-13 07:09:09 +00:00
Chris Lattner
91caf1d039
allow a virtual register to be associated with live-in values.
...
llvm-svn: 21927
2005-05-13 07:08:07 +00:00
Reid Spencer
39ec7f049d
Make sure that decompression checks for the case that bzip2 returns
...
BZ_OK (meaning more data is expected) but there is no more input data. In
this case, the input file is probably truncated. Generate an exception that
indicates this case when its detected.
llvm-svn: 21926
2005-05-13 07:05:37 +00:00
Chris Lattner
ca968393ab
When lowering invokes to calls, amke sure to preserve the calling conv. This
...
fixes Ptrdist/anagram with x86 llcbeta
llvm-svn: 21925
2005-05-13 06:27:02 +00:00
Chris Lattner
ae186e012c
Prefer int 0 instead of long 0 for GEP arguments.
...
llvm-svn: 21924
2005-05-13 06:10:12 +00:00
Chris Lattner
bb1d60de9c
Fix a problem that nate reduced for me.
...
llvm-svn: 21923
2005-05-13 05:17:00 +00:00
Chris Lattner
5a14c8a18e
rename variables and functions to match renamed DAG nodes. Bonus feature:
...
I can actually remember which one is which now!
llvm-svn: 21922
2005-05-13 05:09:11 +00:00
Chris Lattner
4339c4b05a
disable this test for now.
...
llvm-svn: 21920
2005-05-13 04:51:58 +00:00
Chris Lattner
2a4f7312cd
do not call expandop on the same value more than once. This fixes
...
X86/2004-02-22-Casts.llx
llvm-svn: 21919
2005-05-13 04:45:13 +00:00
Chris Lattner
f26c015929
add a correct run line
...
llvm-svn: 21918
2005-05-13 04:20:57 +00:00
Chris Lattner
e3677d6354
fix a bad typeo
...
llvm-svn: 21917
2005-05-12 23:51:40 +00:00
Chris Lattner
d34cd28aa7
update comment
...
llvm-svn: 21916
2005-05-12 23:24:44 +00:00
Chris Lattner
2dce703710
rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
...
llvm-svn: 21915
2005-05-12 23:24:06 +00:00
Chris Lattner
53eadd159b
reg test
...
llvm-svn: 21914
2005-05-12 23:09:04 +00:00
Chris Lattner
7ce7a8fc81
Add a new -enable-x86-fastcc option that enables passing the first
...
two integer values in registers for the fastcc calling conv.
llvm-svn: 21912
2005-05-12 23:06:28 +00:00
Misha Brukman
16948006b6
* Remove reference to llvm-fefw
...
* Fix copyright line
llvm-svn: 21910
2005-05-12 22:15:34 +00:00
Misha Brukman
b151770b4a
llvm-fefw doesn't exist (yet)
...
llvm-svn: 21907
2005-05-12 21:56:03 +00:00
Misha Brukman
cb3fc5ca75
Remove extraneous `U ' in copyright line
...
llvm-svn: 21906
2005-05-12 21:49:11 +00:00
Misha Brukman
f1ed8ede29
* Fix wording of the warning
...
* Add autoindent, smartindent, and smarttab options to the file
llvm-svn: 21905
2005-05-12 21:41:48 +00:00
Misha Brukman
7ced60afcc
Remove extraneous colons after program names for consistency
...
llvm-svn: 21904
2005-05-12 21:39:01 +00:00
John Criswell
d85e1a85bf
Shameless update of copyright years.
...
llvm-svn: 21903
2005-05-12 21:25:32 +00:00
John Criswell
878a202e89
Fix this test on Solaris.
...
Solaris grep is more traditional and (AFAIK) does not support regexs.
Also, single quotes should disable all shell interpretation, so no
backslashes should be needed (and, in fact, keep Solaris from working).
llvm-svn: 21902
2005-05-12 21:06:05 +00:00
Chris Lattner
33d1b6d28f
LowerCallTo now takes the cc to use
...
llvm-svn: 21901
2005-05-12 19:57:08 +00:00
Chris Lattner
111778e665
Pass calling convention to use into lower call to
...
llvm-svn: 21900
2005-05-12 19:56:57 +00:00
Chris Lattner
36674a123e
Pass in Calling Convention to use into LowerCallTo
...
llvm-svn: 21899
2005-05-12 19:56:45 +00:00
Chris Lattner
b5ff4e5e10
Enable pattern isel by default
...
llvm-svn: 21898
2005-05-12 19:56:09 +00:00
Chris Lattner
0bfd177e89
fix expansion of ct[lt]z nodes
...
llvm-svn: 21896
2005-05-12 19:27:51 +00:00
Chris Lattner
cf5f6b0ccb
Expand 64-bit ctlz/cttz nodes for 32-bit targets
...
llvm-svn: 21895
2005-05-12 19:05:01 +00:00
Chris Lattner
26f0317f46
Fix uint->fp casts on PPC, allowing UnitTests/2005-05-12-Int64ToFP to
...
work on it.
llvm-svn: 21894
2005-05-12 18:52:34 +00:00
John Criswell
c932bef114
Correct a detail with the alloca instruction.
...
Functions do not exit with invoke; they exit with unwind.
llvm-svn: 21893
2005-05-12 16:55:34 +00:00
Chris Lattner
b5a78e0873
Allow something to be legalized multiple times. This can be used to reduce
...
legalization iteration
llvm-svn: 21892
2005-05-12 16:53:42 +00:00
John Criswell
02fdc6fab4
Fixed some typos.
...
llvm-svn: 21891
2005-05-12 16:52:32 +00:00
Chris Lattner
153587e555
Oops, don't do this after we figure out where to insert the call chains.
...
llvm-svn: 21890
2005-05-12 07:00:44 +00:00
Chris Lattner
8a5ad8468a
Make sure to expand all nodes, avoiding unintentional node duplication.
...
llvm-svn: 21889
2005-05-12 06:54:21 +00:00
Chris Lattner
d2fb9ea262
handle a common case generated by the uint64 -> FP code path better
...
llvm-svn: 21888
2005-05-12 06:27:02 +00:00
Chris Lattner
f09c0b435b
add fixme
...
llvm-svn: 21887
2005-05-12 06:04:14 +00:00
Chris Lattner
646c0f0234
Fix a really horrible problem that causes the JIT to miscompile any program
...
that use 64-bit integers on 32-bit hosts.
llvm-svn: 21886
2005-05-12 06:01:28 +00:00
Chris Lattner
a5bf1030bf
Fix a problem where early legalization can cause token chain problems.
...
llvm-svn: 21885
2005-05-12 04:49:08 +00:00
Chris Lattner
f80969f29b
These targets don't like setcc
...
llvm-svn: 21884
2005-05-12 02:06:00 +00:00
Chris Lattner
515f53d4fa
Add a little hook
...
llvm-svn: 21883
2005-05-12 02:02:21 +00:00
Chris Lattner
8005e91432
Make legalize a bit more efficient, and canonicalize sub X, C -> add X, -C
...
llvm-svn: 21882
2005-05-12 00:17:04 +00:00
Nate Begeman
4ce1dea8af
Add testcase for legalizing ISD::CTTZ efficiently. On PPC, ctlz(int) is
...
now codegen'd as this:
addi r2, r3, -1
andc r2, r2, r3
cntlzw r2, r2
subfic r3, r2, 32
blr
llvm-svn: 21881
2005-05-11 23:45:54 +00:00
Nate Begeman
99fa5bc1fa
Necessary changes to codegen cttz efficiently on PowerPC
...
1. Teach LegalizeDAG how to better legalize CTTZ if the target doesn't have
CTPOP, but does have CTLZ
2. Teach PPC32 how to do sub x, const -> add x, -const for valid consts
3. Teach PPC32 how to do and (xor a, -1) b -> andc b, a
4. Teach PPC32 that ISD::CTLZ -> PPC::CNTLZW
llvm-svn: 21880
2005-05-11 23:43:56 +00:00
John Criswell
e5121fad61
Regression test for PR#563.
...
llvm-svn: 21879
2005-05-11 21:47:35 +00:00
Tanya Lattner
96726a46c7
Fixed issue that broke ssa.
...
llvm-svn: 21878
2005-05-11 21:45:03 +00:00
Chris Lattner
9c64b0cc18
fix some GCC 4 warnings
...
llvm-svn: 21877
2005-05-11 21:40:40 +00:00
John Criswell
72002e87cc
Added support for decomposing constant expressions containing shr and shl
...
instructions.
Review of this commit would be greatly appreciated.
llvm-svn: 21876
2005-05-11 21:16:42 +00:00
Chris Lattner
991ce36798
Fix lowering of ctlz, so now UnitTests/2005-05-11-Popcount-ffs-fls passes
...
with the CBE
llvm-svn: 21875
2005-05-11 20:24:12 +00:00
Chris Lattner
fe5759b022
Fix lowering of cttz to work with signed values
...
llvm-svn: 21874
2005-05-11 20:02:14 +00:00
Chris Lattner
9ec975a4b5
fix and concisify intinsic lowering for ctpop. Unfortunately, this code
...
looks completely untested. :(
llvm-svn: 21873
2005-05-11 19:42:05 +00:00
Chris Lattner
06bbeb646f
Fix the last remaining bug preventing us from switching the X86 BE over
...
from the simple isel to the pattern isel. This forces inserted libcalls
to serialize against other function calls, which was breaking
UnitTests/2005-05-12-Int64ToFP. Hopefully this will fix issues on other
targets as well.
llvm-svn: 21872
2005-05-11 19:02:11 +00:00
Chris Lattner
724f7eec77
Do not memoize ADJCALLSTACKDOWN nodes, provide a method to hack on them.
...
llvm-svn: 21871
2005-05-11 18:57:39 +00:00
Chris Lattner
490769c5b6
wrap long line
...
llvm-svn: 21870
2005-05-11 18:57:06 +00:00
Chris Lattner
7933dcdb6e
new method
...
llvm-svn: 21869
2005-05-11 18:56:45 +00:00
Chris Lattner
56add05671
Make sure to legalize generated ctpop nodes, convert tabs to spaces
...
llvm-svn: 21868
2005-05-11 18:35:21 +00:00
Andrew Lenharth
0409e1e6d5
Legalize for CTLZ generates a ctpop, but this ctpop is not expanded.
...
This is bad. It is generated if you are ctlz a type that is not
legal for the arch (aka ctlz of bytes on alpha legalize fine).
llvm-svn: 21867
2005-05-11 17:23:41 +00:00
Duraid Madina
a1ebbac9c0
expand count-leading/trailing-zeros; the test 2005-05-11-Popcount-ffs-fls.c
...
should now pass (the "LLVM" and "REF" results should be identical)
llvm-svn: 21866
2005-05-11 08:45:08 +00:00
Chris Lattner
446b611401
include the other bit count intrinsics
...
llvm-svn: 21863
2005-05-11 05:31:01 +00:00
Chris Lattner
7247324047
Add some notes for expanding clz/ctz
...
llvm-svn: 21862
2005-05-11 05:27:09 +00:00
Chris Lattner
05309bf58e
Simplify this code, use the proper shift amount
...
llvm-svn: 21861
2005-05-11 05:21:31 +00:00
Duraid Madina
25163d8d60
add the popcount instruction and support this in the isel
...
the primary user of this will probably end up being find-first-set-bit/find-
last-set-bit, which i'll get around to...
llvm-svn: 21860
2005-05-11 05:16:09 +00:00
Chris Lattner
3740f39883
Legalize this correctly
...
llvm-svn: 21859
2005-05-11 05:09:47 +00:00
Chris Lattner
669c3b17eb
No really IA*64* :)
...
llvm-svn: 21858
2005-05-11 05:03:56 +00:00
Chris Lattner
05ad4b8369
X86 has more than just 32-bit registers
...
llvm-svn: 21857
2005-05-11 05:00:34 +00:00
Chris Lattner
55e9cde37c
implement expansion of ctpop nodes, implementing CodeGen/Generic/llvm-ct-intrinsics.ll
...
llvm-svn: 21856
2005-05-11 04:51:16 +00:00
Chris Lattner
93f4f5f467
Print bit count nodes correctly
...
llvm-svn: 21855
2005-05-11 04:50:30 +00:00
Chris Lattner
d08a2de07d
new testcase
...
llvm-svn: 21854
2005-05-11 04:22:47 +00:00
Chris Lattner
0a338a6ba9
update this to reflect the new selection daggy world
...
llvm-svn: 21853
2005-05-11 03:53:53 +00:00
Chris Lattner
90391c1899
don't duplicate information, particularly when it's out of date!
...
llvm-svn: 21852
2005-05-11 03:35:57 +00:00
Chris Lattner
c18e92f3cd
Do not use "" as a sentinal for a missing argument! This fixes PR560.
...
llvm-svn: 21850
2005-05-10 23:20:17 +00:00
Chris Lattner
afcc1a854b
new testcase for PR562
...
llvm-svn: 21849
2005-05-10 22:32:29 +00:00
Misha Brukman
c3967716a8
Remove vim modeline; this should go into ~/.vimrc
...
llvm-svn: 21848
2005-05-10 22:06:41 +00:00
Misha Brukman
689f247ef4
Remove vim modeline, this belongs in ~/.vimrc
...
llvm-svn: 21847
2005-05-10 22:06:14 +00:00
Misha Brukman
3f2fa8de02
Consistently surround `cl::' code structures with <b> and <tt> to make them
...
stand out as code
llvm-svn: 21846
2005-05-10 22:05:27 +00:00
Misha Brukman
308a715acc
Why output multiple strings, let the compiler concatenate them for us for free
...
llvm-svn: 21845
2005-05-10 22:03:50 +00:00
Misha Brukman
8b47707b5c
* Convert tabs to spaces, fix code alignment
...
* Remove trailing whitespace
* Wrap long lines
llvm-svn: 21844
2005-05-10 22:02:28 +00:00
Duraid Madina
332b16aaeb
note HP-UX support
...
llvm-svn: 21841
2005-05-10 06:57:53 +00:00
Chris Lattner
d8145bcd5b
Convert feature of the simple isel over for the pattern isel to use.
...
llvm-svn: 21840
2005-05-10 03:53:18 +00:00
Chris Lattner
31c667e234
Fix Reassociate/shifttest.ll
...
llvm-svn: 21839
2005-05-10 03:39:25 +00:00
Jeff Cohen
915594d884
Silence some VC++ warnings
...
llvm-svn: 21838
2005-05-10 02:22:38 +00:00
Chris Lattner
abb36674a8
new testcase
...
llvm-svn: 21837
2005-05-10 00:33:36 +00:00
Chris Lattner
bfc796f622
If a function contains no allocas, all of the calls in it are trivially
...
suitable for tail calls.
llvm-svn: 21836
2005-05-09 23:51:13 +00:00
Chris Lattner
2d8b55c476
The semantics of cast X to bool are a comparison against zero, not a truncation!
...
llvm-svn: 21833
2005-05-09 22:17:13 +00:00
Chris Lattner
763a9e8c9b
testcase I've had in my tree
...
llvm-svn: 21832
2005-05-09 21:21:10 +00:00
Chris Lattner
70ea07cfd2
Implement READPORT/WRITEPORT, implementing the last X86 regression tests
...
that were failing with the pattern selector. Note that the support that
existed in the simple selector was clearly broken in several ways though
(which has also been fixed).
llvm-svn: 21831
2005-05-09 21:17:38 +00:00
Chris Lattner
e53158e21d
do not emit illegal instructions
...
llvm-svn: 21830
2005-05-09 21:06:04 +00:00
Chris Lattner
46b5ca4310
Fix the syntax of the i/o instructions, these are obviously unused.
...
llvm-svn: 21829
2005-05-09 20:49:20 +00:00
Chris Lattner
6c6a39a7b8
legalize readio/writeio into load/stores, fixing CodeGen/X86/io.llx with
...
the pattern isel.
llvm-svn: 21828
2005-05-09 20:37:29 +00:00
Chris Lattner
ba45e6c432
legalize readio/writeio into a load/store if requested
...
llvm-svn: 21827
2005-05-09 20:36:57 +00:00
Chris Lattner
5385db5523
legalize READPORT, WRITEPORT, READIO, WRITEIO, at least in the basic cases
...
where they are directly supported by the architecture. Wrap a bunch of
long lines :(
llvm-svn: 21826
2005-05-09 20:23:03 +00:00
Chris Lattner
20eaeae966
Add support for matching the READPORT, WRITEPORT, READIO, WRITEIO intrinsics
...
llvm-svn: 21825
2005-05-09 20:22:36 +00:00
Chris Lattner
67ab94510d
Add support for READPORT, WRITEPORT, READIO, WRITEIO
...
llvm-svn: 21824
2005-05-09 20:22:17 +00:00
Chris Lattner
61171e59b2
Add READPORT, WRITEPORT, READIO, WRITEIO nodes, wrap long lines
...
llvm-svn: 21823
2005-05-09 20:21:27 +00:00
John Criswell
b3235830b6
Tell tblgen exactly where to find the include file.
...
llvm-svn: 21822
2005-05-09 19:32:08 +00:00
Chris Lattner
4ccd1f603c
restore some non-dead code I removed last night breaking double casts to
...
uint
llvm-svn: 21821
2005-05-09 18:37:02 +00:00
Chris Lattner
129c5fea44
fold and (shl X, C1), C2 -> rlwinm when possible. Many other cases are possible,
...
include and (srl) and the inverses (shl and) etc.
llvm-svn: 21820
2005-05-09 17:39:48 +00:00
Chris Lattner
0d9a700b39
new testcase
...
llvm-svn: 21819
2005-05-09 17:09:31 +00:00
Chris Lattner
1ab1691da9
Fold shifts into subsequent SHL's. These shifts often arise due to addrses
...
arithmetic lowering.
llvm-svn: 21818
2005-05-09 17:06:45 +00:00
John Criswell
05990f3302
Updated the list of code generators for LLVM 1.5.
...
Added information on getting LLVM 1.5 from CVS (hopefully readers will
understand that the label will work *after* LLVM 1.5 is released).
llvm-svn: 21817
2005-05-09 16:49:59 +00:00
John Criswell
cfdeb5cf72
Little corrections.
...
llvm-svn: 21816
2005-05-09 16:39:27 +00:00
Chris Lattner
7bd6ddb6f7
Fix bug noticed by Tzu-Chien Chiu, thanks!
...
llvm-svn: 21815
2005-05-09 15:41:03 +00:00
Duraid Madina
74a01fa211
fix and cleanup constmul code a bit, this fixes mediabench/toast and
...
probably a couple of other tests.
llvm-svn: 21814
2005-05-09 13:18:34 +00:00
Chris Lattner
a7fc3d9119
tweak test to accept the (good) code emitted by the pattern isel
...
llvm-svn: 21812
2005-05-09 05:54:27 +00:00
Chris Lattner
daa064d8fd
Wrap long lines, remove dead code that is now handled by legalize
...
llvm-svn: 21811
2005-05-09 05:40:26 +00:00
Chris Lattner
e62661185c
Fix FP -> bool casts
...
llvm-svn: 21810
2005-05-09 05:33:18 +00:00
Chris Lattner
b62f5082c5
implement and.ll:test33
...
llvm-svn: 21809
2005-05-09 04:58:36 +00:00
Chris Lattner
19519b3792
New testcase
...
llvm-svn: 21808
2005-05-09 04:54:18 +00:00
Reid Spencer
3992dbd2a0
Add note to self to complete the testing of all intrinsic functions as
...
specified in the LangRef document.
llvm-svn: 21807
2005-05-09 04:47:32 +00:00
Chris Lattner
57d294f2ac
Don't use the load/store instruction as the source pointer, use the pointer
...
being stored/loaded through!
llvm-svn: 21806
2005-05-09 04:28:51 +00:00
Chris Lattner
c14f354895
memoize all nodes, even null Value* nodes. Do not add two token chain outputs
...
llvm-svn: 21805
2005-05-09 04:14:13 +00:00
Chris Lattner
f5675a0813
wrap long lines
...
llvm-svn: 21804
2005-05-09 04:08:33 +00:00
Chris Lattner
9440d6e260
Print SrcValue nodes correctly
...
llvm-svn: 21803
2005-05-09 04:08:27 +00:00
Chris Lattner
6972c31ab5
Fix X86/2005-05-08-FPStackifierPHI.ll: ugly gross hack.
...
llvm-svn: 21801
2005-05-09 03:36:39 +00:00
Chris Lattner
85013ae74a
New testcase that crashes the pattern isel
...
llvm-svn: 21800
2005-05-09 03:36:11 +00:00
Chris Lattner
e251b5ca89
Preserve CC's when linking modules
...
llvm-svn: 21799
2005-05-09 01:09:39 +00:00
Chris Lattner
d0525a29d1
Preserve calling conventions when doing IPO
...
llvm-svn: 21798
2005-05-09 01:05:50 +00:00
Chris Lattner
21d1dde72a
wrap long lines, preserve calling conventions when cloning functions and
...
turning calls into invokes
llvm-svn: 21797
2005-05-09 01:04:34 +00:00
Chris Lattner
bb0bfc4702
By definition, 'tail' calls cannot access the stack frame of their caller.
...
Expose this as a simple form of mod/ref information. This implements
BasicAA/tailcall-modref.ll
llvm-svn: 21796
2005-05-08 23:58:12 +00:00
Chris Lattner
af008dcdd1
New testacse for information exposed by the 'tail' call marker.
...
llvm-svn: 21795
2005-05-08 23:57:34 +00:00
Chris Lattner
2ad5aa8334
Verify that varargs functions all have ccc
...
llvm-svn: 21792
2005-05-08 22:27:09 +00:00
Chris Lattner
a4c8022caf
Convert non-address taken functions with C calling conventions to fastcc.
...
llvm-svn: 21791
2005-05-08 22:18:06 +00:00
Chris Lattner
257008beff
If loopextract breaks the program provide output so that we can repro the
...
problem.
llvm-svn: 21790
2005-05-08 21:54:56 +00:00
Chris Lattner
2cbd1337ce
add a testcase for a case we do not handle yet
...
llvm-svn: 21789
2005-05-08 21:47:42 +00:00
Chris Lattner
df3332660f
Implement Reassociate/mul-neg-add.ll
...
llvm-svn: 21788
2005-05-08 21:41:35 +00:00
Chris Lattner
ce7d145b20
new testcase
...
llvm-svn: 21787
2005-05-08 21:41:18 +00:00
Chris Lattner
c4f8e2b0ed
Bail out earlier
...
llvm-svn: 21786
2005-05-08 21:33:47 +00:00
Chris Lattner
877b114037
Teach reassociate that 0-X === X*-1
...
llvm-svn: 21785
2005-05-08 21:28:52 +00:00
Chris Lattner
90723bacb9
new testcase
...
llvm-svn: 21784
2005-05-08 21:28:33 +00:00
Chris Lattner
9f284e0a3c
Fix PR557 and basictest[34].ll.
...
This makes reassociate realize that loads should be treated as unmovable, and
gives distinct ranks to distinct values defined in the same basic block, allowing
reassociate to do its thing.
llvm-svn: 21783
2005-05-08 20:57:04 +00:00
Chris Lattner
f9a33ede62
new testcases for PR557
...
llvm-svn: 21782
2005-05-08 20:56:02 +00:00
Chris Lattner
9187f3905e
Add debugging information
...
llvm-svn: 21781
2005-05-08 20:09:57 +00:00
Chris Lattner
08582be283
eliminate gotos
...
llvm-svn: 21780
2005-05-08 19:48:43 +00:00
Chris Lattner
9acd314ba3
Wrap long lines. Fix "warning: conflicting types for built-in function 'memset'"
...
warning from the CBE+GCC.
llvm-svn: 21779
2005-05-08 19:46:29 +00:00
Chris Lattner
5847e5e10c
Improve reassociation handling of inverses, implementing inverses.ll.
...
llvm-svn: 21778
2005-05-08 18:59:37 +00:00
Chris Lattner
2f1b13255d
new testcase
...
llvm-svn: 21777
2005-05-08 18:54:40 +00:00
Chris Lattner
4922118dc4
clean up and modernize this pass.
...
llvm-svn: 21776
2005-05-08 18:45:26 +00:00
Chris Lattner
b18dbbfff5
Strength reduce SAR into SHR if there is no way sign bits could be shifted
...
in. This tends to get cases like this:
X = cast ubyte to int
Y = shr int X, ...
Tested by: shift.ll:test24
llvm-svn: 21775
2005-05-08 17:34:56 +00:00
Chris Lattner
5140c15f08
new testcase
...
llvm-svn: 21774
2005-05-08 17:31:24 +00:00
Jeff Cohen
b127267a5a
Update my info
...
llvm-svn: 21773
2005-05-08 01:07:48 +00:00
Chris Lattner
e1850b86b6
Refactor some code
...
llvm-svn: 21772
2005-05-08 00:19:31 +00:00
Chris Lattner
6e2086d7e4
Handle some simple cases where we can see that values get annihilated.
...
llvm-svn: 21771
2005-05-08 00:08:33 +00:00
Chris Lattner
4294cec0f1
Fix a miscompilation of crafty by clobbering the "A" variable.
...
llvm-svn: 21770
2005-05-07 23:49:08 +00:00
Chris Lattner
041f8b59c1
Move licm after reassociate, add some cond-propagate passes
...
llvm-svn: 21769
2005-05-07 22:45:35 +00:00
Chris Lattner
1e5065052a
Rewrite the guts of the reassociate pass to be more efficient and logical. Instead
...
of trying to do local reassociation tweaks at each level, only process an expression
tree once (at its root). This does not improve the reassociation pass in any real way.
llvm-svn: 21768
2005-05-07 21:59:39 +00:00
Reid Spencer
f2ff439c4b
* Break tests into individual cases so its easier to see what's going on.
...
* Add four new cases to handle the new optimizations for strlen, dealing
with:
strlen(x) != 0 -> *x != 0
strlen(x) == 0 -> *x == 0
for each of two cases: strlen(x) != 0 and strlen(x) == 0
llvm-svn: 21767
2005-05-07 20:21:04 +00:00
Reid Spencer
170ae7ff70
* Add two strlen optimizations:
...
strlen(x) != 0 -> *x != 0
strlen(x) == 0 -> *x == 0
* Change nested statistics to use style of other LLVM statistics so that
only the name of the optimization (simplify-libcalls) is used as the
statistic name, and the description indicates which specific all is
optimized. Cuts down on some redundancy and saves a few bytes of space.
* Make note of stpcpy optimization that could be done.
llvm-svn: 21766
2005-05-07 20:15:59 +00:00
Reid Spencer
4f01a822b4
Don't increment the counter unless the debug flag is set.
...
llvm-svn: 21762
2005-05-07 04:59:45 +00:00
Chris Lattner
cea579932d
Convert shifts to muls to assist reassociation. This implements
...
Reassociate/shifttest.ll
llvm-svn: 21761
2005-05-07 04:24:13 +00:00
Chris Lattner
30555b0d14
test that reassociate can handle shifts
...
llvm-svn: 21760
2005-05-07 04:23:29 +00:00
Chris Lattner
f43e974abd
Simplify the code and rearrange it. No major functionality changes here.
...
llvm-svn: 21759
2005-05-07 04:08:02 +00:00
Jeff Cohen
6dc6672840
Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.
...
llvm-svn: 21758
2005-05-07 02:44:04 +00:00
Chris Lattner
b34b273386
add note about bit builtins newly supported
...
llvm-svn: 21757
2005-05-07 02:21:21 +00:00
Chris Lattner
6ea3be51f8
new testcase
...
llvm-svn: 21756
2005-05-07 02:16:08 +00:00
Chris Lattner
573f64ecb5
fix bugs in my previous commit clarify the return type of the bit ops
...
llvm-svn: 21755
2005-05-07 01:46:40 +00:00
Chris Lattner
c792eb342c
add a couple of notes
...
llvm-svn: 21754
2005-05-06 23:08:23 +00:00
Chris Lattner
0132affa89
document calling convention extensions
...
llvm-svn: 21753
2005-05-06 22:57:40 +00:00
Chris Lattner
9bbe58628b
remove some dead (always dynamically false) flags
...
llvm-svn: 21752
2005-05-06 22:35:09 +00:00
Chris Lattner
129535c787
encode calling conventions for call/invoke instructions.
...
llvm-svn: 21751
2005-05-06 22:34:01 +00:00
Chris Lattner
f71853e277
new testcase
...
llvm-svn: 21750
2005-05-06 22:33:44 +00:00
Chris Lattner
f2e1c1969f
encode function calling convs in the bytecode file. invoke and call are
...
still to come.
llvm-svn: 21749
2005-05-06 20:42:57 +00:00
Chris Lattner
53bdd31211
parse new calling conv specifiers
...
llvm-svn: 21748
2005-05-06 20:27:19 +00:00
Chris Lattner
b25b6304b7
wrap a longline
...
llvm-svn: 21747
2005-05-06 20:27:03 +00:00
Chris Lattner
f7b6d3191b
add support for explicit calling conventions
...
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
4147522d71
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Chris Lattner
e29e1ff1e8
New file
...
llvm-svn: 21744
2005-05-06 19:59:08 +00:00
Chris Lattner
6d817c5486
use splice instead of remove/insert for a minor speedup
...
llvm-svn: 21743
2005-05-06 19:58:35 +00:00
Chris Lattner
6409f3490a
remove some ugly hacks that are no longer needed since andrew removed the
...
varargs munging code
llvm-svn: 21742
2005-05-06 19:49:51 +00:00
Chris Lattner
7effa0ed06
BAD typeo which caused many testsuite failures last night. Note to self, do
...
not change code after testing it without retesting!
llvm-svn: 21741
2005-05-06 17:13:16 +00:00
Chris Lattner
18335f8925
clean up the CBE output a bit
...
llvm-svn: 21740
2005-05-06 06:58:42 +00:00
Chris Lattner
561b7eb9e1
add tail marker as a comment
...
llvm-svn: 21739
2005-05-06 06:53:07 +00:00
Chris Lattner
ec7773e9e8
Make the stub functions be tail calls
...
llvm-svn: 21738
2005-05-06 06:48:54 +00:00
Chris Lattner
6aacb0f9da
Preserve tail marker
...
llvm-svn: 21737
2005-05-06 06:48:21 +00:00
Chris Lattner
9f3dced2c7
Implement Transforms/Inline/inline-tail.ll
...
llvm-svn: 21736
2005-05-06 06:47:52 +00:00
Chris Lattner
318e328fc4
Make sure to not accidentally get a bogus tail marker
...
llvm-svn: 21735
2005-05-06 06:47:37 +00:00
Chris Lattner
324d2eedb2
preserve the tail marker
...
llvm-svn: 21734
2005-05-06 06:46:58 +00:00
Chris Lattner
2db10ece5c
add a default arg
...
llvm-svn: 21733
2005-05-06 06:22:10 +00:00
Chris Lattner
5879f9c24d
Don't forget these are calls
...
llvm-svn: 21730
2005-05-06 06:21:59 +00:00
Chris Lattner
ca4d4bd2db
lex tail
...
llvm-svn: 21729
2005-05-06 06:20:33 +00:00
Chris Lattner
2c9a46e758
test that tail call survives bytecodification
...
llvm-svn: 21728
2005-05-06 06:18:33 +00:00
Chris Lattner
fb6f1746f4
add bytecode reader support for tail calls
...
llvm-svn: 21727
2005-05-06 06:13:34 +00:00
Chris Lattner
abb5bd78ca
Hilight tail
...
llvm-svn: 21726
2005-05-06 06:07:34 +00:00
Chris Lattner
eaf625dc5c
These are legal for tail calls
...
llvm-svn: 21723
2005-05-06 05:59:50 +00:00
Chris Lattner
0603845a49
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Chris Lattner
e23c139836
Add info on new 'tail' marker
...
llvm-svn: 21721
2005-05-06 05:47:36 +00:00
Chris Lattner
53db546b97
Wrap long lines
...
llvm-svn: 21720
2005-05-06 05:34:40 +00:00
Chris Lattner
a36d525741
DCE intrinsic instructions without side effects.
...
llvm-svn: 21719
2005-05-06 05:27:34 +00:00
Chris Lattner
b2d3ac8349
These intrinsics do not access memory
...
llvm-svn: 21718
2005-05-06 05:21:04 +00:00
Chris Lattner
ef298a3b8a
Teach instcombine propagate zeroness through shl instructions, implementing
...
and.ll:test31
llvm-svn: 21717
2005-05-06 04:53:20 +00:00
Chris Lattner
8d83be2bf0
new testcases
...
llvm-svn: 21716
2005-05-06 04:52:46 +00:00
Chris Lattner
873804168e
Implement shift.ll:test23. If we are shifting right then immediately truncating
...
the result, turn signed shift rights into unsigned shift rights if possible.
This leads to later simplification and happens *often* in 176.gcc. For example,
this testcase:
struct xxx { unsigned int code : 8; };
enum codes { A, B, C, D, E, F };
int foo(struct xxx *P) {
if ((enum codes)P->code == A)
bar();
}
used to be compiled to:
int %foo(%struct.xxx* %P) {
%tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0 ; <uint*> [#uses=1]
%tmp.2 = load uint* %tmp.1 ; <uint> [#uses=1]
%tmp.3 = cast uint %tmp.2 to int ; <int> [#uses=1]
%tmp.4 = shl int %tmp.3, ubyte 24 ; <int> [#uses=1]
%tmp.5 = shr int %tmp.4, ubyte 24 ; <int> [#uses=1]
%tmp.6 = cast int %tmp.5 to sbyte ; <sbyte> [#uses=1]
%tmp.8 = seteq sbyte %tmp.6, 0 ; <bool> [#uses=1]
br bool %tmp.8, label %then, label %UnifiedReturnBlock
Now it is compiled to:
%tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0 ; <uint*> [#uses=1]
%tmp.2 = load uint* %tmp.1 ; <uint> [#uses=1]
%tmp.2 = cast uint %tmp.2 to sbyte ; <sbyte> [#uses=1]
%tmp.8 = seteq sbyte %tmp.2, 0 ; <bool> [#uses=1]
br bool %tmp.8, label %then, label %UnifiedReturnBlock
which is the difference between this:
foo:
subl $4, %esp
movl 8(%esp), %eax
movl (%eax), %eax
shll $24, %eax
sarl $24, %eax
testb %al, %al
jne .LBBfoo_2
and this:
foo:
subl $4, %esp
movl 8(%esp), %eax
movl (%eax), %eax
testb %al, %al
jne .LBBfoo_2
This occurs 3243 times total in the External tests, 215x in povray,
6x in each f2c'd program, 1451x in 176.gcc, 7x in crafty, 20x in perl,
25x in gap, 3x in m88ksim, 25x in ijpeg.
Maybe this will cause a little jump on gcc tommorow :)
llvm-svn: 21715
2005-05-06 04:18:52 +00:00
Chris Lattner
1524489f22
new testcase
...
llvm-svn: 21714
2005-05-06 04:11:32 +00:00
Chris Lattner
7208616ec0
Implement xor.ll:test22
...
llvm-svn: 21713
2005-05-06 02:07:39 +00:00
Chris Lattner
4c2d3781aa
implement and.ll:test30 and set.ll:test21
...
llvm-svn: 21712
2005-05-06 01:53:19 +00:00
Chris Lattner
8169e16268
new testcase for unneeded and
...
llvm-svn: 21711
2005-05-06 01:52:52 +00:00
Chris Lattner
838dae0991
new testcase
...
llvm-svn: 21710
2005-05-06 01:51:05 +00:00
Chris Lattner
dd1e562ec3
implement or.ll:test20
...
llvm-svn: 21709
2005-05-06 00:58:50 +00:00
Chris Lattner
ce8dd82d66
new testcase
...
llvm-svn: 21708
2005-05-06 00:58:09 +00:00
Misha Brukman
584ed83d4a
* Order #includes alphabetically
...
* Remove commented-out debug printouts
llvm-svn: 21707
2005-05-05 23:45:17 +00:00
Misha Brukman
c0aac8e858
Remove extra blank line
...
llvm-svn: 21706
2005-05-05 23:43:47 +00:00
Misha Brukman
3f670d29dc
* Use consistent spacing for function arguments
...
* Output single-character strings as chars
llvm-svn: 21705
2005-05-05 22:38:21 +00:00
Misha Brukman
291f6b7223
Remove vim settings from source code; people should use llvm/utils/vim/vimrc
...
llvm-svn: 21704
2005-05-05 22:33:09 +00:00
Misha Brukman
08d66b4e10
Convert tabs to spaces
...
llvm-svn: 21703
2005-05-05 22:30:40 +00:00
Chris Lattner
4a454c80db
new testcase for PR541
...
llvm-svn: 21702
2005-05-05 22:23:10 +00:00
Chris Lattner
1243e1c9f1
add support for undef values of opaque type, addressing PR541
...
llvm-svn: 21701
2005-05-05 22:21:19 +00:00
Chris Lattner
7ddaeb448b
Add some extra checks. Opaque types don't have a null marker.
...
llvm-svn: 21700
2005-05-05 20:57:00 +00:00
Chris Lattner
2cc59a8066
new testcase
...
llvm-svn: 21699
2005-05-05 17:57:24 +00:00
Chris Lattner
7876156ba0
When hitting an unsupported intrinsic, actually print it
...
Lower debug info to noops.
llvm-svn: 21698
2005-05-05 17:55:17 +00:00
Andrew Lenharth
2dbbb3ab84
ctpop lowering in legalize
...
llvm-svn: 21697
2005-05-05 15:55:21 +00:00
Chris Lattner
807aa20f67
Fix a bug compimling Ruby, fixing this testcase:
...
LowerSetJmp/2005-05-05-OldUses.ll
llvm-svn: 21696
2005-05-05 15:47:43 +00:00
Chris Lattner
fa58898845
new testcase for a bug Jim found
...
llvm-svn: 21695
2005-05-05 15:47:16 +00:00
Andrew Lenharth
b8e94c3499
fix typo
...
llvm-svn: 21693
2005-05-04 19:25:37 +00:00
Andrew Lenharth
aed06a0e92
Well, add support for ct* for 21264 only.
...
21164 is broken until expand works.
llvm-svn: 21692
2005-05-04 19:12:09 +00:00
Andrew Lenharth
dd426dd04d
Make promoteOp work for CT*
...
Proof?
ubyte %bar(ubyte %x) {
entry:
%tmp.1 = call ubyte %llvm.ctlz( ubyte %x )
ret ubyte %tmp.1
}
==>
zapnot $16,1,$0
CTLZ $0,$0
subq $0,56,$0
zapnot $0,1,$0
ret $31,($26),1
llvm-svn: 21691
2005-05-04 19:11:05 +00:00
Chris Lattner
809dfac421
Instcombine: cast (X != 0) to int, cast (X == 1) to int -> X iff X has only the low bit set.
...
This implements set.ll:test20.
This triggers 2x on povray, 9x on mesa, 11x on gcc, 2x on crafty, 1x on eon,
6x on perlbmk and 11x on m88ksim.
It allows us to compile these two functions into the same code:
struct s { unsigned int bit : 1; };
unsigned foo(struct s *p) {
if (p->bit)
return 1;
else
return 0;
}
unsigned bar(struct s *p) { return p->bit; }
llvm-svn: 21690
2005-05-04 19:10:26 +00:00
Chris Lattner
3538a4f6cc
new testcase
...
llvm-svn: 21689
2005-05-04 19:05:02 +00:00
Reid Spencer
282d057485
Implement the IsDigitOptimization for simplifying calls to the isdigit
...
library function:
isdigit(chr) -> 0 or 1 if chr is constant
isdigit(chr) -> chr - '0' <= 9 otherwise
Although there are many calls to isdigit in llvm-test, most of them are
compiled away by macros leaving only this:
2 MultiSource/Applications/hexxagon
llvm-svn: 21688
2005-05-04 18:58:28 +00:00
Reid Spencer
f9a4a9681d
Make sure both optimization cases get tested.
...
llvm-svn: 21687
2005-05-04 17:45:10 +00:00
Reid Spencer
190bb26157
Add a test case for the IsDigitOptimization class.
...
llvm-svn: 21686
2005-05-04 17:34:55 +00:00
Andrew Lenharth
702859084b
comment fix
...
llvm-svn: 21685
2005-05-04 15:56:34 +00:00
Andrew Lenharth
dd9d3ac72b
see if the legalize code propery compensates for the additional zeros introduced
...
llvm-svn: 21684
2005-05-04 15:51:07 +00:00
Reid Spencer
e84ee1bcd0
Correct the descriptions of WHILE...END and RROT. Thanks to Lalo Martins
...
for pointing out these errors.
llvm-svn: 21683
2005-05-04 15:43:40 +00:00
Reid Spencer
7063d1aa71
WHILE does not "pop" a value, it "examines" to top of stack. Make this
...
clear in the applicable comment.
llvm-svn: 21682
2005-05-04 15:33:48 +00:00
Andrew Lenharth
6b551024ac
added a use of ctpop to debug stuff with
...
llvm-svn: 21681
2005-05-04 15:20:16 +00:00
Andrew Lenharth
5be6f131e6
fixup argument
...
llvm-svn: 21680
2005-05-04 14:58:31 +00:00
Reid Spencer
1e520fd661
* Correct the function prototypes for some of the functions to match the
...
actual spec (int -> uint)
* Add the ability to get/cache the strlen function prototype.
* Make sure generated values are appropriately named for debugging purposes
* Add the SPrintFOptimiation for 4 casts of sprintf optimization:
sprintf(str,cstr) -> llvm.memcpy(str,cstr) (if cstr has no %)
sprintf(str,"") -> store sbyte 0, str
sprintf(str,"%s",src) -> llvm.memcpy(str,src) (if src is constant)
sprintf(str,"%c",chr) -> store chr, str ; store sbyte 0, str+1
The sprintf optimization didn't fire as much as I had hoped:
2 MultiSource/Applications/SPASS
5 MultiSource/Benchmarks/McCat/18-imp
22 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
1 MultiSource/Benchmarks/Prolangs-C/assembler
6 MultiSource/Benchmarks/Prolangs-C/unix-smail
2 MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec
llvm-svn: 21679
2005-05-04 03:20:21 +00:00
Misha Brukman
23e9f163ad
Minor clean-ups
...
llvm-svn: 21678
2005-05-03 20:30:34 +00:00
Andrew Lenharth
1d463526b4
initial descriptions of count intrinsics
...
llvm-svn: 21677
2005-05-03 18:01:48 +00:00
Andrew Lenharth
5e177826fd
Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
...
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Reid Spencer
f436286cf6
Fix this test to succeed even if "strchr" is on a call instruction.
...
llvm-svn: 21675
2005-05-03 17:09:38 +00:00
Reid Spencer
a6bbd18023
Add a test case for SPrintFOptimization.
...
llvm-svn: 21674
2005-05-03 17:08:45 +00:00
Andrew Lenharth
38cc7bacb4
yea yea yea
...
llvm-svn: 21673
2005-05-03 17:00:48 +00:00
Andrew Lenharth
2e18c628c4
note the vararg change, and other stuff
...
llvm-svn: 21672
2005-05-03 16:59:09 +00:00
Andrew Lenharth
bf50ff58ae
pre add count tests
...
llvm-svn: 21671
2005-05-03 16:49:48 +00:00
Chris Lattner
c22333348e
fix a bug in the 1 index GEP handling code
...
llvm-svn: 21670
2005-05-03 16:44:45 +00:00
Reid Spencer
38cabd7265
Implement optimizations for the strchr and llvm.memset library calls.
...
Neither of these activated as many times as was hoped:
strchr:
9 MultiSource/Applications/siod
1 MultiSource/Applications/d
2 MultiSource/Prolangs-C/archie-client
1 External/SPEC/CINT2000/176.gcc/176.gcc
llvm.memset:
no hits
llvm-svn: 21669
2005-05-03 07:23:44 +00:00
Reid Spencer
a064a84067
Add a test case for StrChrOptimizer for -simplify-libcalls
...
llvm-svn: 21668
2005-05-03 06:22:41 +00:00
Misha Brukman
d317d937b2
Clean up and correct llvmc configurations for C and C++
...
llvm-svn: 21667
2005-05-03 06:13:18 +00:00
Misha Brukman
18aa1d6438
std::string(NULL) does not a proper constructor make
...
llvm-svn: 21666
2005-05-03 06:10:51 +00:00
Chris Lattner
8298120f17
add direct support for making GEP instrs with one index
...
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Misha Brukman
cc42755633
Omit periods at the end of command-line switch explanations for consistency
...
llvm-svn: 21664
2005-05-03 05:36:14 +00:00
Reid Spencer
d18dbcbf4c
A new test case for the LLVMMemSetOptimization.
...
llvm-svn: 21663
2005-05-03 04:00:24 +00:00
Jeff Cohen
4e3aedeaa6
Use ANSI-approved way of getting the value infinity (otherwise VC++ won't compile it)
...
llvm-svn: 21662
2005-05-03 03:13:01 +00:00
Reid Spencer
95d8efdfcf
Avoid garbage output in the statistics display by ensuring that the
...
strings passed to Statistic's constructor are not destructable. The stats
are printed during static destruction and the SimplifyLibCalls module was
getting destructed before the statistics.
llvm-svn: 21661
2005-05-03 02:54:54 +00:00
Reid Spencer
49fa070401
Add the StrNCmpOptimization which is similar to strcmp.
...
Unfortunately, this optimization didn't trigger on any llvm-test tests.
llvm-svn: 21660
2005-05-03 01:43:45 +00:00
Reid Spencer
8204531db1
Correct the title and the success criteria: strcmp -> strncmp
...
llvm-svn: 21659
2005-05-03 00:52:19 +00:00
Reid Spencer
0a23afbedb
Add a new test case for the StrNCmpOptimization.
...
llvm-svn: 21658
2005-05-03 00:50:43 +00:00
Reid Spencer
2d5c7beebd
Implement the fprintf optimization which converts calls like this:
...
fprintf(F,"hello") -> fwrite("hello",strlen("hello"),1,F)
fprintf(F,"%s","hello") -> fwrite("hello",strlen("hello"),1,F)
fprintf(F,"%c",'x') -> fputc('c',F)
This optimization fires severals times in llvm-test:
313 MultiSource/Applications/Burg
302 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
189 MultiSource/Benchmarks/Prolangs-C/mybison
175 MultiSource/Benchmarks/Prolangs-C/football
130 MultiSource/Benchmarks/Prolangs-C/unix-tbl
llvm-svn: 21657
2005-05-02 23:59:26 +00:00
Reid Spencer
59605a1b57
Add a test case for testing the FPrintFOptimization.
...
llvm-svn: 21656
2005-05-02 23:07:14 +00:00
Andrew Lenharth
c73e633a41
fold fp div by 0 to inf, the way gcc does. This is legal according to the FP spec
...
llvm-svn: 21655
2005-05-02 21:25:47 +00:00
Andrew Lenharth
f5d58d1bc3
Remove support for 1.0 style varargs
...
amusing of course, because we will have to go back to those semantics soon
llvm-svn: 21654
2005-05-02 19:07:27 +00:00
John Criswell
f42ed7bdaf
Fixed a comment.
...
llvm-svn: 21653
2005-05-02 14:47:42 +00:00
Duraid Madina
7acd5d5f06
support multiplication by constant negative integers
...
this constmul code is still buggy though, so beware. mul by 7427 is currently
broken, for example. will fix it when I get a moment :)
llvm-svn: 21652
2005-05-02 07:27:14 +00:00
Duraid Madina
0e73188c10
add support for bools to SELECT, this fixes Prolangs-C/bison from the
...
testsuite, however 09-vor is still dead (hopefully for other reasons!)
llvm-svn: 21651
2005-05-02 06:41:13 +00:00
Reid Spencer
d845d160f6
Mention that arguments to functions must be first class types.
...
llvm-svn: 21650
2005-05-01 22:22:57 +00:00
Tanya Lattner
846b8b00e2
Add accessor method,
...
llvm-svn: 21649
2005-05-01 16:22:41 +00:00
Tanya Lattner
c187835632
Adding ModuloSched SB.
...
llvm-svn: 21648
2005-05-01 16:14:34 +00:00
Chris Lattner
a816eee427
Implement getelementptr.ll:test11
...
llvm-svn: 21647
2005-05-01 04:42:15 +00:00
Chris Lattner
cdb2465152
new testcase
...
llvm-svn: 21646
2005-05-01 04:41:57 +00:00
Chris Lattner
a9d84e3388
Check for volatile loads only once.
...
Implement load.ll:test7
llvm-svn: 21645
2005-05-01 04:24:53 +00:00
Chris Lattner
da96eeb2d5
add a new testcase
...
llvm-svn: 21644
2005-05-01 04:24:15 +00:00
Tanya Lattner
9d43c75a55
SMS for superblocks.
...
llvm-svn: 21643
2005-05-01 01:27:47 +00:00
Tanya Lattner
bdfb9e61a0
Added extra constructor for superblocks.
...
llvm-svn: 21642
2005-05-01 01:25:53 +00:00
Tanya Lattner
4d0ee754e3
Fixed bug in searchPath function for finding nodes between two recurrences.
...
Changed dependence analyzer to only use dep distances of 2 or less.
This is experimental.
Changed MSchedGraph to be able to represent more then one BB (first steps).
llvm-svn: 21641
2005-04-30 23:07:59 +00:00
Andrew Lenharth
537332eba8
I was sure I had thought about this and there was a reason it should work.
...
But it is entirely possible I am just crazy.
llvm-svn: 21640
2005-04-30 14:19:13 +00:00
Alkis Evlogimenos
d7e534b2b3
Do not use deprecated APIs
...
llvm-svn: 21639
2005-04-30 07:13:31 +00:00
Reid Spencer
16449a9eb0
Fix a comment that stated the wrong thing.
...
llvm-svn: 21638
2005-04-30 06:45:47 +00:00
Chris Lattner
c8a6633dea
Eliminate some random whitespace
...
llvm-svn: 21637
2005-04-30 04:44:07 +00:00
Chris Lattner
8002640eab
Codegen and legalize sin/cos/llvm.sqrt as FSIN/FCOS/FSQRT calls. This patch
...
was contributed by Morten Ofstad, with some minor tweaks and bug fixes added
by me.
llvm-svn: 21636
2005-04-30 04:43:14 +00:00
Chris Lattner
9efa7e7533
add sin/cos tests
...
llvm-svn: 21635
2005-04-30 04:41:27 +00:00
Chris Lattner
9993823876
Doesn't support these nodes
...
llvm-svn: 21634
2005-04-30 04:26:56 +00:00
Chris Lattner
9c6bbafc15
This target doesn't support the FSIN/FCOS/FSQRT nodes yet
...
llvm-svn: 21633
2005-04-30 04:26:06 +00:00
Chris Lattner
db68d39a01
Add support for FSIN/FCOS when unsafe math ops are enabled. Patch contributed by
...
Morten Ofstad!
llvm-svn: 21632
2005-04-30 04:25:35 +00:00
Chris Lattner
3b20386551
Add support for llvm.sqrt and sin/cos if unsafe math optimizations are enabled.
...
llvm-svn: 21631
2005-04-30 04:12:40 +00:00
Chris Lattner
4a2cc6603d
Expose an option allowing unsafe math optimizations. Patch contributed by
...
Morten Ofstad!
llvm-svn: 21630
2005-04-30 04:09:52 +00:00
Chris Lattner
30fe4ac2fb
Lower llvm.sqrt -> fsqrt/sqrt
...
llvm-svn: 21629
2005-04-30 04:07:50 +00:00
Chris Lattner
7100fcde6c
Add a test for llvm.sqrt
...
llvm-svn: 21628
2005-04-30 04:07:15 +00:00
Chris Lattner
1c636f1118
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Reid Spencer
4c444fe007
* Don't depend on "guessing" what a FILE* is, just require that the actual
...
type be obtained from a CallInst we're optimizing.
* Make it possible for getConstantStringLength to return the ConstantArray
that it extracts in case the content is needed by an Optimization.
* Implement the strcmp optimization
* Implement the toascii optimization
This pass is now firing several to many times in the following MultiSource
tests:
Applications/Burg - 7 (strcat,strcpy)
Applications/siod - 13 (strcat,strcpy,strlen)
Applications/spiff - 120 (exit,fputs,strcat,strcpy,strlen)
Applications/treecc - 66 (exit,fputs,strcat,strcpy)
Applications/kimwitu++ - 34 (strcmp,strcpy,strlen)
Applications/SPASS - 588 (exit,fputs,strcat,strcpy,strlen)
llvm-svn: 21626
2005-04-30 03:17:54 +00:00
Reid Spencer
29c6b848db
* Fix signed/unsigned usage problem
...
* Rearrange for readability.
llvm-svn: 21625
2005-04-30 03:06:36 +00:00
Reid Spencer
10e99b2667
A new test case for the ToAsciiOptimizer.
...
llvm-svn: 21624
2005-04-30 01:00:52 +00:00
Reid Spencer
89339ffb22
A new test case for the StrCmpOptimization in -simplify-libcalls.
...
llvm-svn: 21623
2005-04-30 00:52:04 +00:00
Reid Spencer
1279398b1c
This is StrCpy, NOT StrCat!
...
llvm-svn: 21622
2005-04-29 23:02:15 +00:00
Reid Spencer
cadbe2bbf1
Get the name of the pass right in the documentation.
...
llvm-svn: 21621
2005-04-29 23:01:21 +00:00
Reid Spencer
a2ddce3119
Fix the success criteria for the test to make call instructions with "pow"
...
not just any occurrence of "pow".
llvm-svn: 21620
2005-04-29 10:11:23 +00:00
Reid Spencer
9610da2670
Actually make this pass test something related to fputs.
...
llvm-svn: 21619
2005-04-29 10:10:17 +00:00
Reid Spencer
9361697f93
Implement the optimizations for "pow" and "fputs" library calls.
...
llvm-svn: 21618
2005-04-29 09:39:47 +00:00
Reid Spencer
fc4cf1d435
Add a test case for the puts libcall optimization.
...
llvm-svn: 21616
2005-04-29 07:19:00 +00:00
Reid Spencer
2645640325
Add a testcase for optimizing the strcpy libcall.
...
llvm-svn: 21615
2005-04-29 06:01:28 +00:00
Reid Spencer
c968ea0495
Remove optimizations that don't require both operands to be constant. These
...
are moved to simplify-libcalls pass.
llvm-svn: 21614
2005-04-29 05:55:35 +00:00
Reid Spencer
a8b889490e
New test case for testing pow(3) math library optimizations.
...
llvm-svn: 21613
2005-04-29 05:47:05 +00:00
Jeff Cohen
4bc952f703
Consistently use 'class' to silence VC++
...
llvm-svn: 21612
2005-04-29 03:05:44 +00:00
Reid Spencer
ed55a6b5e0
* Add constant folding for additional floating point library calls such as
...
sinh, cosh, etc.
* Make the name comparisons for the fp libcalls a little more efficient by
switching on the first character of the name before doing comparisons.
llvm-svn: 21611
2005-04-28 23:01:59 +00:00
Chris Lattner
014d2c42e7
Add support for FSQRT node, patch contributed by Morten Ofstad
...
llvm-svn: 21610
2005-04-28 22:07:18 +00:00
Chris Lattner
59ecb57e4a
These functions can set errno!
...
llvm-svn: 21609
2005-04-28 21:52:31 +00:00
Chris Lattner
61827484c7
Add some new X86 instrs, patch contributed by Morten Ofstad
...
llvm-svn: 21608
2005-04-28 21:50:05 +00:00
Chris Lattner
effaec5436
Codegen fabs/fabsf as FABS. Patch contributed by Morten Ofstad
...
llvm-svn: 21607
2005-04-28 21:48:42 +00:00
Chris Lattner
9d6fa98ec7
Legalize FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
...
llvm-svn: 21606
2005-04-28 21:44:33 +00:00
Chris Lattner
2f82d2d58a
Add FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
...
llvm-svn: 21605
2005-04-28 21:44:03 +00:00
Reid Spencer
16983ca865
Remove from the TODO list those optimizations that are already handled by
...
constant folding implemented in lib/Transforms/Utils/Local.cpp.
llvm-svn: 21604
2005-04-28 18:05:16 +00:00
Reid Spencer
649ac283e4
Document additional libcall transformations that need to be written.
...
Help Wanted!
There's a lot of them to write.
llvm-svn: 21603
2005-04-28 04:40:06 +00:00
Reid Spencer
7ddcfb3375
Doxygenate.
...
llvm-svn: 21602
2005-04-27 21:29:20 +00:00
Chris Lattner
36ffb1ff37
remove 'statement with no effect' warning
...
llvm-svn: 21600
2005-04-27 20:12:17 +00:00
Andrew Lenharth
4a73c2cfdc
Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
...
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.
llvm-svn: 21599
2005-04-27 20:10:01 +00:00
Chris Lattner
0a6f42ac1d
Unbreak the sparc backend.
...
llvm-svn: 21598
2005-04-27 18:57:15 +00:00
Reid Spencer
08b4940509
More Cleanup:
...
* Name the instructions by appending to name of original
* Factor common part out of a switch statement.
llvm-svn: 21597
2005-04-27 17:46:54 +00:00
Andrew Lenharth
3b63291fc1
import fix and plot multiple lines at once
...
llvm-svn: 21596
2005-04-27 17:32:41 +00:00
Andrew Lenharth
438225a8cb
Generate a gnuplot script for any program and any test (like llc or gcc)
...
llvm-svn: 21593
2005-04-27 16:41:50 +00:00
Andrew Lenharth
e81871331f
So you want to import nightly tester data into a data base? Have we got the perl script for you
...
llvm-svn: 21592
2005-04-27 16:03:01 +00:00
Andrew Lenharth
be6ce82937
fix for parse, and a start at db import. Using CVS as scp :)
...
llvm-svn: 21591
2005-04-27 14:57:26 +00:00
Duraid Madina
b071bef66a
clean up some warnings
...
llvm-svn: 21590
2005-04-27 11:57:39 +00:00
Reid Spencer
e249a82e73
This is a cleanup commit:
...
* Correct stale documentation in a few places
* Re-order the file to better associate things and reduce line count
* Make the pass thread safe by caching the Function* objects needed by the
optimizers in the pass object instead of globally.
* Provide the SimplifyLibCalls pass object to the optimizer classes so they
can access cached Function* objects and TargetData info
* Make sure the pass resets its cache if the Module passed to runOnModule
changes
* Rename CallOptimizer LibCallOptimization. All the classes are named
*Optimization while the objects are *Optimizer.
* Don't cache Function* in the optimizer objects because they could be used
by multiple PassManager's running in multiple threads
* Add an optimization for strcpy which is similar to strcat
* Add a "TODO" list at the end of the file for ideas on additional libcall
optimizations that could be added (get ideas from other compilers).
Sorry for the huge diff. Its mostly reorganization of code. That won't
happen again as I believe the design and infrastructure for this pass is
now done or close to it.
llvm-svn: 21589
2005-04-27 07:54:40 +00:00
Chris Lattner
93f4e9dd26
detect functions that never return, and turn the instruction following a
...
call to them into an 'unreachable' instruction.
This triggers a bunch of times, particularly on gcc:
gzip: 36
gcc: 601
eon: 12
bzip: 38
llvm-svn: 21587
2005-04-27 04:52:23 +00:00
Chris Lattner
356cbfef73
Test the noreturn function optimization
...
llvm-svn: 21586
2005-04-27 04:51:01 +00:00
Reid Spencer
a21f83f809
Add the simplify-libcalls pass.
...
llvm-svn: 21585
2005-04-27 02:22:47 +00:00
Andrew Lenharth
9b3114d4ed
A first step towards being able to do more interesting things with the nightly tester data. Moreinteresting things will come soon, so tune in
...
llvm-svn: 21584
2005-04-27 02:13:20 +00:00
Reid Spencer
dc11db68b6
Prefix the debug statistics so they group together.
...
llvm-svn: 21583
2005-04-27 00:20:23 +00:00
Reid Spencer
e95a647b2a
In debug builds, make a statistic for each kind of call optimization. This
...
helps track down what gets triggered in the pass so its easier to identify
good test cases.
llvm-svn: 21582
2005-04-27 00:05:45 +00:00
Chris Lattner
7f4f773e9f
This analysis doesn't take 'throwing' into consideration, it looks at
...
'unwinding'
llvm-svn: 21581
2005-04-26 23:53:25 +00:00
Reid Spencer
f9d4be187f
Fix up the debug statement to actually use a newline .. radical concept.
...
llvm-svn: 21580
2005-04-26 23:07:08 +00:00
Reid Spencer
18b998192f
Uh, this isn't argpromotion.
...
llvm-svn: 21579
2005-04-26 23:05:17 +00:00
Reid Spencer
2bc7a4f82a
Add some debugging output so we can tell which calls are getting triggered
...
llvm-svn: 21578
2005-04-26 23:02:16 +00:00
Chris Lattner
2bfe36214d
no parens
...
llvm-svn: 21577
2005-04-26 22:57:07 +00:00
Chris Lattner
730a5da1af
update some paths
...
llvm-svn: 21576
2005-04-26 22:56:16 +00:00
Reid Spencer
f8c03d9db6
No, seriously folks, memcpy really does return void.
...
llvm-svn: 21575
2005-04-26 22:49:48 +00:00
Reid Spencer
aaca170867
memcpy returns void!!!!!
...
llvm-svn: 21574
2005-04-26 22:46:23 +00:00
Reid Spencer
7821d06c24
Convert the remainder of the intrinsic function prototypes to "declare"
...
form from the "call" form.
llvm-svn: 21573
2005-04-26 20:50:44 +00:00
Reid Spencer
cf669d87d0
Use the declare syntax not the call syntax for intrinsic prototypes so
...
the uninitiated reader is not confused.
llvm-svn: 21572
2005-04-26 20:41:16 +00:00
Chris Lattner
41d183ed8d
don't let Reid build void*'s :)
...
llvm-svn: 21571
2005-04-26 20:03:33 +00:00
Reid Spencer
4855ebf622
Fix some bugs found by running on llvm-test:
...
* MemCpyOptimization can only be optimized if the 3rd and 4th arguments are
constants and we weren't checking for that.
* The result of llvm.memcpy (and llvm.memmove) is void* not sbyte*, put in
a cast.
llvm-svn: 21570
2005-04-26 19:55:57 +00:00
Reid Spencer
bb92b4fdfb
Changes From Review Feedback:
...
* Have the SimplifyLibCalls pass acquire the TargetData and pass it down to
the optimization classes so they can use it to make better choices for
the signatures of functions, etc.
* Rearrange the code a little so the utility functions are closer to their
usage and keep the core of the pass near the top of the files.
* Adjust the StrLen pass to get/use the correct prototype depending on the
TargetData::getIntPtrType() result. The result of strlen is size_t which
could be either uint or ulong depending on the platform.
* Clean up some coding nits (cast vs. dyn_cast, remove redundant items from
a switch, etc.)
* Implement the MemMoveOptimization as a twin of MemCpyOptimization (they
only differ in name).
llvm-svn: 21569
2005-04-26 19:13:17 +00:00
Reid Spencer
61a18b84cc
Add a test case for MemMove.ll
...
llvm-svn: 21568
2005-04-26 19:05:51 +00:00
Reid Spencer
abeb186371
Result of strlen is size_t which is either uint or ulong, not int.
...
llvm-svn: 21567
2005-04-26 19:04:46 +00:00
Chris Lattner
eb2a461acf
Make interval partition print correctly, patch contributed by
...
Vladimir Prus!
llvm-svn: 21566
2005-04-26 14:48:28 +00:00
Chris Lattner
bd43b9db9d
Fix the compile failures from last night.
...
llvm-svn: 21565
2005-04-26 14:40:41 +00:00
Duraid Madina
e06ef80244
constmul bugfix: multiply by 27611 was broken
...
llvm-svn: 21564
2005-04-26 09:42:50 +00:00
Duraid Madina
bbd0cd71a8
clean up the code! (oops) lots more cleaning left, however.
...
llvm-svn: 21563
2005-04-26 08:43:47 +00:00
Reid Spencer
b4f7b83dce
* Merge get_GVInitializer and getCharArrayLength into a single function
...
named getConstantStringLength. This is the common part of StrCpy and
StrLen optimizations and probably several others, yet to be written. It
performs all the validity checks for looking at constant arrays that are
supposed to be null-terminated strings and then computes the actual
length of the string.
* Implement the MemCpyOptimization class. This just turns memcpy of 1, 2, 4
and 8 byte data blocks that are properly aligned on those boundaries into
a load and a store. Much more could be done here but alignment
restrictions and lack of knowledge of the target instruction set prevent
use from doing significantly more. That will have to be delegated to the
code generators as they lower llvm.memcpy calls.
llvm-svn: 21562
2005-04-26 07:45:18 +00:00
Reid Spencer
89011b6f3c
Add a new test case for the llvm.memcpy simplification case.
...
llvm-svn: 21561
2005-04-26 07:40:40 +00:00
Duraid Madina
81ebb57771
* Add code to reduce multiplies by constant integers to shifts, adds and
...
subtracts. This is a very rough and nasty implementation of Lefevre's
"pattern finding" algorithm. With a few small changes though, it should
end up beating most other methods in common use, regardless of the size
of the constant (currently, it's often one or two shifts worse)
TODO: rewrite it so it's not hideously ugly (this is a translation from
perl, which doesn't help ;)
bypass most of it for multiplies by 2^n+1
(eventually) teach it that some combinations of shift+add are
cheaper than others (e.g. shladd on ia64, scaled adds on alpha)
get it to try multiple booth encodings in search of the cheapest
routine
make it work for negative constants
This is hacked up as a DAG->DAG transform, so once I clean it up I hope
it'll be pulled out of here and put somewhere else. The only thing backends
should really have to worry about for now is where to draw the line
between using this code vs. going ahead and doing an integer multiply
anyway.
llvm-svn: 21560
2005-04-26 07:23:02 +00:00
Reid Spencer
76dab9a523
* Implement StrLenOptimization
...
* Factor out commonalities between StrLenOptimization and StrCatOptimization
* Make sure that signatures return sbyte* not void*
llvm-svn: 21559
2005-04-26 05:24:00 +00:00
Reid Spencer
3f2710e64e
* Add a test case for StrLenOptimization
...
* Rename ExitInMain and StrCat tests so they don't have the date the
regression was entered since they are feature tests, not regressions.
llvm-svn: 21558
2005-04-26 05:22:38 +00:00
Reid Spencer
8ee5aacc38
Incorporate feedback from Chris:
...
* Change signatures of OptimizeCall and ValidateCalledFunction so they are
non-const, allowing the optimization object to be modified. This is in
support of caching things used across multiple calls.
* Provide two functions for constructing and caching function types
* Modify the StrCatOptimization to cache Function objects for strlen and
llvm.memcpy so it doesn't regenerate them on each call site. Make sure
these are invalidated each time we start the pass.
* Handle both a GEP Instruction and a GEP ConstantExpr
* Add additional checks to make sure we really are dealing with an arary of
sbyte and that all the element initializers are ConstantInt or
ConstantExpr that reduce to ConstantInt.
* Make sure the GlobalVariable is constant!
* Don't use ConstantArray::getString as it can fail and it doesn't give us
the right thing. We must check for null bytes in the middle of the array.
* Use llvm.memcpy instead of memcpy so we can factor alignment into it.
* Don't use void* types in signatures, replace with sbyte* instead.
llvm-svn: 21555
2005-04-26 03:26:15 +00:00
Jeff Cohen
d45bdb45c1
Add SimplyLibCalls.cpp to VC++ build
...
llvm-svn: 21554
2005-04-26 02:57:49 +00:00
Reid Spencer
342fe9a833
Fix RUN: line to not always pass.
...
llvm-svn: 21553
2005-04-26 02:33:25 +00:00
Chris Lattner
cfa7ddd6e2
Fold (X > -1) | (Y > -1) --> (X&Y > -1)
...
llvm-svn: 21552
2005-04-26 01:18:33 +00:00
Reid Spencer
fe91dfec91
Changes due to code review and new implementation:
...
* Don't use std::string for the function names, const char* will suffice
* Allow each CallOptimizer to validate the function signature before
doing anything
* Repeatedly loop over the functions until an iteration produces
no more optimizations. This allows one optimization to insert a
call that is optimized by another optimization.
* Implement the ConstantArray portion of the StrCatOptimization
* Provide a template for the MemCpyOptimization
* Make ExitInMainOptimization split the block, not delete everything
after the return instruction.
(This covers revision 1.3 and 1.4, as the 1.3 comments were botched)
llvm-svn: 21548
2005-04-25 21:20:38 +00:00
Chris Lattner
f806459d90
implement some more logical compares with constants, so that:
...
int foo1(int x, int y) {
int t1 = x >= 0;
int t2 = y >= 0;
return t1 & t2;
}
int foo2(int x, int y) {
int t1 = x == -1;
int t2 = y == -1;
return t1 & t2;
}
produces:
_foo1:
or r2, r4, r3
srwi r2, r2, 31
xori r3, r2, 1
blr
_foo2:
and r2, r4, r3
addic r2, r2, 1
li r2, 0
addze r3, r2
blr
instead of:
_foo1:
srwi r2, r4, 31
xori r2, r2, 1
srwi r3, r3, 31
xori r3, r3, 1
and r3, r2, r3
blr
_foo2:
addic r2, r4, 1
li r2, 0
addze r2, r2
addic r3, r3, 1
li r3, 0
addze r3, r3
and r3, r2, r3
blr
llvm-svn: 21547
2005-04-25 21:20:28 +00:00
Reid Spencer
f2534c7291
Lots of changes based on review and new functionality:
...
* Use a
llvm-svn: 21546
2005-04-25 21:11:48 +00:00
Reid Spencer
172e9155c1
Update the test case to handle a few more (degenerate) cases and remove
...
the restriction that it is an XFAIL because it now passes.
llvm-svn: 21545
2005-04-25 21:08:34 +00:00
Chris Lattner
d373ff64aa
Codegen x < 0 | y < 0 as (x|y) < 0. This allows us to compile this to:
...
_foo:
or r2, r4, r3
srwi r3, r2, 31
blr
instead of:
_foo:
srwi r2, r4, 31
srwi r3, r3, 31
or r3, r2, r3
blr
llvm-svn: 21544
2005-04-25 21:03:25 +00:00
Chris Lattner
e093c6f565
Make dominates(A,B) work with post dominators. Patch contributed by
...
Naveen Neelakantam, thanks!
llvm-svn: 21543
2005-04-25 20:50:33 +00:00
Tanya Lattner
af0ac2744e
Added question about turning off all optimizations. I think this has been asked once or twice.
...
llvm-svn: 21542
2005-04-25 20:36:56 +00:00
Chris Lattner
a21bf8d1be
implement getelementptr.ll:test10
...
llvm-svn: 21541
2005-04-25 20:17:30 +00:00
Chris Lattner
20621b1e94
rename fn
...
llvm-svn: 21540
2005-04-25 20:17:16 +00:00
Chris Lattner
e680ee2a48
new testcase
...
llvm-svn: 21539
2005-04-25 20:17:00 +00:00
Chris Lattner
ecac782786
Correctly handle global-argument aliases induced in main
...
llvm-svn: 21537
2005-04-25 19:16:31 +00:00
Chris Lattner
5965359d8f
Don't mess up SCC traversal when a node has null edges out of it.
...
llvm-svn: 21536
2005-04-25 19:16:17 +00:00
Chris Lattner
37b6b097ff
document 'opaque' types
...
llvm-svn: 21535
2005-04-25 17:34:15 +00:00
Chris Lattner
d1039cc581
Add feedback from Vikram
...
llvm-svn: 21534
2005-04-25 15:47:57 +00:00
Reid Spencer
478d3b930a
Make sure the target buffer is null terminated so we don't blow up
...
strcat when its called.
llvm-svn: 21533
2005-04-25 15:40:35 +00:00
Reid Spencer
20b0e43e1f
A test case for testing the StrCatOptimizer, currently XFAILed everywhere.
...
llvm-svn: 21532
2005-04-25 07:29:30 +00:00
Reid Spencer
9bbaa2ab7f
Post-Review Cleanup:
...
* Fix comments at top of file
* Change algorithm for running the call optimizations from n*n to something
closer to n.
* Use a hash_map to store and lookup the optimizations since there will
eventually (or potentially) be a large number of them. This gets lookup
based on the name of the function to O(1). Each CallOptimizer now has a
std::string member named func_name that tracks the name of the function
that it applies to. It is this string that is entered into the hash_map
for fast comparison against the function names encountered in the module.
* Cleanup some style issues pertaining to iterator invalidation
* Don't pass the Function pointer to the OptimizeCall function because if
the optimization needs it, it can get it from the CallInst passed in.
* Add the skeleton for a new CallOptimizer, StrCatOptimizer which will
eventually replace strcat's of constant strings with direct copies.
llvm-svn: 21526
2005-04-25 03:59:26 +00:00
Reid Spencer
23423346f8
Use the %name rather than the "name" format so those familiar with the
...
llvm-dis output don't go blind.
llvm-svn: 21525
2005-04-25 03:18:19 +00:00
Reid Spencer
ff7b16c1d6
Shut GCC 4.0 up about classes that have virtual functions but a non-virtual
...
destructor. Just add the do-nothing virtual destructor.
llvm-svn: 21524
2005-04-25 02:55:55 +00:00
Reid Spencer
0c2d046aa4
Declare a function to create the SimplifyLibCalls pass.
...
llvm-svn: 21523
2005-04-25 02:54:00 +00:00
Reid Spencer
39a762d149
A new pass to provide specific optimizations for certain well-known library
...
calls. The pass visits all external functions in the module and determines
if such function calls can be optimized. The optimizations are specific to
the library calls involved. This initial version only optimizes calls to
exit(3) when they occur in main(): it changes them to ret instructions.
llvm-svn: 21522
2005-04-25 02:53:12 +00:00
Reid Spencer
985f484263
A test case for the the ExitInMain libcall simplification.
...
llvm-svn: 21521
2005-04-25 02:50:08 +00:00
Reid Spencer
8edc8beacf
Older compilers won't like the inline virtual destructor in the header file
...
so we put the destructor in Pass.cpp and make it non-inline.
llvm-svn: 21520
2005-04-25 01:01:35 +00:00
Chris Lattner
fc104de06d
fix some bugs
...
llvm-svn: 21515
2005-04-25 00:38:52 +00:00
Reid Spencer
756d049c06
Fix a thinko in the documentation of the splitBasicBlock method. The branch
...
instruction is added to the original block, not the new block.
llvm-svn: 21513
2005-04-25 00:31:53 +00:00
Reid Spencer
9c47b25868
Shut GCC 4.0 up about classes with virtual functions but no virtual
...
destructor.
llvm-svn: 21510
2005-04-24 22:27:20 +00:00
Reid Spencer
ad750a80eb
Shut GCC 4.0 up when it complains about classes with virtual functions that
...
don't have virtual destructors.
llvm-svn: 21507
2005-04-24 22:20:32 +00:00
Reid Spencer
4da978466d
Make this readable for newbies and those who can only understand one set of
...
grammar rules for the English language.
llvm-svn: 21503
2005-04-24 20:56:18 +00:00
Misha Brukman
6818b33096
extract has been renamed to llvm-extract to avoid conflicting with another tool
...
llvm-svn: 21501
2005-04-24 17:46:58 +00:00
Chris Lattner
2f1457fd83
Eliminate cases where we could << by 64, which is undefined in C.
...
llvm-svn: 21500
2005-04-24 17:46:05 +00:00
Misha Brukman
ca1e0c6ae0
There are still uses for spaces in Makefiles -- to make text line up together,
...
regardless of the tab size/stop settings on the developer side
llvm-svn: 21499
2005-04-24 17:43:41 +00:00
Misha Brukman
e22594f3d7
extract has been renamed to llvm-extract to avoid conflicting with another tool
...
llvm-svn: 21498
2005-04-24 17:36:05 +00:00
Misha Brukman
3e9634eaa0
elisp code to help with LLVM code standards compliance
...
llvm-svn: 21497
2005-04-24 17:09:19 +00:00
Misha Brukman
831ad84eea
.vimrc file to aid in LLVM coding standards conformance
...
llvm-svn: 21496
2005-04-24 17:05:04 +00:00
Chris Lattner
d6f636a340
Implement xor.ll:test21: select (not C), A, B -> select C, B, A
...
llvm-svn: 21495
2005-04-24 07:30:14 +00:00
Chris Lattner
b57d040464
Test that xor/select are folded into a select with inverted operands.
...
llvm-svn: 21494
2005-04-24 07:28:53 +00:00
Chris Lattner
2c7d177d25
Allow these methods to take a generic Value* to simplify clients. Use
...
const_cast instead of c casts.
llvm-svn: 21493
2005-04-24 07:28:37 +00:00
Chris Lattner
b220952aca
allow these to take a generic Value*
...
llvm-svn: 21492
2005-04-24 07:28:04 +00:00
Chris Lattner
d1f46d3bf9
Use getPrimitiveSizeInBits() instead of getPrimitiveSize()*8
...
Completely rework the 'setcc (cast x to larger), y' code. This code has
the advantage of implementing setcc.ll:test19 (being more general than
the previous code) and being correct in all cases.
This allows us to unxfail 2004-11-27-SetCCForCastLargerAndConstant.ll,
and close PR454.
llvm-svn: 21491
2005-04-24 06:59:08 +00:00
Chris Lattner
0de0638522
unxfail this.
...
llvm-svn: 21490
2005-04-24 06:55:40 +00:00
Chris Lattner
624d5cb006
add a new testcase which occurs in 181.mcf
...
llvm-svn: 21489
2005-04-24 06:55:33 +00:00
Misha Brukman
1c8d93b08f
* The aesthetic police is on patrol!!...
...
* ... but it wasn't so busy as to not smell the roses and doxygenify comments
llvm-svn: 21487
2005-04-23 22:35:26 +00:00
Chris Lattner
396890d3ac
Add a helper method
...
llvm-svn: 21486
2005-04-23 22:20:22 +00:00
Chris Lattner
8a878ccb25
Fix a bug in my previous checkin
...
llvm-svn: 21485
2005-04-23 22:01:39 +00:00
Chris Lattner
2908bc1e7a
This file is never referenced
...
llvm-svn: 21484
2005-04-23 22:00:26 +00:00
Chris Lattner
6263766133
Add a method, remove last use of Type.def
...
llvm-svn: 21483
2005-04-23 22:00:09 +00:00
Chris Lattner
816394d7ad
add a method, remove a dead #include
...
llvm-svn: 21482
2005-04-23 21:59:42 +00:00
Chris Lattner
6226f941b0
Types.def is going away
...
llvm-svn: 21481
2005-04-23 21:59:11 +00:00
Jeff Cohen
82639853c0
Eliminate tabs and trailing spaces
...
llvm-svn: 21480
2005-04-23 21:38:35 +00:00
Jeff Cohen
8047f13a88
Eliminate tabs and trailing spaces
...
llvm-svn: 21479
2005-04-23 21:26:11 +00:00
Chris Lattner
4bbf66b7a2
Propagate eq sets through the bu graphs to the cbu and eq graphs, fixing
...
a crash of the sfv on 188.ammp
llvm-svn: 21478
2005-04-23 21:11:05 +00:00
Chris Lattner
fdfb25a9e1
add a bunch of documentation about the LLVM type resolution machinery
...
llvm-svn: 21475
2005-04-23 17:27:36 +00:00
Reid Spencer
7fa89cfc9b
Make the CBackend actually get included in llc by using USEDLIBS instead of
...
USEDLIB as the variable to which "CBackend" is appended. The surrounding
if clause is safe because currently the configure script ensures that the
CBackend target is always added to TARGETS_TO_BUILD. By using a non-hard
coded construct in the makefile, we gain uniformity and the ability to
change the default set of targets by only changing the configure script.
llvm-svn: 21474
2005-04-23 17:24:33 +00:00
Chris Lattner
c6ce71d434
make an advanced topics section, move symtab to it
...
llvm-svn: 21473
2005-04-23 16:10:52 +00:00
Chris Lattner
7eae28b9d9
This is not needed
...
llvm-svn: 21472
2005-04-23 16:00:27 +00:00
Chris Lattner
c5ad1ca942
add a search box for the documentation
...
llvm-svn: 21471
2005-04-23 15:55:18 +00:00
Chris Lattner
77c32c34d7
Generalize the setcc -> PHI and Select folding optimizations to work with
...
any constant RHS, not just a constant integer RHS. This implements
select.ll:test17
llvm-svn: 21470
2005-04-23 15:31:55 +00:00
Chris Lattner
64a8a7f9b7
add a new testcase
...
llvm-svn: 21469
2005-04-23 15:31:03 +00:00
Chris Lattner
01c81ab706
Always enable the C backend. This fixes a *vast* number of failures on the
...
testers last night, as llc was not getting the cbe linked in.
llvm-svn: 21468
2005-04-23 14:36:22 +00:00
Alkis Evlogimenos
0166db6529
Add method to return the type this type will be promoted to if it is
...
passed through a variable argument function.
llvm-svn: 21462
2005-04-23 00:11:21 +00:00
Reid Spencer
51efcefa49
Mention the --enable-targets= option to configure.
...
llvm-svn: 21459
2005-04-22 20:27:33 +00:00
Misha Brukman
7937b07940
* Order #includes as per style guide
...
* Combine multiple ``std::cerr <<'' statements into one for simplicity
llvm-svn: 21458
2005-04-22 19:13:22 +00:00
Misha Brukman
fd8c2265fa
Convert tabs to spaces
...
llvm-svn: 21457
2005-04-22 18:06:01 +00:00
Misha Brukman
36c6bc1bf4
Hyphenate the adjective `n-bit' when used to describe values and processors
...
llvm-svn: 21456
2005-04-22 18:02:52 +00:00
Misha Brukman
d5da38c9aa
Build the `Skeleton' target when building "all" targets
...
llvm-svn: 21455
2005-04-22 18:00:34 +00:00
Reid Spencer
1e195bdd41
Document the --enable-targets= feature of the configure script.
...
llvm-svn: 21454
2005-04-22 17:58:03 +00:00
Alkis Evlogimenos
7afc9558e0
Silence gcc-4.0.0 warnings.
...
llvm-svn: 21453
2005-04-22 17:56:01 +00:00
Misha Brukman
e73e76dc42
Convert tabs to spaces
...
llvm-svn: 21452
2005-04-22 17:54:37 +00:00
Reid Spencer
948f453254
Don't always build CBackend and Skeleton. Make use of the TARGETS_TO_BUILD
...
parameter instead which will correctly list the set of targets to be built.
llvm-svn: 21451
2005-04-22 17:32:05 +00:00
Reid Spencer
e4481c7c82
Implement the --enable-targets= feature of the configure script. The make
...
variable TARGETS_TO_BUILD is used to determine which targets in lib/Target
are built and which libraries are linked into llc. This effectively
implements the feature. One item remains: disabling targets in the dejagnu
test suite.
llvm-svn: 21450
2005-04-22 17:20:11 +00:00
Reid Spencer
ce9612b23c
Two changes:
...
1. Get rid of TOOLLINKOPTS as it is a hold over from llvm-test and only
used to communicate additional libraries to the linker. The *standard*
way to do that is with the LIBS variable which this change supports.
2. Allow the TARGETS_TO_BUILD variable to be set from the configuration
substitution. This is the result of the --enable-target= parameter to
the configure script.
llvm-svn: 21449
2005-04-22 17:14:14 +00:00
Reid Spencer
90dd65e4a7
Make sure the CBackend is always a target that is built.
...
llvm-svn: 21448
2005-04-22 17:06:18 +00:00
Reid Spencer
e482ca8bfa
Consolidate the target selection options into a single option,
...
--enable-target which can take values "all", "host-only" or a comma
separated list of target names (alpha,ia64,powerpc,skeleton,sparc,x86)
llvm-svn: 21447
2005-04-22 17:02:18 +00:00
Andrew Lenharth
8f4081a8c9
keep track of max depth stats
...
llvm-svn: 21446
2005-04-22 13:35:18 +00:00
Reid Spencer
4742804864
First step in avoiding compilation/usage of non-relevant targets. New
...
options have been added to the configure script that control which targets
will be used. The options are:
--enable-target-this (default=disabled)
This will specify that the target corresponding to the build host is
the target that will be compiled/used. You can't use this with any of
the other options (they'll be ignored). This is what most people want.
--disable-target-x86 (default=enabled)
This will prevent the X86 target(s) from being compiled/used.
--disable-target-sparc (default=enabled)
This will prevent both SparcV8 and SparcV9 from being compiled/used.
--disable-target-powerpc (default=enabled)
This will prevent the PowerPC target from being compiled/used.
--disable-target-alpha (default=enabled)
This will prevent the Alpha target from being compiled/used.
--disable-target-ia64 (default=enabled)
This will prevent the IA64 target from being compiled/used.
Note that without any of these options, the default behavior is to build
all targets, as is the current practice.
All these options do is set up the substititution variable TARGETS_TO_BUILD
which contains the targets that should be compiled/used. The variable is
intended to be used in the makefiles. Those changes will come later.
llvm-svn: 21445
2005-04-22 07:27:28 +00:00
Tanya Lattner
42ed14860b
Updated dependence analyzer. Fixed numerous bugs. Same stage scheduling, etc.
...
llvm-svn: 21444
2005-04-22 06:32:48 +00:00
Chris Lattner
e25cfaee55
Malloc/Free have mod/ref effects. Do not allow CSE of function calls that
...
call malloc/free. This fixes PR555.
llvm-svn: 21443
2005-04-22 05:36:59 +00:00
Chris Lattner
16431f7b3c
remove 'another common example', which doesn't work with VC++, and indent
...
another example properly
llvm-svn: 21442
2005-04-22 04:49:59 +00:00
Jeff Cohen
88e7b7288a
Eliminate tabs and trailing spaces
...
llvm-svn: 21441
2005-04-22 04:13:13 +00:00
Misha Brukman
5191b4b2d0
Convert tabs to spaces
...
llvm-svn: 21440
2005-04-22 04:08:30 +00:00
Misha Brukman
774511633d
Convert tabs to spaces
...
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman
1fabffbf37
Convert tabs to spaces
...
llvm-svn: 21438
2005-04-22 03:46:24 +00:00
Misha Brukman
4b45ec0be0
Convert tabs to spaces
...
llvm-svn: 21437
2005-04-22 03:35:49 +00:00
Misha Brukman
204572af9d
Convert tabs to spaces
...
llvm-svn: 21436
2005-04-22 03:27:20 +00:00
Misha Brukman
8c0ca76517
Convert tabs to spaces
...
llvm-svn: 21433
2005-04-22 03:18:56 +00:00
Reid Spencer
a3d4e04da8
Add the RUN: prefix to the start of the run line so this test doesn't fail.
...
BTW .. isn't the date on this funky? We haven't reachec 2005-05-09 yet???
llvm-svn: 21432
2005-04-22 02:49:25 +00:00
Reid Spencer
7275e3fb31
Change some old-style casts to C++ style casts to avoid warnings in XPS
...
compilation. This change has been waiting in the wings for a long time but
since Misha just did a global change, I figured now was the time to commit
it.
llvm-svn: 21431
2005-04-22 02:31:56 +00:00
Reid Spencer
d6312210d1
There is no =head3. Convert to =head2.
...
llvm-svn: 21430
2005-04-22 02:16:19 +00:00
Reid Spencer
84f3911b09
Correct the documentation to match the program.
...
llvm-svn: 21429
2005-04-22 02:12:41 +00:00
Misha Brukman
650ba8eb56
Remove trailing whitespace
...
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Misha Brukman
b1c9317bb4
Remove trailing whitespace
...
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Misha Brukman
c88330ad13
* Remove trailing whitespace
...
* Convert tabs to spaces
llvm-svn: 21426
2005-04-21 23:38:14 +00:00
Misha Brukman
b440243e94
Remove trailing whitespace
...
llvm-svn: 21425
2005-04-21 23:30:14 +00:00
Misha Brukman
89b8c8d215
Remove trailing whitespace
...
llvm-svn: 21424
2005-04-21 23:13:11 +00:00
Misha Brukman
10468d8a3c
Remove trailing whitespace
...
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Misha Brukman
91fb9ab60b
* Remove trailing whitespace
...
* Convert tabs to spaces
llvm-svn: 21421
2005-04-21 22:43:08 +00:00
Misha Brukman
835702a094
Remove trailing whitespace
...
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Misha Brukman
b47d28bfe8
* Remove trailing whitespace
...
* Convert tabs to spaces
llvm-svn: 21418
2005-04-21 21:48:46 +00:00
Misha Brukman
2ecc34dd3c
Remove trailing whitespace
...
llvm-svn: 21417
2005-04-21 21:44:41 +00:00
Misha Brukman
01808caded
Remove trailing whitespace
...
llvm-svn: 21416
2005-04-21 21:13:18 +00:00
Misha Brukman
13f332cd3f
* Remove trailing whitespace
...
* Convert tabs to spaces
llvm-svn: 21415
2005-04-21 21:10:11 +00:00
Chris Lattner
95e43ae162
Check for eqv matching
...
llvm-svn: 21414
2005-04-21 21:10:07 +00:00
Chris Lattner
3590ef1164
Match another form of eqv
...
llvm-svn: 21413
2005-04-21 21:09:11 +00:00
Misha Brukman
df586aa20e
Remove trailing whitespace
...
llvm-svn: 21412
2005-04-21 20:59:05 +00:00
Misha Brukman
95aab4ef6d
Remove trailing whitespace
...
llvm-svn: 21411
2005-04-21 20:48:15 +00:00
Chris Lattner
5c9ef1ba2d
this passes on darwin
...
llvm-svn: 21410
2005-04-21 20:48:08 +00:00
Misha Brukman
01230b24ae
Remove trailing whitespace
...
llvm-svn: 21409
2005-04-21 20:39:54 +00:00
Misha Brukman
01cada8797
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
486a1ec909
Handle stores of global address as stores of immediates. Instead of:
...
test1:
movl $N, %eax
movl %eax, G
ret
emit:
test1:
movl $N, G
ret
llvm-svn: 21407
2005-04-21 19:11:03 +00:00
Chris Lattner
adcfc1748b
Handle (store &GV -> mem) as a store immediate. This often occurs for
...
printf format strings and other stuff. Instead of generating this:
movl $l1__2E_str_1, %eax
movl %eax, (%esp)
we now emit:
movl $l1__2E_str_1, (%esp)
llvm-svn: 21406
2005-04-21 19:03:24 +00:00
Reid Spencer
c8b5d60937
Use the actual uid/gid for defaulting the fields in the archive.
...
llvm-svn: 21405
2005-04-21 17:49:57 +00:00
Chris Lattner
a3159af703
Fix a bug where we would not promote calls to invokes if they occured in
...
the same block as the setjmp. Thanks to Greg Pettyjohn for noticing this!
llvm-svn: 21403
2005-04-21 16:46:46 +00:00
Reid Spencer
ce7ce1628f
Eliminate calls to system dependent function getuid by using
...
the newly implemented sys::Process::GetCurrentUserId function. Replace
similarly for getgid.
llvm-svn: 21402
2005-04-21 16:15:19 +00:00
Reid Spencer
2d45e25125
Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
...
methods that were recently added to the interface.
llvm-svn: 21401
2005-04-21 16:12:57 +00:00
Reid Spencer
5e92ead30d
Add two new methods for getting the User Id and Group Id values for the
...
current process.
llvm-svn: 21400
2005-04-21 16:12:04 +00:00
Chris Lattner
c346bf59ee
Add doxygen comments, patch contributed by Evan Jones.
...
llvm-svn: 21397
2005-04-21 16:10:03 +00:00
Chris Lattner
4c5c96f35f
add support for taking and resolving the address of free.
...
llvm-svn: 21396
2005-04-21 16:09:43 +00:00
Chris Lattner
631ee94316
add support for taking the address of free.
...
llvm-svn: 21395
2005-04-21 16:08:59 +00:00
Chris Lattner
954c64d532
Improve doxygen, from part of Evan's patch that didn't apply.
...
llvm-svn: 21394
2005-04-21 16:06:03 +00:00
Chris Lattner
7ceb081f3f
Improve doxygen documentation, patch contributed by Evan Jones!
...
llvm-svn: 21393
2005-04-21 16:04:49 +00:00
Chris Lattner
f6302441f0
Improve and elimination. On PPC, for:
...
bool %test(int %X) {
%Y = and int %X, 8
%Z = setne int %Y, 0
ret bool %Z
}
we now generate this:
rlwinm r2, r3, 0, 28, 28
srwi r3, r2, 3
instead of this:
rlwinm r2, r3, 0, 28, 28
srwi r2, r2, 3
rlwinm r3, r2, 0, 31, 31
I'll leave it to Nate to get it down to one instruction. :)
---------------------------------------------------------------------
llvm-svn: 21391
2005-04-21 06:28:15 +00:00
Chris Lattner
ab1ed77570
Fold (x & 8) != 0 and (x & 8) == 8 into (x & 8) >> 3.
...
This turns this PPC code:
rlwinm r2, r3, 0, 28, 28
cmpwi cr7, r2, 8
mfcr r2
rlwinm r3, r2, 31, 31, 31
into this:
rlwinm r2, r3, 0, 28, 28
srwi r2, r2, 3
rlwinm r3, r2, 0, 31, 31
Next up, nuking the extra and.
llvm-svn: 21390
2005-04-21 06:12:41 +00:00
Chris Lattner
374e659466
Instcombine this:
...
%shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1]
%tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1]
into this:
%shortcirc_val = or bool %tmp.1, %tmp.4 ; <bool> [#uses=1]
%tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1]
not this:
%tmp.4.cast = cast bool %tmp.4 to int ; <int> [#uses=1]
%tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast ; <int> [#uses=1]
llvm-svn: 21389
2005-04-21 05:43:13 +00:00
Chris Lattner
b38b443b15
Teach simplifycfg that setcc is cheap and non-trapping, so that it can
...
convert this:
%tmp.1 = seteq int %i, 0 ; <bool> [#uses=1]
br bool %tmp.1, label %shortcirc_done, label %shortcirc_next
shortcirc_next: ; preds = %entry
%tmp.4 = seteq int %j, 0 ; <bool> [#uses=1]
br label %shortcirc_done
shortcirc_done: ; preds = %shortcirc_next, %entry
%shortcirc_val = phi bool [ %tmp.4, %shortcirc_next ], [ true, %entry ] ; <bool> [#uses=1]
to this:
%tmp.1 = seteq int %i, 0 ; <bool> [#uses=1]
%tmp.4 = seteq int %j, 0 ; <bool> [#uses=1]
%shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1]
... which is later simplified by instcombine into an or.
llvm-svn: 21388
2005-04-21 05:31:13 +00:00
Chris Lattner
b7848974cd
Fix some broken links, taking care of PR554
...
llvm-svn: 21387
2005-04-21 04:53:58 +00:00
Chris Lattner
0727518f81
update to match build changes.
...
llvm-svn: 21386
2005-04-21 04:52:37 +00:00
Reid Spencer
8424ba373e
For Bug 543:
...
Standardize the error messages to be in "path: what failed: why" format.
Also attempt to use the correct errno to ThrowErrno in situations where
the errno value is erased by subsequent system calls.
llvm-svn: 21385
2005-04-21 02:50:10 +00:00
Reid Spencer
b02566dc1c
For Bug 543:
...
Allow the ThrowErrno function to optionally accept an error number
parameter so that callers can specify the error number to be used.
llvm-svn: 21384
2005-04-21 02:30:32 +00:00
Misha Brukman
2f72bafb60
Remove trailing whitespace at the end of lines
...
llvm-svn: 21380
2005-04-20 16:42:34 +00:00
Misha Brukman
ea548c0cb1
Remove trailing whitespace, patch by Markus Oberhumer.
...
llvm-svn: 21379
2005-04-20 16:05:03 +00:00
Misha Brukman
5e7bac21d5
Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH may
...
result in returning executable files that won't be runnable.
llvm-svn: 21378
2005-04-20 15:42:11 +00:00
Misha Brukman
a9a8c1b65b
Do not mark directories as `executable', we only want program files
...
Patch by Markus Oberhumer.
llvm-svn: 21377
2005-04-20 15:33:22 +00:00
Misha Brukman
ee6770f1a3
#include system headers after all LLVM headers
...
llvm-svn: 21374
2005-04-20 04:51:29 +00:00
Misha Brukman
17092bd0a4
Eliminate trailing spaces at end-of-line
...
llvm-svn: 21372
2005-04-20 04:08:35 +00:00
Misha Brukman
3f4fe46796
Consistently eschew space between *' or &' and function argument name
...
llvm-svn: 21371
2005-04-20 04:07:47 +00:00
Misha Brukman
1001aea4d3
Ignore dangling symlinks in getDirectoryContents()
...
Thanks to Markus Oberhumer for the patch!
llvm-svn: 21370
2005-04-20 04:04:07 +00:00
Misha Brukman
8cd50bf269
Initialize fields mode, uid, and gid.
...
Patch by Markus Oberhumer. Thanks!
llvm-svn: 21369
2005-04-20 03:55:35 +00:00
Misha Brukman
bebcaeb816
Align comments together for consistency
...
llvm-svn: 21368
2005-04-20 03:52:59 +00:00
Misha Brukman
64a8c3ed91
* Print commands as we execute them with `-v'
...
* Add option `-save-temps'
Patch contributed by Markus Oberhumer.
llvm-svn: 21367
2005-04-20 03:22:18 +00:00
Chris Lattner
8cb10a1775
Wrap some long lines.
...
Make IPSCCP strip off dead constant exprs that are using functions, making
them appear as though their address is taken. This allows us to propagate
some more pool descriptors, lowering the overhead of pool alloc.
llvm-svn: 21363
2005-04-19 19:16:19 +00:00
Chris Lattner
14db4a2895
ignore generated files
...
llvm-svn: 21362
2005-04-19 15:34:36 +00:00
Chris Lattner
b17483028f
fix bogus warning
...
llvm-svn: 21361
2005-04-19 15:32:30 +00:00
Chris Lattner
07ad98dbe2
fix PR549
...
llvm-svn: 21360
2005-04-19 15:27:29 +00:00
Chris Lattner
181c818373
Bug fixed
...
llvm-svn: 21355
2005-04-19 06:08:04 +00:00
Chris Lattner
5c219469a0
Eliminate a broken transformation, fixing PR548
...
llvm-svn: 21354
2005-04-19 06:04:18 +00:00
Chris Lattner
53c40624f9
Add completely untested support for mtcrf/mfcrf encoding
...
llvm-svn: 21353
2005-04-19 05:41:52 +00:00
Chris Lattner
baa9be572b
switch over the rest of the formats that use RC to use isDOT
...
llvm-svn: 21352
2005-04-19 05:21:30 +00:00
Chris Lattner
f9172e14c9
Convert the XForm instrs and XSForm instruction over to use isDOT
...
llvm-svn: 21351
2005-04-19 05:15:18 +00:00
Chris Lattner
5b78da4571
Now that the ppc64 and vmx operands of I are always 0, forward substitute
...
them away.
llvm-svn: 21350
2005-04-19 05:05:22 +00:00
Chris Lattner
116a9e5a34
convert over bform and iform instructions
...
llvm-svn: 21349
2005-04-19 05:00:59 +00:00
Chris Lattner
b2367e398e
Convert over DForm and DSForm instructions
...
llvm-svn: 21348
2005-04-19 04:59:28 +00:00
Chris Lattner
15709c2c33
Convert XLForm and XForm instructions over to use PPC64 when appropriate.
...
llvm-svn: 21347
2005-04-19 04:51:30 +00:00
Chris Lattner
d790d22f22
Convert XO XS and XFX forms to use isPPC64
...
llvm-svn: 21346
2005-04-19 04:40:07 +00:00
Chris Lattner
c7cb8c77fb
Turn PPC64 and VMX into classes that can be added to instructions instead of
...
bits that must be passed up the inheritance hierarchy. Convert MForm and AForm
instructions over
llvm-svn: 21345
2005-04-19 04:32:54 +00:00
Chris Lattner
ef94374a1c
Major change to tblgen: instead of resolving values every time a class is
...
finished up, only resolve fully when the def is defined. This allows things
to be changed and all uses to be propagated through. This implements
TableGen/LazyChange.td and fixes TemplateArgRename.td in the process.
None of the .td files used in LLVM backends are changed at all by this
patch.
llvm-svn: 21344
2005-04-19 03:36:21 +00:00
Chris Lattner
ab77740715
New testcase for a changing values late and allowing them to propagate
...
llvm-svn: 21343
2005-04-19 03:34:58 +00:00
Chris Lattner
d90d566dee
Make this significantly harder
...
llvm-svn: 21342
2005-04-19 02:58:57 +00:00
Chris Lattner
17bd7c5a88
Add a real run line
...
llvm-svn: 21341
2005-04-19 02:53:26 +00:00
Chris Lattner
c00f712fc0
fix this testcase
...
llvm-svn: 21340
2005-04-19 02:52:04 +00:00
Chris Lattner
2b76da7d1f
new testcase
...
llvm-svn: 21339
2005-04-19 02:26:23 +00:00
Chris Lattner
f2fab50974
add a run line
...
llvm-svn: 21338
2005-04-19 01:37:24 +00:00
Chris Lattner
ed8335e35b
Tell dj to run the tests in this directory
...
llvm-svn: 21337
2005-04-19 01:36:41 +00:00
Chris Lattner
3ff0e11294
implementing shifting of literal integers
...
llvm-svn: 21336
2005-04-19 01:17:35 +00:00
Chris Lattner
101fc501d0
Add initial lexer and parser support for shifting values. Every use of this
...
will lead to it being rejected though.
llvm-svn: 21335
2005-04-19 01:11:03 +00:00
Nate Begeman
2331c061ee
Next round of PPC CR optimizations. For the following code:
...
int %bar(float %a, float %b, float %c, float %d) {
entry:
%tmp.1 = setlt float %a, %d
%tmp.2 = setlt float %b, %d
%or = or bool %tmp.1, %tmp.2
%tmp.3 = setgt float %c, %d
%tmp.4 = or bool %or, %tmp.3
%tmp.5 = and bool %tmp.4, true
%retval = cast bool %tmp.5 to int
ret int %retval
}
We now emit:
_bar:
.LBB_bar_0: ; entry
fcmpu cr0, f1, f4
fcmpu cr1, f2, f4
cror 0, 0, 4
fcmpu cr1, f3, f4
cror 28, 0, 5
mfcr r2
rlwinm r3, r2, 29, 31, 31
blr
Instead of:
_bar:
.LBB_bar_0: ; entry
fcmpu cr7, f1, f4
mfcr r2
rlwinm r2, r2, 29, 31, 31
fcmpu cr7, f2, f4
mfcr r3
rlwinm r3, r3, 29, 31, 31
or r2, r2, r3
fcmpu cr7, f3, f4
mfcr r3
rlwinm r3, r3, 30, 31, 31
or r3, r2, r3
blr
llvm-svn: 21321
2005-04-18 07:48:09 +00:00
Chris Lattner
ee84413730
silence a bogus warning
...
llvm-svn: 21320
2005-04-18 05:26:21 +00:00
Chris Lattner
b61ecb5875
Fold setcc of MVT::i1 operands into logical operations
...
llvm-svn: 21319
2005-04-18 04:48:12 +00:00
Chris Lattner
6d40fd01fe
Another minor simplification: handle setcc (zero_extend x), c -> setcc(x, c')
...
llvm-svn: 21318
2005-04-18 04:30:45 +00:00
Chris Lattner
868d473009
Another simple xform
...
llvm-svn: 21317
2005-04-18 04:11:19 +00:00
Chris Lattner
bd22d83d15
Fold:
...
// (X != 0) | (Y != 0) -> (X|Y != 0)
// (X == 0) & (Y == 0) -> (X|Y == 0)
Compiling this:
int %bar(int %a, int %b) {
entry:
%tmp.1 = setne int %a, 0
%tmp.2 = setne int %b, 0
%tmp.3 = or bool %tmp.1, %tmp.2
%retval = cast bool %tmp.3 to int
ret int %retval
}
to this:
_bar:
or r2, r3, r4
addic r3, r2, -1
subfe r3, r3, r2
blr
instead of:
_bar:
addic r2, r3, -1
subfe r2, r2, r3
addic r3, r4, -1
subfe r3, r3, r4
or r3, r2, r3
blr
llvm-svn: 21316
2005-04-18 03:59:53 +00:00
Chris Lattner
d929f8bcd3
Make the AND elimination operation recursive and significantly more powerful,
...
eliminating an and for Nate's testcase:
int %bar(int %a, int %b) {
entry:
%tmp.1 = setne int %a, 0
%tmp.2 = setne int %b, 0
%tmp.3 = or bool %tmp.1, %tmp.2
%retval = cast bool %tmp.3 to int
ret int %retval
}
generating:
_bar:
addic r2, r3, -1
subfe r2, r2, r3
addic r3, r4, -1
subfe r3, r3, r4
or r3, r2, r3
blr
instead of:
_bar:
addic r2, r3, -1
subfe r2, r2, r3
addic r3, r4, -1
subfe r3, r3, r4
or r2, r2, r3
rlwinm r3, r2, 0, 31, 31
blr
llvm-svn: 21315
2005-04-18 03:48:41 +00:00
Nate Begeman
602a45f415
Change codegen for setcc to read the bit directly out of the condition
...
register. Added support in the .td file for the g5-specific variant
of cr -> gpr moves that executes faster, but we currently don't
generate it.
llvm-svn: 21314
2005-04-18 02:43:24 +00:00
Chris Lattner
ed5189da51
Add support for targets that require stubs for external functions.
...
llvm-svn: 21313
2005-04-18 01:44:27 +00:00
Chris Lattner
f281f791b5
Handle ExternalSymbol operands in the PPC JIT
...
llvm-svn: 21312
2005-04-18 00:46:10 +00:00
Nate Begeman
f24225d4d7
Update dejagnu tests to use the new pattern isel flag
...
llvm-svn: 21311
2005-04-16 04:25:48 +00:00
Jeff Cohen
df4f480498
Add CondPropagate.cpp to VC++ Transforms project
...
llvm-svn: 21310
2005-04-16 02:51:44 +00:00
Nate Begeman
779c5cbb44
Make pattern isel default for ppc
...
Add new ppc beta option related to using condition registers
Make pattern isel control flag (-enable-pattern-isel) global and tristate
0 == off
1 == on
2 == target default
llvm-svn: 21309
2005-04-15 22:12:16 +00:00
Chris Lattner
e0a9d042e2
new pass
...
llvm-svn: 21307
2005-04-15 21:13:16 +00:00
Chris Lattner
16a50fd0a0
a new simple pass, which will be extended to be more useful in the future.
...
This pass forward branches through conditions when it can show that the
conditions is either always true or false for a predecessor. This currently
only handles the most simple cases of this, but is successful at threading
across 2489 branches and 65 switch instructions in 176.gcc, which isn't bad.
llvm-svn: 21306
2005-04-15 19:28:32 +00:00
Chris Lattner
d041242256
add a new prototype
...
llvm-svn: 21305
2005-04-15 19:24:49 +00:00
Chris Lattner
8579c2c474
new testcase
...
llvm-svn: 21304
2005-04-15 19:24:36 +00:00
Andrew Lenharth
00ce283b3f
fix calls
...
llvm-svn: 21303
2005-04-14 17:34:20 +00:00
Andrew Lenharth
7ae3aba5aa
a 21264 fix, and fix the operator precidence on an and -> zap check (should fix hundreds of test cases
...
llvm-svn: 21302
2005-04-14 16:24:00 +00:00
Andrew Lenharth
10b7bceb8e
added a random and mask test
...
llvm-svn: 21301
2005-04-14 16:17:49 +00:00
Duraid Madina
0a7c2b9078
print negative 64 bit immediates as negative numbers, makes things a little
...
easier on the eyes, not that numbers like 18446744073709541376 are bad or
anything
llvm-svn: 21300
2005-04-14 10:08:01 +00:00
Duraid Madina
dfbbcc098b
oops, this stopped us turning movl r4=0xFFFFFFFF;; and rX, r4 into zxt4
...
llvm-svn: 21299
2005-04-14 10:06:35 +00:00
Nate Begeman
53d3eccbe2
Implement multi-way branches through logical ops on condition registers.
...
This can generate considerably shorter code, reducing the size of crafty
by almost 1%. Also fix the printing of mcrf. The code is currently
disabled until it gets a bit more testing, but should work as-is.
llvm-svn: 21298
2005-04-14 09:45:08 +00:00
Nate Begeman
80c095f422
Add a couple missing transforms in getSetCC that were triggering assertions
...
in the PPC Pattern ISel
llvm-svn: 21297
2005-04-14 08:56:52 +00:00
Duraid Madina
f6b666fb06
we have zextloads, not sextloads!
...
llvm-svn: 21296
2005-04-14 08:37:32 +00:00
Nate Begeman
65a82c562e
Add the necessary support to codegen condition register logical ops with
...
register allocated condition registers. Make sure that the printed
output is gas compatible.
llvm-svn: 21295
2005-04-14 03:20:38 +00:00
Nate Begeman
be21011911
Start allocating condition registers. Almost all explicit uses of CR0 are
...
now gone. Next step is to get rid of the remaining ones and then start
allocating bools to CRs where appropriate.
llvm-svn: 21294
2005-04-13 23:15:44 +00:00
Nate Begeman
dd1bb81d04
Implement the fold shift X, zext(Y) -> shift X, Y at the target level,
...
where it is safe to do so.
llvm-svn: 21293
2005-04-13 22:14:14 +00:00
Nate Begeman
04ae873648
Add CodeGen tests for the recent SelectionDAG transforms
...
llvm-svn: 21292
2005-04-13 21:45:13 +00:00
Nate Begeman
4ddd81657b
Disbale the broken fold of shift + sz[ext] for now
...
Move the transform for select (a < 0) ? b : 0 into the dag from ppc isel
Enable the dag to fold and (setcc, 1) -> setcc for targets where setcc
always produces zero or one.
llvm-svn: 21291
2005-04-13 21:23:31 +00:00
Chris Lattner
56d177a344
fix an infinite loop
...
llvm-svn: 21289
2005-04-13 20:06:29 +00:00
Chris Lattner
e3d17d8225
fix some serious miscompiles on ia64, alpha, and ppc
...
llvm-svn: 21288
2005-04-13 19:53:40 +00:00
Chris Lattner
8c3d409dc7
avoid work when possible, perhaps fix the problem nate and andrew are seeing
...
with != 0 comparisons vanishing.
llvm-svn: 21287
2005-04-13 19:41:05 +00:00
Andrew Lenharth
93341a0f82
WOW, function calls still seem to work after this.
...
llvm-svn: 21286
2005-04-13 17:17:28 +00:00
Andrew Lenharth
c3621316ee
prepare for func call optimization
...
llvm-svn: 21285
2005-04-13 16:19:50 +00:00
Andrew Lenharth
c2ff402c84
regression case for faster call sequence
...
llvm-svn: 21284
2005-04-13 16:16:01 +00:00
Andrew Lenharth
714dd6a0ec
check that casts still use zap
...
llvm-svn: 21283
2005-04-13 13:00:16 +00:00
Duraid Madina
2f2312575b
* add the shladd instruction
...
* fold left shifts of 1, 2, 3 or 4 bits into adds
This doesn't save much now, but should get a serious workout once
multiplies by constants get converted to shift/add/sub sequences.
Hold on! :)
llvm-svn: 21282
2005-04-13 06:12:04 +00:00
Andrew Lenharth
c7287c8eda
add matches for SxADDL and company, as well as simplify the SxADDQ code
...
llvm-svn: 21281
2005-04-13 05:19:55 +00:00
Chris Lattner
e69ad5fd12
Implement expansion of unsigned i64 -> FP.
...
Note that this probably only works for little endian targets, but is enough
to get siod working :)
llvm-svn: 21280
2005-04-13 05:09:42 +00:00
Duraid Madina
e7ef27bcfe
* if ANDing with a constant of the form:
...
0x00000..00FFF..FF
^ ^
^ ^
any number of
0's followed by
some number of
1's
then we use dep.z to just paste zeros over the input. For the special
cases where this is zxt1/zxt2/zxt4, we use those instructions instead,
because we're all about readability!!!
that's what it's about!! readability!
*twitch* ;D
llvm-svn: 21279
2005-04-13 04:50:54 +00:00
Andrew Lenharth
5cee4ef049
added s4addl matching test
...
llvm-svn: 21277
2005-04-13 04:41:06 +00:00
Andrew Lenharth
8eb82fb524
added all flavors of zap for anding
...
llvm-svn: 21276
2005-04-13 03:47:03 +00:00
Chris Lattner
0efd77eda7
Make expansion of uint->fp cast assert out instead of infinitely recurse.
...
llvm-svn: 21275
2005-04-13 03:42:14 +00:00
Chris Lattner
60c23bd169
Fix some mysteriously missing {}'s which cause the miscompilation of
...
Olden/mst, Ptrdist/bc, Obsequi, etc.
llvm-svn: 21274
2005-04-13 03:29:53 +00:00
Chris Lattner
b1f25ac188
add back the optimization that Nate added for shl X, (zext_inreg y)
...
llvm-svn: 21273
2005-04-13 02:58:13 +00:00
Chris Lattner
39844ac337
Oops, remove these too.
...
llvm-svn: 21272
2005-04-13 02:47:57 +00:00
Chris Lattner
e0efd1fa72
remove one more occurance of this that snuck in
...
llvm-svn: 21271
2005-04-13 02:46:17 +00:00
Chris Lattner
857624f47a
Remove support for ZERO_EXTEND_INREG. This pessimizes code, genering stuff
...
like this:
ldah $1,1($31)
lda $1,-1($1)
and $0,$1,$24
instead of this:
zap $0,252,$24
To get this back, the selector should recognize the ISD::AND case where this
happens and emit the appropriate ZAP instruction.
llvm-svn: 21270
2005-04-13 02:43:40 +00:00
Chris Lattner
7f4c4179a6
Remove special handling of ZERO_EXTEND_INREG. This pessimizes code, causing
...
things like this:
mov r9 = 65535;;
and r8 = r8, r9;;
To be emitted instead of:
zxt2 r8 = r8;;
To get this back, the selector for ISD::AND should recognize this case.
llvm-svn: 21269
2005-04-13 02:41:52 +00:00
Chris Lattner
83075510ee
Elimate handling of ZERO_EXTEND_INREG. This causes the PPC backend to emit
...
andi instructions instead of rlwinm instructions for zero extend, but they
seem like they would take the same time.
llvm-svn: 21268
2005-04-13 02:40:26 +00:00
Chris Lattner
248fe6bda2
Z_E_I is gone
...
llvm-svn: 21267
2005-04-13 02:39:05 +00:00
Chris Lattner
0e852afb4c
Instead of making ZERO_EXTEND_INREG nodes, use the helper method in
...
SelectionDAG to do the job with AND. Don't legalize Z_E_I anymore as
it is gone
llvm-svn: 21266
2005-04-13 02:38:47 +00:00
Chris Lattner
2b4e3fca38
Remove all foldings of ZERO_EXTEND_INREG, moving them to work for AND nodes
...
instead. OVerall, this increases the amount of folding we can do.
llvm-svn: 21265
2005-04-13 02:38:18 +00:00
Chris Lattner
50b63f7015
Add a new helper method which returns the and that is equivalent to what
...
ZERO_EXTEND_INREG was.
llvm-svn: 21264
2005-04-13 02:37:19 +00:00
Chris Lattner
71886d95d5
Remove the ZERO_EXTEND_INREG node which is redundant with AND
...
llvm-svn: 21263
2005-04-13 02:36:41 +00:00
Nate Begeman
ca916ba4a0
Fold shift x, [sz]ext(y) -> shift x, y
...
llvm-svn: 21262
2005-04-12 23:32:28 +00:00
Nate Begeman
af1c0f7a00
Fold shift by size larger than type size to undef
...
Make llvm undef values generate ISD::UNDEF nodes
llvm-svn: 21261
2005-04-12 23:12:17 +00:00
Nate Begeman
818eb6ddd2
Implement setcc op, -1 sequences
...
Remove dead setcc op, 0 sequences
Coming later: generalization of op, imm
llvm-svn: 21260
2005-04-12 21:22:28 +00:00
Chris Lattner
0b73a6d8bc
promote extload i1 -> extload i8
...
llvm-svn: 21258
2005-04-12 20:30:10 +00:00
Chris Lattner
9daef352e9
add an argument to allow avoiding deleting phi nodes.
...
llvm-svn: 21255
2005-04-12 18:52:14 +00:00
Chris Lattner
eb958b0e45
add an argument.
...
llvm-svn: 21254
2005-04-12 18:51:53 +00:00
Chris Lattner
95f16a3ac4
Get rid of this for_each loop
...
llvm-svn: 21253
2005-04-12 18:51:33 +00:00
Duraid Madina
fd469bddac
* OK, after changing to use liveIn/liveOut instead of IDEFs,
...
to avoid redundant mov out3=r44 type instructions, we need to
tell the register allocator the truth about out? registers.
FIXME: unfortunately, since the list of allocatable registers is immutable,
we can't simply 'delete r127' from the allocation order, say, if 'out0' is
used. The only correct thing we can do is have a linear order of regs:
out7, out6 ... out2, out1, out0, r32, r33, r34 ... r126, r127
and slide a 'window' of 96 registers along this line, depending on how many
of the out? regs a function actually uses. The only downside of this is
that the out? registers will be allocated _first_, which makes the
resulting assembly ugly. :( Note this in the README. Hope this gets fixed
soon. :) (note the 3rd person speech there)
llvm-svn: 21252
2005-04-12 18:42:59 +00:00
Andrew Lenharth
740f93ca10
Get rid of idefs for arguments (oops)
...
llvm-svn: 21251
2005-04-12 17:47:57 +00:00
Andrew Lenharth
10c6eb4be2
Get rid of idefs for arguments
...
llvm-svn: 21250
2005-04-12 17:35:16 +00:00
Chris Lattner
14f72885dd
Put out* into the allocation order, allowing the register allocator to
...
coallesce moves into outgoing args.
llvm-svn: 21249
2005-04-12 15:12:51 +00:00
Chris Lattner
6b91767b77
Make sure to realize that calls use their argument regs
...
llvm-svn: 21248
2005-04-12 15:12:19 +00:00
Duraid Madina
b6dfb227b7
stop emitting IDEFs for args - change to using liveIn/liveOut
...
llvm-svn: 21247
2005-04-12 14:54:44 +00:00
Nate Begeman
f67f3bf627
Initial support for allocation condition registers
...
llvm-svn: 21246
2005-04-12 07:04:16 +00:00
Chris Lattner
6febe5ef40
Fix a crash analyzing MultiSource/Benchmarks/MallocBench/gs
...
llvm-svn: 21245
2005-04-12 03:59:27 +00:00
Chris Lattner
af5b25f139
Remove some redundant checks, add a couple of new ones. This allows us to
...
compile this:
int foo (unsigned long a, unsigned long long g) {
return a >= g;
}
To:
foo:
movl 8(%esp), %eax
cmpl %eax, 4(%esp)
setae %al
cmpl $0, 12(%esp)
sete %cl
andb %al, %cl
movzbl %cl, %eax
ret
instead of:
foo:
movl 8(%esp), %eax
cmpl %eax, 4(%esp)
setae %al
movzbw %al, %cx
movl 12(%esp), %edx
cmpl $0, %edx
sete %al
movzbw %al, %ax
cmpl $0, %edx
cmove %cx, %ax
movzbl %al, %eax
ret
llvm-svn: 21244
2005-04-12 02:54:39 +00:00
Chris Lattner
aedcabe8db
Emit comparisons against the sign bit better. Codegen this:
...
bool %test1(long %X) {
%A = setlt long %X, 0
ret bool %A
}
like this:
test1:
cmpl $0, 8(%esp)
setl %al
movzbl %al, %eax
ret
instead of:
test1:
movl 8(%esp), %ecx
cmpl $0, %ecx
setl %al
movzbw %al, %ax
cmpl $0, 4(%esp)
setb %dl
movzbw %dl, %dx
cmpl $0, %ecx
cmove %dx, %ax
movzbl %al, %eax
ret
llvm-svn: 21243
2005-04-12 02:19:10 +00:00
Chris Lattner
71ff44e46c
Emit long comparison against -1 better. Instead of this (x86):
...
test2:
movl 8(%esp), %eax
notl %eax
movl 4(%esp), %ecx
notl %ecx
orl %eax, %ecx
cmpl $0, %ecx
sete %al
movzbl %al, %eax
ret
or this (PPC):
_test2:
nor r2, r4, r4
nor r3, r3, r3
or r2, r2, r3
cntlzw r2, r2
srwi r3, r2, 5
blr
Emit this:
test2:
movl 8(%esp), %eax
andl 4(%esp), %eax
cmpl $-1, %eax
sete %al
movzbl %al, %eax
ret
or this:
_test2:
.LBB_test2_0: ;
and r2, r4, r3
cmpwi cr0, r2, -1
li r3, 1
li r2, 0
beq .LBB_test2_2 ;
.LBB_test2_1: ;
or r3, r2, r2
.LBB_test2_2: ;
blr
it seems like the PPC isel could do better for R32 == -1 case.
llvm-svn: 21242
2005-04-12 01:46:05 +00:00
Chris Lattner
87bd69884a
canonicalize x <u 1 -> x == 0. On this testcase:
...
unsigned long long g;
unsigned long foo (unsigned long a) {
return (a >= g) ? 1 : 0;
}
It changes the ppc code from:
_foo:
.LBB_foo_0: ; entry
mflr r11
stw r11, 8(r1)
bl "L00000$pb"
"L00000$pb":
mflr r2
addis r2, r2, ha16(L_g$non_lazy_ptr-"L00000$pb")
lwz r2, lo16(L_g$non_lazy_ptr-"L00000$pb")(r2)
lwz r4, 0(r2)
lwz r2, 4(r2)
cmplw cr0, r3, r2
li r2, 1
li r3, 0
bge .LBB_foo_2 ; entry
.LBB_foo_1: ; entry
or r2, r3, r3
.LBB_foo_2: ; entry
cmplwi cr0, r4, 1
li r3, 1
li r5, 0
blt .LBB_foo_4 ; entry
.LBB_foo_3: ; entry
or r3, r5, r5
.LBB_foo_4: ; entry
cmpwi cr0, r4, 0
beq .LBB_foo_6 ; entry
.LBB_foo_5: ; entry
or r2, r3, r3
.LBB_foo_6: ; entry
rlwinm r3, r2, 0, 31, 31
lwz r11, 8(r1)
mtlr r11
blr
to:
_foo:
.LBB_foo_0: ; entry
mflr r11
stw r11, 8(r1)
bl "L00000$pb"
"L00000$pb":
mflr r2
addis r2, r2, ha16(L_g$non_lazy_ptr-"L00000$pb")
lwz r2, lo16(L_g$non_lazy_ptr-"L00000$pb")(r2)
lwz r4, 0(r2)
lwz r2, 4(r2)
cmplw cr0, r3, r2
li r2, 1
li r3, 0
bge .LBB_foo_2 ; entry
.LBB_foo_1: ; entry
or r2, r3, r3
.LBB_foo_2: ; entry
cntlzw r3, r4
srwi r3, r3, 5
cmpwi cr0, r4, 0
beq .LBB_foo_4 ; entry
.LBB_foo_3: ; entry
or r2, r3, r3
.LBB_foo_4: ; entry
rlwinm r3, r2, 0, 31, 31
lwz r11, 8(r1)
mtlr r11
blr
llvm-svn: 21241
2005-04-12 00:28:49 +00:00
Nate Begeman
79a3bea4ca
Implement bitfield clears
...
Implement divide by negative power of two
llvm-svn: 21240
2005-04-12 00:10:02 +00:00
Nate Begeman
08698cf644
Update PPC readme. Remove things that are done or aren't ppc specific
...
llvm-svn: 21232
2005-04-11 20:48:57 +00:00
Chris Lattner
8ffd004920
Teach the dag mechanism that this:
...
long long test2(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) + B;
}
is equivalent to this:
long long test1(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) | B;
}
Now they are both codegen'd to this on ppc:
_test2:
blr
or this on x86:
test2:
movl 4(%esp), %edx
movl 8(%esp), %eax
ret
llvm-svn: 21231
2005-04-11 20:29:59 +00:00
Chris Lattner
edd197062f
Fix expansion of shifts by exactly NVT bits on arch's (like X86) that have
...
masking shifts.
This fixes the miscompilation of this:
long long test1(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) | B;
}
into this:
test1:
movl 4(%esp), %edx
movl %edx, %eax
orl 8(%esp), %eax
ret
allowing us to generate this instead:
test1:
movl 4(%esp), %edx
movl 8(%esp), %eax
ret
llvm-svn: 21230
2005-04-11 20:08:52 +00:00
Chris Lattner
607bd26b38
IA64 supports this operation.
...
llvm-svn: 21228
2005-04-11 18:55:36 +00:00
Chris Lattner
67291ea580
ORo sets CR0
...
llvm-svn: 21227
2005-04-11 15:03:48 +00:00
Chris Lattner
f29cc88210
Revert the previous patch, which I didn't mean to check in.
...
llvm-svn: 21226
2005-04-11 15:03:41 +00:00
Chris Lattner
d3dc31009f
Fix a minor bug (ORo didn't mark that it set CR0).
...
Refactor how . instructions are handled. In particular, instead of passing
the RC flag all the way up the inheritance hierarchy, just make a new tblgen
class 'DOT' which can be added to an instruction definition.
For example, instead of this:
-def AND : XForm_6<31, 28, 0, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
-let Defs = [CR0] in
-def ANDo : XForm_6<31, 28, 1, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
- "and. $rA, $rS, $rB">;
We now have this:
+def AND : XForm_6<31, 28, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB),
"and $rA, $rS, $rB">;
llvm-svn: 21225
2005-04-11 15:01:39 +00:00
Duraid Madina
8de7ac092d
hmm, should probably change addImm() to take 64-bit arguments one day anyway.
...
llvm-svn: 21224
2005-04-11 07:16:39 +00:00
Duraid Madina
247def9c2b
rename addU64Imm() to addImm64()
...
llvm-svn: 21223
2005-04-11 07:14:41 +00:00
Nate Begeman
bebefac791
Add recording variants of ISD::AND and ISD::OR. This kills almost 1000
...
(1.5%) instructions in 186.crafty
llvm-svn: 21222
2005-04-11 06:34:10 +00:00
Duraid Madina
fb43ef78c5
assorted fixes:
...
* clean up immediates (we use 14, 22 and 64 bit immediates now. sane.)
* fold r0/f0/f1 registers into comparisons against 0/0.0/1.0
* fix nasty thinko - didn't use two-address form of conditional add
for extending bools to integers, so occasionally there would be
garbage in the result. it's amazing how often zeros are just
sitting around in registers ;) - this should fix a bunch of tests.
llvm-svn: 21221
2005-04-11 05:55:56 +00:00
Reid Spencer
7a763bfbc5
Ensure that the arguments passed to sys::Program::ExecuteAndWait include
...
the program name as the first argument. Thanks go to Markus Oberhumer for
noticing this problem.
llvm-svn: 21220
2005-04-11 05:48:04 +00:00
Jeff Cohen
a3b1458175
Eliminate tabs
...
llvm-svn: 21216
2005-04-11 03:44:22 +00:00
Jeff Cohen
ecbfa98ce7
Eliminate major source of VC++ "possible loss of data" warnings.
...
llvm-svn: 21215
2005-04-11 03:38:28 +00:00
Nate Begeman
add0c63ad2
Fix libcall code to not pass a NULL Chain to LowerCallTo
...
Fix libcall code to not crash or assert looking for an ADJCALLSTACKUP node
when it is known that there is no ADJCALLSTACKDOWN to match.
Expand i64 multiply when ISD::MULHU is legal for the target.
llvm-svn: 21214
2005-04-11 03:01:51 +00:00
Chris Lattner
e2427c9afc
Don't bother sign/zext_inreg'ing the result of an and operation if we know
...
the result does change as a result of the extend.
This improves codegen for Alpha on this testcase:
int %a(ushort* %i) {
%tmp.1 = load ushort* %i
%tmp.2 = cast ushort %tmp.1 to int
%tmp.4 = and int %tmp.2, 1
ret int %tmp.4
}
Generating:
a:
ldgp $29, 0($27)
ldwu $0,0($16)
and $0,1,$0
ret $31,($26),1
instead of:
a:
ldgp $29, 0($27)
ldwu $0,0($16)
and $0,1,$0
addl $0,0,$0
ret $31,($26),1
btw, alpha really should switch to livein/outs for args :)
llvm-svn: 21213
2005-04-10 23:37:16 +00:00
Chris Lattner
a3b7ef05f4
Teach legalize to deal with targets that don't support some SEXTLOAD/ZEXTLOADs
...
llvm-svn: 21212
2005-04-10 22:54:25 +00:00
Chris Lattner
672fe7267b
The first argument to ExecuteAndWait should be the program name, but pointed
...
out by Markus F.X.J. Oberhumer.
llvm-svn: 21211
2005-04-10 20:59:38 +00:00
Chris Lattner
751cc5f49f
fix this testcase so the regex doesn't match the function name
...
llvm-svn: 21210
2005-04-10 20:45:35 +00:00
Chris Lattner
391a351ede
don't zextload fp values!
...
llvm-svn: 21209
2005-04-10 17:40:35 +00:00
Duraid Madina
7b0287b78d
* store immediate values as int64_t, not int. come on, we should be happy
...
when there are immediates, let's not worry about the memory overhead of
this :)
* add addU64Imm(uint64_t val) to machineinstrbuilder
(seriously: this seems required to support 64-bit immediates cleanly. if it
_really_ gets on your nerves, feel free to pull it out ;) )
coming up next week: "all your floating point constants are belong to us"
llvm-svn: 21208
2005-04-10 09:18:55 +00:00
Nate Begeman
492370311d
Fix another fixme: factor out the constant fp generation code.
...
llvm-svn: 21207
2005-04-10 06:06:10 +00:00
Nate Begeman
941a01802f
Fix 64 bit argument loading that straddles the args in regs / args on stack
...
boundary.
llvm-svn: 21206
2005-04-10 05:53:14 +00:00
Chris Lattner
c53cd501b5
Until we have a dag combiner, promote using zextload's instead of extloads.
...
This gives the optimizer a bit of information about the top-part of the
value.
llvm-svn: 21205
2005-04-10 04:33:47 +00:00
Chris Lattner
f74c794ccf
Fold zext_inreg(zextload), likewise for sext's
...
llvm-svn: 21204
2005-04-10 04:33:08 +00:00
Chris Lattner
f2bff92411
add a simple xform
...
llvm-svn: 21203
2005-04-10 04:04:49 +00:00
Nate Begeman
b076731713
Remove unnecessary Implicit Defs. Since r0 is not in allocation, we do not
...
have to inform the register allocator it might be stepped on.
llvm-svn: 21202
2005-04-10 03:59:42 +00:00
Chris Lattner
2de306ba83
make this harder
...
llvm-svn: 21201
2005-04-10 03:18:18 +00:00
Chris Lattner
d65632a9ca
oops add ~
...
llvm-svn: 21200
2005-04-10 03:07:25 +00:00
Chris Lattner
38b1ae75fc
new testcase for previously unsupported unary complex operators
...
llvm-svn: 21199
2005-04-10 03:06:27 +00:00
Nate Begeman
6566e8ac06
Make sure that BRCOND branches can be converted into long branches too.
...
llvm-svn: 21198
2005-04-10 01:48:29 +00:00
Nate Begeman
3345eadc37
Don't hand ISD::CALL nodes off to SelectExprFP. This fixes siod.
...
llvm-svn: 21197
2005-04-10 01:14:13 +00:00
Chris Lattner
d8cbfe82ba
Fix a thinko. If the operand is promoted, pass the promoted value into
...
the new zero extend, not the original operand. This fixes cast bool -> long
on ppc.
Add an unrelated fixme
llvm-svn: 21196
2005-04-10 01:13:15 +00:00
Chris Lattner
9ff4b4190f
rename getPPCOpcodeForSetCCNumber -> getPPCOpcodeForSetCCOpode to be more
...
correct. Remove the EmitComparison retvalue, as it is always the first arg.
Fix a place where we incorrectly passed in the setcc opcode instead of the
setcc number, causing us to miscompile crafty. Crafty now works!
llvm-svn: 21195
2005-04-10 01:03:31 +00:00
Nate Begeman
2121a54868
fix ISD::BRCONDTWOWAY codegen to not deference the end() iterator
...
llvm-svn: 21193
2005-04-09 23:35:05 +00:00
Chris Lattner
228fed92e6
Fix CodeGen/Generic/2005-05-09-GlobalInPHI.ll, which was reduced from 254.gap.
...
This caused the "use before a def" assertion on some programs.
With this patch, 254.gap now passes with the PPC backend.
llvm-svn: 21191
2005-04-09 22:05:17 +00:00
Chris Lattner
db32a632c9
new testcase that used to crash the ppc fe. It could effect any simpleisel
...
that is not careful, so I'm checking it into the generic tests.
llvm-svn: 21190
2005-04-09 22:03:10 +00:00
Chris Lattner
da504741da
add a little peephole optimization. This allows us to codegen:
...
int a(short i) {
return i & 1;
}
as
_a:
andi. r3, r3, 1
blr
instead of:
_a:
rlwinm r2, r3, 0, 16, 31
andi. r3, r2, 1
blr
on ppc. It should also help the other risc targets.
llvm-svn: 21189
2005-04-09 21:43:54 +00:00
Chris Lattner
e8e070dbfb
do not set the root to null if an argument is dead
...
llvm-svn: 21188
2005-04-09 21:23:24 +00:00
Nate Begeman
8309a333dd
Add rlwnm instruction for variable rotate
...
Generate rotate left/right immediate
Generate code for brcondtwoway
Use new livein/liveout functionality
llvm-svn: 21187
2005-04-09 20:09:12 +00:00
Chris Lattner
3a7f5768c5
Fix a crash on 173.applu by asking for a constant bigger than 32-bits.
...
llvm-svn: 21185
2005-04-09 19:47:21 +00:00
Chris Lattner
a55a5f2580
Switch this instruction selector over to using liveins and liveouts, eliminating
...
implicit defs on entry to the function. yaay :)
llvm-svn: 21184
2005-04-09 16:32:30 +00:00
Chris Lattner
1a44855f8f
there is no need to remove this instruction, linscan does it already as it
...
removes noop moves.
llvm-svn: 21183
2005-04-09 16:24:20 +00:00
Chris Lattner
0b1681bce1
Adjust live intervals to support a livein set
...
llvm-svn: 21182
2005-04-09 16:17:50 +00:00
Chris Lattner
b59006c4a1
Use live out sets for return values instead of imp_defs, which is cleaner and faster.
...
llvm-svn: 21181
2005-04-09 15:23:56 +00:00
Chris Lattner
4c6ab01a20
Consider the livein/out set for a function, allowing targets to not have to
...
use ugly imp_def/imp_uses for arguments and return values.
llvm-svn: 21180
2005-04-09 15:23:25 +00:00
Chris Lattner
576db37185
add routines to track the livein/out set for a function
...
llvm-svn: 21179
2005-04-09 15:22:53 +00:00
Duraid Madina
46aa06cfed
ok, the "ia64 has a boatload of registers" joke stopped being funny today ;)
...
* fix overallocation of integer (stacked) registers: we can't allocate
registers for local use if they are required as output registers
this fixes 'toast' in the test suite, and all sorts of larger programs
like bzip2 etc.
llvm-svn: 21178
2005-04-09 11:53:00 +00:00
Nate Begeman
2f64122319
Optimize FSEL a bit for fneg arguments. This fixes the recently added test
...
case so that we emit
_test_fneg_sel:
.LBB_test_fneg_sel_0: ;
fsel f1, f1, f3, f2
blr
instead of:
_test_fneg_sel:
.LBB_test_fneg_sel_0: ;
fneg f0, f1
fneg f0, f0
fsel f1, f0, f3, f2
blr
llvm-svn: 21177
2005-04-09 09:33:07 +00:00
Nate Begeman
7d3e44fb12
Add a testcase to make sure that we don't emit two fneg instructions back
...
to back for certain fsel instructions.
llvm-svn: 21176
2005-04-09 09:30:09 +00:00
Nate Begeman
968e44a900
Add cases to cover the rest of the patterns we should be matching
...
llvm-svn: 21175
2005-04-09 08:29:59 +00:00
Chris Lattner
888c5fdcc2
Fix CodeGen/SparcV9/2005-05-09-GEP-Crash.ll a crash on some specfp program
...
lets hope this doesn't break other programs with induced entropy
llvm-svn: 21174
2005-04-09 06:27:14 +00:00
Chris Lattner
3aa6ec0dda
New testcase that the sparc backend crashes on
...
llvm-svn: 21173
2005-04-09 06:26:27 +00:00
Chris Lattner
6a31b878f8
recognize some patterns as fabs operations, so that fabs at the source level
...
is deconstructed then reconstructed here. This catches 19 fabs's in 177.mesa
9 in 168.wupwise, 5 in 171.swim, 3 in 172.mgrid, and 14 in 173.applu out of
specfp2000.
This allows the X86 code generator to make MUCH better code than before for
each of these and saves one instr on ppc.
This depends on the previous CFE patch to expose these correctly.
llvm-svn: 21171
2005-04-09 05:15:53 +00:00
Chris Lattner
d9748bcae5
make this test more interesting
...
llvm-svn: 21170
2005-04-09 04:55:14 +00:00
Chris Lattner
ec90861662
add a test for fnabs
...
llvm-svn: 21169
2005-04-09 04:03:16 +00:00
Chris Lattner
b9a11b8b7f
add a partial test for the fma operations that ppc supports. I'm sure I'm
...
missing some and not all of these match yet, but I'm sure that Nate will
clean up my mess :)
llvm-svn: 21168
2005-04-09 04:01:32 +00:00
Chris Lattner
8a98c7f337
Emit BRCONDTWOWAY when possible.
...
llvm-svn: 21167
2005-04-09 03:30:29 +00:00
Chris Lattner
fd98678a8a
Legalize BRCONDTWOWAY into a BRCOND/BR pair if a target doesn't support it.
...
llvm-svn: 21166
2005-04-09 03:30:19 +00:00
Chris Lattner
b0713c74a2
print and fold BRCONDTWOWAY correctly
...
llvm-svn: 21165
2005-04-09 03:27:28 +00:00
Chris Lattner
a3a135a9f7
This target does not support/want ISD::BRCONDTWOWAY
...
llvm-svn: 21164
2005-04-09 03:22:37 +00:00
Chris Lattner
4f77badaa3
This target does not yet support ISD::BRCONDTWOWAY
...
llvm-svn: 21163
2005-04-09 03:22:30 +00:00
Chris Lattner
4b1323e846
Add a new node
...
llvm-svn: 21162
2005-04-09 03:21:50 +00:00
Nate Begeman
e8ce0cda40
64b: Expand S/UREM
...
32b: No longer pattern match fneg(fsub(fmul)) as fnmsub
Pattern match fsub a, mul(b, c) as fnmsub
Pattern match fadd a, mul(b, c) as fmadd
Those changes speed up hydro2d by 2.5%, distray by 6%, and scimark by 8%
llvm-svn: 21161
2005-04-09 03:05:51 +00:00
Chris Lattner
0ea81f9db4
canonicalize a bunch of operations involving fneg
...
llvm-svn: 21160
2005-04-09 03:02:46 +00:00
Nate Begeman
f50b597f67
Fix 64b shifts
...
llvm-svn: 21159
2005-04-08 23:45:01 +00:00
Chris Lattner
61b6f04ae9
fix this method for 64-bit constants
...
llvm-svn: 21158
2005-04-08 21:31:29 +00:00
Nate Begeman
705d3c18e8
Match Mac OS X 64 bit calling conventions
...
llvm-svn: 21157
2005-04-08 21:26:05 +00:00
Andrew Lenharth
de5aed3f12
collect a few statistics, factor constants (constant loading and mult), fix logic operation pattern matchs, supress FP div when int dividing by a constant
...
llvm-svn: 21156
2005-04-08 17:28:49 +00:00
Andrew Lenharth
ce9e043c78
oops
...
llvm-svn: 21155
2005-04-08 16:55:15 +00:00
Andrew Lenharth
2e184e2522
added some tests to check stupid pattern matching mistakes
...
llvm-svn: 21154
2005-04-08 16:46:44 +00:00
Duraid Madina
41ff502549
fix bogus division-by-power-of-2 (was wrong for negative input, adds extr insn)
...
fix hack in division (clean up frcpa instruction)
llvm-svn: 21153
2005-04-08 10:01:48 +00:00
Chris Lattner
4236261930
Fix bug: InstCombine/2005-05-07-UDivSelectCrash.ll
...
llvm-svn: 21152
2005-04-08 04:03:26 +00:00
Chris Lattner
9e2b5fc65a
new testcase that crashes the instcombiner.
...
llvm-svn: 21151
2005-04-08 03:58:21 +00:00
Nate Begeman
b1f66d1af2
Optimized code sequences for setcc reg, 0
...
Optimized code sequence for (a < 0) ? b : 0
llvm-svn: 21150
2005-04-07 20:30:01 +00:00
Andrew Lenharth
534eebb317
Alpha zero extends setcc results
...
llvm-svn: 21149
2005-04-07 20:11:32 +00:00
Chris Lattner
b32d9318d2
If a target zero or sign extends the result of its setcc, allow folding of
...
this into sign/zero extension instructions later.
On PPC, for example, this testcase:
%G = external global sbyte
implementation
void %test(int %X, int %Y) {
%C = setlt int %X, %Y
%D = cast bool %C to sbyte
store sbyte %D, sbyte* %G
ret void
}
Now codegens to:
cmpw cr0, r3, r4
li r3, 1
li r4, 0
blt .LBB_test_2 ;
.LBB_test_1: ;
or r3, r4, r4
.LBB_test_2: ;
addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb")
lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2)
stb r3, 0(r2)
instead of:
cmpw cr0, r3, r4
li r3, 1
li r4, 0
blt .LBB_test_2 ;
.LBB_test_1: ;
or r3, r4, r4
.LBB_test_2: ;
*** rlwinm r3, r3, 0, 31, 31
addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb")
lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2)
stb r3, 0(r2)
llvm-svn: 21148
2005-04-07 19:43:53 +00:00
Chris Lattner
532ac79122
PowerPC zero extends setcc results
...
llvm-svn: 21147
2005-04-07 19:41:49 +00:00
Chris Lattner
38fd97084b
X86 zero extends setcc results
...
llvm-svn: 21146
2005-04-07 19:41:46 +00:00
Chris Lattner
693e797be9
Allow targets which produce setcc results in non-MVT::i1 registers to describe
...
what the contents of the top bits of these registers are, in the common cases
of targets that sign and zero extend the results.
llvm-svn: 21145
2005-04-07 19:41:18 +00:00
Chris Lattner
dfed7355c9
Remove somethign I had for testing
...
llvm-svn: 21144
2005-04-07 18:58:54 +00:00
Andrew Lenharth
9807ac5d3c
fix a small optimization opertunity and make gcc happy
...
llvm-svn: 21143
2005-04-07 18:15:28 +00:00
Chris Lattner
6b03a0cba1
This patch does two things. First, it canonicalizes 'X >= C' -> 'X > C-1'
...
(likewise for <= >=u >=u).
Second, it implements a special case hack to turn 'X gtu SINTMAX' -> 'X lt 0'
On powerpc, for example, this changes this:
lis r2, 32767
ori r2, r2, 65535
cmplw cr0, r3, r2
bgt .LBB_test_2
into:
cmpwi cr0, r3, 0
blt .LBB_test_2
llvm-svn: 21142
2005-04-07 18:14:58 +00:00
Andrew Lenharth
31f5e2f73f
match case change in codegen
...
llvm-svn: 21141
2005-04-07 17:47:00 +00:00
Andrew Lenharth
6b492bec30
fixup magic constant making code. tested by thousands of random divisions.... by 10000. ok, so random divisors would be good too, but this at least fixes some things
...
llvm-svn: 21140
2005-04-07 17:19:16 +00:00
Andrew Lenharth
d2da7177f2
lowercase instructions, makes diff happier
...
llvm-svn: 21139
2005-04-07 17:17:48 +00:00
Chris Lattner
4706046e68
Implement the following xforms:
...
(X-Y)-X --> -Y
A + (B - A) --> B
(B - A) + A --> B
llvm-svn: 21138
2005-04-07 17:14:51 +00:00
Chris Lattner
679c1119e8
new test
...
llvm-svn: 21137
2005-04-07 16:41:45 +00:00
Chris Lattner
c7f3c1a00e
Implement InstCombine/add.ll:test28, transforming C1-(X+C2) --> (C1-C2)-X.
...
This occurs several dozen times in specint2k, particularly in crafty and gcc
apparently.
llvm-svn: 21136
2005-04-07 16:28:01 +00:00
Chris Lattner
dd83183c1e
new testcase
...
llvm-svn: 21135
2005-04-07 16:24:59 +00:00
Chris Lattner
a9be4490d8
Transform X-(X+Y) == -Y and X-(Y+X) == -Y
...
llvm-svn: 21134
2005-04-07 16:15:25 +00:00
Andrew Lenharth
05e51d92e0
It wasn't happy about this either
...
llvm-svn: 21133
2005-04-07 14:18:13 +00:00
Andrew Lenharth
85f34a5682
Yea, it wasn't happy
...
llvm-svn: 21132
2005-04-07 13:55:53 +00:00
Duraid Madina
a7abda3989
teach asmprinter to print s8/s14 operands
...
llvm-svn: 21131
2005-04-07 12:34:36 +00:00
Duraid Madina
8419da8acf
codegen immediate forms of add/sub/shift
...
llvm-svn: 21130
2005-04-07 12:33:38 +00:00
Duraid Madina
b484f7c55e
add immediate forms of add, sub, shift
...
llvm-svn: 21129
2005-04-07 12:32:24 +00:00
Chris Lattner
7d13eae254
Fix a really scary bug that Nate found where we weren't deleting the right
...
elements auto of the autoCSE maps.
llvm-svn: 21128
2005-04-07 00:30:13 +00:00
Nate Begeman
d20628ff7d
Pattern match bitfield insert, which helps shift long by immediate, among
...
other things.
llvm-svn: 21127
2005-04-06 23:51:40 +00:00
Nate Begeman
505f6b760d
Fix some shift bugs
...
llvm-svn: 21126
2005-04-06 22:42:08 +00:00
Alkis Evlogimenos
7ca0947274
Make these 64 bit constants so that this compiles on x86-32 as well.
...
llvm-svn: 21125
2005-04-06 22:09:40 +00:00
Andrew Lenharth
3ea17c6cfe
added sdiv by 2^k and works for neg divisors also
...
llvm-svn: 21124
2005-04-06 22:03:13 +00:00
Chris Lattner
747eee2707
Don't make this require loopsimplify. It works BETTER with loop simplify
...
but should not require it.
llvm-svn: 21123
2005-04-06 21:45:00 +00:00
Nate Begeman
b067492535
Teach ExpandShift how to handle shifts by a constant. This allows targets
...
like PowerPC to codegen long shifts in many fewer instructions.
llvm-svn: 21122
2005-04-06 21:13:14 +00:00
Andrew Lenharth
df3256aa7f
fix copy/paste errors, and add imm support to SxADDQ and SxSUBQ
...
llvm-svn: 21121
2005-04-06 20:59:59 +00:00
Chris Lattner
bd32728a98
Fix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not
...
properly sign extending the top of the result of a 64-bit shift right by
a constant > 32.
llvm-svn: 21120
2005-04-06 20:59:35 +00:00
Andrew Lenharth
249bf7bee4
simplified
...
llvm-svn: 21119
2005-04-06 20:59:03 +00:00
Andrew Lenharth
99edcfe3f8
added first alpha codegen regression test
...
llvm-svn: 21117
2005-04-06 20:39:17 +00:00
Andrew Lenharth
1d4747c302
Added Nate's div by constant stuff, also scaled operations!
...
llvm-svn: 21116
2005-04-06 20:25:34 +00:00
Chris Lattner
70b8b96d6c
Fix a namespace issue, reported by Vladimir Merzliakov!
...
llvm-svn: 21115
2005-04-06 19:45:39 +00:00
Duraid Madina
c36b6c3b1a
steal sampo's div-by-constant-power-of-2 stuff
...
thanks sampo!!
llvm-svn: 21113
2005-04-06 09:55:17 +00:00
Duraid Madina
03c530786c
add fms instruction
...
llvm-svn: 21112
2005-04-06 09:54:09 +00:00
Nate Begeman
39ef2f1d43
Fixed version of optimized integer divide is now fixed. Calculate the
...
quotient, not the remainder. Also, make sure to remove the old div operand
from the ExprMap and let SelectExpr insert the new one.
llvm-svn: 21111
2005-04-06 06:44:57 +00:00
Duraid Madina
c0e9adf3cc
lie a bit and say that r1/r12 (GP/SP) _aren't_ callee-save, as we take
...
care of this ourselves
llvm-svn: 21110
2005-04-06 06:18:36 +00:00
Duraid Madina
df0ecbd4cc
make sure 'special' registers don't get allocated
...
llvm-svn: 21109
2005-04-06 06:17:54 +00:00
Chris Lattner
9953d17a44
document these nodes, as they are nonobvious
...
llvm-svn: 21108
2005-04-06 04:21:29 +00:00
Chris Lattner
4fbb4af5d1
Add (untested) support for MULHS and MULHU.
...
llvm-svn: 21107
2005-04-06 04:21:07 +00:00
Chris Lattner
c21db6b15c
add signed versions of the extra precision multiplies
...
llvm-svn: 21106
2005-04-06 04:19:22 +00:00
Nate Begeman
dd397119b0
Turn off the div -> mul optimization until it works correctly 100% of the
...
time.
llvm-svn: 21105
2005-04-06 03:36:33 +00:00
Nate Begeman
4164c4baac
Add support for MULHS and MULHU nodes
...
Have LegalizeDAG handle SREM and UREM for us
Codegen SDIV and UDIV by constant as a multiply by magic constant instead
of integer divide, which is very slow.
llvm-svn: 21104
2005-04-06 00:25:27 +00:00
Nate Begeman
20b7d2a36f
Expand SREM and UREM for targets that claim not to have them, like PowerPC
...
llvm-svn: 21103
2005-04-06 00:23:54 +00:00
Nate Begeman
55e8625c69
Add MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
...
multiply.
llvm-svn: 21102
2005-04-05 22:36:56 +00:00
Andrew Lenharth
43f78bc2da
added lowerargs support for varargs
...
llvm-svn: 21101
2005-04-05 20:51:46 +00:00
Nate Begeman
524417357c
Behold, rlwinm with certain immediate arguments is printed as the much more
...
readable slwi or srwi (shift left/right word immediate).
llvm-svn: 21099
2005-04-05 18:19:50 +00:00
Nate Begeman
a188b698a2
Fix cut & paste errors (32->64), and codegen float->int more optimally.
...
llvm-svn: 21098
2005-04-05 17:32:30 +00:00
Tanya Lattner
8d64e9a90d
Updated to use dep analyzer.
...
llvm-svn: 21097
2005-04-05 16:36:44 +00:00
Nate Begeman
9203e169a7
Remove 64 bit simple ISel, it never worked correctly
...
Add initial (buggy) implementation of 64 bit pattern ISel
llvm-svn: 21096
2005-04-05 08:51:15 +00:00
Nate Begeman
4bde071216
Back out the previous change to SelectBranchCC, since there are cases it
...
could miscompile. A correct solution will be found in the near future.
llvm-svn: 21095
2005-04-05 04:32:16 +00:00
Nate Begeman
9049e4beec
Rename canUseAsImmediateForOpcode to getImmediateForOpcode to better
...
indicate that it is not a boolean function.
Properly emit the pseudo instruction for conditional branch, so that we
can fix up conditional branches whose displacements are too large.
Reserve the right amount of opcode space for said pseudo instructions.
llvm-svn: 21094
2005-04-05 04:22:58 +00:00
Chris Lattner
7e0a534cba
do not crash when using -debug
...
llvm-svn: 21092
2005-04-05 01:12:03 +00:00
Nate Begeman
d6933f5078
Implement SDIV by power of 2 as srawi/addze rather than load imm, divw
...
llvm-svn: 21091
2005-04-05 00:15:08 +00:00
Nate Begeman
1d5d767a09
Pattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-sub
...
llvm-svn: 21090
2005-04-04 23:40:36 +00:00
Nate Begeman
d96350095c
Add support for multiply-add, multiply-sub, and their negated versions
...
llvm-svn: 21089
2005-04-04 23:01:51 +00:00
Chris Lattner
b919b21777
do not dereference an extra layer of pointers to determine if an external
...
call can modify a memory location. This fixes
test/Regression/Analysis/Andersens/modreftest.ll
llvm-svn: 21088
2005-04-04 22:23:21 +00:00
Chris Lattner
0933766e2b
new testcase
...
llvm-svn: 21087
2005-04-04 22:22:30 +00:00
Nate Begeman
1194531057
Make sure that arg regs used by the call instruction are marked as such, so
...
that regalloc doesn't cleverly reuse early arg regs loading later arg regs.
This fixes almost all outstanding failures in the pattern isel.
llvm-svn: 21086
2005-04-04 22:17:48 +00:00
Nate Begeman
c7186025de
Remove unnecessary register copy now that regalloc is fixed
...
llvm-svn: 21085
2005-04-04 21:48:13 +00:00
Chris Lattner
6a6056e93d
Make sure to notice that explicit physregs are used in the function
...
llvm-svn: 21084
2005-04-04 21:35:34 +00:00
Nate Begeman
d753765460
i1 loads should also be from the low byte of the argument word.
...
llvm-svn: 21077
2005-04-04 09:09:00 +00:00
Nate Begeman
1ce4839890
Fix i64 return, fix CopyFromReg
...
llvm-svn: 21076
2005-04-04 06:52:38 +00:00
Duraid Madina
9935f44fb8
fix SREM/UREM, which gave incorrect results for x%y if x was zero. This is
...
an ugly hack, but it seems to work. I should fix this properly and add a test
as well.
fixes multisource/obsequi (maybe others)
llvm-svn: 21075
2005-04-04 05:05:52 +00:00
Duraid Madina
dbc810022b
add implicit use op
...
llvm-svn: 21074
2005-04-04 04:50:57 +00:00
Nate Begeman
cc00a7c42d
Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
...
you have something like i16 = truncate i64. This fixes Regression/C/casts
llvm-svn: 21073
2005-04-04 00:57:08 +00:00
Chris Lattner
4784489de2
Fix sign_extend and zero_extend of promoted value types to expanded value
...
types. This occurs when casting short to long on PPC for example.
llvm-svn: 21072
2005-04-03 23:41:52 +00:00
Nate Begeman
629cdaea39
Full varargs support. All of UnitTests now passes
...
llvm-svn: 21070
2005-04-03 23:11:17 +00:00
Nate Begeman
7a3e929efc
Pass the correct value for the chain to the store
...
llvm-svn: 21066
2005-04-03 22:22:56 +00:00
Nate Begeman
f6dc43bd46
Fix SHL_PARTS
...
Start implementation of integer varargs
llvm-svn: 21065
2005-04-03 22:13:27 +00:00
Andrew Lenharth
79e727e8a7
is this simpler? I think it is simpler.
...
llvm-svn: 21064
2005-04-03 20:35:21 +00:00
Andrew Lenharth
7ce5740de9
fix 101 regressions
...
llvm-svn: 21063
2005-04-03 18:24:50 +00:00
Duraid Madina
2f472ecb11
a wise man once said:
...
"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"
llvm-svn: 21062
2005-04-03 14:57:35 +00:00
Duraid Madina
6c9afaead4
.bss is no problem here.
...
llvm-svn: 21061
2005-04-03 14:52:01 +00:00
Nate Begeman
34cc5b329f
Keeping up with the Joneses.
...
Implement not, nor, nand, and eqv
llvm-svn: 21060
2005-04-03 11:20:20 +00:00
Andrew Lenharth
46897ab49e
Select optimization
...
llvm-svn: 21051
2005-04-02 22:32:39 +00:00
Andrew Lenharth
f029d795f0
Try several things. 1) drop /i from FP ops 2) factor out FP to Int moves and provide 21264 support for those 3) match not 4) match ornot andnot xornot
...
llvm-svn: 21046
2005-04-02 21:06:51 +00:00
Chris Lattner
d2df8ca403
fix some VC compilation problems, thanks to Jeff C for pointing this out!
...
llvm-svn: 21044
2005-04-02 20:17:09 +00:00
Chris Lattner
a7913e66e1
EquivClassGraphs is now in DataStructure.h
...
llvm-svn: 21042
2005-04-02 20:08:17 +00:00
Chris Lattner
745c960672
merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
...
llvm-svn: 21041
2005-04-02 20:08:06 +00:00
Chris Lattner
526cc17b55
use a callee_iterator typedef.
...
llvm-svn: 21038
2005-04-02 20:02:41 +00:00
Chris Lattner
63e3a262d8
add and use a callee_iterator typedef
...
llvm-svn: 21037
2005-04-02 20:02:32 +00:00
Chris Lattner
990ed1d201
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.
llvm-svn: 21031
2005-04-02 19:17:18 +00:00
Chris Lattner
637e42022f
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
llvm-svn: 21030
2005-04-02 19:15:15 +00:00
Andrew Lenharth
e7ae400bc8
FNEG/FABS/UNDEF
...
llvm-svn: 21029
2005-04-02 19:11:07 +00:00
Andrew Lenharth
7ad3697e1e
FNEG/FABS
...
llvm-svn: 21028
2005-04-02 19:04:58 +00:00
Chris Lattner
04e0515937
this has now been fixed
...
llvm-svn: 21026
2005-04-02 16:17:57 +00:00
Duraid Madina
50b339b7fa
ia64 asmprinter fixes:
...
- turn off assembler's autoalignment
- set FunctionAddrPrefix/Suffix so that .data8 entries pointing to
functions have their value wrapped in @fptr(), so that a function
descriptor will be materialized for that function.
llvm-svn: 21025
2005-04-02 12:30:47 +00:00
Duraid Madina
73a316d712
add support for prefix/suffix strings to go around GlobalValue(s)
...
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:
data8.ua @fptr(blah__blah__mangled_function_name)
(by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")
llvm-svn: 21024
2005-04-02 12:21:51 +00:00
Duraid Madina
c935c833d1
support IDEF, fnegabs (thanks sampo)
...
llvm-svn: 21023
2005-04-02 10:33:53 +00:00
Duraid Madina
0ccac38ed3
add fnegabs op
...
llvm-svn: 21022
2005-04-02 10:06:27 +00:00
Nate Begeman
165cf4844e
Set shift amount to Extend
...
Implement ISD::FABS and ISD::FNEG nodes
Implement SHL_PARTS, SRL_PARTS, and SRA_PARTS
Generate PowerPC 'fneg', 'fabs', and 'fnabs' instructions
llvm-svn: 21018
2005-04-02 05:59:34 +00:00
Chris Lattner
1d7052fad5
don't forget to use the right code generator :)
...
llvm-svn: 21017
2005-04-02 05:40:03 +00:00
Chris Lattner
b4e122c59f
new testcase
...
llvm-svn: 21016
2005-04-02 05:35:00 +00:00
Chris Lattner
0e0b599d29
add support for FABS and FNEG
...
llvm-svn: 21015
2005-04-02 05:30:17 +00:00
Chris Lattner
0c14000760
transform fabs/fabsf calls into FABS nodes.
...
llvm-svn: 21014
2005-04-02 05:26:53 +00:00
Chris Lattner
a0c72cf289
Expand fabs into fneg
...
llvm-svn: 21013
2005-04-02 05:26:37 +00:00
Duraid Madina
0720dc14ed
add support FNEG and FABS
...
llvm-svn: 21012
2005-04-02 05:18:38 +00:00
Chris Lattner
f68fd0b533
Turn -0.0 - X -> fneg
...
llvm-svn: 21011
2005-04-02 05:04:50 +00:00
Chris Lattner
0b7e4cd107
This target doesn't support fabs/fneg yet.
...
llvm-svn: 21010
2005-04-02 05:03:24 +00:00
Chris Lattner
13fe99c807
Several changes mixed up here. First when legalizing a DAG with pcmarker,
...
dont' regen the whole dag if unneccesary. Second, fix and ugly bug with
the _PARTS nodes that caused legalize to produce multiples of them.
Finally, implement initial support for FABS and FNEG. Currently FNEG is
the only one to be trusted though.
llvm-svn: 21009
2005-04-02 05:00:07 +00:00
Chris Lattner
c4a2046a88
print fneg/fabs
...
llvm-svn: 21008
2005-04-02 04:58:41 +00:00
Chris Lattner
b3183de8c6
Add two happy new nodes for FABS and FNEG
...
llvm-svn: 21007
2005-04-02 04:58:28 +00:00
Chris Lattner
2d451658a6
add an fabs instr
...
llvm-svn: 21006
2005-04-02 04:31:56 +00:00
Chris Lattner
a31d4c7548
Add support for 64-bit shifts.
...
llvm-svn: 21005
2005-04-02 04:01:14 +00:00
Chris Lattner
4157c417a1
fix some bugs in the implementation of SHL_PARTS and friends.
...
llvm-svn: 21004
2005-04-02 04:00:59 +00:00
Chris Lattner
6f28fd388a
fix a comment
...
llvm-svn: 21003
2005-04-02 03:59:45 +00:00
Chris Lattner
2e5872c671
Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.
...
llvm-svn: 21002
2005-04-02 03:38:53 +00:00
Chris Lattner
5b7bb56ef8
Print some new nodes
...
llvm-svn: 21001
2005-04-02 03:30:42 +00:00
Chris Lattner
dbd130cf46
add some new nodes.
...
llvm-svn: 21000
2005-04-02 03:30:33 +00:00
Chris Lattner
07f97d5f55
Fix a bug when inserting a libcall into a function with no other calls.
...
llvm-svn: 20999
2005-04-02 03:22:40 +00:00
Chris Lattner
07e3f7e1ff
new generic testcsae
...
llvm-svn: 20996
2005-04-02 02:41:55 +00:00
Nate Begeman
cfc452d088
Fix i64 returns
...
Generate PowerPC 'subfic' instruction when appropriate
llvm-svn: 20995
2005-04-02 00:42:16 +00:00
Nate Begeman
69d39433c4
Fix a warning about an unhandled switch case
...
llvm-svn: 20994
2005-04-02 00:41:14 +00:00
John Criswell
9f680da784
For Sparc, this xfails. I don't think sparc has the C99 complex data
...
type support.
llvm-svn: 20993
2005-04-01 23:16:23 +00:00
Chris Lattner
f4b985d1f6
Add support for ISD::UNDEF to the X86 be
...
llvm-svn: 20990
2005-04-01 22:46:45 +00:00
Nate Begeman
cda9aa7fa9
Add ISD::UNDEF node
...
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
arguments, but not shadowing their value. This allows us to do the right
thing with both fixed and vararg floating point arguments.
llvm-svn: 20988
2005-04-01 22:34:39 +00:00
Chris Lattner
5053ea85fc
Fix another PATypeHolder error, contributed by Bill Wendling!
...
llvm-svn: 20983
2005-04-01 15:41:30 +00:00
Duraid Madina
617af97040
repair mindless SELECT waste.
...
llvm-svn: 20982
2005-04-01 10:35:00 +00:00
Nate Begeman
1c3aea6019
Fix Olden/bh, CR0 was being set in the wrong order
...
LowerCallTo and ISD::CALL are going to need to be modified, regs are being
set in the wrong order.
llvm-svn: 20981
2005-04-01 08:57:43 +00:00
Nate Begeman
c9e50238c5
Also apply Chris's fix to FP select and SETCC
...
llvm-svn: 20979
2005-04-01 07:21:30 +00:00
Chris Lattner
9122b4c9c0
new testcase
...
llvm-svn: 20978
2005-04-01 07:19:06 +00:00
Chris Lattner
ffc7f243fe
Move the selection of the arms of the select operation up to the conditional
...
part to make sure we get the side effects and to avoid confusing the CFG.
llvm-svn: 20977
2005-04-01 07:10:02 +00:00
Chris Lattner
329c14a8bc
print the machine CFG in the -print-machineinstrs dump
...
llvm-svn: 20976
2005-04-01 06:48:38 +00:00
Nate Begeman
2095f3b06b
Fix stores to global addresses
...
Fix calls with no arguments
llvm-svn: 20975
2005-04-01 05:57:17 +00:00
Nate Begeman
839b34c367
Support indexed loads and stores. This drops Shootout/matrix time from
...
18.8 to 14.8 seconds. The Pattern ISel is now often faster than the
Simple ISel, esp. on memory intensive code.
llvm-svn: 20973
2005-04-01 04:45:11 +00:00
Nate Begeman
f4d91610ff
Implement FP_TO_SINT and FP_TO_UINT
...
llvm-svn: 20972
2005-04-01 02:59:27 +00:00
Nate Begeman
508aac2ca8
Add support for adding 0.0 and -0.0 to the constant pool, since we lie and
...
say that we support them, for the purposes of generating fsel instructions.
llvm-svn: 20970
2005-04-01 01:08:07 +00:00
Nate Begeman
4f3a9860d3
Factor out common code, support FP comparison in folded SetCC
...
llvm-svn: 20969
2005-04-01 00:32:34 +00:00
Nate Begeman
6215b35918
fsel generation for f32 and f64 select
...
generate compare immediate for integer compare with constant
fold setcc into branch
fold setcc into select
Code generation quality for Shootout is now on par with the Simple ISel
llvm-svn: 20968
2005-03-31 23:55:40 +00:00
Andrew Lenharth
3bf6f80588
make fp div trick dependend on flag
...
llvm-svn: 20967
2005-03-31 22:02:25 +00:00
Misha Brukman
9337e4c5ab
Fix spelling of `corresponds'
...
llvm-svn: 20966
2005-03-31 21:30:35 +00:00
Andrew Lenharth
dec53920b4
PCMarker support for DAG and Alpha
...
llvm-svn: 20965
2005-03-31 21:24:06 +00:00
Duraid Madina
21ce5f7a66
Assorted fixes:
...
* Stop being pessimistic about output register allocation
* Start to handle function descriptors: compute target GPs and so on
when doing indirect calls etc. Not there yet, though. For the moment,
we try to use _indirect_ branches wherever possible, to stress test
function descriptors.
* FP divide-by-zero should work now
* add varargs (it doesn't work, though)
At this point, all of SingleSource passes (modulo C++ tests that are due
to issues with the CFE, see note in the README.) Much of MultiSource also
passes although there's still a ton of bugs around. Something for me to
work on tomorrow, then. :)
llvm-svn: 20960
2005-03-31 12:31:11 +00:00
Duraid Madina
ffb9d14bb3
* declare local common symbols as such (.lcomm, not merely .common)
...
* begin great adventure into correct function descriptor materialization
llvm-svn: 20956
2005-03-31 07:40:24 +00:00
Duraid Madina
8106f12d33
daintyness
...
llvm-svn: 20955
2005-03-31 07:36:43 +00:00
Duraid Madina
73c2777a0e
add what we need to fudge a 'floating point conditional move', this is
...
used to get FP div-by-zero working properly (shunt the right answer
depending on how frcpa sets its predicate output)
llvm-svn: 20954
2005-03-31 07:32:32 +00:00
Nate Begeman
eddfff338a
Pass the correct values to the chain argument for node construction during
...
LowerCallTo.
Handle ISD::ADD in SelectAddr, allowing us to have nonzero immediates for
loads and stores, amazing!
llvm-svn: 20946
2005-03-31 02:05:53 +00:00
Nate Begeman
9de7ddf7d5
Rewrite LowerCallTo and Select(ISD::CALL) to properly handle float varargs
...
Tell the SelectionDAG ISel to expand SEXTLOAD of i1 and i8, rather than
complicate the code in ISD::SEXTLOAD to do it by hand
Combine the FP and Int ISD::LOAD codegen
Generate better code for constant pool loads
As a result, all of Shootout, and likely many other programs are now
working.
llvm-svn: 20945
2005-03-31 00:15:26 +00:00
Nate Begeman
4c0780cf42
Fix calls whose arguments fit entirely in registers to not break the Chain.
...
Implement SINT_TO_FP and UINT_TO_FP
Remove some dead code from the simple ISel
llvm-svn: 20944
2005-03-30 19:38:35 +00:00
Misha Brukman
9615809383
* Put command-line switches and function names in <tt>
...
* Add links to mailing lists and publications
llvm-svn: 20943
2005-03-30 19:14:24 +00:00
Andrew Lenharth
e3d9f8c4f9
yea, fine Duraid
...
llvm-svn: 20942
2005-03-30 18:22:52 +00:00
Duraid Madina
722d514025
Add section for Itanium
...
llvm-svn: 20941
2005-03-30 05:33:54 +00:00
Nate Begeman
a8114a0f48
Fix frame index code to generate legal PowerPC instructions. About half of
...
Shootout now works.
llvm-svn: 20940
2005-03-30 02:23:08 +00:00
Nate Begeman
5851a66128
Fix external symbol printing in the AsmPrinter. Tell the ISel that we
...
don't support things like memcpy directly. This allows a handful of the
Shootout programs to work, yay!
llvm-svn: 20939
2005-03-30 01:45:43 +00:00
Misha Brukman
650d1742f7
* Add section for Alpha
...
* Remove extraneous subsections
llvm-svn: 20938
2005-03-30 01:14:38 +00:00
Chris Lattner
5ca31d9831
Instead of setting up the CFG edges at selectiondag construction time, set
...
them up after the code has been emitted. This allows targets to select one
mbb as multiple mbb's as needed.
llvm-svn: 20937
2005-03-30 01:10:47 +00:00
Chris Lattner
472a265ef6
don't depend on the cfg being set up yet
...
llvm-svn: 20936
2005-03-30 01:10:00 +00:00
Nate Begeman
9c40e9c61f
Fix BranchCC (it's still dumb), and implement FP select (also dumb)
...
llvm-svn: 20935
2005-03-29 22:48:55 +00:00
Nate Begeman
28145edd30
Implement integer select and i1 sign extend
...
llvm-svn: 20934
2005-03-29 22:24:51 +00:00
Nate Begeman
28c5ac9ff4
Implement SetCC, fix ZERO_EXTEND_INREG
...
llvm-svn: 20933
2005-03-29 21:54:38 +00:00
Chris Lattner
af4d93cd39
import all of the rest of the stubs that dsa uses for direct comparison
...
llvm-svn: 20932
2005-03-29 20:36:05 +00:00
Tanya Lattner
91964490e2
Compare dependence analysis with llvm instructions versus machine instrutions. the problem with using machine instructions and alias analysis is that aa does not handle tmp instructions.
...
llvm-svn: 20931
2005-03-29 20:35:10 +00:00
Tanya Lattner
6e19b21e30
Dependence analyzer that just determines dependences within a loop for loads and stores using alias analysis.
...
llvm-svn: 20930
2005-03-29 20:33:42 +00:00
Chris Lattner
4dba2ee974
learn about some more functions.
...
llvm-svn: 20929
2005-03-29 20:04:24 +00:00
Andrew Lenharth
93d008990e
Fix up some types and constants
...
llvm-svn: 20928
2005-03-29 19:24:04 +00:00
Chris Lattner
2e1971c19d
Fix a problem where we not marking incoming arguments to functions with
...
external linkage as incomplete.
llvm-svn: 20927
2005-03-29 19:16:59 +00:00
Chris Lattner
db45f7d763
Fix a bug that andrew noticed where we do not correctly sign/zero extend
...
returned integer values all of the way to 64-bits (we only did it to 32-bits
leaving the top bits undefined). This causes problems for targets like alpha
whose ABI's define the top bits too.
llvm-svn: 20926
2005-03-29 19:09:56 +00:00
Chris Lattner
8de8b7bf40
there is no point comparing against null pointer.
...
llvm-svn: 20925
2005-03-29 17:44:52 +00:00
Chris Lattner
ca85130b0a
Fix a major problem with global variable initializers. This could cause
...
us to have stuff pointing to the null pointer, which makes no sense
(the null ptr is an ssa value, not the null object)
llvm-svn: 20922
2005-03-29 17:21:53 +00:00
Chris Lattner
1ce9aacf2e
fix a warning in the optimized build
...
llvm-svn: 20920
2005-03-29 15:13:27 +00:00
Chris Lattner
dd94b2d01e
add some more functions, ignore setcc for constraints!
...
llvm-svn: 20917
2005-03-29 06:52:20 +00:00
Chris Lattner
ecfa9b5810
disable this transformation in the one obscure case that really pessimizes
...
pointer analysis.
llvm-svn: 20916
2005-03-29 06:37:47 +00:00
Chris Lattner
2c95fac918
there is no reason to run -instcombine -instcombine!
...
llvm-svn: 20915
2005-03-29 06:25:11 +00:00
Chris Lattner
7617e886c1
Handle "known" external calls context sensitively, add support for realloc
...
and a couple of other functions that are important.
Handle aggregate undef values for gv initializers
llvm-svn: 20914
2005-03-29 06:09:07 +00:00
Nate Begeman
60956dd52f
Implement div, rem, and frameindex
...
llvm-svn: 20907
2005-03-29 00:03:27 +00:00
Nate Begeman
731bed10c7
Pattern ISel: fix argument loading for i64s (thanks chris)
...
Simple ISel: fix i64 subtract
llvm-svn: 20903
2005-03-28 23:08:54 +00:00
Nate Begeman
66acad746f
Remove fake instruction 'subc' (mnemonic for subfc).
...
More pattern isel updates
llvm-svn: 20902
2005-03-28 22:28:37 +00:00
Chris Lattner
32e08b7c06
implement legalization of build_pair for nate
...
llvm-svn: 20901
2005-03-28 22:03:13 +00:00
Andrew Lenharth
b442791124
First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
...
llvm-svn: 20900
2005-03-28 20:05:49 +00:00
Nate Begeman
5bdfc63516
Implement proper loads and zero-extends of all types
...
llvm-svn: 20897
2005-03-28 19:36:43 +00:00
Duraid Madina
bdbf8ba2d0
Emit .global @function and .global @object entries so the Intel ias
...
assembler may be used; identify LLVM output as such.
llvm-svn: 20892
2005-03-28 15:21:43 +00:00
Chris Lattner
81b6d86a3a
Teach andersens that non-escaping memory cannot be mod/ref'd by external fn calls.
...
llvm-svn: 20891
2005-03-28 06:21:17 +00:00
Misha Brukman
009585d2ac
Fix grammar
...
llvm-svn: 20890
2005-03-28 04:32:12 +00:00
Chris Lattner
a8ad8b2826
Make anders-aa much more precise by not being completely pessimistic about
...
external functions. Teach it about a few important ones.
llvm-svn: 20889
2005-03-28 04:03:52 +00:00
Jeff Cohen
03332ecf17
Fix VC++ build breakage
...
llvm-svn: 20888
2005-03-28 02:52:28 +00:00
Alkis Evlogimenos
9ead0d7b4c
Rename createPromoteMemoryToRegister() to
...
createPromoteMemoryToRegisterPass() to be consistent with other pass
creation functions.
llvm-svn: 20885
2005-03-28 02:01:12 +00:00
Chris Lattner
147f8b789c
wrap some long lines
...
llvm-svn: 20884
2005-03-27 22:03:46 +00:00
Chris Lattner
2db10ba297
remove ...
...
llvm-svn: 20883
2005-03-27 21:57:09 +00:00
Chris Lattner
f290da862d
speed up steens by using spliceFrom, improve its precision by realizing that
...
an incomplete node cannot alias a complete node.
llvm-svn: 20882
2005-03-27 21:56:55 +00:00
Chris Lattner
ea69f1f9e8
teach andersens about undef
...
llvm-svn: 20881
2005-03-27 18:58:23 +00:00
Chris Lattner
82166467c3
Don't give up completely, maybe other AA can say something about this.
...
llvm-svn: 20873
2005-03-27 00:02:33 +00:00
Chris Lattner
3f08e7899f
Factor out percentage printing into its own function. Make two changes to
...
the function: print more precision XX.X% instead of XX%, and cast to ULL
before scaling by 100/1000 to avoid wrap around for large numbers of queries
(such as occur for 253.perlbmk and 176.gcc)
llvm-svn: 20872
2005-03-26 23:56:33 +00:00
Chris Lattner
2ba37389c9
Cache mapping information for a call site after computing it for a mod/ref
...
query. If the next mod/ref query happens to be for the same call site
(which is extremely likely), use the cache instead of recomputing the
callee/caller mapping. This makes -aa-eval ***MUCH*** faster with
ds-aa
llvm-svn: 20871
2005-03-26 23:29:03 +00:00
Chris Lattner
139f43b340
Remove more long dead code: dsa doesn't provide must alias info
...
llvm-svn: 20870
2005-03-26 22:54:46 +00:00
Chris Lattner
1a02d15dab
remove some unsafe code that has long been dead
...
llvm-svn: 20869
2005-03-26 22:48:42 +00:00
Chris Lattner
9cc932d3b3
slightly improve mod/ref for DSAA by checking the globals graph for fallback
...
llvm-svn: 20868
2005-03-26 22:47:03 +00:00
Chris Lattner
b3baff1830
Teach steens-aa two things about mod/ref information:
...
1. If memory never escapes the program, it cannot be mod/ref'd by external
functions.
2. If memory is global never mod/ref'd in the program, it cannot be mod/ref'd
by any call.
llvm-svn: 20867
2005-03-26 22:43:20 +00:00
Chris Lattner
68ee8f572c
Interchange this loop so that we test all pointers against one call site
...
before moving on to the next call site. This will be a more efficient way
to compute the mod/ref set for AA implementations like DSA.
llvm-svn: 20866
2005-03-26 22:16:44 +00:00
Nate Begeman
518a994b7d
Fix that pesky floats in integer regs problem by assigning the f32 type to
...
the correct register class. Also remove the loading of float data into int
regs part of varargs; it will need to be implemented differently later.
llvm-svn: 20857
2005-03-26 08:25:22 +00:00
Nate Begeman
dcad53e7bd
Get closer to having varargs working. There's still something strange
...
going on with copies between floating point and integer register files
being generated. Once that is solved, varargs will be done.
llvm-svn: 20856
2005-03-26 07:46:36 +00:00
Nate Begeman
c95bf7b226
Make 64bit args and float args work correct with calls. Thanks to Chris
...
for explaining EXTRACT_ELEMENT to me.
llvm-svn: 20847
2005-03-26 02:17:46 +00:00
Nate Begeman
0bea1090dd
Change LowerCallTo to take a boolean isVarArg argument. This is needed
...
by the PowerPC backend, and probably others in the future.
llvm-svn: 20843
2005-03-26 01:30:30 +00:00
Nate Begeman
f656525cb6
Change interface to LowerCallTo to take a boolean isVarArg argument.
...
llvm-svn: 20842
2005-03-26 01:29:23 +00:00
Nate Begeman
e70b5c79f8
Next round of pattern isel changes, mostly dealing with calls.
...
llvm-svn: 20841
2005-03-26 01:28:53 +00:00
Nate Begeman
5d7610de65
Correct a documention link
...
llvm-svn: 20840
2005-03-26 01:28:05 +00:00
Chris Lattner
d21e220035
no really, don't double count these nodes either!
...
llvm-svn: 20837
2005-03-25 20:54:45 +00:00
Chris Lattner
b7ffd50537
Don't count all of the nodes in the SCC once for each function in the SCC.
...
llvm-svn: 20836
2005-03-25 20:37:32 +00:00
Chris Lattner
5ecec08ab5
Grow the EQ classes for globals at the end of the BU pass. This shrinks
...
memory usage in the TD pass for 254.gap from 31.3MB to 3.9MB.
llvm-svn: 20834
2005-03-25 16:45:43 +00:00
Chris Lattner
d6e6b38918
fix the RUN line on this testcase so it passes.
...
llvm-svn: 20833
2005-03-25 15:36:19 +00:00
Nate Begeman
0ad33afe22
Support global addresses and fix call returns. Varargs still aren't
...
handled correctly for floating point arguments, or more than 8 arguemnts.
This does however, allow hello world to run.
llvm-svn: 20832
2005-03-25 08:34:25 +00:00
Chris Lattner
514e843e89
Enhance loopsimplify to preserve alias analysis instead of clobbering it.
...
This prevents crashes on some programs when using -ds-aa -licm.
llvm-svn: 20831
2005-03-25 06:37:22 +00:00
Chris Lattner
8d9f3735cd
Treat free operations as volatile, since they cannot be moved. This fixes
...
Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll
llvm-svn: 20830
2005-03-25 05:49:37 +00:00
Chris Lattner
b99c93c93b
New testcase that crashes licm.
...
llvm-svn: 20829
2005-03-25 05:49:13 +00:00
Chris Lattner
faf7791fea
Fix a bug where LICM was not updating AA information properly when sinking
...
a pointer value out of a loop causing it to be duplicated.
llvm-svn: 20828
2005-03-25 00:22:36 +00:00
Chris Lattner
3322e28f75
remove a debugging timer.
...
llvm-svn: 20827
2005-03-25 00:06:09 +00:00
Chris Lattner
278bac843c
Two changes here:
...
1. Instead of copying Local graphs to the BU graphs to start with, use
spliceFrom to do the job (which is constant time in this case). On
176.gcc, this chops off .17s from the bu pass.
2. When building SCC graphs, simplify the logic and use spliceFrom to
do the heavy lifting, instead of cloneInto/delete. This slices
another .14s off 176.gcc.
llvm-svn: 20826
2005-03-25 00:05:04 +00:00
Chris Lattner
a396eb8ae9
Make the spliceFrom case where one graph is completely empty be constant time.
...
llvm-svn: 20825
2005-03-25 00:02:41 +00:00
Chris Lattner
127dd12427
add a new DSGraph::spliceFrom method, which violently takes the content of
...
one graph and plops it into another, without breaking a sweat.
llvm-svn: 20824
2005-03-24 23:46:04 +00:00
Chris Lattner
56787258e7
add new spliceFrom methods.
...
llvm-svn: 20823
2005-03-24 23:45:20 +00:00
Nate Begeman
ad5151d785
Implement next round of Pattern ISel fixes
...
1. void returns
2. multiplies
3. calls
llvm-svn: 20822
2005-03-24 23:35:30 +00:00
Nate Begeman
3a9a2f9ec7
Fix an incorrect argument being passed to BuildMI for indirect calls.
...
llvm-svn: 20821
2005-03-24 23:34:38 +00:00
Chris Lattner
301764e28c
This replaces the correct but slow code with a more aggressive scc-finder
...
based approach to find globals and call sites that need to be copied. This
speeds up the BU pass on 176.gcc from 22s back up to 2.3s. Not as good
as 1.5s, but at least it's correct :)
llvm-svn: 20820
2005-03-24 23:06:02 +00:00
Chris Lattner
1b5b559011
only look at successors of globals. This gets us down to "only" 22s in the
...
bu pass for 176.gcc
llvm-svn: 20818
2005-03-24 21:17:27 +00:00
Chris Lattner
189d7bb9ee
Unfortunately, a previous patch was not safe. Revert it, reimplement
...
something correct. Unfortunately this takes 176.gcc's BU phase back
up to 29s from 1.5. This fixes DSGraph/2005-03-24-Global-Arg-Alias.ll
llvm-svn: 20817
2005-03-24 21:07:47 +00:00
Nate Begeman
d73c87a424
Commit Gabor Greif's patch to use iterators in lowering intrinsics.
...
llvm-svn: 20816
2005-03-24 20:07:16 +00:00
Chris Lattner
923d925953
don't bother |'ing in 0's
...
llvm-svn: 20815
2005-03-24 18:42:51 +00:00
Chris Lattner
ba6006d84b
be more aggressive about incompleteness marking
...
llvm-svn: 20814
2005-03-24 18:42:28 +00:00
Chris Lattner
299be4b42f
new testcase that DS-AA is causing to be miscompiled.
...
llvm-svn: 20813
2005-03-24 17:57:43 +00:00
Chris Lattner
b15317b74a
eliminate dead variables, patch contributed by Gabor Greif!
...
llvm-svn: 20812
2005-03-24 17:32:20 +00:00
Nate Begeman
7ec19b4d5a
Implement more of the PPC32 Pattern ISel:
...
1) dynamic stack alloc
2) loads
3) shifts
4) subtract
5) immediate form of add, and, or, xor
6) change flag from -pattern-isel to -enable-ppc-pattern-isel
Remove dead arguments from getGlobalBaseReg in the simple ISel
llvm-svn: 20810
2005-03-24 06:28:42 +00:00
Chris Lattner
a3abb4c01a
Fix silly "no newline at end of file" warning
...
llvm-svn: 20809
2005-03-24 06:16:18 +00:00
Chris Lattner
d6888355fa
Fix compilation errors, patch contributed by the fabulous Bill Wendling!
...
llvm-svn: 20808
2005-03-24 05:13:53 +00:00
Chris Lattner
fed2a42895
fix a compilation error, patch contributed by Bill Wendling!
...
llvm-svn: 20807
2005-03-24 05:12:48 +00:00
Nate Begeman
20e7e28ee7
Addition of the PPC32 Pattern ISel. While it is far from complete, it will
...
be brought up to parity with the current simple ISel in the coming days.
Currently, -pattern-isel is required to trigger it.
llvm-svn: 20805
2005-03-24 04:41:43 +00:00
Nate Begeman
952105220e
Remove comments that are now meaningless from the pattern ISels, at Chris's
...
request.
llvm-svn: 20804
2005-03-24 04:39:54 +00:00
Chris Lattner
19d7f2883d
Fix a crash while promoting a value out of a loop from a global variable
...
when using ds-aa
llvm-svn: 20802
2005-03-24 04:22:04 +00:00
Chris Lattner
f0d919ece9
teach ds-aa about mod/ref for external function calls.
...
llvm-svn: 20801
2005-03-24 03:04:50 +00:00
Chris Lattner
aff85ac552
Simplify dead code into a fixme :)
...
llvm-svn: 20800
2005-03-24 02:41:19 +00:00
Chris Lattner
85a1d92323
fix a compiler crash in runtime/libprofile
...
llvm-svn: 20799
2005-03-24 01:22:52 +00:00
Chris Lattner
6a3f5fd623
wrap a long line
...
llvm-svn: 20797
2005-03-23 23:51:12 +00:00
Chris Lattner
2a7358064e
If we are calling an external function, chain to another AA to potentially
...
decide, don't just immediately give up.
This implements GlobalsModRef/chaining-analysis.ll
llvm-svn: 20796
2005-03-23 23:49:47 +00:00
Chris Lattner
4baa138fad
GlobalMR should be able to analyze this function.
...
llvm-svn: 20795
2005-03-23 23:48:56 +00:00
Chris Lattner
18ae9b911a
if a function doesn't access memory at all, it definitely doesn't read it.
...
llvm-svn: 20794
2005-03-23 23:27:34 +00:00
Chris Lattner
8424b0f82e
Make this more efficient by only making one virtual method call.
...
llvm-svn: 20793
2005-03-23 23:26:58 +00:00
Chris Lattner
07eac1e698
Make this a bit more aggressive
...
llvm-svn: 20792
2005-03-23 22:06:41 +00:00
Chris Lattner
9f9da538d6
a hack to allow count-aa to work with ds-aa :(
...
llvm-svn: 20791
2005-03-23 21:59:34 +00:00
Chris Lattner
ccb6faad7e
Add two options to allow -count-aa to print queries either (1) all queries,
...
or (2) only queries that are not successful (e.g. return may alias)
llvm-svn: 20790
2005-03-23 21:59:07 +00:00
Misha Brukman
9c64d9c2b5
Fix grammar
...
llvm-svn: 20789
2005-03-23 21:14:33 +00:00
Chris Lattner
1c790bf656
enable -debug-only=licm
...
llvm-svn: 20788
2005-03-23 21:00:12 +00:00
Chris Lattner
61130216ec
turn a dead conditional into an assert.
...
llvm-svn: 20787
2005-03-23 20:12:08 +00:00
Chris Lattner
01f0879c48
Totally gut mergeInGraph. There is absolutely no reason to be merging
...
global roots in from callees to callers. The BU graphs do not have accurate
globals information and all of the clients know it. Instead, just make sure
the GG is up-to-date, and they will be perfectly satiated.
This speeds up the BU pass on 176.gcc from 5.5s to 1.5s, and Loc+BU+TD
from 7s to 2.7s.
llvm-svn: 20786
2005-03-23 20:08:59 +00:00
Chris Lattner
048ae36b93
wrap a long line
...
llvm-svn: 20785
2005-03-23 16:43:11 +00:00
Andrew Lenharth
82f364515c
don't lie to the register allocator
...
llvm-svn: 20784
2005-03-23 15:20:01 +00:00
Chris Lattner
e36d77b726
Make -steens-aa more conservative (aka correct) by making sure to obey
...
incompleteness flags.
Make it more aggressive by taking field sensitive information into
account.
llvm-svn: 20781
2005-03-23 01:48:09 +00:00
Tanya Lattner
13417b5be3
Added alias analysis.
...
Fixed many many bugs.
This now works on almost all Singlesource , and most of MultiSource.
llvm-svn: 20780
2005-03-23 01:47:20 +00:00
Chris Lattner
7d3df410ab
implement Analysis/DSGraph/field-sensitive.ll
...
llvm-svn: 20779
2005-03-23 01:47:19 +00:00
Chris Lattner
17011d972a
new testcase to verify that we have field sensitive alias analysis info. This
...
test cannot be satisfied without interprocedural information.
llvm-svn: 20778
2005-03-23 01:46:59 +00:00
Chris Lattner
70a402b9b8
make sure this test tests the intended target.
...
llvm-svn: 20777
2005-03-23 01:32:03 +00:00
Chris Lattner
dcb82f5d0a
don't crash in some bad cases.
...
llvm-svn: 20776
2005-03-23 01:29:26 +00:00
Chris Lattner
310d1a3882
Several changes here:
...
1. Increase max node size from 64->256 to avoid collapsing an important
structure in 181.mcf
2. If we have multiple calls to an indirect call node with an indirect
callee, fold these call nodes together, to avoid DSA turning apoc into
a flaming fireball of death when analyzing 176.gcc.
With this change, 176.gcc now takes ~7s to analyze for loc+bu+td, with
5.7s of that in the BU pass.
llvm-svn: 20775
2005-03-22 23:54:52 +00:00
Chris Lattner
5c971a0072
We might as well check the TD graphs as well, even though they are fine.
...
llvm-svn: 20774
2005-03-22 22:11:22 +00:00
Chris Lattner
ca174306f0
Mark external globals incomplete in the BU Globals graph, fixing
...
Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll
llvm-svn: 20773
2005-03-22 22:10:22 +00:00
Chris Lattner
537dcf017c
New testcase, the BU pass is marking the global complete in the globals graph.
...
llvm-svn: 20772
2005-03-22 22:07:15 +00:00
Tanya Lattner
8b953a1c32
Updating my entry.
...
llvm-svn: 20771
2005-03-22 21:33:19 +00:00
Chris Lattner
ecdc1ed631
Fix a serious bug where we didn't insert globals into the globalset when
...
cloning a graph.
llvm-svn: 20770
2005-03-22 19:44:11 +00:00
Andrew Lenharth
8180e87e51
hum, it is good to use real instructions
...
llvm-svn: 20769
2005-03-22 16:42:52 +00:00
Chris Lattner
f00684079a
Directly count the number of memory instructions.
...
llvm-svn: 20766
2005-03-22 03:55:10 +00:00
Chris Lattner
24922c7a2b
Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!
...
llvm-svn: 20765
2005-03-22 03:20:38 +00:00
Chris Lattner
495f00946e
Remove an iteration pass over the entire scalarmap for each function created
...
by not allowing integer constants to get into the scalar map in the first
place.
llvm-svn: 20764
2005-03-22 02:45:13 +00:00
Chris Lattner
250726ec25
When making a clone of a DSGraph from the BU pass, make sure to remember that
...
this clone is supposed to be used for *ALL* of the functions in the SCC.
This fixes the memory explosion problem the TD pass was having, reducing the
memory growth from 24MB -> 3.5MB on povray and 270MB ->8.3MB on perlbmk!
This obviously also speeds up the TD pass *a lot*.
llvm-svn: 20763
2005-03-22 01:50:42 +00:00
Chris Lattner
e05c633099
Don't use operator[], use the new method instead, which is faster. This speeds
...
up the TD pass about 30% for povray and perlbmk. It's still not clear why
copying a 5MB set of graphs turns into a 25MB set of graphs though :(
llvm-svn: 20762
2005-03-22 01:42:59 +00:00
Chris Lattner
d0949a00be
add a method
...
llvm-svn: 20761
2005-03-22 01:42:10 +00:00
Chris Lattner
fcae88f280
Now that the dead ctor is gone, nothing uses the old node mapping exported by
...
cloneInto: make it an internally used mapping.
llvm-svn: 20760
2005-03-22 00:36:51 +00:00
Chris Lattner
8016c975c9
remove a dead ctor
...
llvm-svn: 20759
2005-03-22 00:33:35 +00:00
Chris Lattner
ea2c02bcca
now that the second argument is always this->ReturnNodes, don't bother passing it.
...
llvm-svn: 20758
2005-03-22 00:29:44 +00:00
Chris Lattner
571578143c
instead of using a local RetValMap, just use the graph we are cloning into
...
for the return node map.
llvm-svn: 20757
2005-03-22 00:25:52 +00:00
Andrew Lenharth
6294dee913
two things: 1)evilness reduction patch, reduces the number of instructions hiding in the small jump CC moving code. 2)implement div of small data types by FP DIV (also reduces evilness and should speed things up)
...
llvm-svn: 20756
2005-03-22 00:24:07 +00:00
Chris Lattner
d05ab9cab4
now that the valuemapping is always the local scalar map, we can eliminate
...
this identity merge.
llvm-svn: 20755
2005-03-22 00:22:45 +00:00
Chris Lattner
19944fade3
remove the second argument to cloneInto
...
llvm-svn: 20754
2005-03-22 00:21:05 +00:00
Chris Lattner
d22030f8db
drop the second argument to cloneInto, which is always the local scalar map.
...
llvm-svn: 20753
2005-03-22 00:20:56 +00:00
Chris Lattner
03b7f99338
add some timers, don't clone aux nodes
...
llvm-svn: 20752
2005-03-22 00:12:00 +00:00
Chris Lattner
410da35a1f
move this out of line
...
llvm-svn: 20751
2005-03-22 00:09:45 +00:00
Chris Lattner
7b5fe1bdb6
move this stuff out of line
...
llvm-svn: 20750
2005-03-22 00:09:36 +00:00
Chris Lattner
5f10e6dda1
don't generate temporary scalarmaps.
...
llvm-svn: 20749
2005-03-22 00:04:21 +00:00
Chris Lattner
848ef879c5
allow passing clone flags down to cloneInto
...
llvm-svn: 20748
2005-03-21 22:49:53 +00:00
Chris Lattner
f9ef3f0bb4
allow passing clone flags into the ctor
...
llvm-svn: 20747
2005-03-21 22:49:43 +00:00
Chris Lattner
c1439d539f
Enhance the TD pass to build composite graphs when we have indirect call
...
sites that target multiple callees. If we have a function table, for
example, with N callees, and M callers call through it, we used to have
to perform O(M*N) graph inlinings. Now we perform O(M+N) inlinings.
This speeds up the td pass on perlbmk from 36.26s to 25.75s.
llvm-svn: 20743
2005-03-21 20:31:29 +00:00
Chris Lattner
650cd59f28
add a new map
...
llvm-svn: 20742
2005-03-21 20:29:56 +00:00
Chris Lattner
d90f5bab82
make this const correct
...
llvm-svn: 20741
2005-03-21 20:28:50 +00:00
Chris Lattner
040426aee0
Fix a major problem where we didn't add call graph edges for call sites with
...
more than 1 callee. This fixes Analysis/DSGraph/FunctionPointerTable-const.ll
llvm-svn: 20740
2005-03-21 20:20:49 +00:00
Chris Lattner
032b364fc4
New testcase, which is important to handle correctly.
...
llvm-svn: 20739
2005-03-21 20:18:51 +00:00
Misha Brukman
82ae9e1dda
We may be adding functions to the Module during initialization, so
...
conservatively, it's modified
llvm-svn: 20735
2005-03-21 19:22:14 +00:00
Chris Lattner
bad17144d0
This error message changed.
...
llvm-svn: 20734
2005-03-21 17:55:41 +00:00
Chris Lattner
e8a43291cd
Ugh, for some reason, I can't call this unless the reference is const!?!?!?
...
llvm-svn: 20732
2005-03-21 10:00:45 +00:00
Chris Lattner
13429dc5af
The reachability cloner should add arguments to merged calls when the RHS of
...
the merge has more operands than the LHS.
llvm-svn: 20731
2005-03-21 09:39:51 +00:00
Chris Lattner
aa32b37885
Make the first operand of this method be modifiable.
...
llvm-svn: 20730
2005-03-21 09:39:20 +00:00
Chris Lattner
8632462267
add a method
...
llvm-svn: 20729
2005-03-21 09:38:39 +00:00
Chris Lattner
5204115d09
If merging two calls like: foo(A) and bar(B, C), make sure the result has two
...
arguments, not one.
llvm-svn: 20728
2005-03-21 09:18:39 +00:00
Chris Lattner
7269f15e8f
'note to self'
...
llvm-svn: 20727
2005-03-21 08:43:32 +00:00
Chris Lattner
a5f4b773d9
Remove a bunch of cruft and dead code for handling the case when types were
...
defined in function constant pools. The assembler grammar has long
disallowed functions from having constant pools, so all of this stuff is
dead.
This makes it an immediate error for functions to refer to nonexisting
types, fixing Regression/Verifier/2005-03-21-UndefinedTypeReference.ll.
Before, references to non-existing types in functions would only be
detected when the subsequent function was parsed, due to the call to
"ResolveTypes". "ResolveTypes" has not resolved any types for a long time,
instead it emitted an error message if no resolved types are left. Since
the only caller of this method is in the module code, just inline it.
llvm-svn: 20726
2005-03-21 06:27:42 +00:00
Chris Lattner
a825b14278
New testcase that the assembler incorrectly accepts.
...
llvm-svn: 20725
2005-03-21 06:24:53 +00:00
Tanya Lattner
87ee2ba48d
Make this method non-const. Making it const causes the const version of
...
getIGroup to be called instead of the non-const one. These two methods
have (??) different behavior, so this change fixes bugs.
llvm-svn: 20724
2005-03-21 06:07:43 +00:00
Chris Lattner
98f7e1c370
Change the way that the TD pass inlines graphs. Instead of inlining each
...
graph into all of the functions it calls when we visit a graph, change it so
that the graph visitor inlines all of the callers of a graph into the current
graph when it visits it.
While we're at it, inline global information from the GG instead of from each
of the callers. The GG contains a superset of the info that the callers do
anyway, and this way we only need to do it one time (not one for each caller).
This speeds up the TD pass substantially on several programs, and there is
still room for improvement. For example, the TD pass used to take 147s
on perlbmk, it now takes 36s. On povray, we went from about 5s to 1.97s.
134.perl is down from ~1s for Loc+BU+TD to .6s.
The TD pass needs a lot of improvement though, which will occur with later
patches.
llvm-svn: 20723
2005-03-21 04:55:35 +00:00
Chris Lattner
6a67d4a804
rename a method add a data structure.
...
llvm-svn: 20722
2005-03-21 04:46:35 +00:00
Chris Lattner
c8b4b7e314
Provide a guaranteed definition of intptr_t. Thansk to Evan Jones for
...
pointing this out!
llvm-svn: 20721
2005-03-21 01:36:35 +00:00
Chris Lattner
c5cdc2260d
Don't strip modref bits when inlining down the call graph. This fixes
...
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night.
llvm-svn: 20717
2005-03-20 18:02:56 +00:00
Chris Lattner
21ef7678d6
Remove the ability to keep track of inlined globals, which is always dead.
...
llvm-svn: 20716
2005-03-20 04:30:30 +00:00
Chris Lattner
6abefe7639
Remove the InlinedGlobals set which is always empty.
...
llvm-svn: 20715
2005-03-20 04:30:16 +00:00
Chris Lattner
571c62a008
This call is always a noop, remove it.
...
llvm-svn: 20714
2005-03-20 04:29:54 +00:00
Chris Lattner
b1cabb6541
remove some pointless asserts
...
llvm-svn: 20713
2005-03-20 04:29:39 +00:00
Chris Lattner
ded489ec3b
-steens doesn't use the inlined globals facility.
...
llvm-svn: 20712
2005-03-20 04:23:57 +00:00
Chris Lattner
ff634f4e32
Build EC's for globals twice. The first is after constructing the initial
...
Globals Graph for the local pass, the second is after all of the locals
graphs have been constructed. This allows for many additional global EC's
to be recognized that weren't before. This speeds up analysis of programs
like 177.mesa, where it changes DSA from taking 0.712s to 0.4018s.
llvm-svn: 20711
2005-03-20 03:32:35 +00:00
Chris Lattner
36a810ac40
Add a new DSNode::removeGlobal method.
...
llvm-svn: 20710
2005-03-20 03:29:54 +00:00
Chris Lattner
0ebba657df
add a method
...
llvm-svn: 20709
2005-03-20 03:29:39 +00:00
Chris Lattner
5ae215248f
Transform BU pass to not use the horrible DSCallSiteIterator class.
...
llvm-svn: 20708
2005-03-20 02:42:07 +00:00
Chris Lattner
a550a5b173
Implement new methods for dealing with DSNode global lists, rename uses of
...
old methods.
llvm-svn: 20707
2005-03-20 02:41:38 +00:00
Chris Lattner
e68e808bcd
use simpler methods.
...
llvm-svn: 20706
2005-03-20 02:41:16 +00:00
Chris Lattner
1ffdd57e0a
method was renamed.
...
llvm-svn: 20705
2005-03-20 02:40:27 +00:00
Chris Lattner
5635a88fcb
print out equiv class info.
...
llvm-svn: 20704
2005-03-20 02:40:11 +00:00
Chris Lattner
e7a8e8677e
some methods got renamed
...
llvm-svn: 20703
2005-03-20 02:40:04 +00:00
Chris Lattner
711e083c26
Make use of simpler DSNode methods.
...
llvm-svn: 20702
2005-03-20 02:39:49 +00:00
Chris Lattner
9991eeb575
rename some methods and add some new methods for dealing with the globals list
...
in a DSNode.
llvm-svn: 20701
2005-03-20 02:38:39 +00:00
Chris Lattner
61f3befdc8
#ifdef out a function only used by #ifdef'd code.
...
llvm-svn: 20700
2005-03-20 02:14:15 +00:00
Chris Lattner
e965bd16bb
comment cleanup
...
llvm-svn: 20699
2005-03-20 01:18:00 +00:00
Misha Brukman
42f1cfd637
Constant-propagate the value of `isL' variable and eliminate it.
...
llvm-svn: 20698
2005-03-19 23:39:50 +00:00
Jeff Cohen
f4ab9e5965
Silence VC++ warning about mixing intptr_t and bool, and about unused variable isL.
...
llvm-svn: 20697
2005-03-19 22:36:39 +00:00
Chris Lattner
9379e69af9
Create an equivalence class of global variables that DSA will never be able
...
to tell apart anyway, and only track the leader for of these equivalence
classes in our graphs.
This dramatically reduces the number of GlobalValue*'s that appear in scalar
maps, which A) reduces memory usage, by eliminating many many scalarmap entries
and B) reduces time for operations that need to execute an operation for each
global in the scalar map.
As an example, this reduces the memory used to analyze 176.gcc from 1GB to
511MB, which (while it's still way too much) is better because it doesn't hit
swap anymore. On eon, this shrinks the local graphs from 14MB to 6.8MB,
shrinks the bu+td graphs of povray from 50M to 40M, shrinks the TD graphs of
130.li from 8.8M to 3.6M, etc.
This change also speeds up DSA on large programs where this makes a big
difference. For example, 130.li goes from 1.17s -> 0.56s, 134.perl goes
from 2.14 -> 0.93s, povray goes from 15.63s->7.99s (!!!).
This also apparently either fixes the problem that caused DSA to crash on
perlbmk and gcc, or it hides it, because DSA now works on these. These
both take entirely too much time in the TD pass (147s for perl, 538s for
gcc, vs 7.67/5.9s in the bu pass for either one), but this is a known
problem that I'll deal with later.
llvm-svn: 20696
2005-03-19 22:23:45 +00:00
Chris Lattner
4037048300
Make each scalar map contain a reference to an equivalence class of global
...
variables. Do not insert a global into the scalar map unless it is the
leader of its equivalence class.
llvm-svn: 20695
2005-03-19 22:13:13 +00:00
Chris Lattner
1ce80fb008
Each DS collection now contains an equivalence class of globals values.
...
llvm-svn: 20694
2005-03-19 22:12:33 +00:00
Chris Lattner
6c5b90f36c
add a method to clear globals from a node
...
llvm-svn: 20693
2005-03-19 22:12:03 +00:00
Chris Lattner
300dc0bc90
Two fixes for the copy ctor/operator=:
...
1. Make sure to clear() 'this' before adding elements to it
2. Make sure that the leaders of the RHS EC are the leaders of the LHS EC.
llvm-svn: 20692
2005-03-19 21:02:12 +00:00
Chris Lattner
325f234d79
add some methods, fix a major bug in getLeader() that was causing things to
...
not be unified correctly.
llvm-svn: 20691
2005-03-19 20:42:43 +00:00
Chris Lattner
e6364c2702
implement a proper copy ctor, operator= and add a helper method.
...
llvm-svn: 20690
2005-03-19 19:26:14 +00:00
Chris Lattner
484bfc4d26
Fix the 3 regressions last night, due to my buggy patch from yesterday.
...
llvm-svn: 20689
2005-03-19 17:35:11 +00:00
Alkis Evlogimenos
9160d5fd8b
Add new function getPtrPtrFromArrayPtr().
...
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Alkis Evlogimenos
1a48561432
Stop using deprecated interface.
...
llvm-svn: 20679
2005-03-19 09:22:17 +00:00
Chris Lattner
c1b9b56a2c
Switch to use the new interface for the EquivalenceClasses class, and fix
...
a bug involving SCC's who have multiple members that are part of an EC.
llvm-svn: 20678
2005-03-19 05:15:27 +00:00
Chris Lattner
c3256647e7
Rewrite this class, making the following improvements:
...
1. It now actually uses tarjan's algorithm, so it is a efficient inverse
ackerman's function for union operations, not linear time.
2. It now stores one copy of the data in the set instead of two.
3. It now works for elements other than pointers.
4. It now has a more STL-like interface that exposes iterators instead
of internal implementation details.
llvm-svn: 20677
2005-03-19 05:14:29 +00:00
Chris Lattner
bed1c18a44
do not bother inlining nullary functions without return values. The only
...
effect these calls can have is due to global variables, and these passes
all use the globals graph to capture their effect anyway. This speeds up
the BU pass very slightly on perlbmk, reducing the number of dsnodes
allocated from 98913 to 96423.
llvm-svn: 20676
2005-03-18 23:19:47 +00:00
Chris Lattner
30525a04c1
fix a bogus assertion
...
llvm-svn: 20675
2005-03-18 23:18:30 +00:00
Chris Lattner
5bd948b4d7
another fastpath
...
llvm-svn: 20674
2005-03-18 23:18:20 +00:00
Chris Lattner
bed9657ff6
remove use of getPrev() and getNext() on ilist nodes.
...
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Chris Lattner
e29503a805
expose this pass to both opt and analyze
...
llvm-svn: 20672
2005-03-18 05:27:57 +00:00
Misha Brukman
f12594d56f
We shall have IA64 as a new experimental backend released with LLVM 1.5
...
llvm-svn: 20671
2005-03-18 00:48:56 +00:00
Chris Lattner
a8e1a5250a
remove a bogus optimization. This only works if there are no globals in the
...
graph, and the combination of a function that does not reference globals, takes
not arguments and returns no value is pretty rare.
llvm-svn: 20670
2005-03-18 00:23:59 +00:00
Chris Lattner
3f181d7880
Rewrite DSAA::getModRefInfo to compute the mapping between caller and callee
...
to determine mod/ref behavior, instead of creating a *copy* of the caller
graph and inlining the callee graph into the copy.
This speeds up aa-eval on Ptrdist/yacr2 from 109.13s to 3.98s, and gives
identical results. The speedup is similar on other programs.
llvm-svn: 20669
2005-03-18 00:21:03 +00:00
Chris Lattner
b8d85c1a74
implement a new method.
...
llvm-svn: 20668
2005-03-17 23:45:54 +00:00
Chris Lattner
49ec9eeede
add 3 methods
...
llvm-svn: 20667
2005-03-17 23:45:35 +00:00
Misha Brukman
72c27e6112
Recognize an IA64 when we see one
...
llvm-svn: 20666
2005-03-17 20:56:22 +00:00
Chris Lattner
488a80a292
add some possibly bogus assertions.
...
llvm-svn: 20665
2005-03-17 20:33:27 +00:00
Chris Lattner
9c9f68c42f
Do not include the Function* for direct call/invoke instructions in the
...
alias evaluation. Clients really don't care.
llvm-svn: 20664
2005-03-17 20:25:04 +00:00
Duraid Madina
8a3aa43422
typo/denial
...
llvm-svn: 20663
2005-03-17 20:23:27 +00:00
Chris Lattner
b5525529bd
simplify this function a bit, allow DS-AA to build on/improve the mod/ref
...
results returned by AA, not just use one or the other.
llvm-svn: 20662
2005-03-17 20:16:58 +00:00
Chris Lattner
8dd1491e71
Clean up some code, handle null pointer specially to avoid an assertion
...
llvm-svn: 20660
2005-03-17 19:56:56 +00:00
Chris Lattner
ea7e6548dc
Two changes:
...
1. Chain to the parent implementation of M/R analysis if we can't find
any information. It has some heuristics that often do well.
2. Do not clear all flags, this can make invalid nodes by turning nodes
that used to be collapsed into non-collapsed nodes (fixing crashes)
llvm-svn: 20659
2005-03-17 19:56:18 +00:00
Duraid Madina
df642ff2ae
clean up warnings when building in release mode
...
llvm-svn: 20658
2005-03-17 19:00:40 +00:00
Duraid Madina
bf01370fc3
now the angry bug reports have somewhere to go!
...
llvm-svn: 20657
2005-03-17 18:57:02 +00:00
Chris Lattner
206f2ecaf2
statically link ia64 into llc
...
llvm-svn: 20656
2005-03-17 18:39:06 +00:00
Duraid Madina
a06265a119
OK, IA64 is statically linked into llc
...
llvm-svn: 20655
2005-03-17 18:37:05 +00:00
Duraid Madina
f5cc2c453d
build the IA64 target as a .so for now
...
llvm-svn: 20654
2005-03-17 18:29:04 +00:00
Duraid Madina
e20f4cd1b0
dainty
...
llvm-svn: 20653
2005-03-17 18:23:22 +00:00
Duraid Madina
91ed0a11cf
and so it begins...
...
PHASE 1: write instruction selector
PHASE 2: ???
PHASE 3: profit!
llvm-svn: 20652
2005-03-17 18:17:03 +00:00
Chris Lattner
43832b049e
Don't emit two comparisons when comparing a FP value against zero!
...
llvm-svn: 20651
2005-03-17 16:29:26 +00:00
Chris Lattner
9fcfb35e1a
spiff up the nightly tester output one more notch
...
llvm-svn: 20650
2005-03-17 16:07:45 +00:00
Chris Lattner
7b9020a059
Fix the missing symbols problem Bill was hitting. Patch contributed by
...
Bill Wendling!!
llvm-svn: 20649
2005-03-17 15:38:16 +00:00
Chris Lattner
5251047abd
Do not create ridiculously huge DSNodes, as described in the comments.
...
This speeds up the BU pass on 172.mgrid from 62.3 -> 0.1242s.
llvm-svn: 20648
2005-03-17 05:25:34 +00:00
Chris Lattner
252f546ceb
Fix a bug where we would consider " .99" and "1.0" different because of the
...
leading whitespace.
llvm-svn: 20647
2005-03-17 04:49:04 +00:00
Chris Lattner
6b6bdf602b
remove compat_iterator, which is dead in the tree.
...
llvm-svn: 20644
2005-03-16 22:42:45 +00:00
Chris Lattner
62462c2314
remove use of compat_iterator.
...
llvm-svn: 20643
2005-03-16 22:42:19 +00:00
Chris Lattner
4559d5f5c0
remove use of compat_iterator
...
llvm-svn: 20642
2005-03-16 22:42:01 +00:00
Chris Lattner
267cfa042b
Print out who commits and what files were modified at the bottom of the test summary log sent to llvm-commits.
...
llvm-svn: 20641
2005-03-16 17:09:53 +00:00
Jeff Cohen
44af33905a
Do #include HashExtras.h with VC++
...
llvm-svn: 20640
2005-03-16 05:49:58 +00:00
Jeff Cohen
d4cc65f39d
Don't provide default hash struct instantiation.
...
llvm-svn: 20639
2005-03-16 05:49:06 +00:00
Misha Brukman
96eb878f2a
Convert tabs to spaces
...
llvm-svn: 20638
2005-03-16 05:42:00 +00:00
Jeff Cohen
9f15b5eb40
Add adapter class to let VC++ hash_map use GCC's hash struct.
...
llvm-svn: 20637
2005-03-16 05:25:09 +00:00
Jeff Cohen
2419195c1e
Remove deleted files from VC++ project.
...
llvm-svn: 20636
2005-03-16 05:09:59 +00:00
Misha Brukman
3f922a3a37
Fix grammar wrt apostrophe's
...
llvm-svn: 20635
2005-03-16 03:54:50 +00:00
Misha Brukman
7fa86b98c3
Convert tabs to spaces
...
llvm-svn: 20634
2005-03-16 03:46:55 +00:00
Chris Lattner
018b093c79
fix some 80 column violations
...
Add support for programs that define main in a .a file, such as f2c'd programs.
llvm-svn: 20631
2005-03-15 23:03:34 +00:00
Chris Lattner
ebaf17875e
consolidate LinkFiles into LinkItems, use lib_* iterators.
...
llvm-svn: 20630
2005-03-15 22:55:17 +00:00
Chris Lattner
d3d086d679
consolidate LinkLibraries into LinkItems
...
llvm-svn: 20629
2005-03-15 22:51:40 +00:00
Chris Lattner
f901355379
make sure to mark nodes in the globals graph incomplete after computing it
...
so that external globals (and whatever they point to) are marked incomplete.
llvm-svn: 20628
2005-03-15 22:47:18 +00:00
Chris Lattner
21a79edb27
fix crashes when we only have a prototype for main.
...
llvm-svn: 20627
2005-03-15 22:10:04 +00:00
Chris Lattner
dadf4b369e
Fix a crash that happens when mapping something like this:
...
{ short, short }
to
short
where the second short maps onto the second field of the first struct. In
this case, the struct index is not aligned, so we should avoid calling
getLink(2), which asserts out.
llvm-svn: 20626
2005-03-15 21:36:50 +00:00
Andrew Lenharth
aa254d5f79
sure, I can set a flag, but if I never check it, why bother setting it? Should fix 20 programs :)
...
llvm-svn: 20623
2005-03-15 19:51:19 +00:00
Chris Lattner
dd3fb83f32
Make computeGGToGMapping compute an invnodemap
...
llvm-svn: 20622
2005-03-15 17:52:18 +00:00
Chris Lattner
6cd5d1adb6
remove warning, make computeGGToGMapping return an invnodemap.
...
llvm-svn: 20621
2005-03-15 17:52:07 +00:00
Chris Lattner
3918419c77
add support for hashing nodehandles.
...
llvm-svn: 20620
2005-03-15 17:51:51 +00:00
Chris Lattner
d31a3d0e82
Finally fix (the right way) the problem where functions like this:
...
void foo() {
G = 1;
}
would have an empty DSGraph even though G (a global) is directly used
in the function.
llvm-svn: 20619
2005-03-15 17:14:09 +00:00
Chris Lattner
92d0c1c1ba
Start using retnodes_* for iteration.
...
llvm-svn: 20618
2005-03-15 16:55:04 +00:00
Chris Lattner
f8c924bfcf
add iterators for return nodes list.
...
llvm-svn: 20617
2005-03-15 16:46:11 +00:00
Chris Lattner
0bda00642f
method renamed
...
llvm-svn: 20616
2005-03-15 15:48:22 +00:00
Chris Lattner
22b216a59e
Replace more a*'s with arg_*'s, thanks to Gabor Greif!
...
llvm-svn: 20615
2005-03-15 15:48:06 +00:00
Chris Lattner
3779fd6521
add missing copyright header
...
llvm-svn: 20614
2005-03-15 15:46:23 +00:00
Alkis Evlogimenos
222dcd44ff
Stop using abegin and aend.
...
llvm-svn: 20610
2005-03-15 07:20:55 +00:00
Alkis Evlogimenos
84adfd8c4f
Stop using abegin.
...
llvm-svn: 20609
2005-03-15 07:12:30 +00:00
Alkis Evlogimenos
a67bafa568
Use arg_iterator and arg_begin and arg_end functions.
...
llvm-svn: 20608
2005-03-15 07:02:26 +00:00
Jeff Cohen
9bc0cc890e
Add EquivClassGraphs.cpp to VC++ project.
...
llvm-svn: 20607
2005-03-15 06:31:46 +00:00
Chris Lattner
451fa32685
avoid varialbe name collisions
...
llvm-svn: 20606
2005-03-15 06:29:12 +00:00
Jeff Cohen
99c15a5d48
Do it right...
...
llvm-svn: 20605
2005-03-15 06:21:40 +00:00
Jeff Cohen
10be0f6f1b
Fix VC++ breakage.
...
llvm-svn: 20604
2005-03-15 06:15:08 +00:00
Chris Lattner
6cb4559369
stop using method.
...
llvm-svn: 20603
2005-03-15 05:19:49 +00:00
Chris Lattner
bc18ef02ce
methods removed.
...
llvm-svn: 20602
2005-03-15 05:19:20 +00:00
Chris Lattner
4d6b6d4d6e
remove reverse BB iterators.
...
llvm-svn: 20601
2005-03-15 05:17:48 +00:00
Chris Lattner
57b2cd665b
remove a whole bunch of dead methods. Noone should use reverse iterators anyway.
...
llvm-svn: 20600
2005-03-15 05:13:47 +00:00
Chris Lattner
fb972add4f
stop using arg_front
...
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
31c8a9d41a
stop using arg_back
...
llvm-svn: 20598
2005-03-15 04:59:17 +00:00
Chris Lattner
531f9e92d4
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
5ce25cdc6d
switch from a* to arg_* and g* to global_* for argument/global var iterators
...
llvm-svn: 20596
2005-03-15 04:48:32 +00:00
Chris Lattner
28f1caa639
Don't crash if computing a mapping to a node with zero size
...
llvm-svn: 20595
2005-03-15 04:40:24 +00:00
Chris Lattner
26415d7432
rename method, add counterpart
...
llvm-svn: 20593
2005-03-15 00:58:16 +00:00
Chris Lattner
9468d19ce9
Rename method, add counterpart.
...
llvm-svn: 20592
2005-03-15 00:58:09 +00:00
Chris Lattner
91e6ed6e36
Remove the reverse iterators for arguments and global vars.
...
Rename argument iterators arg_* instead of a*
Remove global variable iterators global_* instead of g*.
Keep the old names for temporary compatibility.
Patch contributed by Gabor Greif!
llvm-svn: 20591
2005-03-14 23:49:40 +00:00
Andrew Lenharth
0b9096bcc5
FP 0.0 setcc optimization, and generate short branch sequence for setcc(FP) rather than stack usage
...
llvm-svn: 20589
2005-03-14 19:23:45 +00:00
Chris Lattner
1bdb8b7e7e
add a method to compute a commonly used mapping.
...
llvm-svn: 20588
2005-03-14 19:22:47 +00:00
Chris Lattner
40e2b71f7a
Add a useful method.
...
llvm-svn: 20587
2005-03-14 19:22:33 +00:00
Chris Lattner
9071175625
regardless of whether or not the client things we should mark globals incomplete,
...
ALWAYS mark them incomplete if they are external!
llvm-svn: 20586
2005-03-13 20:36:01 +00:00
Chris Lattner
b9e2a4dec0
Make sure to remove incomplete markers before we add to them! :)
...
llvm-svn: 20585
2005-03-13 20:32:26 +00:00
Chris Lattner
5a6609771a
The incoming arguments to main (the argv list) are not complete!
...
llvm-svn: 20584
2005-03-13 20:22:10 +00:00
Chris Lattner
2eff970892
After finishing BU analysis, move all global variables from the globals
...
graph into main and mark them complete.
llvm-svn: 20583
2005-03-13 20:15:06 +00:00
Chris Lattner
68c3caccb1
ADd support for printing eqgraphs.
...
llvm-svn: 20582
2005-03-13 19:51:24 +00:00
Chris Lattner
db98a9745a
Add support for printing EQ graphs
...
llvm-svn: 20581
2005-03-13 19:50:40 +00:00
Chris Lattner
9cc2c3e9d6
Replace linear search with logrithmic one.
...
llvm-svn: 20580
2005-03-13 19:05:05 +00:00
Chris Lattner
3434004dce
add a StructLayout::getElementContainingOffset method.
...
llvm-svn: 20579
2005-03-13 19:04:41 +00:00
Chris Lattner
e15f891bf0
add a helper method
...
llvm-svn: 20578
2005-03-13 19:04:04 +00:00
Andrew Lenharth
af9a15fe64
Should fix mesa
...
llvm-svn: 20577
2005-03-13 00:43:20 +00:00
Chris Lattner
97ac0a8780
make sure to mark nodes returned from functions as incomplete
...
llvm-svn: 20576
2005-03-12 14:58:28 +00:00
Chris Lattner
dd6bcbe820
remove this from the PA namespace, leaving it in the llvm ns
...
llvm-svn: 20574
2005-03-12 12:08:52 +00:00
Chris Lattner
2dd9a09837
Move this from the pool allocator project to here, where it logically belongs.
...
llvm-svn: 20570
2005-03-12 11:51:30 +00:00
Chris Lattner
a945923045
this doesn't fail on the suns either!
...
llvm-svn: 20567
2005-03-12 03:43:38 +00:00
Misha Brukman
8f3df64397
Move link to GCC prefetch info here, since it's gone from Open Projects page
...
llvm-svn: 20566
2005-03-11 21:18:18 +00:00
Chris Lattner
90e6ff073c
this passes on darwin
...
llvm-svn: 20565
2005-03-11 21:18:00 +00:00
Chris Lattner
5490aae863
Fix computation of compiled objects, contributed by Vladimir Merzliakov!
...
llvm-svn: 20564
2005-03-11 20:17:04 +00:00
Andrew Lenharth
27a3df07a0
remove a pseudo instruction and improve inline constant generation
...
llvm-svn: 20563
2005-03-11 17:48:05 +00:00
Chris Lattner
db302f899a
prefetch is now supported.
...
llvm-svn: 20562
2005-03-11 06:16:26 +00:00
Chris Lattner
c2fdf33162
new testcase for __builtin_prefetch support.
...
llvm-svn: 20561
2005-03-11 06:14:23 +00:00
Misha Brukman
9d72af0489
* Remove extraneous spaces
...
* Convert some tabs to spaces
llvm-svn: 20560
2005-03-11 04:15:18 +00:00
Nate Begeman
5f399bb2fe
Add SelectionDAG library to PPC JIT so that lli will link when
...
PPC32ISelPattern.cpp is present.
llvm-svn: 20559
2005-03-11 03:58:53 +00:00
Chris Lattner
8227a51c10
Fix some crashes noted by John Mellor-Crummey's group.
...
llvm-svn: 20558
2005-03-11 00:00:56 +00:00
Misha Brukman
922bf92b08
Sprinkle code examples and command-line interaction examples with some style
...
llvm-svn: 20557
2005-03-11 00:00:33 +00:00
Misha Brukman
5da60ba6aa
* Add directions to send output of nightly test script to llvm-testresults@cs
...
* Use the doc_code class to nightly test script example
* Enclose file names in <tt> tags
* Achieve compliance with HTML-4.01 Strict
llvm-svn: 20556
2005-03-10 22:51:59 +00:00
Chris Lattner
6f6ecad995
I didn't mean to check this in. :(
...
llvm-svn: 20555
2005-03-10 20:59:51 +00:00
Chris Lattner
85e7163947
Fix a bug where we would incorrectly do a sign ext instead of a zero ext
...
because we were checking the wrong thing. Thanks to andrew for pointing
this out!
llvm-svn: 20554
2005-03-10 20:55:51 +00:00
Andrew Lenharth
7054073bb6
yay for camel_cvs diff
...
llvm-svn: 20552
2005-03-10 20:15:09 +00:00
Andrew Lenharth
7728eb7b80
some typoes and .bss isn't liked, at all
...
llvm-svn: 20542
2005-03-10 19:02:02 +00:00
Misha Brukman
df5b6d3921
Replace tabs with spaces, separate function arguments with a space
...
llvm-svn: 20538
2005-03-10 16:32:33 +00:00
Chris Lattner
2aade22c67
Improve formatting of the sent mail for the dj test results.
...
llvm-svn: 20537
2005-03-10 16:26:50 +00:00
Chris Lattner
76aa8e071b
Allow the live interval analysis pass to be a bit more aggressive about
...
numbering values in live ranges for physical registers.
The alpha backend currently generates code that looks like this:
vreg = preg
...
preg = vreg
use preg
...
preg = vreg
use preg
etc. Because vreg contains the value of preg coming in, each of the
copies back into preg contain that initial value as well.
In the case of the Alpha, this allows this testcase:
void "foo"(int %blah) {
store int 5, int *%MyVar
store int 12, int* %MyVar2
ret void
}
to compile to:
foo:
ldgp $29, 0($27)
ldiq $0,5
stl $0,MyVar
ldiq $0,12
stl $0,MyVar2
ret $31,($26),1
instead of:
foo:
ldgp $29, 0($27)
bis $29,$29,$0
ldiq $1,5
bis $0,$0,$29
stl $1,MyVar
ldiq $1,12
bis $0,$0,$29
stl $1,MyVar2
ret $31,($26),1
This does not seem to have any noticable effect on X86 code.
This fixes PR535.
llvm-svn: 20536
2005-03-09 23:05:19 +00:00
Andrew Lenharth
8145fec740
minor correction for Register that isn't used
...
llvm-svn: 20535
2005-03-09 20:48:23 +00:00
Chris Lattner
7f26946709
constant fold FP_ROUND_INREG, ZERO_EXTEND_INREG, and SIGN_EXTEND_INREG
...
This allows the alpha backend to compile:
bool %test(uint %P) {
%c = seteq uint %P, 0
ret bool %c
}
into:
test:
ldgp $29, 0($27)
ZAP $16,240,$0
CMPEQ $0,0,$0
AND $0,1,$0
ret $31,($26),1
instead of:
test:
ldgp $29, 0($27)
ZAP $16,240,$0
ldiq $1,0
ZAP $1,240,$1
CMPEQ $0,$1,$0
AND $0,1,$0
ret $31,($26),1
... and fixes PR534.
llvm-svn: 20534
2005-03-09 18:37:12 +00:00
Chris Lattner
b1d901427a
correct the computation of the isAbstract bit for types.
...
llvm-svn: 20533
2005-03-09 17:34:27 +00:00
Chris Lattner
562c180879
Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
...
that Alkis found with Java, thanks Alkis!
llvm-svn: 20531
2005-03-09 16:29:52 +00:00
Chris Lattner
623bb75d35
new testcase for a -basicaa bug that Alkis found with Java.
...
llvm-svn: 20530
2005-03-09 16:29:22 +00:00
Reid Spencer
f064bb2617
Fix a typo in an assertion comment.
...
Patch contributed by Vladimir Merzliakov.
llvm-svn: 20529
2005-03-09 15:19:41 +00:00
Chris Lattner
4dc39d447d
Use static_cast and #include Instructions.h
...
llvm-svn: 20528
2005-03-09 05:35:16 +00:00
Chris Lattner
adb043c2d8
Export two methods for getting -X and A-B.
...
llvm-svn: 20527
2005-03-09 05:34:41 +00:00
Chris Lattner
bc6b18e6d3
export two methods
...
llvm-svn: 20526
2005-03-09 05:34:23 +00:00
Chris Lattner
b9f0cebeb5
get bugpoint working on ia64, by building .so's with -fpic. :)
...
llvm-svn: 20525
2005-03-09 03:31:02 +00:00
Chris Lattner
1f1462fafa
Fix a crash handling 'undef bool', fixing an llc crash on 186.crafty
...
llvm-svn: 20523
2005-03-08 22:53:09 +00:00
Reid Spencer
00658b80fb
Patch to make assembly output compatible with mingw compilation (identical
...
to cygwin)
llvm-svn: 20520
2005-03-08 17:02:05 +00:00
Chris Lattner
ea50620eec
Make sure to remove all dead type names from the symbol table, not just
...
struct types. This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll,
a crash on Java output that Alkis reported.
llvm-svn: 20519
2005-03-08 16:19:59 +00:00
Chris Lattner
7c303235b4
new testcase that crashes the CBE.
...
llvm-svn: 20518
2005-03-08 16:19:02 +00:00
Jeff Cohen
e77909805b
Clarify inability to generate assembly, and note that VC++ Express works.
...
llvm-svn: 20516
2005-03-08 03:56:50 +00:00
Misha Brukman
20238eb963
Single characters should be printed out as chars, not strings.
...
llvm-svn: 20515
2005-03-08 00:26:08 +00:00
Chris Lattner
455fc8c917
Various cleanups and clarifications, thanks to Gabor Greif for contributing this patch!
...
llvm-svn: 20514
2005-03-07 22:13:59 +00:00
Chris Lattner
4604436b29
Fix problems compiling with G++ 4.x.x with -pedantic. Thanks to
...
Vladimir Merzliakov for the patch!
llvm-svn: 20513
2005-03-07 20:35:45 +00:00
Chris Lattner
d3e641c2ab
fix another typo
...
llvm-svn: 20512
2005-03-07 20:31:38 +00:00
Chris Lattner
2e6eb5f40d
fix typeo that Gabor Greif noticed!
...
llvm-svn: 20511
2005-03-07 20:30:51 +00:00
Chris Lattner
a9beaacac6
move the reassociation pass after the LICM pass. This speeds up mgrid
...
from 10.27s to 9.57s with the CBE.
llvm-svn: 20508
2005-03-07 03:19:50 +00:00
Chris Lattner
e9328b319c
Fix an apparent ambiguity compiling on PPC
...
llvm-svn: 20507
2005-03-07 02:59:36 +00:00
Chris Lattner
8c79559443
fix a bug where we thought arguments were constants :(
...
llvm-svn: 20506
2005-03-06 22:52:29 +00:00
Chris Lattner
2ce303b406
Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll,
...
hopefully not breaking too many other things.
llvm-svn: 20505
2005-03-06 22:36:12 +00:00
Chris Lattner
5991cf77b2
cleanup the test
...
llvm-svn: 20504
2005-03-06 22:24:45 +00:00
Chris Lattner
1173c52d82
check that we only insert one phi node per loop
...
llvm-svn: 20503
2005-03-06 22:23:31 +00:00
Chris Lattner
392a0bba42
Add testcase for this:
...
(3) Do not reduce element sizes of small power of two:
char s[10];
for (i)
...s[i] ...
when the indvar is not eliminable.
llvm-svn: 20502
2005-03-06 22:15:24 +00:00
Chris Lattner
45403e5052
implement Transforms/LoopStrengthReduce/invariant_value_first_arg.ll
...
llvm-svn: 20501
2005-03-06 22:06:22 +00:00
Chris Lattner
656a6e37e1
testcase for A[invariant][indvar] where invariant is an instruction.
...
llvm-svn: 20500
2005-03-06 22:06:09 +00:00
Chris Lattner
ab00dc30df
add test for this:
...
(1) Allow loop invariant expressions to come before the induction variable (instead of just
constants):
int x;
for (i)
...a[x][i]
llvm-svn: 20499
2005-03-06 22:04:27 +00:00
Chris Lattner
97b8cbff7c
Add test for this:
...
Allow operands after the induction variable (no restrictions):
int x;
for (i)
j = .....
a[i][x][j]
llvm-svn: 20498
2005-03-06 22:01:42 +00:00
Chris Lattner
d3874fad44
minor simplifications of the code.
...
llvm-svn: 20497
2005-03-06 21:58:22 +00:00
Chris Lattner
9cd727c2ee
a regtest
...
llvm-svn: 20496
2005-03-06 21:47:40 +00:00
Chris Lattner
78f166c6ab
new directory
...
llvm-svn: 20495
2005-03-06 21:42:59 +00:00
Chris Lattner
dd3ec92085
trivial simplification
...
llvm-svn: 20494
2005-03-06 21:35:38 +00:00
Chris Lattner
238f6df546
Fix a bug where we could corrupt a parent loop's header info if we unrolled
...
a nested loop. This fixes Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll
and PR532
llvm-svn: 20493
2005-03-06 20:57:32 +00:00
Chris Lattner
1c69aab68b
New testcase for PR532
...
llvm-svn: 20492
2005-03-06 20:56:55 +00:00
Chris Lattner
6aa5f97a05
new helper method
...
llvm-svn: 20491
2005-03-06 20:55:34 +00:00
Chris Lattner
a93419c8df
new testcase reduced from the MultiSource/Applications/d failure last night.
...
llvm-svn: 20490
2005-03-06 19:40:19 +00:00
Chris Lattner
5de9dec0d1
move some method declarations around to make it clear that users should
...
not call insert(Value *Val), remove(Value* Val), or
changeName(Value *V, const std::string &Name)
llvm-svn: 20488
2005-03-06 06:03:44 +00:00
Chris Lattner
96b7bf6244
this method is never called.
...
llvm-svn: 20487
2005-03-06 06:00:24 +00:00
Chris Lattner
897cc8e1ec
cleanup some html
...
remove a statement that is no longer true
remove comment about a dead method.
llvm-svn: 20486
2005-03-06 06:00:13 +00:00
Chris Lattner
19d1c03311
the only caller of insertEntry is insert, inline it and remove insertEntry
...
llvm-svn: 20485
2005-03-06 05:56:02 +00:00
Chris Lattner
86fe3a1fdb
rename insertEntry to insert
...
llvm-svn: 20484
2005-03-06 05:55:40 +00:00
Chris Lattner
533805e6da
Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
...
llvm-svn: 20483
2005-03-06 05:51:09 +00:00
Chris Lattner
7dfb29d5cb
remove this method.
...
llvm-svn: 20482
2005-03-06 05:50:49 +00:00
Chris Lattner
290d881f84
Delete the really inefficient method: void remove(const Type* Typ);
...
Speed up the symbol stripping code by avoiding a linear search of the
type table.
Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.
llvm-svn: 20481
2005-03-06 05:46:41 +00:00
Chris Lattner
aa4138a5da
Delete the really inefficient method: void remove(const Type* Typ);
...
Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.
llvm-svn: 20480
2005-03-06 05:46:00 +00:00
Chris Lattner
1b032f59e7
Make this MUCH faster by avoiding a linear search in the symbol table code.
...
llvm-svn: 20479
2005-03-06 05:42:36 +00:00
Chris Lattner
bcd8393d50
InternallyInconsistent is dead!
...
llvm-svn: 20478
2005-03-06 05:22:05 +00:00
Chris Lattner
bad0e7e2d9
Remove some really gross and hard to understand code now that
...
InternallyInconsistent is always false.
llvm-svn: 20477
2005-03-06 05:21:40 +00:00
Chris Lattner
cd56f5a8e4
Simplify some code.
...
llvm-svn: 20476
2005-03-06 05:13:42 +00:00
Chris Lattner
6be3b418e7
remove these dead methods.
...
llvm-svn: 20475
2005-03-06 02:38:24 +00:00
Chris Lattner
eb9a12cbce
remove these methods.
...
llvm-svn: 20474
2005-03-06 02:37:47 +00:00
Chris Lattner
807db03233
These methods are removed.
...
llvm-svn: 20473
2005-03-06 02:37:21 +00:00
Chris Lattner
8a982e10be
simplify and speed up some code
...
llvm-svn: 20472
2005-03-06 02:32:00 +00:00
Chris Lattner
c9b0984666
simplify some code.
...
llvm-svn: 20471
2005-03-06 02:28:23 +00:00
Chris Lattner
8344ba0dac
nuke some dead methods.
...
llvm-svn: 20470
2005-03-06 02:25:02 +00:00
Chris Lattner
ffb3778f87
This fixes PR531, a crash when running the CBE on a bytecode file.
...
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).
The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one. This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.
This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)
llvm-svn: 20469
2005-03-06 02:14:28 +00:00
Chris Lattner
bb28bfdcbf
Add a new method, allow symtab to poke name.
...
llvm-svn: 20468
2005-03-06 02:10:40 +00:00
Jeff Cohen
4abcea3a69
Reformat comments to fix 80 columns.
...
llvm-svn: 20467
2005-03-05 22:45:40 +00:00
Jeff Cohen
be37fa07fd
Reuse induction variables created for strength-reduced GEPs by other similar GEPs.
...
llvm-svn: 20466
2005-03-05 22:40:34 +00:00
Chris Lattner
9d0ac507ba
remove extraneous spaces from argument lists.
...
llvm-svn: 20465
2005-03-05 19:58:40 +00:00
Chris Lattner
cdb9bfc150
remove all of the various setName implementations, consolidating them into
...
Value::setName, which is no longer virtual.
llvm-svn: 20464
2005-03-05 19:51:50 +00:00
Chris Lattner
6d0a24c608
second argument to Value::setName is now gone.
...
llvm-svn: 20463
2005-03-05 19:05:20 +00:00
Chris Lattner
7c832fb0b2
Make sure the two arguments of a setcc instruction point to the same node.
...
llvm-svn: 20462
2005-03-05 19:04:31 +00:00
Chris Lattner
aa72c889a6
zap
...
llvm-svn: 20461
2005-03-05 19:04:07 +00:00
Chris Lattner
f66165674f
2nd arg to setName goes away.
...
llvm-svn: 20460
2005-03-05 19:02:15 +00:00
Chris Lattner
cc77b84fcb
Constants never get names.
...
llvm-svn: 20459
2005-03-05 19:01:59 +00:00
Chris Lattner
ed2fb1cf93
Remove the 2nd argument to Value::setName
...
llvm-svn: 20458
2005-03-05 19:01:49 +00:00
Chris Lattner
f18c871b58
Remove the second argument to Value::setName, it is never needed.
...
llvm-svn: 20457
2005-03-05 18:59:36 +00:00
Chris Lattner
15ac102737
New testcase for PR533
...
llvm-svn: 20456
2005-03-05 18:47:28 +00:00
Chris Lattner
f246ef3e2f
don't break the build on 32-bit hosts.
...
llvm-svn: 20455
2005-03-05 17:47:38 +00:00
Chris Lattner
02f0d7bcc9
This file is all commented out.
...
llvm-svn: 20454
2005-03-05 17:28:37 +00:00
Andrew Lenharth
7c954c6d13
fix data size stuff for architectures with bit challenged data types
...
llvm-svn: 20453
2005-03-05 15:30:33 +00:00
Chris Lattner
cfe2822cdf
Do not compute 1ULL << 64, which is undefined. This fixes Ptrdist/ks on the
...
sparc, and testcase Regression/Transforms/InstCombine/2005-03-04-ShiftOverflow.ll
llvm-svn: 20445
2005-03-04 23:21:33 +00:00
Chris Lattner
6cc4ee0f24
Testcase for a bug that caused us to miscompile ptrdist/ks on sparc.
...
llvm-svn: 20444
2005-03-04 23:20:46 +00:00
Andrew Lenharth
f3cd1477c3
fix up stack pointer adjustments
...
llvm-svn: 20442
2005-03-04 21:40:02 +00:00
Chris Lattner
c01e2f76c3
Trivial cleanup patch
...
llvm-svn: 20436
2005-03-04 20:27:46 +00:00
Andrew Lenharth
8df62dda57
fix FCMOVxx typo, set rem and div to hardcode target reg to be the same as the one the assembler uese, update ISel to put values in regs used by assembler for rem and div
...
llvm-svn: 20434
2005-03-04 20:09:23 +00:00
Jeff Cohen
a2c59b7423
Add support for not strength reducing GEPs where the element size is a small
...
power of two. This emphatically includes the zeroeth power of two.
llvm-svn: 20429
2005-03-04 04:04:26 +00:00
Andrew Lenharth
f0ab14aa24
turn on IEEE for compares
...
llvm-svn: 20425
2005-03-03 22:12:11 +00:00
Andrew Lenharth
6a5f52d15a
beter Select on FP
...
llvm-svn: 20424
2005-03-03 21:47:53 +00:00
Chris Lattner
00ee68c612
Print -X like this:
...
double test(double l1_X) {
return (-l1_X);
}
instead of like this:
double test(double l1_X) {
return (-0x0p+0 - l1_X);
}
llvm-svn: 20423
2005-03-03 21:12:04 +00:00
Andrew Lenharth
00348ce902
LSR cleanup patch
...
llvm-svn: 20422
2005-03-03 19:03:21 +00:00
Chris Lattner
1a678c67c9
Do not lower malloc's to pass "sizeof" expressions like this:
...
ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));
Instead, just emit the literal constant, like this:
ltmp_0_7 = malloc(784u);
This works around a bug in ICC 8.1 compiling the CBE generated code. :-(
llvm-svn: 20415
2005-03-03 01:04:50 +00:00
Chris Lattner
ef1e989e4f
Add an optional argument to lower to a specific constant value instead of
...
to a "sizeof" expression.
llvm-svn: 20414
2005-03-03 01:03:43 +00:00
Chris Lattner
3b5667c579
Add an argument.
...
llvm-svn: 20413
2005-03-03 01:03:10 +00:00
Misha Brukman
f090d1b3ab
Fix the spelling of the word `the'
...
llvm-svn: 20412
2005-03-02 23:17:31 +00:00
Chris Lattner
4d8689edcb
Print the module ID as a comment.
...
llvm-svn: 20411
2005-03-02 23:12:40 +00:00
Chris Lattner
5b5caaf3cd
cleanup the cfg after lsr
...
llvm-svn: 20410
2005-03-02 21:56:00 +00:00
Andrew Lenharth
180a04a4bb
remove 32 sign extend after 32 sextload and handle small negative constant
...
llvm-svn: 20408
2005-03-02 17:23:03 +00:00
Andrew Lenharth
ed4b6488a7
Added LSR as a beta pass for alpha
...
llvm-svn: 20407
2005-03-02 17:21:38 +00:00
Chris Lattner
c8bb99760a
Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
...
Loop Strength Reduction.
llvm-svn: 20399
2005-03-02 06:19:22 +00:00
Reid Spencer
a556669219
Be slightly more accurate in an error message.
...
llvm-svn: 20397
2005-03-02 05:45:56 +00:00
Chris Lattner
fe760deb75
Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's an
...
explanation from IRC:
|sabre| I think it's an order of evaluation thing
|sabre| for me, the RHS of the assignment is evaluated first
|sabre| getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything
|sabre| since it doesn't, it computes and returns the value
|sabre| this gets put into the map.
|sabre| For you, the LHS is evaluated first.
|sabre| Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference
|sabre| getTypeDesc then sees the empty string in the map
|sabre| and returns it
|sabre| bork :)
llvm-svn: 20394
2005-03-02 03:54:43 +00:00
Chris Lattner
884ebd4c79
Now that type does not derive from Value, these do not need to be virtual.
...
llvm-svn: 20393
2005-03-02 03:43:55 +00:00
Misha Brukman
e4fad6b70f
Fix HTML-4.01 Strict compliance
...
llvm-svn: 20386
2005-03-01 17:19:21 +00:00
Misha Brukman
a9b8676393
Use a colon instead of a period since we're introducing a command list
...
llvm-svn: 20385
2005-03-01 17:15:23 +00:00
Reid Spencer
fefb9ea94d
Correct a typo in Makefile.rules.
...
Patch idea contributed by Vladimir Merzliakov.
llvm-svn: 20384
2005-03-01 16:27:06 +00:00
Jeff Cohen
8ea6f9e821
Fixed the following LSR bugs:
...
* Loop invariant code does not dominate the loop header, but rather
the end of the loop preheader.
* The base for a reduced GEP isn't a constant unless all of its
operands (preceding the induction variable) are constant.
* Allow induction variable elimination for the simple case after all.
Also made changes recommended by Chris for properly deleting
instructions.
llvm-svn: 20383
2005-03-01 03:46:11 +00:00
Alkis Evlogimenos
b3846f4b06
Lower llvm.isunordered(a, b) into a != a | b != b.
...
llvm-svn: 20382
2005-03-01 02:07:58 +00:00
Chris Lattner
ff851073f6
cleanup my miswording
...
llvm-svn: 20381
2005-02-28 19:47:14 +00:00
Chris Lattner
12328e9378
Remove tabs from file.
...
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner
5d43cbc6ac
Add a test for llvm.prefetch.
...
llvm-svn: 20379
2005-02-28 19:31:42 +00:00
Chris Lattner
811107350a
Add support to the C backend for llvm.prefetch. Patch contributed by
...
Justin Wick!
llvm-svn: 20378
2005-02-28 19:29:46 +00:00
Chris Lattner
1772c1a672
recognize llvm.prefetch. Patch contributed by Justin Wick!
...
llvm-svn: 20377
2005-02-28 19:28:00 +00:00
Chris Lattner
39637ef023
Verify llvm.prefetch.
...
llvm-svn: 20376
2005-02-28 19:27:42 +00:00
Chris Lattner
c87e03aeea
Lower prefetch to a noop, patch contributed by Justin Wick!
...
llvm-svn: 20375
2005-02-28 19:27:23 +00:00
Chris Lattner
816cc5e10d
Add a prefetch intrinsic, patch contributed by Justin Wick!
...
llvm-svn: 20374
2005-02-28 19:25:57 +00:00
Chris Lattner
c8a2c22f36
Document llvm.prefetch, patch contributed by Justin Wick!
...
llvm-svn: 20373
2005-02-28 19:24:19 +00:00
Andrew Lenharth
76eff48195
fix integer division and stuff
...
llvm-svn: 20372
2005-02-28 17:22:18 +00:00
Chris Lattner
81c1dd2a06
Adam Treat implemented this :)
...
llvm-svn: 20371
2005-02-28 16:52:28 +00:00
Reid Spencer
9947c42037
Changes to enable creation of native executables directly from gccld and to
...
ensure that -L paths don't contain both bytecode and native libraries.
This patch contributed by Adam Treat.
llvm-svn: 20370
2005-02-28 08:45:35 +00:00
Reid Spencer
35cb2f49c4
A few small steps toward HTML 4.01 Strict compliance.
...
llvm-svn: 20369
2005-02-28 01:10:48 +00:00
Reid Spencer
da132f2fdf
Add a little more detail about the configuration process for projects.
...
llvm-svn: 20368
2005-02-28 00:40:29 +00:00
Jeff Cohen
dcaa48b5c4
Fix crash in LSR due to attempt to remove original induction variable. However,
...
for reasons explained in the comments, I also deactivated this code as it needs
more thought.
llvm-svn: 20367
2005-02-28 00:08:56 +00:00
Jeff Cohen
fd63d3af0d
PHI nodes were incorrectly placed when more than one GEP is reduced in a loop.
...
llvm-svn: 20360
2005-02-27 21:08:04 +00:00
Jeff Cohen
39751c3b7c
First pass at improved Loop Strength Reduction. Still not yet ready for prime time.
...
llvm-svn: 20358
2005-02-27 19:37:07 +00:00
Chris Lattner
c6e3380fd7
Bug fixed
...
llvm-svn: 20357
2005-02-27 19:31:02 +00:00
Chris Lattner
cf1359ddf5
New testcase for PR529
...
llvm-svn: 20356
2005-02-27 19:28:30 +00:00
Chris Lattner
2fe7b71936
Fix this to create a recursive mutex. Patch by Evan Jones!
...
llvm-svn: 20355
2005-02-27 19:07:36 +00:00
Chris Lattner
7f32c4aa36
Use const iterators where possible. Patch by Evan Jones!
...
llvm-svn: 20354
2005-02-27 19:06:10 +00:00
Chris Lattner
eeffe8eea3
Rename include guard, patch contributed by Evan Jones!
...
llvm-svn: 20353
2005-02-27 19:05:24 +00:00
Chris Lattner
7561ca1d15
Teach globalopt how memset/cpy/move affect memory, to allow better optimization.
...
llvm-svn: 20352
2005-02-27 18:58:52 +00:00
Chris Lattner
a1079acb0a
new testcase globalopt should handle.
...
llvm-svn: 20351
2005-02-27 18:48:19 +00:00
Chris Lattner
19d4ab642f
new testcase globalopt should implement
...
llvm-svn: 20350
2005-02-27 18:47:17 +00:00
Chris Lattner
5042453bb8
Test that a global is marked constant when it can be.
...
llvm-svn: 20349
2005-02-27 18:19:26 +00:00
Alkis Evlogimenos
24340589c0
Add llc to tools.
...
llvm-svn: 20345
2005-02-27 10:21:37 +00:00
Chris Lattner
0ce80cd542
Fix spelling, patch contributed by Gabor Greif!
...
llvm-svn: 20343
2005-02-27 06:18:25 +00:00
Chris Lattner
dc166eb8f7
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner
600420647f
Fix misspellings, patch contributed by Gabor Greif!
...
llvm-svn: 20341
2005-02-27 06:14:21 +00:00
Chris Lattner
5315aa0ec6
Remove some stuff I checked in accidentally
...
llvm-svn: 20340
2005-02-27 04:32:35 +00:00
Chris Lattner
0b0f3520cb
DCE a dead function
...
llvm-svn: 20339
2005-02-26 23:36:45 +00:00
Reid Spencer
709e10ed92
Implement an isBytecodeArchive method to determine if an archive contains
...
bytecode file members or not.
Patch Contributed By Adam Treat
llvm-svn: 20338
2005-02-26 22:00:32 +00:00
Chris Lattner
f05d2b3178
1 + 100 + 51 == 152, not 52.
...
If we fold three constants together (c1+c2+c3), make sure to keep
LHSC updated, instead of reusing (in this case), the 1 instead of the
partial sum.
llvm-svn: 20337
2005-02-26 18:50:19 +00:00
Chris Lattner
67bf757d0a
A testcase that we miscompile, noticed from the demo page.
...
llvm-svn: 20336
2005-02-26 18:49:04 +00:00
Chris Lattner
435829f89b
Fix a case where we incorrectly returned hasComputableLoopEvolution for
...
a ternary commutative expr. Remove FIXME that does not need to be fixed
(can't happen).
llvm-svn: 20335
2005-02-26 18:40:02 +00:00
Chris Lattner
cc6d75fddf
remove extraneous cast
...
llvm-svn: 20334
2005-02-26 18:33:28 +00:00
Andrew Lenharth
10bc4c0ff6
make BB labels be exported for debuging, add fp negation optimization, further pecimise the FP instructions
...
llvm-svn: 20332
2005-02-25 22:55:15 +00:00
Chris Lattner
37d554759b
add an entry, add links to entries for demo page.
...
llvm-svn: 20328
2005-02-25 20:30:21 +00:00
Chris Lattner
e99ee2b35d
Handle null a bit more carefully.
...
Actually teach dsa about select instructions. This doesn't affect the
graph in any way other than not setting a spurious U marker on pointer
nodes that are selected.
llvm-svn: 20324
2005-02-25 01:27:48 +00:00
Reid Spencer
e447fce542
Use DataInstall macro instead of INSTALL.
...
llvm-svn: 20322
2005-02-24 21:43:43 +00:00
Reid Spencer
895e00b418
Remove a -C I forgot to remove earlier.
...
llvm-svn: 20321
2005-02-24 21:41:26 +00:00
Reid Spencer
dcc5375d49
Don't try to strip bytecode files!
...
llvm-svn: 20320
2005-02-24 21:36:32 +00:00
Reid Spencer
d77a4c0660
The install program doesn't know how to strip bytecode files so install
...
bytecode as data, not program.
llvm-svn: 20319
2005-02-24 21:30:37 +00:00
Reid Spencer
e6684c8c82
For PR528:
...
Use the DataInstall and MKDIR macros instead of using $(INSTALL) directly
llvm-svn: 20318
2005-02-24 21:28:08 +00:00
Chris Lattner
468fd33abb
This instruction:
...
X = gep null, ...
Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.
llvm-svn: 20316
2005-02-24 19:55:31 +00:00
Reid Spencer
eeedeaff99
Adjust to changes needed to more easily support projects via the new
...
LLVM_CONFIG_PROJECT macro.
llvm-svn: 20313
2005-02-24 19:05:19 +00:00
Reid Spencer
206bed0b97
Update to reflect various changes in the autoconf directory. THe
...
recommended configuration of projects is now much simplified and depends
on LLVM file presence rather than local project file presence.
llvm-svn: 20312
2005-02-24 18:53:47 +00:00
Reid Spencer
51d736301a
Remove auxilliary files that are now picked up from llvm/autoconf. This
...
avoids version conflict problems with ltmain.sh (libtool), mkinstalldirs
and install-sh. This prevents projects from becoming stale when the LLVM
build system is upgraded or modified.
llvm-svn: 20311
2005-02-24 18:52:22 +00:00
Reid Spencer
0354a9ce35
* Move all the "standard" configuration stuff to the start of the file
...
* Make the auxilliary directory be llvm/autoconf not the project's
* Use the LLVM_CONFIG_PROJECT macro to get the --with-llvm{src,obj} args
llvm-svn: 20310
2005-02-24 18:50:53 +00:00
Reid Spencer
797f910736
Don't put generated files into CVS.
...
llvm-svn: 20309
2005-02-24 18:49:37 +00:00
Chris Lattner
d13cc49e19
Fix a bug introduced by revision 1.187 of this file.
...
llvm-svn: 20308
2005-02-24 18:48:07 +00:00
Reid Spencer
07068a53ab
* Fix an output message
...
* Make aclocal look in LLVM's autoconf/m4 directory for macros
* Don't force generation of missing files
llvm-svn: 20307
2005-02-24 18:42:34 +00:00
Andrew Lenharth
904650cdd0
fix Allocas. Really. I mean it this time.
...
llvm-svn: 20306
2005-02-24 18:36:32 +00:00
Reid Spencer
f3102c287d
Add a call to AC_CONFIG_COMMANDS to ensure that llvm_src is set properly
...
in the config.status script. This allows the AC_CONFIG_MAKEFILE macro to
work properly after it was changed to support sub-projects.
llvm-svn: 20305
2005-02-24 18:31:27 +00:00
Reid Spencer
28f7cd3216
This macro cannot assume that the location of install-sh and mkinstalldirs
...
is in ${srcdir}/autoconf because that is only true if the project is LLVM.
For other projects (e.g. sample), we don't want to have to distribute the
mkinstalldirs or install-sh programs because it opens a window of breakage
for projects. So, this change requires that the llvm_src variable be set
up via another AC_CONFIG_COMMANDS call. For LLVM this is done in the
configure.ac. For projects its done in the LLVM_CONFIG_PROJECT macro.
llvm-svn: 20304
2005-02-24 18:28:20 +00:00
Reid Spencer
76d99df157
Add a new macro for configuring projects, LLVM_CONFIG_PROJECT. This macro
...
takes care of the --with-llvmsrc and --with-llvmobj options for the project
It was moved here from the project's configure.ac file because there is
some tricky handling of the llvm_src variable to tell the project where the
llvm source tree is (for mkinstalldirs and install-sh commands).
llvm-svn: 20303
2005-02-24 18:25:24 +00:00
Chris Lattner
08f7d0c262
Fix some problems where the verifier would crash on invalid input instead of
...
reporting the problem and exiting.
llvm-svn: 20302
2005-02-24 16:58:29 +00:00
Reid Spencer
247a10e729
Fix the other half of PR528 .. don't try to strip header files!
...
llvm-svn: 20301
2005-02-24 07:12:43 +00:00
Chris Lattner
1cca959e5d
Implement Transforms/SimplifyCFG/switch_thread.ll
...
This does a simple form of "jump threading", which eliminates CFG edges that
are provably dead. This triggers 90 times in the external tests, and
eliminating CFG edges is always always a good thing! :)
llvm-svn: 20300
2005-02-24 06:17:52 +00:00
Chris Lattner
c0968c72ff
new testcase for a simple optimization that simplifycfg is about to do.
...
All CFG edges to DEAD should be eliminated.
llvm-svn: 20299
2005-02-24 06:15:27 +00:00
Chris Lattner
47ac187c08
switch instructions only allow constantints for their values, be more specific.
...
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner
75f5b42624
use more specific cast.
...
llvm-svn: 20297
2005-02-24 05:26:04 +00:00
Chris Lattner
fc824c1a7e
add more checking
...
llvm-svn: 20296
2005-02-24 05:25:17 +00:00
Chris Lattner
5f0df0c1e6
Do not read free'd memory when printing an error message.
...
llvm-svn: 20295
2005-02-24 04:59:49 +00:00
Reid Spencer
c43b1d403e
For PR528:
...
* Consolidate all "install" usage to the install program/script found by
autoconf which includes the autoconf/install-sh script if necessary
* Change Makefile.rules to not use the -D flag to install but use the
MKDIR command as necessary.
* Change Makefile.rules to differentiate between installation of executable
files and regular data files to get the permission modes correct.
llvm-svn: 20294
2005-02-24 03:56:32 +00:00
Chris Lattner
ce046ac9c6
add a new method.
...
llvm-svn: 20293
2005-02-24 02:37:26 +00:00
Tanya Lattner
ee47100d44
Only print out machine instructions before modulo scheduling if we are actually doing modulo scheduling! :)
...
llvm-svn: 20292
2005-02-24 02:14:44 +00:00
Chris Lattner
272f3527a3
add another testcase to make sure it gets turned into a switch (answer: yes it does)
...
llvm-svn: 20291
2005-02-24 02:13:50 +00:00
Andrew Lenharth
27cf4eb1c7
Ah the problems you have to fix when you stray from the One True Way (TM)
...
llvm-svn: 20290
2005-02-23 17:33:42 +00:00
Chris Lattner
25169caa80
make this more efficient. Scan up to 16 nodes, not the whole list.
...
llvm-svn: 20289
2005-02-23 16:53:04 +00:00
Chris Lattner
d36552f34f
new method
...
llvm-svn: 20288
2005-02-23 16:51:11 +00:00
Chris Lattner
8a504447f7
Add new method.
...
llvm-svn: 20287
2005-02-23 16:50:59 +00:00
Chris Lattner
cf08c21f2c
Reduce the amount of searching this assertion does. On a testcase of mine,
...
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s
llvm-svn: 20286
2005-02-23 07:09:08 +00:00
Chris Lattner
5e166a5f3e
Fix a bugpoint crash that JeffC noticed, looking like this:
...
*** Attempting to perform final cleanups: Final cleanups failed. Sorry. :( Ple
ase report a bug!
<llc>llc.exe: bytecode didn't read correctly.
llc.exe: bytecode didn't read correctly.
<crash>
Assertion failed: M && "You can't write a null module!!", file c:\llvm\lib\bytec
ode\writer\writer.cpp, line 1094
The fact that llc bombed (in this case) is ok, but bugpoint shouldn't crash after this.
llvm-svn: 20285
2005-02-23 06:12:11 +00:00
Chris Lattner
80c5b97046
Silence some uninit variable warnings.
...
llvm-svn: 20284
2005-02-23 05:57:21 +00:00
Tanya Lattner
a31ad5172e
Fixed bug in findAllcircuits. Fixed branch addition to schedule. Added debug information.
...
llvm-svn: 20280
2005-02-23 02:01:42 +00:00
Chris Lattner
5cf3521883
remove some more dead templates and a dead macro.
...
llvm-svn: 20279
2005-02-22 23:36:37 +00:00
Andrew Lenharth
ccdfdd7aee
oops
...
llvm-svn: 20278
2005-02-22 23:29:25 +00:00
Chris Lattner
3166471603
Remove use of bind_obj, deleter, and finegrainify namespacification.
...
llvm-svn: 20277
2005-02-22 23:27:21 +00:00
Chris Lattner
52e931b37d
Remove use of bind_obj
...
llvm-svn: 20276
2005-02-22 23:22:58 +00:00
Chris Lattner
2c07348696
Remove a bunch of dead templates.
...
llvm-svn: 20275
2005-02-22 23:19:42 +00:00
Chris Lattner
06b6c4bbde
C++ is not a functional programming language.
...
llvm-svn: 20274
2005-02-22 23:13:58 +00:00
Andrew Lenharth
7ac0143fa6
dynamic stack allocas
...
llvm-svn: 20273
2005-02-22 21:59:48 +00:00
Chris Lattner
a474313902
Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
...
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!! In practice, a simple loop like this:
no_exit: ; preds = %no_exit, %entry
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1]
store double 0.000000e+00, double* %tmp.4
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
was being code gen'd to:
.LBBtest_1: # no_exit
movl %edx, %esi
shll $4, %esi
movl $0, 4(%eax,%esi)
movl $0, (%eax,%esi)
incl %edx
movl $0, (%eax,%esi)
movl $0, 4(%eax,%esi)
cmpl %ecx, %edx
jne .LBBtest_1 # no_exit
Note that we are doing 4 32-bit stores instead of 2. Now we generate:
.LBBtest_1: # no_exit
movl %edx, %esi
incl %esi
shll $4, %edx
movl $0, (%eax,%edx)
movl $0, 4(%eax,%edx)
cmpl %ecx, %esi
movl %esi, %edx
jne .LBBtest_1 # no_exit
This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/
llvm-svn: 20265
2005-02-22 07:23:39 +00:00
Andrew Lenharth
5ab3986e49
no longer build as a shared library
...
llvm-svn: 20264
2005-02-22 04:58:26 +00:00
Chris Lattner
25170b0177
add another plausible reason
...
llvm-svn: 20262
2005-02-21 16:35:31 +00:00
Chris Lattner
b3dd24435f
new testcase for PR523
...
llvm-svn: 20261
2005-02-21 04:03:32 +00:00
Chris Lattner
3a8f68e4cb
Bug fixed.
...
llvm-svn: 20260
2005-02-20 23:31:49 +00:00
Chris Lattner
8a8f9032c3
New testcase for PR522.
...
llvm-svn: 20259
2005-02-20 23:29:23 +00:00
Chris Lattner
ec3f094489
Fix problems running the HowToUseJIT on powerpc, and probably problems with
...
ANY program that does not have all functions internalized.
llvm-svn: 20258
2005-02-20 18:43:35 +00:00
Jeff Cohen
18cf7ebcee
Fix silly mistake.
...
llvm-svn: 20256
2005-02-20 02:48:51 +00:00
Jeff Cohen
4220bf5726
Implement standard I/O redirection in ExecuteAndWait().
...
llvm-svn: 20255
2005-02-20 02:43:04 +00:00
Chris Lattner
e68dae0eb6
Add support for ".so" files compiled with LLVM which contain LLVM bytecode.
...
llvm-svn: 20253
2005-02-19 18:30:29 +00:00
Chris Lattner
fe723a7c05
Eliminate silly warnings from the linker of the form:
...
WARNING: Type conflict between types named 'union.._604.'.
Src=' %union.._604.'.
Dest=' %union.._604.'
llvm-svn: 20252
2005-02-19 17:52:37 +00:00
Chris Lattner
3d6194f8cc
typeo
...
llvm-svn: 20251
2005-02-19 17:17:32 +00:00
Chris Lattner
fdff9e7d0d
New entry.
...
llvm-svn: 20250
2005-02-19 17:14:24 +00:00
Chris Lattner
6a3ae64639
Bug fixed.
...
llvm-svn: 20249
2005-02-19 17:13:20 +00:00
Chris Lattner
e98b480b2e
Testcase for PR520
...
llvm-svn: 20248
2005-02-19 17:07:48 +00:00
Chris Lattner
a94f9ffd0e
Adjust this test to pass after recent CFE changes. We now generate:
...
%XX = global int cast (int* getelementptr ([2 x int]* getelementptr (%struct.S* null, int 0, uint 0), int 0, int 1) to int)
which is the literal translation of the testcase :)
llvm-svn: 20247
2005-02-19 07:31:54 +00:00
Chris Lattner
48c23141a2
Bug fixed.
...
llvm-svn: 20246
2005-02-19 07:29:25 +00:00
Chris Lattner
4fec95cd4d
Make this testcase harder, to test the read case as well.
...
llvm-svn: 20245
2005-02-19 06:56:46 +00:00
Chris Lattner
e22674c706
new testcase.
...
llvm-svn: 20244
2005-02-19 06:54:44 +00:00
Jeff Cohen
07e22ba2c7
Change __MINGW to __MINGW32__. Patch submitted by Henrik Bach.
...
llvm-svn: 20243
2005-02-19 03:01:13 +00:00
Chris Lattner
16fb0037c4
Fix a bug.
...
llvm-svn: 20242
2005-02-19 02:22:14 +00:00
Reid Spencer
9756aea1cb
Quote the value of the PATH variable so that Cygwin and Windows can have
...
spaces in path names and not confuse the shell.
llvm-svn: 20241
2005-02-18 20:24:09 +00:00
Reid Spencer
75542d4e78
Allow dejagnu tests to run on Windows/Cygwin. Quote the value of the PATH
...
variable so that spaces don't screw it up.
llvm-svn: 20240
2005-02-18 20:17:44 +00:00
Reid Spencer
63eb0aa52a
Adjust the help output so that it will fit cleanly within 80 columns.
...
llvm-svn: 20239
2005-02-18 20:00:05 +00:00
Misha Brukman
634b0a3b7e
* llvmc does not have a -V switch
...
* --config-file is really --config-dir, according to `llvmc --help'
llvm-svn: 20238
2005-02-18 18:00:53 +00:00
Jeff Cohen
81549a57b8
Make PreventCoreFiles() do the right thing on Windows.
...
llvm-svn: 20237
2005-02-18 07:05:18 +00:00
Misha Brukman
3703685b1a
Remove colloquialisms from the documentation.
...
llvm-svn: 20233
2005-02-17 22:22:24 +00:00
Misha Brukman
20430321c2
Fix compilation errors with VS 2005, patch contributed by Aaron Gray.
...
llvm-svn: 20232
2005-02-17 21:40:27 +00:00
Misha Brukman
73e929f89d
Fix compilation errors with VS 2005, patch by Aaron Gray.
...
llvm-svn: 20231
2005-02-17 21:39:27 +00:00
Chris Lattner
381dddc90c
Don't rely on doubles comparing identical to each other, which doesn't work
...
for 0.0 and -0.0.
llvm-svn: 20230
2005-02-17 20:17:32 +00:00
Chris Lattner
67395c2002
Map doubles from integers, not the double itself.
...
llvm-svn: 20229
2005-02-17 20:16:58 +00:00
Chris Lattner
0c56a548ed
Don't sink argument loads into loops or other bad places. This disables folding of argument loads with instructions that are not in the entry block.
...
llvm-svn: 20228
2005-02-17 19:40:32 +00:00
Chris Lattner
7b5d9e2217
Do not mark obviously unreachable blocks live when processing PHI nodes,
...
and handle incomplete control dependences correctly. This fixes:
Regression/Transforms/ADCE/dead-phi-edge.ll
-> a missed optimization
Regression/Transforms/ADCE/dead-phi-edge.ll
-> a compiler crash distilled from QT4
llvm-svn: 20227
2005-02-17 19:28:49 +00:00
Chris Lattner
854c086e0f
New files, testing for a crash in ADCE compiling QT and a missed optimization.
...
llvm-svn: 20226
2005-02-17 19:27:44 +00:00
Chris Lattner
47555decfb
Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll
...
and PR515.
llvm-svn: 20224
2005-02-17 16:54:16 +00:00
Chris Lattner
02fd7d1d56
new testcase for PR515
...
llvm-svn: 20223
2005-02-17 16:53:41 +00:00
Reid Spencer
53e86c13f6
Remove the "pax" program from the list of those needed to support LLVM.
...
The install target in Makefile.rules no longer uses pax but just uses find
and "install" instead.
llvm-svn: 20216
2005-02-16 16:21:00 +00:00
Reid Spencer
e386b72d21
Fix installation of configuration files.
...
llvm-svn: 20215
2005-02-16 16:17:11 +00:00
Reid Spencer
fe0a01ee25
* Don't flatten the directory hierarchy when installing headers
...
* Make it possible to have the Install program run in verbose mode when
the TOOL_VERBOSE=1 option is set
* Ensure non-executable installed files do not install with execute perms.
llvm-svn: 20214
2005-02-16 16:13:02 +00:00
Reid Spencer
48a82f49bd
Don't use pax for installing header files. Use the install program instead.
...
llvm-svn: 20213
2005-02-16 15:54:03 +00:00
Jeff Cohen
cce4b92601
Somehow tablegen.exe got moved... fix up tablegen invocations to match.
...
llvm-svn: 20212
2005-02-16 05:06:52 +00:00
Jeff Cohen
81d26d168d
Get bugpoint compiling with VC++ again, not that it works anyway.
...
llvm-svn: 20211
2005-02-16 05:05:31 +00:00
Jeff Cohen
97a41e238e
Arg list already has program name in it.
...
llvm-svn: 20208
2005-02-16 04:43:45 +00:00
Tanya Lattner
c28fd0db2e
Fixed node deletion bug.
...
llvm-svn: 20207
2005-02-16 04:00:59 +00:00
Chris Lattner
3e7a193bd7
Instead of doing a manual comparison loop, just use memcmp, thanks to JohnC
...
for the suggestion! :)
llvm-svn: 20203
2005-02-15 22:12:10 +00:00
Chris Lattner
9d0db6f602
Make this more efficient now that we know both files are the same length.
...
llvm-svn: 20202
2005-02-15 22:01:43 +00:00
Misha Brukman
f232a4582d
Fix spelling
...
llvm-svn: 20201
2005-02-15 21:59:53 +00:00
Reid Spencer
f4425b0208
Adjust DiffFilesWithTolerance to help poor cygwin's mmap facility by
...
handling zero length files a little more intelligently. If both files are
zero length then we return 0 (true) indicating a match. If only one of the
files is zero length then we return 1 (false) indicating that the files
differ. If the files don't agree in length then they can't match so we
skip the first loop that looks for a quick match.
llvm-svn: 20200
2005-02-15 21:47:02 +00:00
Andrew Lenharth
5f7c53599e
add Alpha to llc
...
llvm-svn: 20198
2005-02-15 21:14:09 +00:00
Chris Lattner
915fd0de4b
Fix a problem where the PPC backend lost track of the fact that it had
...
to save and restore the LR register on entry and exit of a leaf function
that needed to access globals or the constant pool. This should hopefully
fix oscar from sending the PPC tester spinning out of control.
llvm-svn: 20197
2005-02-15 20:26:49 +00:00
Chris Lattner
3e708301d2
Add a sanity check.
...
llvm-svn: 20195
2005-02-15 18:48:48 +00:00
Chris Lattner
219002ed8f
Add a new method to make it easy to update graphs.
...
llvm-svn: 20194
2005-02-15 18:40:55 +00:00
Chris Lattner
385a47394a
Bug fixed
...
llvm-svn: 20193
2005-02-15 07:02:12 +00:00
Chris Lattner
3bef66fcf3
Fix volatile load/store of pointers. Consider this testcase:
...
void %test(int** %P) {
%A = volatile load int** %P
ret void
}
void %test2(int*** %Q) {
%P = load int*** %Q
volatile store int** %P, int*** %Q
ret void
}
instead of emitting:
void test(int **l1_P) {
int *l2_A;
l2_A = (int **((volatile int **)l1_P));
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((volatile int ***)l2_Q) = l1_P;
return;
}
... which is loading/storing volatile pointers, not through volatile pointers,
emit this (which is right):
void test(int **l1_P) {
int *l3_A;
l3_A = *((int * volatile*)l1_P);
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((int ** volatile*)l2_Q) = l1_P;
return;
}
llvm-svn: 20191
2005-02-15 05:52:14 +00:00
Chris Lattner
1f031b20fe
Bug fixed.
...
llvm-svn: 20190
2005-02-15 05:28:06 +00:00
Chris Lattner
1a9cbe67ed
New testcase for PR510.
...
llvm-svn: 20189
2005-02-15 05:18:05 +00:00
Chris Lattner
be895eda63
wow, interesting typo :)
...
llvm-svn: 20187
2005-02-14 22:58:38 +00:00
Chris Lattner
7027143f0a
execution tests shouldn't go here. This was killing the PPC nightly tester.
...
llvm-svn: 20186
2005-02-14 21:54:32 +00:00
Reid Spencer
e9fa5444c5
For PR496:
...
When llvm-gcc is not available, bypass rules for Modules and Bytecode
Libraries that require llvm-gcc and emit instead a warning that llvm-gcc
is not available. This permits "make LLVMGCC=" to build LLVM completely
without error and provides warnings about the modules and bc libs that
could not be constructed.
llvm-svn: 20185
2005-02-14 21:54:08 +00:00
Chris Lattner
6e528dce90
Fix a bug in my previous change to this, which broke the build on sparcs.
...
llvm-svn: 20184
2005-02-14 21:42:10 +00:00
Chris Lattner
145569b076
Print GEP offsets as signed values instead of unsigned values. On X86, this
...
prints:
getelementptr (int* %A, int -1)
as: "(A) - 4" instead of "(A) + 18446744073709551612", which makes the
assembler much happier.
This fixes test/Regression/CodeGen/X86/2005-02-14-IllegalAssembler.ll,
and Benchmarks/Prolangs-C/cdecl with LLC on X86.
llvm-svn: 20183
2005-02-14 21:40:26 +00:00
Chris Lattner
3d2881066b
A testcase that LLC produces illegal asm on for Prolangs-C/cdecl now.
...
llvm-svn: 20182
2005-02-14 21:31:41 +00:00
Chris Lattner
31f3382b3b
Fix the second bug attached to PR504.
...
llvm-svn: 20181
2005-02-14 20:11:45 +00:00
Chris Lattner
a3a55bf997
Work around GCC PR19958, which causes programs to sometimes crash after
...
printing help output or version info.
llvm-svn: 20180
2005-02-14 19:17:29 +00:00
Misha Brukman
2b1e10031f
Write out single characters as chars, not strings.
...
llvm-svn: 20179
2005-02-14 18:52:35 +00:00
Chris Lattner
1c75b25546
Bugs fixed
...
llvm-svn: 20178
2005-02-14 16:57:55 +00:00
Chris Lattner
7afbdcad15
Implement CodeGen/CBackend/2005-02-14-VolatileOperations.ll
...
Volatile loads and stores need to emit volatile pointer operations in C.
llvm-svn: 20177
2005-02-14 16:47:52 +00:00
Chris Lattner
4c13ab61b3
new testcase
...
llvm-svn: 20176
2005-02-14 16:45:38 +00:00
Reid Spencer
9c7fbaef9b
Update makefile to use PROJ_* makefile variables intead of BUILD_* as
...
required by changes to the Makefile.rules. Patch contributed by Vladimir
Merzliakov.
llvm-svn: 20175
2005-02-14 16:04:28 +00:00
Reid Spencer
8c47826c9f
Update comments to reflect new variable names. Patch contributed by
...
Vladimir Merzliakov.
llvm-svn: 20174
2005-02-14 16:02:19 +00:00
Misha Brukman
e71cbb82ba
Give props to Andrew for the Alpha backend
...
llvm-svn: 20173
2005-02-14 09:07:23 +00:00
Andrew Lenharth
cae2f21e3b
fix setcc on floats, fixes singlesource:pi, perhaps others
...
llvm-svn: 20172
2005-02-14 05:41:43 +00:00
Chris Lattner
71ff539ed6
new testcase for PR509
...
llvm-svn: 20171
2005-02-14 02:54:41 +00:00
Chris Lattner
259df2bf3c
Fix the llvm bootstrap
...
llvm-svn: 20170
2005-02-13 23:37:09 +00:00
Chris Lattner
5f429c3347
Move private helper function into the only .cpp file that uses it.
...
llvm-svn: 20169
2005-02-13 23:14:06 +00:00
Chris Lattner
dc01c3f058
Move helper function here.
...
llvm-svn: 20168
2005-02-13 23:13:47 +00:00
Chris Lattner
9db0eccc42
Conform to the documented interface by null terminating argument lists!
...
llvm-svn: 20167
2005-02-13 23:10:45 +00:00
Chris Lattner
61a31c9fe2
Make sure to null terminate argument lists!
...
llvm-svn: 20166
2005-02-13 23:02:34 +00:00
Chris Lattner
743dd2cd80
If errno is zero strerror_r does not modify the buffer, leaving it unterminated.
...
This causes garbage to be printed out after error messages.
llvm-svn: 20165
2005-02-13 22:46:37 +00:00
Chris Lattner
e14babd141
Add some updates
...
llvm-svn: 20164
2005-02-13 22:27:24 +00:00
Chris Lattner
5824762378
SuSE 3.3.3 is also borken.
...
llvm-svn: 20163
2005-02-13 22:20:49 +00:00
Chris Lattner
5881b91bd7
Do not replace ostream << Module*, only ostream << Module&.
...
llvm-svn: 20157
2005-02-13 19:15:01 +00:00
Chris Lattner
6983f5d2ed
Print the module, not the pointer.
...
llvm-svn: 20156
2005-02-13 19:12:31 +00:00
Reid Spencer
8d0f126b74
Make the check for global variables the same as the one for functions. In
...
both cases they are looking for non-external variables/functions that do
not have internal linkage. Using "!isExternal()" is a little more
understandable than "hasInitializer()"
llvm-svn: 20155
2005-02-13 18:12:20 +00:00
Chris Lattner
8d54dd37c9
Nuke blank line.
...
llvm-svn: 20154
2005-02-13 17:54:21 +00:00
Chris Lattner
08a5eb3cf0
Minor cleanup. No need to explicitly tell the compiler the template arguments.
...
llvm-svn: 20153
2005-02-13 17:50:16 +00:00
Chris Lattner
147c561432
Make sure to clear the LazyFunctionLoadMap after we ParseAllFunctionBodies.
...
Otherwise, clients who call ParseAllFunctionBodies will attempt to parse
the function bodies twice, which is (uh) very very bad (tm).
This fixes gccld on python.
llvm-svn: 20152
2005-02-13 17:48:18 +00:00
Chris Lattner
1b9f9c5f67
Do not put internal symbols into the symbol table. This shrinks the symbol
...
table for archives in common cases, and prevents trying to resolve a
external reference with an internal reference. This shrinks the libpython.a
symbol table from 126302 to 19770 bytes.
llvm-svn: 20151
2005-02-13 17:42:11 +00:00
Chris Lattner
38a3ba0234
Include local time on the web page for start/end times.
...
llvm-svn: 20150
2005-02-13 16:08:30 +00:00
Chris Lattner
71a44087d4
Print something useful for gccld -v with an archive.
...
llvm-svn: 20148
2005-02-13 15:26:14 +00:00
Reid Spencer
9f219c79aa
Fix PR506:
...
* Use error returned from Archive::OpenAndLoad
* Make sure only std::string is thrown so it gets caught and printed.
llvm-svn: 20147
2005-02-13 07:34:17 +00:00
Chris Lattner
7b0fbe7ccf
Correct the recursive PHI node handling routines in a way that CANNOT induce
...
infinite loops (using the new replaceSymbolicValuesWithConcrete method).
This patch reverts this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050131/023830.html
... which was an attempted fix for this problem. Unfortunately, that patch
caused test/Regression/Transforms/IndVarsSimplify/exit_value_tests.llx to fail
and slightly castrated the entire analysis. This patch fixes it right.
This patch is dedicated to jeffc, for making me deal with this. :)
llvm-svn: 20146
2005-02-13 04:37:18 +00:00
Chris Lattner
b06944e813
Add a new replaceSymbolicValuesWithConcrete method to the SCEV class,
...
adjust const'ness a bit to be more correct.
llvm-svn: 20145
2005-02-13 04:34:51 +00:00
Andrew Lenharth
9a98def106
non-ieee arith crashes passes on alpha
...
llvm-svn: 20144
2005-02-13 03:41:10 +00:00
Andrew Lenharth
d39febfc66
try to do better match for i32 adds
...
llvm-svn: 20143
2005-02-12 21:11:17 +00:00
Andrew Lenharth
ab4db0522a
make FP conversion more conservative (matches gcc)
...
llvm-svn: 20142
2005-02-12 21:10:58 +00:00
Andrew Lenharth
df5cd0868f
oops, I was sure this had already gond though the nightly tester
...
llvm-svn: 20141
2005-02-12 20:42:09 +00:00
Chris Lattner
e254e2ffcc
Add note about broken GCC
...
llvm-svn: 20138
2005-02-12 20:11:13 +00:00
Andrew Lenharth
76c5d97750
added sign extend for boolean
...
llvm-svn: 20137
2005-02-12 19:35:12 +00:00
Chris Lattner
5d5aede33b
Document the newly generalized model for constant globals.
...
llvm-svn: 20136
2005-02-12 19:30:21 +00:00
Chris Lattner
16277c1775
Allow globals to be of different const'nesses when we link.
...
This finally resolves PR502, PR450,
and test/Regression/Linker/2005-02-12-ConstantGlobals{,-2}.ll correctly
llvm-svn: 20135
2005-02-12 19:20:28 +00:00
Chris Lattner
36f3eb82a1
New test, adjust other test.
...
llvm-svn: 20134
2005-02-12 19:19:36 +00:00
Chris Lattner
6af31478ef
Reinstate this test, it is correct after all.
...
llvm-svn: 20133
2005-02-12 19:14:11 +00:00
Chris Lattner
3b4f6c4a73
This test is invalid
...
llvm-svn: 20131
2005-02-12 19:02:30 +00:00
Chris Lattner
e616fea3bc
Fix for testcase Transforms/IndVarsSimplify/2005-02-11-InvokeCrash.ll
...
and PR504.
llvm-svn: 20129
2005-02-12 03:26:49 +00:00
Chris Lattner
4c916478e5
new testcase for PR504
...
llvm-svn: 20128
2005-02-12 03:26:30 +00:00
Chris Lattner
82e87e4d0c
Actually, this testcase is invalid, the bug is in the C++ FE.
...
llvm-svn: 20123
2005-02-11 23:18:40 +00:00
Chris Lattner
1afcaf601f
New testcase that manyoso found compiling QT 4.0.
...
llvm-svn: 20122
2005-02-11 23:08:34 +00:00
Chris Lattner
bebf14d28e
Slightly expand on the instructions.
...
llvm-svn: 20121
2005-02-11 21:17:26 +00:00
Chris Lattner
2a38aea0a7
Bug fixed
...
llvm-svn: 20118
2005-02-11 19:29:52 +00:00
Chris Lattner
e6138f4240
New testcase for PR501
...
llvm-svn: 20117
2005-02-11 19:26:06 +00:00
Chris Lattner
72b5054afb
The pool allocator is now the llvm-poolalloc module in public CVS
...
llvm-svn: 20116
2005-02-11 04:46:58 +00:00
Andrew Lenharth
b301af712e
fix a bunch of regressions due to call behavior
...
llvm-svn: 20110
2005-02-10 20:10:38 +00:00
Alkis Evlogimenos
c4a44c6b3d
Localize globals if they are only used in main(). This replaces the
...
global with an alloca, which eventually gets promoted into a
register. This enables a lot of other optimizations later on.
llvm-svn: 20109
2005-02-10 18:36:30 +00:00
Tanya Lattner
56807c6f4a
Added new circuit finding alogrithm.
...
Fixed bug in graph so that phi ite diff edges are added.
llvm-svn: 20108
2005-02-10 17:02:58 +00:00
Tanya Lattner
1137d7c6a1
Allow modsched and local scheduling to both be run.
...
llvm-svn: 20107
2005-02-10 17:02:06 +00:00
Andrew Lenharth
e0b789fdf5
so, if you beat on it, you too can talk emacs into having a sane indenting policy... Also, optimize many function calls with pc-relative calls (partial prologue skipping for that case coming soon), try to fix the random jumps to strange places problem by pesimizing div et. al. register usage and fixing up GP before using, some calling convention tweaks, and make frame pointer unallocatable (not strickly necessary, but let's go for correctness first)
...
llvm-svn: 20106
2005-02-10 06:25:22 +00:00
Andrew Lenharth
f70ef47ee1
fix fp branch
...
llvm-svn: 20105
2005-02-10 05:17:38 +00:00
Misha Brukman
8d343e77f8
Give props to Brian for V8 backend
...
llvm-svn: 20104
2005-02-10 02:07:57 +00:00
Misha Brukman
06a1d47f96
* Fix spelling of `volatile'
...
* Align comments with tablegen elements
llvm-svn: 20103
2005-02-10 01:52:22 +00:00
Chris Lattner
38de952115
This will be moved elsewhere.
...
llvm-svn: 20101
2005-02-09 22:52:46 +00:00
Misha Brukman
b139a7dbb9
* Use doc_code style for blocks of code
...
* Convert < to < in <pre> block
* Use doc_hilite instead of doc_red style
* Put some classes and options in <tt> blocks
llvm-svn: 20100
2005-02-09 22:49:05 +00:00
Misha Brukman
64f8d07090
Do not mention colors in style names, we might want to change styles themselves
...
llvm-svn: 20099
2005-02-09 22:47:47 +00:00
Misha Brukman
0c4b8b6db4
* Use an HTML list <ol> instead of custom superscripts in the platform notes
...
* Reorder software requirements list to show relative importance
* Use superscripts for footnotes in software list rather than "Note 1"
* Use new doc_notes class to separate footnotes from main doc text
llvm-svn: 20098
2005-02-09 22:38:47 +00:00
Misha Brukman
649b77858d
Add style to display notes on a different background than the main text
...
llvm-svn: 20097
2005-02-09 22:36:44 +00:00
Chris Lattner
ac648f5375
Turn footnotes into links, make the page validate.
...
llvm-svn: 20096
2005-02-09 21:15:51 +00:00
Chris Lattner
59a486ace6
If needed, this should be in the 'how to compile the cfe' doc.
...
llvm-svn: 20095
2005-02-09 21:07:21 +00:00
Chris Lattner
09cc355153
this should be incorporated into the build
...
llvm-svn: 20094
2005-02-09 21:05:01 +00:00
Misha Brukman
7772309b70
* Separate superscript footnotes with a comma, otherwise it's a 2-digit number
...
* Make a URL into an HTML link using anchor tag
* Put code in fixed-width font
* Since the MinGW footnote is significantly more than the rest of the footnotes
combined, it needs to have a border and background color to separate it from
the regular flow of text for readability purposes.
llvm-svn: 20093
2005-02-09 21:01:26 +00:00
Chris Lattner
093ffb0a5c
Add instructions for MINGW, contributed by Henrik Bach
...
llvm-svn: 20092
2005-02-09 20:43:48 +00:00
Chris Lattner
610ce2c678
Don't print a 'Total Execution Time' line for the 'Miscellaneous Ungrouped
...
Timers' section. Since these are random timers in the program it doesn't
make sense to sum them up.
llvm-svn: 20090
2005-02-09 18:41:32 +00:00
Chris Lattner
159485ff1b
Fix test/Regression/Assembler/2005-02-09-AsmWriterStoreBug.ll
...
llvm-svn: 20089
2005-02-09 17:45:03 +00:00
Chris Lattner
60fb167b6e
New testcase that the asmwriter botches.
...
llvm-svn: 20088
2005-02-09 17:42:24 +00:00
Chris Lattner
5ce5a094aa
Use new edge iterators to simplify some code.
...
llvm-svn: 20086
2005-02-09 03:20:43 +00:00
Chris Lattner
06e353c5a9
Add some iterators that should have come in long ago
...
llvm-svn: 20085
2005-02-09 03:14:29 +00:00
Chris Lattner
81bfc9eda8
Fix installation of configured headers when objdir != srcdir. Patch
...
contributed by Vladimir Merzliakov!
llvm-svn: 20084
2005-02-09 02:24:00 +00:00
Andrew Lenharth
8ec0a2b13a
BranchCC, nifty
...
llvm-svn: 20067
2005-02-08 00:40:03 +00:00
Andrew Lenharth
d4f440de0f
fix store issue and an FP conversion (segfault) issue
...
llvm-svn: 20066
2005-02-07 23:02:23 +00:00
Chris Lattner
863d9c9068
IndCallGraphMap is now a pointer to a new'd map.
...
llvm-svn: 20065
2005-02-07 16:09:15 +00:00
Chris Lattner
67aeddc423
Hopefully fix the build on Darwin with GCC 3.3
...
llvm-svn: 20064
2005-02-07 16:09:01 +00:00
Andrew Lenharth
9d3f7704fd
copytoreg fix
...
llvm-svn: 20063
2005-02-07 06:31:44 +00:00
Andrew Lenharth
57047720ce
copyfromreg fix
...
llvm-svn: 20062
2005-02-07 06:21:37 +00:00
Andrew Lenharth
351df0c2dc
fix load bug
...
llvm-svn: 20061
2005-02-07 05:55:55 +00:00
Andrew Lenharth
5d004edc3d
more FP load store fixes and Load store simplifications
...
llvm-svn: 20060
2005-02-07 05:33:15 +00:00
Andrew Lenharth
5fb9b53060
clean up load and stores alot
...
llvm-svn: 20059
2005-02-07 05:18:02 +00:00
Andrew Lenharth
a9e02156ce
teach all loads and stores about the stack
...
llvm-svn: 20058
2005-02-07 05:07:00 +00:00
Andrew Lenharth
0021f55863
prefer FP scratch registers and more check in LowerArguments
...
llvm-svn: 20057
2005-02-06 21:07:31 +00:00
Andrew Lenharth
eefd410522
fix oopso
...
llvm-svn: 20056
2005-02-06 16:22:15 +00:00
Andrew Lenharth
6c018f77d1
smarter loads and stores. can now handle base+offset.
...
llvm-svn: 20055
2005-02-06 15:40:40 +00:00
Andrew Lenharth
d9bf7b81eb
fix build
...
llvm-svn: 20053
2005-02-05 19:46:51 +00:00
Andrew Lenharth
7be9854594
clean up
...
llvm-svn: 20051
2005-02-05 17:41:39 +00:00
Andrew Lenharth
ea9224a69a
fix f32 setcc, and fp select
...
llvm-svn: 20050
2005-02-05 16:41:03 +00:00
Andrew Lenharth
060d58b88f
added ugly support for fp compares
...
llvm-svn: 20049
2005-02-05 13:19:12 +00:00
Misha Brukman
ffe9968b5a
Make the rest of file header comments consistent in format and style
...
llvm-svn: 20048
2005-02-05 02:24:26 +00:00
Chris Lattner
423c04c75c
Eliminate the explicit opcode field in ConstantExpr, using the SubclassData
...
field to hold it instead. This shrinks memory usage for 176.gcc from
57628728 to 57598144 bytes, a small reduction of about 30K.
llvm-svn: 20047
2005-02-05 02:00:12 +00:00
Chris Lattner
0a9a2e734b
Eliminate the explicit volatile fields in LoadInst and StoreInst. This shrinks
...
LoadInst from 60 -> 56 bytes and StoreInst from 76 -> 72 bytes.
Note however, that this doesn't actually save any memory on common systems
where 'malloc' returns 8-byte aligned memory, as the saved space is replaced
by useless alignment padding. :(
llvm-svn: 20046
2005-02-05 01:44:18 +00:00
Chris Lattner
df57a02be4
Instead of initializing the volatile field, use accessors to set it.
...
llvm-svn: 20045
2005-02-05 01:38:38 +00:00
Chris Lattner
a29c92ffdd
Initialize new field.
...
llvm-svn: 20044
2005-02-05 01:37:58 +00:00
Chris Lattner
9cd92de64b
SubclassID is really a small field. Split it into half and let subclasses
...
play with the unused part.
llvm-svn: 20043
2005-02-05 01:37:44 +00:00
Chris Lattner
f60c170ea5
Add support for .cc and .hpp files. Patch contributed by Vladimir Merzliakov!
...
llvm-svn: 20042
2005-02-04 21:28:50 +00:00
Misha Brukman
076b9f4507
Make file header comment consistent: extend the whole 80 cols to fill the line
...
llvm-svn: 20039
2005-02-04 20:25:52 +00:00
Chris Lattner
4585abd549
If we have an indirect call site that calls N functions, inline the N functions
...
into a temporary graph, remember it for later, then inline the tmp graph into
the call site.
In the case where there are other call sites to the same set of functions, this
permits us to just inline the temporary graph instead of all of the callees.
This turns N*M inlining situations into an N+M inlining situation.
llvm-svn: 20036
2005-02-04 19:59:49 +00:00
Chris Lattner
d1000686cd
Split mergeInGraph into two methods.
...
llvm-svn: 20035
2005-02-04 19:58:28 +00:00
Chris Lattner
377507b125
Add some new members
...
llvm-svn: 20034
2005-02-04 19:58:06 +00:00
Chris Lattner
28bfbb70dd
add new member
...
llvm-svn: 20033
2005-02-04 19:57:57 +00:00
Chris Lattner
ba954f3284
Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.
...
llvm-svn: 20031
2005-02-04 18:58:04 +00:00
Chris Lattner
0559691163
Fix a case where were incorrectly compiled cast from short to int on 64-bit
...
targets.
llvm-svn: 20030
2005-02-04 18:39:19 +00:00
Andrew Lenharth
5152be292a
alignment
...
llvm-svn: 20028
2005-02-04 14:09:38 +00:00
Andrew Lenharth
202011fcc7
get alignment printing correctly and get rid of __main hack
...
llvm-svn: 20027
2005-02-04 14:01:21 +00:00
Andrew Lenharth
c8770aa507
fix constant pointer outputing on 64 bit machines
...
llvm-svn: 20026
2005-02-04 13:47:16 +00:00
Misha Brukman
20b8a65627
* Fix broken link to directions to get llvm, llvm-gcc, and llvm-test from CVS
...
* Remove duplicated CVS directions and refer reader to the CVS section
* Clean up directions to be brief
llvm-svn: 20023
2005-02-03 22:25:23 +00:00
Andrew Lenharth
799479138e
FP fixes
...
llvm-svn: 20019
2005-02-03 21:01:15 +00:00
Chris Lattner
3dd3df2b55
Refactor getFunctionArgumentsForCall out of mergeInGraph.
...
llvm-svn: 20018
2005-02-03 18:40:25 +00:00
Chris Lattner
446b15f3a3
Add a new method.
...
llvm-svn: 20017
2005-02-03 18:40:05 +00:00
Misha Brukman
cd673250ba
* Clearly mark LLVM_LIB_SEARCH_PATH as being optional
...
* llvmgcc and llvmg++ aliases are no longer needed (binaries have llvm- prefix)
llvm-svn: 20016
2005-02-03 18:28:08 +00:00
Chris Lattner
45a6a18393
This is no longer needed. Global variables with undef initializers can be
...
initialized to anything, including garbage.
llvm-svn: 20010
2005-02-02 20:50:50 +00:00
Misha Brukman
d4528ea031
* Instead of fixing the version numbers before every release, mark them as x.y
...
* Eliminate the redundant "This is the..." in released file listing
* Fix grammar
llvm-svn: 20005
2005-02-02 18:01:57 +00:00
Andrew Lenharth
75c6225f32
Store fix
...
llvm-svn: 20004
2005-02-02 17:32:39 +00:00
Andrew Lenharth
cf2e21e879
oops
...
llvm-svn: 20003
2005-02-02 17:01:31 +00:00
Andrew Lenharth
fe6e7a30c0
prevent register allocator from using the stack pointer :)
...
llvm-svn: 20002
2005-02-02 17:00:21 +00:00
Andrew Lenharth
c7042c2d8b
fix loading of floats
...
llvm-svn: 19997
2005-02-02 15:05:33 +00:00
Jeff Cohen
fc9f146966
Put libraries in a common directory
...
llvm-svn: 19995
2005-02-02 06:33:11 +00:00
Andrew Lenharth
0f42d92ca0
marked mem* as not supported
...
llvm-svn: 19992
2005-02-02 05:49:42 +00:00
Jeff Cohen
d44e5dae0f
Add additional source of Win32 GNU utilities.
...
llvm-svn: 19991
2005-02-02 05:46:20 +00:00
Alkis Evlogimenos
346bb20409
Fix crash on MallocInsts of unsized types.
...
llvm-svn: 19988
2005-02-02 04:43:37 +00:00
Andrew Lenharth
07c0b0d92b
fix Load bug
...
llvm-svn: 19987
2005-02-02 04:35:44 +00:00
Chris Lattner
5aa75e4ce5
Fix yet another memset issue.
...
llvm-svn: 19986
2005-02-02 03:44:41 +00:00
Andrew Lenharth
c7e55f430c
try to make a bug bugpointable, add yet more constant pool stuff, fixup constant loads for FP
...
llvm-svn: 19985
2005-02-02 03:36:35 +00:00
Andrew Lenharth
ae88b6a8a8
better constant handling, should fix many remaining cases
...
llvm-svn: 19984
2005-02-02 00:51:15 +00:00
Alkis Evlogimenos
7c04a3ddb6
Add variable for bugpoint.
...
llvm-svn: 19981
2005-02-02 00:40:15 +00:00
Chris Lattner
16a53243c6
Eliminate some duplicated debug code
...
llvm-svn: 19980
2005-02-01 21:55:40 +00:00
Chris Lattner
5ce51e83af
Eliminate self-recursion as a special case.
...
llvm-svn: 19979
2005-02-01 21:49:43 +00:00
Chris Lattner
50cebc6b9b
Eliminate use of DSCallSiteIterator in key loop. This is a half step to
...
a tasty speedup.
llvm-svn: 19978
2005-02-01 21:37:27 +00:00
Chris Lattner
eb5febea34
remove dead method
...
llvm-svn: 19977
2005-02-01 21:37:06 +00:00
Andrew Lenharth
9df6a764b9
fix FP arg passing bug, Add unsigned to/from int, fix SELECT, fix Constant pool
...
llvm-svn: 19976
2005-02-01 20:40:27 +00:00
Andrew Lenharth
20d8b2ff71
Print the Constant pool
...
llvm-svn: 19975
2005-02-01 20:38:53 +00:00
Andrew Lenharth
32124c0a70
Make cmov work right and loads for fp from constant pool
...
llvm-svn: 19974
2005-02-01 20:36:44 +00:00
Andrew Lenharth
c777d4f03d
Correct stack stuff for FP
...
llvm-svn: 19973
2005-02-01 20:35:57 +00:00
Andrew Lenharth
8fb0d5002b
try to match alpha pattern
...
llvm-svn: 19972
2005-02-01 20:35:11 +00:00
Andrew Lenharth
7703d1ab25
fix register names
...
llvm-svn: 19971
2005-02-01 20:34:29 +00:00
Chris Lattner
63a46cee87
Signficantly speed up printing by not emitting the same file twice with
...
different names. Large SCC's tend to be big, so this saves a lot of time.
llvm-svn: 19970
2005-02-01 19:10:48 +00:00
Chris Lattner
4487b2e5a6
Fix some bugs andrew noticed legalizing memset for alpha
...
llvm-svn: 19969
2005-02-01 18:38:28 +00:00
Chris Lattner
d6106a41fe
Do not revisit nodes in the SCC traversal. This speeds up the BU pass a bit.
...
llvm-svn: 19968
2005-02-01 17:35:52 +00:00
Jeff Cohen
c04c0dbd19
Put finishing touches on GettingStartedVS.html and link it to the index.
...
llvm-svn: 19967
2005-02-01 15:59:28 +00:00
Chris Lattner
085c981345
Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll
...
llvm-svn: 19966
2005-02-01 01:47:42 +00:00
Chris Lattner
29b97d53c1
Apparently := confuses makellvm
...
llvm-svn: 19965
2005-02-01 01:47:12 +00:00
Chris Lattner
4298e1fea4
This bug crashes the assembler, distilled from a testcase produced by Andrew.
...
llvm-svn: 19964
2005-02-01 01:44:54 +00:00
Andrew Lenharth
cdc9e33ae5
pecimise loads, put indirect call addr in right register. still doesn't fix methcall
...
llvm-svn: 19963
2005-02-01 01:37:24 +00:00
Chris Lattner
f87e05be26
Update speedup and shrinkage info
...
llvm-svn: 19962
2005-02-01 01:33:52 +00:00
Chris Lattner
4947e67c4f
Updates for new use list changes.
...
llvm-svn: 19961
2005-02-01 01:24:21 +00:00
Chris Lattner
b6c21dbb1e
Update for API change.
...
llvm-svn: 19960
2005-02-01 01:24:01 +00:00
Chris Lattner
82b42c5d85
API change.
...
llvm-svn: 19959
2005-02-01 01:23:49 +00:00
Chris Lattner
d6a4492f81
Adjust to changes in APIs
...
llvm-svn: 19958
2005-02-01 01:23:31 +00:00
Chris Lattner
f98a7bffb3
Hacks to make this ugly ugly code work with the new use lists.
...
llvm-svn: 19957
2005-02-01 01:22:56 +00:00
Chris Lattner
ef55a1a775
Switch from using an ilist for uses to using a custom doubly linked list.
...
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).
This change means that use iterators are now only forward iterators, not
bidirectional.
This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'. While it would be better to reduce the multiplied factor,
I'm not smart enough to do so. This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.
This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction. It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).
llvm-svn: 19956
2005-02-01 01:22:06 +00:00
Chris Lattner
1230cf25ba
Fix a problem where we could infinitely recurse on phi nodes.
...
llvm-svn: 19955
2005-02-01 00:18:30 +00:00
Misha Brukman
8dfa2e4465
Fix hyphenation in output comment
...
llvm-svn: 19954
2005-01-31 06:19:57 +00:00
Chris Lattner
72684fecf8
Implement InstCombine/cast.ll:test25, a case that occurs many times
...
in spec
llvm-svn: 19953
2005-01-31 05:51:45 +00:00
Chris Lattner
46452d4558
New testcase
...
llvm-svn: 19952
2005-01-31 05:51:18 +00:00
Jeff Cohen
1b0d750ade
Add LLVM with Visual Studio overview
...
llvm-svn: 19951
2005-01-31 05:42:10 +00:00
Chris Lattner
31f486c775
Implement the trivial cases in InstCombine/store.ll
...
llvm-svn: 19950
2005-01-31 05:36:43 +00:00
Chris Lattner
2357f255ca
New testcase
...
llvm-svn: 19949
2005-01-31 05:36:19 +00:00
Chris Lattner
c456eac1b9
Rename these to start with %c, as they are the only ones that are checked.
...
No change to the tests themselves.
llvm-svn: 19948
2005-01-31 05:17:31 +00:00
Chris Lattner
fe1b0b8b24
Implement Transforms/InstCombine/cast-load-gep.ll, which allows us to devirtualize
...
11 indirect calls in perlbmk.
llvm-svn: 19947
2005-01-31 04:50:46 +00:00
Chris Lattner
340ab5bbbb
New testcase
...
llvm-svn: 19946
2005-01-31 04:49:22 +00:00
Andrew Lenharth
ae25bb1dc5
indirect call fix
...
llvm-svn: 19945
2005-01-31 03:19:31 +00:00
Andrew Lenharth
c40d156dc9
fp to int and back conversion sequences
...
llvm-svn: 19944
2005-01-31 01:44:26 +00:00
Chris Lattner
ccf22fb182
Fix the regressions my User changes introduced. Apparently some parts of
...
LLVM make the very reasonable assumption that constant expressions will
have at least one operand! :)
llvm-svn: 19943
2005-01-31 01:11:13 +00:00
Chris Lattner
2ca79d339e
Rename variables to work with VC++'s hokey scoping rules.
...
llvm-svn: 19942
2005-01-31 00:10:58 +00:00
Chris Lattner
2977b857c2
Fix some scary bugs that VC++ detected.
...
llvm-svn: 19941
2005-01-31 00:10:45 +00:00
Chris Lattner
e9772aea47
Make things more const-correct, adjust to changes in DSA interfaces.
...
llvm-svn: 19940
2005-01-30 23:51:25 +00:00
Chris Lattner
a1b39fa5ad
* Make some methods more const correct.
...
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
This makes many operations on these lists much more natural, and avoids
*exteremely* expensive copying of DSCallSites (e.g. moving nodes around
between lists, erasing a node from not the end of the vector, etc).
With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc. I expect that it would help TD even more, but I don't
have data for it.
This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.
llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Andrew Lenharth
7141334f98
added fp extend and removed a forgotten assert in more than 6 arg support (should break somewhere else now :) ) and fix an incorrect asm sequence for indirect calls
...
llvm-svn: 19938
2005-01-30 20:42:36 +00:00
Jeff Cohen
391380ee97
Silence VC++ warnings about using 'this' in base member initializations.
...
llvm-svn: 19937
2005-01-30 17:54:12 +00:00
Chris Lattner
8e62f434cd
This code is really unreachable.
...
llvm-svn: 19934
2005-01-30 16:33:46 +00:00
Chris Lattner
bfa060c5d2
Fix warnings.
...
llvm-svn: 19933
2005-01-30 16:32:48 +00:00
Andrew Lenharth
918a29fc51
support for larger calls
...
llvm-svn: 19932
2005-01-30 00:35:27 +00:00
Chris Lattner
79a85fada1
Improve spelling
...
llvm-svn: 19931
2005-01-30 00:13:34 +00:00
Chris Lattner
f6c93e36c7
Improve conformance with the Misha spelling benchmark suite
...
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Tanya Lattner
5ca41e2b68
Make this work on systems where size_t == unsigned and where they are not
...
the same.
llvm-svn: 19929
2005-01-29 23:29:55 +00:00
Tanya Lattner
238cf92000
Make this work on systems where size_t is not the same as unsigned.
...
llvm-svn: 19928
2005-01-29 23:08:01 +00:00
Chris Lattner
fdec565f1f
Unbreak the build :(
...
llvm-svn: 19926
2005-01-29 19:27:28 +00:00
Chris Lattner
2f0a1108ff
Adjust to ilist changes.
...
Based on the ilist changes avoid allocating an entire Use object for the
end of the Use chain. This saves 8 bytes of memory for each Value allocated
in the program. For 176.gcc, this reduces us from 69.5M -> 66.0M, a 5.3%
memory savings.
llvm-svn: 19925
2005-01-29 18:43:28 +00:00
Chris Lattner
e6074aa08b
adjust to ilist changes.
...
llvm-svn: 19924
2005-01-29 18:41:25 +00:00
Chris Lattner
e5c7b9a215
Adjust to ilist changes.
...
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Chris Lattner
f84ecca5f3
Adjust to changes in ilist
...
llvm-svn: 19922
2005-01-29 18:41:00 +00:00
Chris Lattner
02ccc2d7a0
Rename createNode -> createSentinal.
...
Add a new method, destroySentinal, that is used to delete it (instead of
requiring use of delete.
llvm-svn: 19921
2005-01-29 18:40:19 +00:00
Chris Lattner
0174b52dd9
clean up comments
...
llvm-svn: 19920
2005-01-29 17:29:05 +00:00
Chris Lattner
e89f022ba7
This has been deprecated for long enough, nuke it.
...
llvm-svn: 19919
2005-01-29 17:27:26 +00:00
Chris Lattner
800b72445f
This file was schizophrenic when it came to representing sizes. In some
...
cases it represented them as 'unsigned's, which are not enough for 64-bit
hosts. In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.
This patch unifies all of the sizes to use size_t instead.
llvm-svn: 19918
2005-01-29 17:17:18 +00:00
Chris Lattner
0701b78768
There is no reason to include ostream here, include iosfwd instead.
...
This file was schizophrenic when it came to representing sizes. In some
cases it represented them as 'unsigneds', which are not enough for 64-bit
hosts. In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.
This patch unifies all of the sizes to use size_t instead.
llvm-svn: 19917
2005-01-29 17:16:07 +00:00
Chris Lattner
bb4384ba71
After reading in a bc file, trim the resultant buffer down to what we
...
really need. This reduces 4M of memory consumption reading 176.gcc.
llvm-svn: 19916
2005-01-29 17:05:56 +00:00
Chris Lattner
173340640a
Finegrainify namespacification
...
llvm-svn: 19915
2005-01-29 16:53:02 +00:00
Andrew Lenharth
41bc2c2897
first step towards a correct and complete stack. also add some forms for things that were getting stuck in the nightly tester.
...
llvm-svn: 19914
2005-01-29 15:42:07 +00:00
Chris Lattner
1ec230e665
Due to previous simplifications, we can simplify the data structures being
...
used here.
llvm-svn: 19913
2005-01-29 07:04:10 +00:00
Chris Lattner
ce0fa4c109
Properly handle volatile.
...
llvm-svn: 19912
2005-01-29 06:42:34 +00:00
Chris Lattner
a194357025
Remove some useless map operations. Loads/stores that are in the same
...
BB as the load are not included in the Cand* sets at all.
llvm-svn: 19911
2005-01-29 06:39:25 +00:00
Chris Lattner
be62e72273
Before doing expensive global analysis, check to make sure the pointer is
...
not invalidated on entry and on exit of the block. This fixes some N^2
behavior in common cases, and speeds up gcc another 5% to 22.35s.
llvm-svn: 19910
2005-01-29 06:31:53 +00:00
Chris Lattner
afdbae2b55
Fix quotes.
...
llvm-svn: 19909
2005-01-29 06:29:45 +00:00
Jeff Cohen
b49177f017
Unbreak VC++ build
...
llvm-svn: 19908
2005-01-29 06:27:16 +00:00
Chris Lattner
fe7a9a242e
Minor simplification/speedup. Replaces a set lookup with a pointer comparison.
...
This speeds up 176.gcc from 25.73s to 23.48s, which is 9.5%
llvm-svn: 19907
2005-01-29 06:20:55 +00:00
Chris Lattner
787aed675d
Eliminate generality that is not buying us anything. In particular, this
...
will cause us to miss cases where the input pointer to a load could be value
numbered to another load. Something like this:
%X = load int* %P1
%Y = load int* %P2
Those are obviously the same if P1/P2 are the same. The code this patch
removes attempts to handle that. However, since GCSE iterates, this doesn't
actually buy us anything: GCSE will first replace P1 or P2 with the other
one, then the load can be value numbered as equal.
Removing this code speeds up gcse a lot. On 176.gcc in debug mode, this
speeds up gcse from 29.08s -> 25.73s, a 13% savings.
llvm-svn: 19906
2005-01-29 06:11:16 +00:00
Chris Lattner
b25abcb1fa
If we see:
...
%A = alloca int
%V = load int* %A
value number %V to undef, not 0.
llvm-svn: 19905
2005-01-29 05:57:01 +00:00
Chris Lattner
2295d0b7de
Memory used is a delta between memuse at the start of the time and the
...
memuse at the end, thus it is signed.
llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Jeff Cohen
a7f83cf6b3
Unbreak VC++ build
...
llvm-svn: 19903
2005-01-29 03:32:49 +00:00
Chris Lattner
f711f8db41
Make sure that we always grow a multiple of 2 operands.
...
llvm-svn: 19902
2005-01-29 01:05:12 +00:00
Chris Lattner
e9c61fbb51
noteworthy.
...
llvm-svn: 19901
2005-01-29 00:44:22 +00:00
Chris Lattner
d8e20188c6
Adjust to changes in instruction interfaces.
...
llvm-svn: 19900
2005-01-29 00:39:08 +00:00
Chris Lattner
a3f06fa2dd
Switchinst takes a hint for the number of cases it will have.
...
llvm-svn: 19899
2005-01-29 00:38:45 +00:00
Chris Lattner
a35dfcedd3
switchinst ctor now takes a hint for the number of cases that it will have.
...
llvm-svn: 19898
2005-01-29 00:38:26 +00:00
Chris Lattner
84d3137da7
Adjust Valuehandle to hold its operand directly in it.
...
llvm-svn: 19897
2005-01-29 00:37:36 +00:00
Chris Lattner
3479f9cca8
Finegrainify namespacification.
...
Adjust TmpInstruction to work with the new User model.
llvm-svn: 19896
2005-01-29 00:36:59 +00:00
Chris Lattner
68afd89730
add namespace qualifier
...
llvm-svn: 19895
2005-01-29 00:36:38 +00:00
Chris Lattner
616b8fc630
Adjust to changes in User class and minor changes in instruction ctors.
...
llvm-svn: 19894
2005-01-29 00:36:19 +00:00
Chris Lattner
2c08949c62
Adjust to slight changes in instruction interfaces.
...
llvm-svn: 19893
2005-01-29 00:35:55 +00:00
Chris Lattner
5d1bc2c408
Adjust to changes in User class.
...
llvm-svn: 19892
2005-01-29 00:35:33 +00:00
Chris Lattner
afdb3de4d7
Merge InstrTypes.cpp into this file
...
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.
llvm-svn: 19891
2005-01-29 00:35:16 +00:00
Chris Lattner
d0df99ce86
Adjust to changes in User class. Aggregate constants now must explicitly
...
manage their operands.
llvm-svn: 19890
2005-01-29 00:34:39 +00:00
Chris Lattner
03adb1aa83
This file is now merged into Instructions.cpp
...
llvm-svn: 19889
2005-01-29 00:33:32 +00:00
Chris Lattner
00b82c25bc
Adjust to changes in the User class.
...
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
5e9de0e083
Adjust to changes in the User class. Introduce a new UnaryInstruction
...
class.
llvm-svn: 19887
2005-01-29 00:32:51 +00:00
Chris Lattner
9d8da6a9f4
Adjust to user changes.
...
llvm-svn: 19886
2005-01-29 00:32:00 +00:00
Chris Lattner
4921cdf9c0
Many changes to cope with the User.h changes. Instructions now generally
...
directly embed their operands.
llvm-svn: 19885
2005-01-29 00:31:36 +00:00
Chris Lattner
893314cd3a
Adjust to User.h changes.
...
llvm-svn: 19884
2005-01-29 00:30:52 +00:00
Chris Lattner
f11ea56ef6
Instead of storing operands as std::vector<Use>, just maintain a pointer
...
and num operands in the User class. this allows us to embed the operands
directly in the subclasses if possible. For example, for binary operators
we store the two operands in the derived class.
The has several effects:
1. it improves locality because the operands and instruction are together
2. it makes accesses to operands faster (one less load) if you access them
through the derived class pointer. For example this:
Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
return I->getOperand(i);
}
Was compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 4(%esp), %edx
movl 8(%esp), %eax
sall $4, %eax
movl 24(%edx), %ecx
addl %ecx, %eax
movl (%eax), %eax
ret
and is now compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 8(%esp), %eax
movl 4(%esp), %edx
sall $4, %eax
addl %edx, %eax
movl 44(%eax), %eax
ret
Accesses through "Instruction*" are unmodified.
3. This reduces memory consumption (by about 3%) by eliminating 1 word of
vector overhead and a malloc header on a seperate object.
4. This speeds up gccas about 10% (both debug and release builds) on
large things (such as 176.gcc). For example, it takes a debug build
from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s
llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Andrew Lenharth
4a0d200c13
fix ExprMap, partially teach about add long
...
llvm-svn: 19882
2005-01-28 23:17:54 +00:00
Chris Lattner
feaf92f7ad
Fix a nasty thinko in my previous commit.
...
llvm-svn: 19881
2005-01-28 23:17:27 +00:00
Chris Lattner
bc7497d5f5
Alpha doesn't have a native f32 extload instruction.
...
llvm-svn: 19880
2005-01-28 22:58:25 +00:00
Chris Lattner
bf8c1ad313
implement legalization of truncates whose results and sources need to be
...
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.
llvm-svn: 19879
2005-01-28 22:52:50 +00:00
Chris Lattner
a4cfafe31a
Get alpha working with memset/memcpy/memmove
...
llvm-svn: 19878
2005-01-28 22:29:18 +00:00
Reid Spencer
3a46875e54
Fix some typos in the Makefile.rules.
...
Patch contributed by Vladimer Merzliakov.
llvm-svn: 19877
2005-01-28 19:52:32 +00:00
Chris Lattner
cd96168c95
Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd.
...
llvm-svn: 19876
2005-01-28 19:37:35 +00:00
Chris Lattner
cd517ff0c7
* add some DEBUG statements
...
* Properly compile this:
struct a {};
int test() {
struct a b[2];
if (&b[0] != &b[1])
abort ();
return 0;
}
to 'return 0', not abort().
llvm-svn: 19875
2005-01-28 19:32:01 +00:00
Chris Lattner
60c47267a9
Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
...
not change the address.
llvm-svn: 19874
2005-01-28 19:09:51 +00:00
Chris Lattner
e3aa4c01d5
New testcase.
...
llvm-svn: 19873
2005-01-28 19:08:32 +00:00
Chris Lattner
54903b68f2
Add some initial documentation for the SelectionDAG based instruction selectors
...
llvm-svn: 19872
2005-01-28 17:22:53 +00:00
Chris Lattner
5d88f184e2
Do not clean up if the MappedFile was never used or if the client already
...
closed the file. This unbreaks the build.
llvm-svn: 19871
2005-01-28 16:08:23 +00:00
Andrew Lenharth
579a324137
fix ExprMap and constant check in setcc
...
llvm-svn: 19870
2005-01-28 14:06:46 +00:00
Jeff Cohen
c723678541
Get VC++ compiling again
...
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Reid Spencer
adabeccd02
Convert some old C-style casts to C++ style.
...
llvm-svn: 19868
2005-01-28 07:22:20 +00:00
Andrew Lenharth
479bc61455
move FP into it's own select
...
llvm-svn: 19867
2005-01-28 06:57:18 +00:00
Chris Lattner
eb6614d719
CopyFromReg produces two values. Make sure that we remember that both are
...
legalized, and actually return the correct result when we legalize the chain first.
llvm-svn: 19866
2005-01-28 06:27:38 +00:00
Chris Lattner
38389b1633
These passes are no more.
...
llvm-svn: 19865
2005-01-28 06:13:52 +00:00
Chris Lattner
c782335e33
Remove this code as it is currently completely broken and unmaintained.
...
If needed, this can be resurrected from CVS.
Note that several of the interfaces (e.g. the IPModRef ones) are supersumed
by generic AliasAnalysis interfaces that have been written since this code
was developed (and they are not DSA specific).
llvm-svn: 19864
2005-01-28 06:12:46 +00:00
Jeff Cohen
971e03d74a
Properly close mapped files.
...
llvm-svn: 19863
2005-01-28 01:17:07 +00:00
Misha Brukman
df77835166
Mark -parallel pass as `experimental'
...
llvm-svn: 19858
2005-01-27 17:59:51 +00:00
Andrew Lenharth
7c538a6593
stack frame fix and zero FP reg fix
...
llvm-svn: 19857
2005-01-27 08:31:19 +00:00
Andrew Lenharth
96515adad6
Floating point instructions like Floating point registers
...
llvm-svn: 19856
2005-01-27 07:58:15 +00:00
Andrew Lenharth
0cceb5165e
int to float conversion and another setcc
...
llvm-svn: 19855
2005-01-27 07:50:35 +00:00
Misha Brukman
3852f652bf
Fix grammar
...
llvm-svn: 19854
2005-01-27 06:46:38 +00:00
Andrew Lenharth
3c361fd6f7
teach isel about comparison with constants and zero extending bits
...
llvm-svn: 19853
2005-01-27 03:49:45 +00:00
Jeff Cohen
9671b213b6
Fix some Path bugs
...
llvm-svn: 19852
2005-01-27 03:49:03 +00:00
Andrew Lenharth
5374789198
perhaps this will let me have calls again
...
llvm-svn: 19851
2005-01-27 01:22:48 +00:00
Andrew Lenharth
9e27e54d70
minor bug fix
...
llvm-svn: 19850
2005-01-27 00:52:26 +00:00
Andrew Lenharth
9748b623a4
minor bug fix
...
llvm-svn: 19849
2005-01-27 00:51:05 +00:00
Andrew Lenharth
267908ad47
added instructions for fp to int to fp moves
...
llvm-svn: 19848
2005-01-26 23:56:48 +00:00
Andrew Lenharth
5ae5f81720
initial fp support
...
llvm-svn: 19847
2005-01-26 21:54:09 +00:00
Chris Lattner
651ffb1df8
xfail this.
...
llvm-svn: 19846
2005-01-26 07:09:44 +00:00
Chris Lattner
a710180bba
XFAIL this for now.
...
llvm-svn: 19845
2005-01-26 07:08:42 +00:00
Andrew Lenharth
589304de7f
hum, writing on one machine, testing on another...
...
llvm-svn: 19844
2005-01-26 02:53:56 +00:00
Andrew Lenharth
02c5459948
add some operations, fix others. should compile several more tests now
...
llvm-svn: 19843
2005-01-26 01:24:38 +00:00
Chris Lattner
1b20615173
We can fold promoted and non-promoted loads into divs also!
...
llvm-svn: 19835
2005-01-25 20:35:10 +00:00
Chris Lattner
30607ec66e
Fold promoted loads into binary ops for FP, allowing us to generate m32 forms
...
of FP ops.
llvm-svn: 19834
2005-01-25 20:03:11 +00:00
Andrew Lenharth
ba2bcd867f
problems with bools, and their work arounds
...
llvm-svn: 19833
2005-01-25 19:58:40 +00:00
Alkis Evlogimenos
fbd921987f
Add a dependency to the trace library so that it gets pulled in
...
automatically.
llvm-svn: 19828
2005-01-25 16:23:57 +00:00
Reid Spencer
97f0f7646d
Document the --load option.
...
llvm-svn: 19822
2005-01-25 05:04:49 +00:00
Andrew Lenharth
122489bcab
more load choices, better add with imm
...
llvm-svn: 19821
2005-01-25 00:35:34 +00:00
Chris Lattner
2e2edef9c6
Make -ds-aa more useful, allowing it to be updated as xforms hack on the program.
...
llvm-svn: 19818
2005-01-24 20:00:14 +00:00
Chris Lattner
d64fafd937
Add some methods.
...
llvm-svn: 19817
2005-01-24 19:55:34 +00:00
Andrew Lenharth
2f0f845534
Clean ups, and taught the instruction selector about immediate forms
...
llvm-svn: 19816
2005-01-24 19:44:07 +00:00
Andrew Lenharth
6d1a96bccc
Alpha JIT prune
...
llvm-svn: 19815
2005-01-24 18:48:22 +00:00
Andrew Lenharth
3c12772190
include prune and JIT prune
...
llvm-svn: 19814
2005-01-24 18:45:41 +00:00
Andrew Lenharth
4680f89526
Pruned includes
...
llvm-svn: 19813
2005-01-24 18:37:48 +00:00
Andrew Lenharth
f36418f618
let configure recognize Alphas
...
llvm-svn: 19811
2005-01-24 17:33:52 +00:00
Andrew Lenharth
3c3de91b79
let configure recognize Alphas
...
llvm-svn: 19810
2005-01-24 17:25:41 +00:00
Misha Brukman
454c06f5a4
Mark CVS versions different from releases
...
llvm-svn: 19809
2005-01-24 16:29:24 +00:00
Misha Brukman
664d251443
primitive' has no a'
...
llvm-svn: 19808
2005-01-24 16:28:03 +00:00
Chris Lattner
5b9c49b6f2
Do not return true from isSized for things without a size (like functions and
...
labels) even though they are concrete. This fixes the DSA regressions from
last night.
llvm-svn: 19807
2005-01-24 16:00:52 +00:00
Chris Lattner
b6627702b4
This giant patch speeds up Type::isSized(). Before, this would have to search
...
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which
are a common occurance (and includes all primitives).
On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).
DSE and GCSE are still too slow on this testcase, but this is a simple
improvement.
llvm-svn: 19800
2005-01-24 02:08:34 +00:00
Chris Lattner
39837024ae
Fix a spurious warning.
...
llvm-svn: 19799
2005-01-24 01:40:18 +00:00
Chris Lattner
0e1de101a1
Silence a warning.
...
llvm-svn: 19798
2005-01-23 23:20:06 +00:00
Chris Lattner
0dfd7d3a0d
Silence optimized warnings.
...
llvm-svn: 19797
2005-01-23 23:19:44 +00:00
Chris Lattner
debae1e3c3
Allow the FP stackifier to completely ignore functions that do not use FP at
...
all. This should speed up the X86 backend fairly significantly on integer
codes. Now if only we didn't have to compute livevar still... ;-)
llvm-svn: 19796
2005-01-23 23:13:59 +00:00
Chris Lattner
fb5614506e
Simplify/speedup the PEI by not having to scan for uses of the callee saved
...
registers. This information is computed directly by the register allocator
now.
llvm-svn: 19795
2005-01-23 23:13:12 +00:00
Chris Lattner
90b491f46a
Add an accessor.
...
llvm-svn: 19794
2005-01-23 22:57:27 +00:00
Chris Lattner
3d527f7b61
Update physregsused info.
...
llvm-svn: 19793
2005-01-23 22:55:45 +00:00
Chris Lattner
24f0f0e28f
Update this pass to set PhysRegsUsed info in MachineFunction.
...
llvm-svn: 19792
2005-01-23 22:51:56 +00:00
Chris Lattner
ae09d93b35
Update these register allocators to set the PhysRegUsed info in MachineFunction.
...
llvm-svn: 19791
2005-01-23 22:45:13 +00:00
Chris Lattner
304053c6ec
Add support for the PhysRegsUsed array.
...
llvm-svn: 19789
2005-01-23 22:13:58 +00:00
Chris Lattner
1def519f3d
Expose more information from register allocation to passes that run after
...
it.
llvm-svn: 19788
2005-01-23 22:13:36 +00:00
Chris Lattner
ef2de322c6
Speed this up a bit by making ModifiedRegs a vector<char> not vector<bool>
...
llvm-svn: 19787
2005-01-23 21:45:01 +00:00
Chris Lattner
9e2c7facb2
Get rid of a several dozen more and instructions in specint.
...
llvm-svn: 19786
2005-01-23 20:26:55 +00:00
Chris Lattner
6c43f5e5fe
Fix crash comparing empty file against nonempty file.
...
llvm-svn: 19782
2005-01-23 06:02:40 +00:00
Chris Lattner
4add7e356f
Adjust to changes in SelectionDAG interfaces
...
The first half of correct chain insertion for libcalls. This is not enough
to fix Fhourstones yet though.
llvm-svn: 19781
2005-01-23 04:42:50 +00:00
Chris Lattner
90b7c13f3a
Remove the 3 HACK HACK HACKs I put in before, fixing them properly with
...
the new TLI that is available.
Implement support for handling out of range shifts. This allows us to
compile this code (a 64-bit rotate):
unsigned long long f3(unsigned long long x) {
return (x << 32) | (x >> (64-32));
}
into this:
f3:
mov %EDX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
ret
GCC produces this:
$ gcc t.c -masm=intel -O3 -S -o - -fomit-frame-pointer
..
f3:
push %ebx
mov %ebx, DWORD PTR [%esp+12]
mov %ecx, DWORD PTR [%esp+8]
mov %eax, %ebx
mov %edx, %ecx
pop %ebx
ret
The Simple ISEL produces (eww gross):
f3:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %ESI, 0
or %EAX, %ECX
or %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
llvm-svn: 19780
2005-01-23 04:39:44 +00:00
Chris Lattner
ffcb0ae329
Adjust to changes in SelectionDAG interface.
...
llvm-svn: 19779
2005-01-23 04:36:26 +00:00
Chris Lattner
2877e9e826
Give SelectionDAG a TargetLowering instance instead of TM instance.
...
llvm-svn: 19778
2005-01-23 04:36:06 +00:00
Chris Lattner
28939a222e
Build Alpha by default.
...
llvm-svn: 19777
2005-01-23 04:34:46 +00:00
Reid Spencer
d5d45b8d1a
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
...
llvm-svn: 19776
2005-01-23 04:32:47 +00:00
Reid Spencer
30226da5b3
Support Cygwin assembly generation. The cygwin version of Gnu ASsembler
...
doesn't support certain directives and symbols on cygwin are prefixed with
an underscore. This patch makes the necessary adjustments to the output.
llvm-svn: 19775
2005-01-23 03:52:14 +00:00
Chris Lattner
ece10a420e
Add support for fp tolerances
...
llvm-svn: 19774
2005-01-23 03:45:26 +00:00
Chris Lattner
580f5bfae3
This method takes sys::Path objects now.
...
llvm-svn: 19773
2005-01-23 03:32:16 +00:00
Chris Lattner
411bbeeac7
Adjust to changed interface.
...
llvm-svn: 19772
2005-01-23 03:31:39 +00:00
Chris Lattner
b782187b32
Make DiffFilesWithTolerance take sys::Path's instead of std::strings
...
Delete dead functions.
llvm-svn: 19771
2005-01-23 03:31:02 +00:00
Chris Lattner
7e264b2ec6
Remove two dead methods and improve the comments for DiffFilesWithTolerance.
...
Also, make DiffFilesWithTolerance take sys::Path objects instead of std::strings.
llvm-svn: 19770
2005-01-23 03:30:39 +00:00
Chris Lattner
364e8b771d
Fix a bug in previous checkin
...
llvm-svn: 19769
2005-01-23 03:19:13 +00:00
Chris Lattner
dff29cd72e
Drop dead #include
...
llvm-svn: 19768
2005-01-23 03:16:56 +00:00
Chris Lattner
c5a20a5dd4
The meat of this utility has been moved to FileUtilities, where it can be
...
used by other tools.
llvm-svn: 19767
2005-01-23 03:15:47 +00:00
Chris Lattner
16a4368c40
Add a new method, refactored out of fpcmp
...
llvm-svn: 19766
2005-01-23 03:13:43 +00:00
Chris Lattner
ca2bf0b67a
New method.
...
llvm-svn: 19765
2005-01-23 03:11:38 +00:00
Andrew Lenharth
a1b5ca2b9d
Let me introduce you to the early stages of the llvm backend for the alpha processor
...
llvm-svn: 19764
2005-01-22 23:41:55 +00:00
Chris Lattner
eccb73d57f
Get this to work for 64-bit systems.
...
llvm-svn: 19763
2005-01-22 23:04:37 +00:00
Reid Spencer
12b25a12a6
We're working towards LLVM 1.5 now so bump the version number. This change
...
won't be propagated to the configure script until there's a need to change
configure.ac for some larger purpose.
llvm-svn: 19762
2005-01-22 21:29:42 +00:00
Chris Lattner
97cf8fd4a9
Minor fix.
...
llvm-svn: 19761
2005-01-22 20:59:38 +00:00
Chris Lattner
59a7f5c2f3
This is the final big of factoring. This shares cases in suboperand
...
differences, which means that identical instructions (after stripping off
the first literal string) do not run any different code at all. On the X86,
this turns this code:
switch (MI->getOpcode()) {
case X86::ADC32mi: printOperand(MI, 4, MVT::i32); break;
case X86::ADC32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::ADC32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ADD32mi: printOperand(MI, 4, MVT::i32); break;
case X86::ADD32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::ADD32mr: printOperand(MI, 4, MVT::i32); break;
case X86::AND32mi: printOperand(MI, 4, MVT::i32); break;
case X86::AND32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::AND32mr: printOperand(MI, 4, MVT::i32); break;
case X86::CMP32mi: printOperand(MI, 4, MVT::i32); break;
case X86::CMP32mr: printOperand(MI, 4, MVT::i32); break;
case X86::MOV32mi: printOperand(MI, 4, MVT::i32); break;
case X86::MOV32mr: printOperand(MI, 4, MVT::i32); break;
case X86::OR32mi: printOperand(MI, 4, MVT::i32); break;
case X86::OR32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::OR32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ROL32mi: printOperand(MI, 4, MVT::i8); break;
case X86::ROR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SAR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SBB32mi: printOperand(MI, 4, MVT::i32); break;
case X86::SBB32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::SBB32mr: printOperand(MI, 4, MVT::i32); break;
case X86::SHL32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SHLD32mrCL: printOperand(MI, 4, MVT::i32); break;
case X86::SHR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SHRD32mrCL: printOperand(MI, 4, MVT::i32); break;
case X86::SUB32mi: printOperand(MI, 4, MVT::i32); break;
case X86::SUB32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::SUB32mr: printOperand(MI, 4, MVT::i32); break;
case X86::TEST32mi: printOperand(MI, 4, MVT::i32); break;
case X86::TEST32mr: printOperand(MI, 4, MVT::i32); break;
case X86::TEST8mi: printOperand(MI, 4, MVT::i8); break;
case X86::XCHG32mr: printOperand(MI, 4, MVT::i32); break;
case X86::XOR32mi: printOperand(MI, 4, MVT::i32); break;
case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
}
into this:
switch (MI->getOpcode()) {
case X86::ADC32mi:
case X86::ADC32mr:
case X86::ADD32mi:
case X86::ADD32mr:
case X86::AND32mi:
case X86::AND32mr:
case X86::CMP32mi:
case X86::CMP32mr:
case X86::MOV32mi:
case X86::MOV32mr:
case X86::OR32mi:
case X86::OR32mr:
case X86::SBB32mi:
case X86::SBB32mr:
case X86::SHLD32mrCL:
case X86::SHRD32mrCL:
case X86::SUB32mi:
case X86::SUB32mr:
case X86::TEST32mi:
case X86::TEST32mr:
case X86::XCHG32mr:
case X86::XOR32mi:
case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ADC32mi8:
case X86::ADD32mi8:
case X86::AND32mi8:
case X86::OR32mi8:
case X86::ROL32mi:
case X86::ROR32mi:
case X86::SAR32mi:
case X86::SBB32mi8:
case X86::SHL32mi:
case X86::SHR32mi:
case X86::SUB32mi8:
case X86::TEST8mi:
case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
}
After this, the generated asmwriters look pretty much as though they were
generated by hand. This shrinks the X86 asmwriter.inc files from 55101->39669
and 55429->39551 bytes each, and PPC from 16766->12859 bytes.
llvm-svn: 19760
2005-01-22 20:31:17 +00:00
Chris Lattner
92275bb6bb
Implement *even more* factoring. In particular, if all of the instruction
...
strings starts out with a constant string, we emit the string first, using
a table lookup (instead of a switch statement).
Because this is usually the opcode portion of the asm string, the differences
between the instructions have now been greatly reduced. This allows many
more case statements to be grouped together.
This patch also allows instruction cases to be grouped together when the
instruction patterns are exactly identical (common after the opcode string
has been ripped off), and when the differing operand is a MachineInstr
operand that needs to be formatted.
The end result of this is a mean and lean generated AsmPrinter!
llvm-svn: 19759
2005-01-22 19:22:23 +00:00
Chris Lattner
945e8655dd
Refactor code for numbering instructions into CodeGenTarget.
...
llvm-svn: 19758
2005-01-22 18:58:51 +00:00
Jeff Cohen
da636b3783
Fix VC++ compilation error
...
llvm-svn: 19757
2005-01-22 18:50:10 +00:00
Chris Lattner
64d9d2b819
QOI feature implemented.
...
llvm-svn: 19756
2005-01-22 18:45:35 +00:00
Chris Lattner
9ceb7c8f23
Implement factoring of instruction pattern strings. In particular, instead of
...
emitting code like this:
case PPC::ADD: O << "add "; printOperand(MI, 0, MVT::i64); O << ", "; prin
tOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '\n
'; break;
case PPC::ADDC: O << "addc "; printOperand(MI, 0, MVT::i64); O << ", "; pr
intOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '
\n'; break;
case PPC::ADDE: O << "adde "; printOperand(MI, 0, MVT::i64); O << ", "; pr
intOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '
\n'; break;
...
Emit code like this:
case PPC::ADD:
case PPC::ADDC:
case PPC::ADDE:
...
switch (MI->getOpcode()) {
case PPC::ADD: O << "add "; break;
case PPC::ADDC: O << "addc "; break;
case PPC::ADDE: O << "adde "; break;
...
}
printOperand(MI, 0, MVT::i64);
O << ", ";
printOperand(MI, 1, MVT::i64);
O << ", ";
printOperand(MI, 2, MVT::i64);
O << "\n";
break;
This shrinks the PPC asm writer from 24785->15205 bytes (even though the new
asmwriter has much more whitespace than the old one), and the X86 printers shrink
quite a bit too. The important implication of this is that GCC no longer hits swap
when building the PPC backend in optimized mode. Thus this fixes PR448.
-Chris
llvm-svn: 19755
2005-01-22 18:38:13 +00:00
Chris Lattner
b6f5d9a82a
Fix the ::: problem
...
llvm-svn: 19754
2005-01-22 18:18:59 +00:00
Chris Lattner
3baf682110
Minor refactoring, no functionality change.
...
llvm-svn: 19753
2005-01-22 17:40:38 +00:00
Jeff Cohen
ff696def84
oops
...
llvm-svn: 19752
2005-01-22 17:37:13 +00:00
Jeff Cohen
c8f1f4bc8e
Use binary mode for reading/writing bytecode files
...
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Jeff Cohen
e90b0c5469
Add (non-working) project bugpoint to Visual Studio
...
llvm-svn: 19750
2005-01-22 17:35:30 +00:00
Chris Lattner
0c23ba5c0f
Seperate asmstring parsing from emission. This allows the code to be simpler
...
and more understandable. It also allows us to do simple things like fold
consequtive literal strings together. For example, instead of emitting this
for the X86 backend:
O << "adc" << "l" << " ";
we now generate this:
O << "adcl ";
*whoa* :)
This shrinks the X86 asmwriters from 62729->58267 and 65176->58644 bytes
for the intel/att asm writers respectively.
llvm-svn: 19749
2005-01-22 17:32:42 +00:00
Jeff Cohen
0e64c73e67
Don't exclude FileUtilies and ToolRunner from VC++ build
...
llvm-svn: 19748
2005-01-22 16:32:47 +00:00
Jeff Cohen
142b4a721f
Fix VC++ complaint
...
llvm-svn: 19747
2005-01-22 16:30:58 +00:00
Jeff Cohen
ccbd3f0d57
Fix destroyDirectory bug
...
llvm-svn: 19746
2005-01-22 16:28:33 +00:00
Chris Lattner
52c97fbea9
Implicitly defined registers can clobber callee saved registers too!
...
This fixes the return-address-not-being-saved problem in the Alpha backend.
llvm-svn: 19741
2005-01-22 00:49:16 +00:00
Andrew Lenharth
67e2e21353
make double-dollar properly escape asmstrings
...
llvm-svn: 19740
2005-01-22 00:35:22 +00:00
Chris Lattner
3bc78b2e0b
More bugfixes for IA64 shifts.
...
llvm-svn: 19739
2005-01-22 00:33:03 +00:00
Chris Lattner
ec2183713c
Fix problems with non-x86 targets.
...
llvm-svn: 19738
2005-01-22 00:31:52 +00:00
Chris Lattner
d637c96fac
Add a nasty hack to fix Alpha/IA64 multiplies by a power of two.
...
llvm-svn: 19737
2005-01-22 00:20:42 +00:00
Chris Lattner
d53e763f18
Remove unneeded line.
...
llvm-svn: 19736
2005-01-21 23:43:12 +00:00
Chris Lattner
4f987bf16d
test commit
...
llvm-svn: 19735
2005-01-21 23:38:56 +00:00
Chris Lattner
fc4429e7c1
Handle comparisons of gep instructions that have different typed indices
...
as long as they are the same size.
llvm-svn: 19734
2005-01-21 23:06:49 +00:00
Chris Lattner
e70eb9da7d
Speed up folding operations into loads.
...
llvm-svn: 19733
2005-01-21 21:43:02 +00:00
Chris Lattner
e85a8d8f92
Keep track of node depth for each node
...
llvm-svn: 19732
2005-01-21 21:39:38 +00:00
Chris Lattner
e1e844c416
The ever-important vanity pass name :)
...
llvm-svn: 19731
2005-01-21 21:35:14 +00:00
Chris Lattner
28edd69eb4
If the interpreter tries to execute an external function, kill it. Of course
...
since we are dirty, special case __main. This should fix the infinite loop
horrible stuff that happens on linux-alpha when configuring llvm-gcc. It
might also help cygwin, who knows??
llvm-svn: 19729
2005-01-21 19:59:37 +00:00
Chris Lattner
c78776d209
Fix a FIXME: realize that argument stores are all independent (don't alias)
...
llvm-svn: 19728
2005-01-21 19:46:38 +00:00
Chris Lattner
96e809c47d
Unary token factor nodes are unneeded.
...
llvm-svn: 19727
2005-01-21 18:01:22 +00:00
Chris Lattner
aac464e6c0
Refactor libcall code a bit. Initial implementation of expanding int -> FP
...
operations for 64-bit integers.
llvm-svn: 19724
2005-01-21 06:05:23 +00:00
Chris Lattner
4105d5f249
Apparently destroyFile() now throws an exception. Since this class is
...
designed to be put on the stack, that's not cool. Catch and ignore the
exception.
llvm-svn: 19723
2005-01-20 23:31:35 +00:00
Chris Lattner
ac4e5ef023
Remove this test. This test is already in PR269, so it should be
...
readded when the bug is fixed.
llvm-svn: 19722
2005-01-20 20:58:42 +00:00
Chris Lattner
4d25c04f94
Simplify the shift-expansion code.
...
llvm-svn: 19721
2005-01-20 20:29:23 +00:00
Chris Lattner
2a631fa406
Implement ADD_PARTS/SUB_PARTS so that 64-bit integer add/sub work. This
...
fixes most of the remaining llc-beta failures.
llvm-svn: 19716
2005-01-20 18:53:00 +00:00
Chris Lattner
b3f83b28a5
Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.
...
llvm-svn: 19715
2005-01-20 18:52:28 +00:00
Chris Lattner
1fe9b40981
implement add_parts/sub_parts.
...
llvm-svn: 19714
2005-01-20 18:50:55 +00:00
Chris Lattner
ad1ffcc358
Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
...
llvm-svn: 19713
2005-01-20 18:50:39 +00:00
Chris Lattner
28d15860bd
Add missing entry.
...
llvm-svn: 19712
2005-01-20 17:32:28 +00:00
Chris Lattner
5b04f33405
Fix a crash compiling 134.perl.
...
llvm-svn: 19711
2005-01-20 16:50:16 +00:00
Jeff Cohen
90f0dc8fc6
Get analyze to show all analysis options when compiled with VC++
...
llvm-svn: 19710
2005-01-20 05:19:40 +00:00
Jeff Cohen
e1fde90bac
Add analyze project to Visual Studio
...
llvm-svn: 19709
2005-01-20 04:52:59 +00:00
Jeff Cohen
6eaf83e172
Add project llvm-proj to Visual Studio
...
llvm-svn: 19708
2005-01-20 04:41:49 +00:00
Chris Lattner
96c26751ec
Support targets that do not use i8 shift amounts.
...
llvm-svn: 19707
2005-01-19 22:31:21 +00:00
Chris Lattner
411336fe04
Add two optimizations. The first folds (X+Y)-X -> Y
...
The second folds operations into selects, e.g. (select C, (X+Y), (Y+Z))
-> (Y+(select C, X, Z)
This occurs a few times across spec, e.g.
select add/sub
mesa: 83 0
povray: 5 2
gcc 4 2
parser 0 22
perlbmk 13 30
twolf 0 3
llvm-svn: 19706
2005-01-19 21:50:18 +00:00
Chris Lattner
2547f05be8
Add some new tests
...
llvm-svn: 19705
2005-01-19 21:48:31 +00:00
Chris Lattner
f840289291
Add an assertion that would have made more sense to duraid
...
llvm-svn: 19704
2005-01-19 21:32:07 +00:00
Chris Lattner
3d95c14d94
Add support for targets that pass args in registers to calls.
...
llvm-svn: 19703
2005-01-19 20:24:35 +00:00
Chris Lattner
5695864a41
Add an accessor for targets that pass args in regs
...
llvm-svn: 19702
2005-01-19 20:19:58 +00:00
Chris Lattner
55562fa99a
Fold single use token factor nodes into other token factor nodes.
...
llvm-svn: 19701
2005-01-19 19:10:54 +00:00
Chris Lattner
0d03eb45a8
Realize the individual pieces of an expanded copytoreg/store/load are
...
independent of each other.
llvm-svn: 19700
2005-01-19 18:02:17 +00:00
Chris Lattner
9b75e148fd
Know some identities about tokenfactor nodes.
...
llvm-svn: 19699
2005-01-19 18:01:40 +00:00
Chris Lattner
32a5f02598
Know some simple identities. This improves codegen for (1LL << N).
...
llvm-svn: 19698
2005-01-19 17:29:49 +00:00
Chris Lattner
474aac4da9
Fix a problem where were were literally selecting for INCREASED register
...
pressure, not decreases register pressure. Fix problem where we accidentally
swapped the operands of SHLD, which caused fourinarow to fail. This fixes
fourinarow.
llvm-svn: 19697
2005-01-19 17:24:34 +00:00
Chris Lattner
1cffa73f2a
Just in case, handle something that is both a use and a def.
...
llvm-svn: 19696
2005-01-19 17:11:51 +00:00
Chris Lattner
00c436824f
When an instruction moves, make sure to update the VarInfo::Kills list as
...
well as all of teh other stuff in livevar. This fixes the compiler crash
on fourinarow last night.
llvm-svn: 19695
2005-01-19 17:09:15 +00:00
Chris Lattner
25be208e02
When commuting these instructions, make sure to actually swap the operands too.
...
llvm-svn: 19694
2005-01-19 16:55:52 +00:00
Chris Lattner
a3cc1835ad
Fix 'raise' to work with packed types. Patch by Morten Ofstad.
...
llvm-svn: 19693
2005-01-19 16:16:35 +00:00
Chris Lattner
de87d146ab
Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which
...
typically cost 1 cycle) instead of shld/shrd instruction (which are typically
6 or more cycles). This also saves code space.
For example, instead of emitting:
rotr:
mov %EAX, DWORD PTR [%ESP + 4]
mov %CL, BYTE PTR [%ESP + 8]
shrd %EAX, %EAX, %CL
ret
rotli:
mov %EAX, DWORD PTR [%ESP + 4]
shrd %EAX, %EAX, 27
ret
Emit:
rotr32:
mov %CL, BYTE PTR [%ESP + 8]
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, %CL
ret
rotli32:
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, 27
ret
We also emit byte rotate instructions which do not have a sh[lr]d counterpart
at all.
llvm-svn: 19692
2005-01-19 08:07:05 +00:00
Chris Lattner
c4adfbbd0b
New testcase for rotate instructions. Each function should codegen to a
...
rotate.
llvm-svn: 19691
2005-01-19 08:04:08 +00:00
Chris Lattner
0edf9535b9
Add rotate instructions.
...
llvm-svn: 19690
2005-01-19 07:50:03 +00:00
Chris Lattner
29f5819158
Match 16-bit shld/shrd instructions as well, implementing shift-double.llx:test5
...
llvm-svn: 19689
2005-01-19 07:37:26 +00:00
Chris Lattner
603677549f
Add a test for 16-bit sh*d.
...
llvm-svn: 19688
2005-01-19 07:37:01 +00:00
Chris Lattner
d54845f530
Improve coverage of the X86 instruction set by adding 16-bit shift doubles.
...
llvm-svn: 19687
2005-01-19 07:31:24 +00:00
Chris Lattner
2947801735
Teach the code generator that shrd/shld is commutable if it has an immediate.
...
This allows us to generate this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
shld %EDX, %EDX, 2
shl %EAX, 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EDX, %EAX
shrd %EDX, %ECX, 30
shl %EAX, 2
ret
Note the magically transmogrifying immediate.
llvm-svn: 19686
2005-01-19 07:11:01 +00:00
Chris Lattner
ea42c15da9
Use the TargetInstrInfo::commuteInstruction method to commute instructions
...
instead of doing it manually.
llvm-svn: 19685
2005-01-19 07:08:42 +00:00
Chris Lattner
f6932b700b
Finegrainify namespacification
...
Add default impl of commuteInstruction
Add notes about ugly V9 code.
llvm-svn: 19684
2005-01-19 06:53:34 +00:00
Chris Lattner
eadd41207d
Add a new method, described in the comment.
...
llvm-svn: 19683
2005-01-19 06:53:02 +00:00
Chris Lattner
892336a1b5
Ensure that each these functions generates a sh[rl]d instruction.
...
llvm-svn: 19682
2005-01-19 06:30:36 +00:00
Chris Lattner
41fe201b61
Codegen long >> 2 to this:
...
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
shrd %EAX, %EDX, 2
sar %EDX, 2
ret
instead of this:
test1:
mov %ECX, DWORD PTR [%ESP + 4]
shr %ECX, 2
mov %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %EDX
shl %EAX, 30
or %EAX, %ECX
sar %EDX, 2
ret
and long << 2 to this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
*** mov %EDX, %EAX
shrd %EDX, %ECX, 30
shl %EAX, 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
shr %ECX, 30
mov %EDX, DWORD PTR [%ESP + 8]
shl %EDX, 2
or %EDX, %ECX
shl %EAX, 2
ret
The extra copy (marked ***) can be eliminated when I teach the code generator
that shrd32rri8 is really commutative.
llvm-svn: 19681
2005-01-19 06:18:43 +00:00
Jeff Cohen
7230239553
Add missing data types for VC++
...
llvm-svn: 19680
2005-01-19 05:08:31 +00:00
Chris Lattner
2a7f8a94f4
Implement a way of expanding shifts. This applies to targets that offer
...
select operations or to shifts that are by a constant. This automatically
implements (with no special code) all of the special cases for shift by 32,
shift by < 32 and shift by > 32.
llvm-svn: 19679
2005-01-19 04:19:40 +00:00
Chris Lattner
d8d306601a
X86 shifts mask the amount.
...
llvm-svn: 19678
2005-01-19 03:36:30 +00:00
Chris Lattner
a05cd83d2f
Add a hook to find out how the target handles shift amounts that are out of
...
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
llvm-svn: 19677
2005-01-19 03:36:14 +00:00
Chris Lattner
9aa4886283
Move all data members to the end of the class.
...
Add a hook to find out how the target handles shift amounts that are out of
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
llvm-svn: 19676
2005-01-19 03:36:03 +00:00
Chris Lattner
42993e45b6
Zero is cheaper than sign extend.
...
llvm-svn: 19675
2005-01-18 21:57:59 +00:00
Chris Lattner
14947c34cc
Code to handle FP_EXTEND is dead now. X86 doesn't support any data types to
...
FP_EXTEND from!
llvm-svn: 19674
2005-01-18 20:05:56 +00:00
Chris Lattner
c6e928cba5
Remove more dead code.
...
llvm-svn: 19673
2005-01-18 19:50:08 +00:00
Chris Lattner
0616fa6b9b
The selection dag code handles the promotions from F32 to F64 for us, so we
...
don't need to even think about F32 in the X86 code anymore.
llvm-svn: 19672
2005-01-18 19:46:54 +00:00
Chris Lattner
d65c3f3118
Fix some fixmes (promoting bools for select and brcond), fix promotion
...
of zero and sign extends.
llvm-svn: 19671
2005-01-18 19:27:06 +00:00
Chris Lattner
a9d53f9fb9
Keep track of the retval type as well.
...
llvm-svn: 19670
2005-01-18 19:26:36 +00:00
Chris Lattner
8cd93be302
Keep track of the returned value type as well.
...
llvm-svn: 19669
2005-01-18 19:26:18 +00:00
Chris Lattner
9f2c4a5200
Teach legalize to promote copy(from|to)reg, instead of making the isel pass
...
do it. This results in better code on X86 for floats (because if strict
precision is not required, we can elide some more expensive double -> float
conversions like the old isel did), and allows other targets to emit
CopyFromRegs that are not legal for arguments.
llvm-svn: 19668
2005-01-18 17:54:55 +00:00
Chris Lattner
479c7118e4
Fix 124.m88ksim.
...
llvm-svn: 19667
2005-01-18 17:35:28 +00:00
Jeff Cohen
cef394290f
Add project llvm-ld to Visual Studio
...
llvm-svn: 19665
2005-01-18 05:44:50 +00:00
Jeff Cohen
18320b07d4
Add project llvm-nm to Visual Studio
...
llvm-svn: 19664
2005-01-18 05:44:25 +00:00
Jeff Cohen
1a6c167332
Add project llvm-ld to Visual Studio
...
llvm-svn: 19663
2005-01-18 05:39:37 +00:00
Jeff Cohen
c45440c72b
Add llvm-bcanalyzer project to Visual Studio
...
llvm-svn: 19662
2005-01-18 05:31:34 +00:00
Chris Lattner
ed246ec0d2
Do not emit loads multiple times, potentially in the wrong places.
...
llvm-svn: 19661
2005-01-18 04:18:32 +00:00
Tanya Lattner
c227ad2640
Minor changes.
...
llvm-svn: 19660
2005-01-18 04:15:41 +00:00
Chris Lattner
28a205e01b
Eliminate bad assertions.
...
llvm-svn: 19659
2005-01-18 04:00:54 +00:00
Chris Lattner
78d3028350
* Eliminate the TokenSet and just use the ExprMap for both tokens and values.
...
* Insert some really pedantic assertions that will notice when we emit the
same loads more than one time, exposing bugs. This turns a miscompilation in
bzip2 into a compile-fail. yaay.
llvm-svn: 19658
2005-01-18 03:51:59 +00:00
Chris Lattner
2cb338d7b5
Teach legalize to promote SetCC results.
...
llvm-svn: 19657
2005-01-18 02:59:52 +00:00
Chris Lattner
b07e2d2084
Allow setcc operations to have nonbool types.
...
llvm-svn: 19656
2005-01-18 02:52:03 +00:00
Chris Lattner
178219f913
Allow setcc operations to have non-bool types.
...
llvm-svn: 19655
2005-01-18 02:51:41 +00:00
Chris Lattner
d7f93950aa
Rely on the code in MatchAddress to do this work. Otherwise we fail to
...
match (X+Y)+(Z << 1), because we match the X+Y first, consuming the index
register, then there is no place to put the Z.
llvm-svn: 19652
2005-01-18 02:25:52 +00:00
Chris Lattner
2b4b79581d
Fix the completely broken FP constant folds for setcc's.
...
llvm-svn: 19651
2005-01-18 02:11:55 +00:00
Chris Lattner
a7acdda064
Fix a problem where probing for addressing modes caused expressions to be
...
emitted too early. In particular, this fixes
Regression/CodeGen/X86/regpressure.ll:regpressure3.
This also improves the 2nd basic block in 164.gzip:flush_block, which went from
.LBBflush_block_1: # loopentry.1.i
movzx %EAX, WORD PTR [dyn_ltree + 20]
movzx %ECX, WORD PTR [dyn_ltree + 16]
mov DWORD PTR [%ESP + 32], %ECX
movzx %ECX, WORD PTR [dyn_ltree + 12]
movzx %EDX, WORD PTR [dyn_ltree + 8]
movzx %EBX, WORD PTR [dyn_ltree + 4]
mov DWORD PTR [%ESP + 36], %EBX
movzx %EBX, WORD PTR [dyn_ltree]
add DWORD PTR [%ESP + 36], %EBX
add %EDX, DWORD PTR [%ESP + 36]
add %ECX, %EDX
add DWORD PTR [%ESP + 32], %ECX
add %EAX, DWORD PTR [%ESP + 32]
movzx %ECX, WORD PTR [dyn_ltree + 24]
add %EAX, %ECX
mov %ECX, 0
mov %EDX, %ECX
to
.LBBflush_block_1: # loopentry.1.i
movzx %EAX, WORD PTR [dyn_ltree]
movzx %ECX, WORD PTR [dyn_ltree + 4]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 8]
add %EAX, %ECX
movzx %ECX, WORD PTR [dyn_ltree + 12]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 16]
add %EAX, %ECX
movzx %ECX, WORD PTR [dyn_ltree + 20]
add %ECX, %EAX
movzx %EAX, WORD PTR [dyn_ltree + 24]
add %ECX, %EAX
mov %EAX, 0
mov %EDX, %EAX
... which results in less spilling in the function.
This change alone speeds up 164.gzip from 37.23s to 36.24s on apoc. The
default isel takes 37.31s.
llvm-svn: 19650
2005-01-18 01:06:26 +00:00
Chris Lattner
b93409f3e2
Fix indentation.
...
llvm-svn: 19649
2005-01-17 23:25:45 +00:00
Chris Lattner
81841af594
This is a carefully contrived testcase where the X86 ISel is emitting all loads
...
before other ops, causing it to spill like mad. This occurs in
164.gzip:flush_block.
llvm-svn: 19648
2005-01-17 23:16:01 +00:00
Chris Lattner
a5d137f471
Don't bother using max here.
...
llvm-svn: 19647
2005-01-17 23:02:13 +00:00
Chris Lattner
ca318edb94
Do not give token factor nodes outrageous weights
...
llvm-svn: 19645
2005-01-17 22:56:09 +00:00
Chris Lattner
4d9651c760
Non-volatile loads can be freely reordered against each other. This fixes
...
X86/reg-pressure.ll again, and allows us to do nice things in other cases.
For example, we now codegen this sort of thing:
int %loadload(int *%X, int* %Y) {
%Z = load int* %Y
%Y = load int* %X ;; load between %Z and store
%Q = add int %Z, 1
store int %Q, int* %Y
ret int %Y
}
Into this:
loadload:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%EAX]
mov %ECX, DWORD PTR [%ESP + 8]
inc DWORD PTR [%ECX]
ret
where we weren't able to form the 'inc [mem]' before. This also lets the
instruction selector emit loads in any order it wants to, which can be good
for register pressure as well.
llvm-svn: 19644
2005-01-17 22:19:26 +00:00
Chris Lattner
e86c933df7
Two changes:
...
1. Fold [mem] += (1|-1) into inc [mem]/dec [mem] to save some icache space.
2. Do not let token factor nodes prevent forming '[mem] op= val' folds.
llvm-svn: 19643
2005-01-17 22:10:42 +00:00
Chris Lattner
4108bb01cf
Don't call SelectionDAG.getRoot() directly, go through a forwarding method.
...
llvm-svn: 19642
2005-01-17 19:43:36 +00:00
Chris Lattner
96113fd08f
Refactor load/op/store folding into it's own method, no functionality changes.
...
llvm-svn: 19641
2005-01-17 19:25:26 +00:00
Chris Lattner
e3c2cf4854
Implement a target independent optimization to codegen arguments only into
...
the basic block that uses them if possible. This is a big win on X86, as it
lets us fold the argument loads into instructions and reduce register pressure
(by not loading all of the arguments in the entry block).
For this (contrived to show the optimization) testcase:
int %argtest(int %A, int %B) {
%X = sub int 12345, %A
br label %L
L:
%Y = add int %X, %B
ret int %Y
}
we used to produce:
argtest:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, 12345
sub %EAX, %ECX
mov %EDX, DWORD PTR [%ESP + 8]
.LBBargtest_1: # L
add %EAX, %EDX
ret
now we produce:
argtest:
mov %EAX, 12345
sub %EAX, DWORD PTR [%ESP + 4]
.LBBargtest_1: # L
add %EAX, DWORD PTR [%ESP + 8]
ret
This also fixes the FIXME in the code.
BTW, this occurs in real code. 164.gzip shrinks from 8623 to 8608 lines of
.s file. The stack frame in huft_build shrinks from 1644->1628 bytes,
inflate_codes shrinks from 116->108 bytes, and inflate_block from 2620->2612,
due to fewer spills.
Take that alkis. :-)
llvm-svn: 19639
2005-01-17 17:55:19 +00:00
Chris Lattner
9098879472
Fix a major regression last night that prevented us from producing [mem] op= reg
...
operations.
The body of the if is less indented but unmodified in this patch.
llvm-svn: 19638
2005-01-17 17:49:14 +00:00
Chris Lattner
16f64df93a
Refactor code into a new method.
...
llvm-svn: 19635
2005-01-17 17:15:02 +00:00
Chris Lattner
b21b6b9e84
Make methods private, add a method.
...
llvm-svn: 19634
2005-01-17 17:14:43 +00:00
Chris Lattner
b72ea1b719
Codegen this:
...
int %foo(int %X) {
%T = add int %X, 13
%S = mul int %T, 3
ret int %S
}
as this:
mov %ECX, DWORD PTR [%ESP + 4]
lea %EAX, DWORD PTR [%ECX + 2*%ECX + 39]
ret
instead of this:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, %ECX
add %EAX, 13
imul %EAX, %EAX, 3
ret
llvm-svn: 19633
2005-01-17 06:48:02 +00:00
Tanya Lattner
a8b2929f45
Added tmp instructions to preserve ssa.
...
llvm-svn: 19632
2005-01-17 06:47:26 +00:00
Chris Lattner
a56d29d517
Fix test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll and 132.ijpeg.
...
Do not fold a load into an operation if it will induce a cycle in the DAG.
Repeat after me: dAg.
llvm-svn: 19631
2005-01-17 06:26:58 +00:00
Chris Lattner
9605c927d1
New testcase for a problem that occurred in 132.ijpeg
...
llvm-svn: 19630
2005-01-17 06:25:59 +00:00
Chris Lattner
715364364b
Delete PHI nodes that are not dead but are locked in a cycle of single
...
useness.
llvm-svn: 19629
2005-01-17 05:10:15 +00:00
Chris Lattner
03f06f11aa
Move code out of indentation one level to make it easier to read.
...
Disable the xform for < > cases. It turns out that the following is being
miscompiled:
bool %test(sbyte %S) {
%T = cast sbyte %S to uint
%V = setgt uint %T, 255
ret bool %V
}
llvm-svn: 19628
2005-01-17 03:20:02 +00:00
Chris Lattner
30d205e080
Add methods
...
llvm-svn: 19627
2005-01-17 02:24:59 +00:00
Chris Lattner
3be6cd57c9
Do not fold a load into a comparison that is used by more than one place.
...
The comparison will probably be folded, so this is not ok to do.
This fixed 197.parser.
llvm-svn: 19624
2005-01-17 01:34:14 +00:00
Reid Spencer
642de64ef9
sysconfdir -> PROJ_etcdir
...
llvm-svn: 19623
2005-01-17 00:42:31 +00:00
Chris Lattner
0cd6b9ae1e
Do not codegen 'xor bool, true' as 'not reg'. not reg inverts the upper bits
...
of the bytereg. This fixes yacr2, 300.twolf and probably others.
llvm-svn: 19622
2005-01-17 00:23:16 +00:00
Chris Lattner
f7648e7110
Fix typos noticed by Gabor Greif, thanks Gabor!
...
llvm-svn: 19621
2005-01-17 00:12:04 +00:00
Chris Lattner
c1f386c7b8
Set up the shift and setcc types.
...
If we emit a load because we followed a token chain to get to it, try to
fold it into its single user if possible.
llvm-svn: 19620
2005-01-17 00:00:33 +00:00
Chris Lattner
5f180e4645
Shift and setcc types default to the pointer type.
...
llvm-svn: 19619
2005-01-16 23:59:48 +00:00
Chris Lattner
12879e04cb
Add comments
...
Add fields to hold the result type of setcc operations and shift amounts.
llvm-svn: 19618
2005-01-16 23:59:30 +00:00
Chris Lattner
5c8a85e2d8
Implement legalize of call nodes.
...
llvm-svn: 19617
2005-01-16 19:46:48 +00:00
Alkis Evlogimenos
a9c9f38498
Fix llvm-java project autconfiguration.
...
llvm-svn: 19616
2005-01-16 09:44:58 +00:00
Tanya Lattner
e4872342db
Added paramters to a few functions in order to allow me to change the functions to preserve SSA
...
llvm-svn: 19615
2005-01-16 08:51:10 +00:00
Chris Lattner
b14a63aa1c
* Adjust to changes in TargetLowering interfaces.
...
* Remove custom promotion for bool and byte select ops. Legalize now
promotes them for us.
* Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates.
* Declare which operations are not supported better.
* Add some hacky code for TRUNCSTORE to pretend that we have truncstore
for i16 types. This is useful for testing promotion code because I can
just remove 16-bit registers all together and verify that programs work.
llvm-svn: 19614
2005-01-16 07:34:08 +00:00
Chris Lattner
3c0dd46a3b
Revamp supported ops. Instead of just being supported or not, we now keep
...
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).
llvm-svn: 19613
2005-01-16 07:29:19 +00:00
Chris Lattner
897cd7dc0a
add method stub
...
llvm-svn: 19612
2005-01-16 07:28:41 +00:00
Chris Lattner
2c331fbc8f
Don't mash stuff together.
...
llvm-svn: 19611
2005-01-16 07:28:31 +00:00
Chris Lattner
6f8097951c
Use enums, move virtual dtor out of line.
...
llvm-svn: 19610
2005-01-16 07:28:11 +00:00
Chris Lattner
328bc38c5c
Revamp supported ops. Instead of just being supported or not, we now keep
...
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
llvm-svn: 19609
2005-01-16 07:27:49 +00:00
Reid Spencer
71e1e6220c
* Revise the projects section and make reference to Projects.html
...
* the dist-clean target no longer implies a check
llvm-svn: 19608
2005-01-16 07:18:31 +00:00
Reid Spencer
12adad4b2f
Don't confuse the LLVM_OBJ_DIR and the PROJ_OBJ_DIR because there might be
...
a symbolic link making the autoconf name for the directory (LLVM_OBJ_ROOT)
and the "make" name for the directory (PROJ_OBJ_ROOT) different.
llvm-svn: 19607
2005-01-16 06:53:48 +00:00
Chris Lattner
3ba56b3fe7
Implement some more missing promotions.
...
llvm-svn: 19606
2005-01-16 05:06:12 +00:00
Chris Lattner
8bdd0fc7aa
Fix bugpoint
...
llvm-svn: 19605
2005-01-16 04:23:22 +00:00
Chris Lattner
d0a65013ab
cycles_t -> CycleCount_t
...
llvm-svn: 19604
2005-01-16 04:20:30 +00:00
Jeff Cohen
fcd4587a75
Add some .cvsignores to the win32 hierarchy to account for generated files
...
llvm-svn: 19603
2005-01-16 03:18:23 +00:00
Reid Spencer
d9f4f3b141
Provide support for HP/UX aCC compiler's variant of hash_map and hash_set
...
(RogueWave). These are implemented in rw/stdex/hash_map.h and
rw/stdex/hash_set.h on HP/UX.
llvm-svn: 19600
2005-01-16 02:58:39 +00:00
Reid Spencer
64cee423c3
Fix locations of libraries and executables to match makefiles.
...
llvm-svn: 19599
2005-01-16 02:38:06 +00:00
Reid Spencer
44764d6406
BUILD_* to PROJ_*
...
llvm-svn: 19598
2005-01-16 02:35:47 +00:00
Chris Lattner
73b6977700
Clarify assertion.
...
llvm-svn: 19597
2005-01-16 02:23:34 +00:00
Chris Lattner
4e550ebb38
Add assertions.
...
llvm-svn: 19596
2005-01-16 02:23:22 +00:00
Chris Lattner
209f585033
Add support for promoted registers being live across blocks.
...
llvm-svn: 19595
2005-01-16 02:23:07 +00:00
Reid Spencer
22978217af
Update per new Makefile requirements for projects
...
llvm-svn: 19594
2005-01-16 02:21:42 +00:00
Reid Spencer
0e48bf8a19
Rename BUILD_* to PROJ_*
...
llvm-svn: 19592
2005-01-16 02:21:29 +00:00
Reid Spencer
05a2e79221
Update documentation on how to set up a project
...
llvm-svn: 19591
2005-01-16 02:21:18 +00:00
Reid Spencer
ba6a3dbd2d
Several changes:
...
* Rename BUILD_* to PROJ_*
* Differentiate between LLVM's Makefile.conf and the project's
* Use project specific install locations
llvm-svn: 19590
2005-01-16 02:20:54 +00:00
Reid Spencer
62ca901007
Several changes:
...
* Get rid of variables that are duplicates of autoconf variables.
* Rename BUILD_* to PROJ_*
* Define some project related install locations
* Don't assume LLVM's configured values are the project's
llvm-svn: 19589
2005-01-16 02:20:42 +00:00
Reid Spencer
5ee86be22b
Make this file capable of being used by both LLVM and its projects
...
llvm-svn: 19588
2005-01-16 02:20:30 +00:00
Tanya Lattner
7462d192b8
Fixed a couple of instructions that broke SSA.
...
llvm-svn: 19587
2005-01-16 02:14:17 +00:00
Chris Lattner
cebb964fef
Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
...
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner
4fb0fa4309
Improve compatibility with aCC on HPUX. Patch by Duraid Madina
...
llvm-svn: 19585
2005-01-16 01:22:18 +00:00
Chris Lattner
8ec1dc5fc0
Set up identity transforms.
...
llvm-svn: 19584
2005-01-16 01:20:18 +00:00
Chris Lattner
87a769cbd4
Move some information into the TargetLowering object.
...
llvm-svn: 19583
2005-01-16 01:11:45 +00:00
Chris Lattner
d58384fca6
Use the new TLI method to get this.
...
llvm-svn: 19582
2005-01-16 01:11:19 +00:00
Chris Lattner
1bc93bac69
Move some information out of LegalizeDAG into the generic Target interface.
...
llvm-svn: 19581
2005-01-16 01:10:58 +00:00
Chris Lattner
71d7f6e86f
legalize a bunch of operations that I missed.
...
llvm-svn: 19580
2005-01-16 00:38:00 +00:00
Chris Lattner
a8d34fb8c6
Add support for targets that require promotions.
...
llvm-svn: 19579
2005-01-16 00:37:38 +00:00
Chris Lattner
207a962c2c
Fix some serious bugs in promotion.
...
llvm-svn: 19578
2005-01-16 00:17:42 +00:00
Chris Lattner
0fe7776da5
Eliminate unneeded extensions.
...
llvm-svn: 19577
2005-01-16 00:17:20 +00:00
Chris Lattner
4d97864e92
Implement promotion of a whole bunch more operators. I think that this is
...
basically everything.
llvm-svn: 19576
2005-01-15 22:16:26 +00:00
Chris Lattner
630d1937bf
Print extra type for nodes with extra type info.
...
llvm-svn: 19575
2005-01-15 21:11:37 +00:00
Jeff Cohen
a2071f1247
Add new file to Visual Studio CodeGen project
...
llvm-svn: 19574
2005-01-15 07:33:52 +00:00
Chris Lattner
99222f706c
Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
...
ZERO_EXTEND_INREG for targets that don't support them.
llvm-svn: 19573
2005-01-15 07:15:18 +00:00
Chris Lattner
09d1b3d01d
Common code factored out.
...
llvm-svn: 19572
2005-01-15 07:14:32 +00:00
Chris Lattner
5d24d61ae8
implement these methods.
...
llvm-svn: 19571
2005-01-15 06:52:40 +00:00
Chris Lattner
efd434591d
Add some helper methods.
...
llvm-svn: 19570
2005-01-15 06:52:18 +00:00
Chris Lattner
c6c9a5b07d
Add support for promoting ADD/MUL.
...
Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.
llvm-svn: 19569
2005-01-15 06:18:18 +00:00
Chris Lattner
1001c6e2cd
Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
...
llvm-svn: 19568
2005-01-15 06:17:04 +00:00
Chris Lattner
9de5890211
Add a new target-independent code generator flag.
...
llvm-svn: 19567
2005-01-15 06:00:32 +00:00
Chris Lattner
e18a4c4c19
Add support for truncstore and *extload.
...
llvm-svn: 19566
2005-01-15 05:22:24 +00:00
Chris Lattner
1f2c9d82fa
Add intitial support for promoting some operators.
...
llvm-svn: 19565
2005-01-15 05:21:40 +00:00
Chris Lattner
ea2fa46f53
Improve output precision.
...
llvm-svn: 19564
2005-01-15 00:07:19 +00:00
Reid Spencer
730e7cb048
We don't distribute the operating system specific directories any more.
...
llvm-svn: 19563
2005-01-14 22:43:01 +00:00
Chris Lattner
3b8e719d1d
Adjust to CopyFromReg changes, implement deletion of truncating/extending
...
stores/loads.
llvm-svn: 19562
2005-01-14 22:38:01 +00:00
Chris Lattner
720a62e8c7
Adjust to CopyFromREg changes.
...
llvm-svn: 19561
2005-01-14 22:37:41 +00:00
Chris Lattner
868e9d79d7
Change CopyFromReg to take and produce a chain node, allowing it to be used
...
with physregs that are not live across the entire block.
llvm-svn: 19560
2005-01-14 22:37:20 +00:00
Chris Lattner
39c6744c9f
Start implementing truncating stores and extending loads.
...
llvm-svn: 19559
2005-01-14 22:08:15 +00:00
Chris Lattner
4bdb582200
Start adding some new operators, give IMPLICIT_DEF a chain operand.
...
llvm-svn: 19558
2005-01-14 22:07:46 +00:00
Chris Lattner
d7bffad559
Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
...
llvm-svn: 19557
2005-01-14 20:22:02 +00:00
Chris Lattner
8025e8b9e6
New testcase, problem found by Rob.
...
llvm-svn: 19556
2005-01-14 20:21:51 +00:00
Chris Lattner
c3ed31f837
Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
...
llvm-svn: 19555
2005-01-14 19:31:00 +00:00
Chris Lattner
57fb55d750
Testcase that crashes the PPC backend. Thanks to Rob for finding this.
...
llvm-svn: 19554
2005-01-14 19:30:42 +00:00
Chris Lattner
51726c47fe
Fix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
...
llvm-svn: 19553
2005-01-14 17:35:12 +00:00
Chris Lattner
7aa41cfa88
Fix a compile crash on spiff
...
llvm-svn: 19552
2005-01-14 17:17:59 +00:00
Reid Spencer
b12e290f8a
Allow the Echo and EchoCmd variables to be overridden.
...
llvm-svn: 19551
2005-01-14 16:33:36 +00:00
Reid Spencer
9dcfffd730
Fix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.
...
llvm-svn: 19550
2005-01-14 16:32:39 +00:00
Chris Lattner
0ad02bdd3d
Improve compatibility with acc
...
llvm-svn: 19549
2005-01-14 15:54:24 +00:00
Chris Lattner
d3af59bec2
Make this compatible with the HP/intel compiler. Fix by Duraid, thanks!
...
llvm-svn: 19548
2005-01-14 15:53:26 +00:00
Alkis Evlogimenos
a938e629f6
Correctly update configure to configure the llvm-java project
...
llvm-svn: 19546
2005-01-14 07:52:28 +00:00
Jeff Cohen
e246cdc946
Fix and improve win32 path validation.
...
llvm-svn: 19545
2005-01-14 04:09:39 +00:00
Reid Spencer
cbeed3571a
Make asctime_r work for HP/UX.
...
llvm-svn: 19544
2005-01-14 00:50:50 +00:00
Chris Lattner
144f6e3dee
More testcases
...
llvm-svn: 19543
2005-01-14 00:26:25 +00:00
Chris Lattner
4fa89827e2
if two gep comparisons only differ by one index, compare that index directly.
...
This allows us to better optimize begin() -> end() comparisons in common cases.
llvm-svn: 19542
2005-01-14 00:20:05 +00:00
Chris Lattner
d35d210ea0
Do not overrun iterators. This fixes a 176.gcc crash
...
llvm-svn: 19541
2005-01-13 23:26:48 +00:00
Chris Lattner
8ea1e8b982
Add a method
...
llvm-svn: 19540
2005-01-13 23:26:28 +00:00
Chris Lattner
7db6765530
new testcase
...
llvm-svn: 19539
2005-01-13 23:26:14 +00:00
Chris Lattner
7d131a4b9c
Add a method
...
llvm-svn: 19538
2005-01-13 22:58:50 +00:00
Chris Lattner
a04c904c4c
Turn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))). This occurs in
...
the 'sim' program and probably elsewhere. In sim, it comes up for cases
like this:
#define round(x) ((x)>0.0 ? (x)+0.5 : (x)-0.5)
double G;
void T(double X) { G = round(X); }
(it uses the round macro a lot). This changes the LLVM code from:
%tmp.1 = setgt double %X, 0.000000e+00 ; <bool> [#uses=1]
%tmp.4 = add double %X, 5.000000e-01 ; <double> [#uses=1]
%tmp.6 = sub double %X, 5.000000e-01 ; <double> [#uses=1]
%mem_tmp.0 = select bool %tmp.1, double %tmp.4, double %tmp.6
store double %mem_tmp.0, double* %G
to:
%tmp.1 = setgt double %X, 0.000000e+00 ; <bool> [#uses=1]
%mem_tmp.0.p = select bool %tmp.1, double 5.000000e-01, double -5.000000e-01
%mem_tmp.0 = add double %mem_tmp.0.p, %X
store double %mem_tmp.0, double* %G
ret void
llvm-svn: 19537
2005-01-13 22:52:24 +00:00
Chris Lattner
81e8417614
Implement an optimization for == and != comparisons like this:
...
_Bool test2(int X, int Y) {
return &arr[X][Y] == arr;
}
instead of generating this:
bool %test2(int %X, int %Y) {
%tmp.3.idx = mul int %X, 160 ; <int> [#uses=1]
%tmp.3.idx1 = shl int %Y, ubyte 2 ; <int> [#uses=1]
%tmp.3.offs2 = sub int 0, %tmp.3.idx ; <int> [#uses=1]
%tmp.7 = seteq int %tmp.3.idx1, %tmp.3.offs2 ; <bool> [#uses=1]
ret bool %tmp.7
}
generate this:
bool %test2(int %X, int %Y) {
seteq int %X, 0 ; <bool>:0 [#uses=1]
seteq int %Y, 0 ; <bool>:1 [#uses=1]
%tmp.7 = and bool %0, %1 ; <bool> [#uses=1]
ret bool %tmp.7
}
This idiom occurs in C++ programs when iterating from begin() to end(),
in a vector or array. For example, we now compile this:
void test(int X, int Y) {
for (int *i = arr; i != arr+100; ++i)
foo(*i);
}
to this:
no_exit: ; preds = %entry, %no_exit
...
%exitcond = seteq uint %indvar.next, 100 ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
instead of this:
no_exit: ; preds = %entry, %no_exit
...
%inc5 = getelementptr [100 x [40 x int]]* %arr, int 0, int 0, int %inc.rec ; <int*> [#uses=1]
%tmp.8 = seteq int* %inc5, getelementptr ([100 x [40 x int]]* %arr, int 0, int 100, int 0) ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.8, label %return, label %no_exit
llvm-svn: 19536
2005-01-13 22:25:21 +00:00
Chris Lattner
e727af06c8
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
...
llvm-svn: 19535
2005-01-13 20:50:02 +00:00
Chris Lattner
4cb9fa373b
Fix some bugs in code I didn't mean to check in.
...
llvm-svn: 19534
2005-01-13 20:40:58 +00:00
Chris Lattner
0798af33a5
Fix a crash compiling 129.compress
...
llvm-svn: 19533
2005-01-13 20:14:25 +00:00
Chris Lattner
15bd19dd76
Codegen factor nodes more intelligently according to perceived register pressure.
...
llvm-svn: 19532
2005-01-13 19:56:00 +00:00
Chris Lattner
2451684678
Don't forget the existing root.
...
llvm-svn: 19531
2005-01-13 19:53:14 +00:00
Reid Spencer
74bc42304c
Update the documentation about -enable-llcbeta vs. -enable-linscan
...
llvm-svn: 19530
2005-01-13 18:02:40 +00:00
Chris Lattner
c251fb6441
Initial trivial (but stupid) codegen for this node.
...
llvm-svn: 19529
2005-01-13 18:01:36 +00:00
Chris Lattner
718b5c2f82
Codegen independent ops as being independent.
...
llvm-svn: 19528
2005-01-13 17:59:43 +00:00
Chris Lattner
05b4e37e85
Legalize new node, add assertion.
...
llvm-svn: 19527
2005-01-13 17:59:25 +00:00
Chris Lattner
4b1be0dfeb
Print new node.
...
llvm-svn: 19526
2005-01-13 17:59:10 +00:00
Chris Lattner
f510866785
Add a new node type, add comments.
...
llvm-svn: 19525
2005-01-13 17:58:35 +00:00
Reid Spencer
152733823e
Turn on LOADABLE_MODULE so that profile.so can be loaded dynamically by
...
the JIT.
llvm-svn: 19524
2005-01-13 16:53:05 +00:00
Reid Spencer
9df352d469
Re-enable libprofile now that llvm-ar is working better.
...
llvm-svn: 19523
2005-01-13 16:51:19 +00:00
Chris Lattner
3676cd6fe2
Add some really pedantic assertions to the load folding code. Fix a bunch
...
of cases where we accidentally emitted a load folded once and unfolded
elsewhere.
llvm-svn: 19522
2005-01-13 05:53:16 +00:00
Chris Lattner
4dfd2cfc0c
Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.
...
This fixes llvm-test/SingleSource/Regression/C/casts.c
llvm-svn: 19519
2005-01-12 18:51:15 +00:00
Chris Lattner
7b1dae8032
We can only fold a load into an op if there is exactly one use of the value.
...
Checking to see if the load has two uses is not equivalent, as the chain
value may have zero uses.
llvm-svn: 19518
2005-01-12 18:38:26 +00:00
Chris Lattner
40e7982c2c
New method
...
llvm-svn: 19517
2005-01-12 18:37:47 +00:00
Chris Lattner
373e8f5607
New method.
...
llvm-svn: 19516
2005-01-12 18:37:33 +00:00
Chris Lattner
9864b08f94
Fix sign extend to long. When coming from sbyte, we used to generate:
...
movsbl 4(%esp), %eax
movl %eax, %edx
sarl $7, %edx
Now we generate:
movsbl 4(%esp), %eax
movl %eax, %edx
sarl $31, %edx
Which is right.
llvm-svn: 19515
2005-01-12 18:19:52 +00:00
Chris Lattner
1321754941
Update comments to indicate CopyFrom/ToReg take physregs as well as vregs.
...
llvm-svn: 19514
2005-01-12 18:11:36 +00:00
Chris Lattner
1755360db6
Try both ways to fold an add together. This allows us to generate this code
...
imul %EAX, %EAX, 400
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX + 4*%EDX]
inc %EDX
cmp %EDX, 100
instead of this:
imul %EAX, %EAX, 400
add %ECX, %EAX
mov %EAX, %EDX
shl %EAX, 2
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX]
inc %EDX
cmp %EDX, 100
llvm-svn: 19513
2005-01-12 18:08:53 +00:00
Reid Spencer
6dced92447
Shut up warnings with GCC 3.4.3 about uninitialized variables.
...
llvm-svn: 19512
2005-01-12 14:53:45 +00:00
Chris Lattner
42e7e98908
Fix a major miscompilation where we were overwriting the scale reg.
...
llvm-svn: 19511
2005-01-12 07:33:20 +00:00
Chris Lattner
db4b67c81e
Do not use the type of the RHS constant to determine the type of the operation.
...
This fails for shifts because the constant is always 8 bits.
llvm-svn: 19508
2005-01-12 05:22:07 +00:00
Chris Lattner
bdb2e9dabc
Do not lose the offset from teh global when peephole optimizing instructions.
...
This fixes FreeBench/pcompress
llvm-svn: 19507
2005-01-12 05:17:28 +00:00
Chris Lattner
2f8e4ad870
Silence VC++ warnings.
...
llvm-svn: 19506
2005-01-12 04:51:37 +00:00
Jeff Cohen
847b54101b
Add new file to Visual Studio CodeGen project
...
llvm-svn: 19505
2005-01-12 04:32:42 +00:00
Jeff Cohen
407aa0198c
Fix C++ more compilatiom errors
...
llvm-svn: 19504
2005-01-12 04:29:05 +00:00
Chris Lattner
efe90209ef
Fix a compile error with VC++, which things that static const arrays need
...
to be dynamically initialized. :(
llvm-svn: 19503
2005-01-12 04:23:22 +00:00
Chris Lattner
6fba62d6ec
Fix a bug that caused us to crash on povray. We weren't emitting an FP_REG_KILL into a block that had a successor with a FP PHI node.
...
llvm-svn: 19502
2005-01-12 04:21:28 +00:00
Chris Lattner
bb4c14f270
Print a load of a null pointer (in intel mode) like this:
...
mov %AX, WORD PTR [0]
instead of like this:
mov %AX, WORD PTR []
llvm-svn: 19501
2005-01-12 04:07:11 +00:00
Chris Lattner
b372fab2be
Print a load of a null pointer like this:
...
movw 0, %ax
instead of like this:
movw , %ax
llvm-svn: 19500
2005-01-12 04:05:19 +00:00
Chris Lattner
f8f79c4192
Fix a crash compiling povray on UINT_TO_FP from i16.
...
llvm-svn: 19499
2005-01-12 04:00:00 +00:00
Chris Lattner
e05a461f1d
Add an option to view the selection dags as they are generated.
...
llvm-svn: 19498
2005-01-12 03:41:21 +00:00
Misha Brukman
732daa5b9d
Use and print out BuildStatus, we don't always have build errors.
...
llvm-svn: 19497
2005-01-12 03:31:38 +00:00
Chris Lattner
3278ce8871
There are no [mem] op= reg instructions for FP, so remove their entries.
...
llvm-svn: 19496
2005-01-12 03:16:09 +00:00
Chris Lattner
e49a335797
Fix a bug where we didn't insert FP_REG_KILL instructions into MBB's that
...
contain FP PHI nodes but no other FP defining instructions. This fixes
183.equake
llvm-svn: 19495
2005-01-12 02:57:10 +00:00
Chris Lattner
b7fe57a0f1
Fold TRUNCATE (LOAD P) into a smaller load from P.
...
llvm-svn: 19494
2005-01-12 02:19:06 +00:00
Chris Lattner
2cfce6853b
Be more careful about order of arg evalution for CopyToReg nodes. This shrinks
...
256.bzip2 from 7142 to 7103 lines of .s file.
Second, add initial support for folding loads into compares, though this code
is dynamically dead for now. :(
llvm-svn: 19493
2005-01-12 02:02:48 +00:00
Chris Lattner
021cfd2a80
Fold some more [mem] op= val operators. This allows us to things like this
...
several times in 256.bzip2:
mov %EAX, DWORD PTR [%ESP + 204]
- mov %EAX, DWORD PTR [%EAX]
- or %EAX, 2097152
- mov %ECX, DWORD PTR [%ESP + 204]
- mov DWORD PTR [%ECX], %EAX
+ or DWORD PTR [%EAX], 2097152
llvm-svn: 19492
2005-01-12 01:28:00 +00:00
Chris Lattner
b0eef82b82
Fold loads into sign/zero extends. instead of:
...
mov %AL, BYTE PTR [%EDX + l18_length_code]
movzx %EAX, %AL
Emit:
movzx %EAX, BYTE PTR [%EDX + l18_length_code]
llvm-svn: 19489
2005-01-11 23:33:00 +00:00
Chris Lattner
75bac9f786
Comment out debug code :)
...
Select [mem] += Val operations. For constants, we used to get:
mov %ECX, -32768
add %ECX, DWORD PTR [l4_match_start]
mov DWORD PTR [l4_match_start], %ECX
Now we get:
add DWORD PTR [l4_match_start], -32768
For other values we used to get:
mov %EBP, %EDI ;; because the add destroys the value
add %EBP, DWORD PTR [l4_input_len]
mov DWORD PTR [l4_input_len], %EBP
now we get:
add DWORD PTR [l4_input_len], %EDI
Both of these use less registers than the alternative, are faster and smaller.
llvm-svn: 19488
2005-01-11 23:21:30 +00:00
Chris Lattner
d28ae12168
Handle the global address case here, not just the offset case.
...
llvm-svn: 19487
2005-01-11 22:58:43 +00:00
Chris Lattner
8aa10fcd1b
Treat int constants as not requiring a register, since they are almost always
...
folded into an instruction.
llvm-svn: 19486
2005-01-11 22:29:12 +00:00
Chris Lattner
c2785562f1
Print the value types in the nodes of the graph
...
llvm-svn: 19485
2005-01-11 22:21:04 +00:00
Chris Lattner
613f79fcbb
add an assertion, avoid creating copyfromreg/copytoreg pairs that are the
...
same for PHI nodes.
llvm-svn: 19484
2005-01-11 22:03:46 +00:00
Chris Lattner
62b22420be
* Factor a bunch of binary operator cases into shared code.
...
* Fold loads into Add, sub, and, or, xor and mul when possible.
* Codegen shl X, 1 as add X, X
llvm-svn: 19483
2005-01-11 21:19:59 +00:00
Chris Lattner
4cbf1f0038
Clear the whole array, always.
...
llvm-svn: 19482
2005-01-11 20:25:26 +00:00
Misha Brukman
7b98f7407b
No need to repeat the word build' since it's under Build status'
...
llvm-svn: 19481
2005-01-11 19:51:24 +00:00
Chris Lattner
8cf9cdae3d
Fold multiplies by 3,5,9 into addressing modes when possible.
...
llvm-svn: 19480
2005-01-11 19:37:02 +00:00
Misha Brukman
870b872bfa
We don't always have build errors, so call it status', not error'
...
llvm-svn: 19479
2005-01-11 18:27:16 +00:00
Chris Lattner
f49c27c65c
Squelch optimized warning.
...
llvm-svn: 19475
2005-01-11 17:46:49 +00:00
Reid Spencer
792bbf02a2
Fix the documentation for executeAndWait so the argument comments are
...
actually attributed to the arguments by doxygen.
llvm-svn: 19473
2005-01-11 06:37:27 +00:00
Chris Lattner
b74ec4cd24
Instead of generating stuff like this:
...
mov %ECX, %EAX
add %ECX, 32768
mov %SI, WORD PTR [2*%ECX + l13_prev]
Generate this:
mov %SI, WORD PTR [2*%ECX + l13_prev + 65536]
This occurs when you have a GEP instruction where an index is
"something + imm".
llvm-svn: 19472
2005-01-11 06:36:20 +00:00
Reid Spencer
4596db3509
Make the construction of doxygen documentation a repeatable process
...
llvm-svn: 19469
2005-01-11 06:26:27 +00:00
Chris Lattner
c07164e909
Implement MEMCPY natively in terms of rep movs*
...
llvm-svn: 19468
2005-01-11 06:19:26 +00:00
Chris Lattner
36f7848b26
Implement memset -> rep stos*
...
llvm-svn: 19467
2005-01-11 06:14:36 +00:00
Chris Lattner
a19f84240f
Announce that we don't support mem ops yet.
...
llvm-svn: 19466
2005-01-11 05:57:36 +00:00
Chris Lattner
85d70c6fd5
Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the target
...
does not support them.
llvm-svn: 19465
2005-01-11 05:57:22 +00:00
Chris Lattner
844277fb1e
Print new operations.
...
llvm-svn: 19464
2005-01-11 05:57:01 +00:00
Chris Lattner
875def9b71
Turn memset/memcpy/memmove into the corresponding operations.
...
llvm-svn: 19463
2005-01-11 05:56:49 +00:00
Chris Lattner
1d7b8e118b
Add MEMSET/MEMCPY/MEMMOVE operations. Fix a really bad bug in the vector
...
SDNode ctor.
llvm-svn: 19462
2005-01-11 05:56:17 +00:00
Reid Spencer
4a1ab18fbf
* Add the use of LOADABLE_MODULE=1 in the makefile example
...
* Change the names of the resulting module to Hello instead of libHello
* Change lib/Debug -> Debug/lib per new makefile implementation.
llvm-svn: 19459
2005-01-11 05:16:23 +00:00
Reid Spencer
1e008c200d
* Describe the LOADABLE_MODULE feature
...
* Get rid of non-compliant <font> elements (how did that get in there?)
llvm-svn: 19458
2005-01-11 05:12:54 +00:00
Chris Lattner
378262d33b
Teach the address selector to make 'reg+reg' addressing modes.
...
llvm-svn: 19457
2005-01-11 04:40:19 +00:00
Reid Spencer
134f02d0c7
Add the LOADABLE_MODULE=1 directive to indicate that this shared library is
...
intended to be a dlopenable module and not a "plain" shared library.
llvm-svn: 19456
2005-01-11 04:33:32 +00:00
Chris Lattner
9d7cf998ca
Emit NOT instructions.
...
llvm-svn: 19455
2005-01-11 04:31:30 +00:00
Reid Spencer
87e645c5bd
Implement the LOADABLE_MODULE option when building a shared library. This
...
passes the -module option on the libtool command line to ensure that the
shared library being built can be dlopened and dlsym can work on that
module. LOADABLE_MODULE should be sent only in conjunction with the
SHARED_LIBRARY directive. It should generally be used for any module that
is intended to be the target of an LLVM -load option. Note that loadable
modules will not have the lib prefix but otherwise look like shared
libraries. This is per the libtool recommendations and prevents these
special shared libraries from being linked in via -l option to the linker.
llvm-svn: 19454
2005-01-11 04:31:07 +00:00
Chris Lattner
a86fa4455b
shift X, 0 -> X
...
llvm-svn: 19453
2005-01-11 04:25:13 +00:00
Chris Lattner
37ed28558f
Fix a bug emitting branches that broke a lot of programs.
...
llvm-svn: 19452
2005-01-11 04:06:27 +00:00
Chris Lattner
e44e6d16fb
Be more careful where we set ContainsFPCode. We were missing a set in the
...
int -> FP casting code. Note that we don't have to set it for FP operations
that take FP values as operands: whatever produces the FP value will set the
flag.
llvm-svn: 19451
2005-01-11 03:50:45 +00:00
Chris Lattner
8fea42bd6d
Fix a major bug in setcc/cmov folding, where we accidentally
...
inverted the sense of the comparison.
llvm-svn: 19450
2005-01-11 03:37:59 +00:00
Chris Lattner
0d1f82ac2f
Take register pressure into account when we have to decide whether to
...
evaluate the LHS or the RHS of an operation first. This causes good things
to happen. For example, instead of compiling a loop to this:
.LBBstrength_result7_1: # loopentry
movl 16(%esp), %edi
movl (%edi), %edi ;;; LOAD
movl (%ecx), %ebx
movl $2, (%eax,%ebx,4)
movl (%edx), %ebx
movl %esi, %ebp
addl $21, %ebp
addl $42, %esi
cmpl $0, %edi ;;; USE
cmovne %esi, %ebp
cmpl %ebp, %ebx
movl %ebp, %esi
jg .LBBstrength_result7_1
We now compile it to this:
.LBBstrength_result7_1: # loopentry
movl %edi, %ebx
addl $42, %ebx
addl $21, %edi
movl (%ecx), %ebp ;; LOAD
cmpl $0, %ebp ;; USE
cmovne %ebx, %edi
movl (%edx), %ebx
movl $2, (%eax,%ebx,4)
movl (%esi), %ebx
cmpl %edi, %ebx
jg .LBBstrength_result7_1
Which reduces register pressure enough (in this case) to avoid spilling in the
loop.
As another example, consider the CodeGen/X86/regpressure.ll testcase. We
used to generate this code for both cases:
regpressure1:
subl $32, %esp
movl %esi, 12(%esp)
movl %edi, 8(%esp)
movl %ebx, 4(%esp)
movl %ebp, (%esp)
movl 36(%esp), %ecx
movl (%ecx), %eax
movl 4(%ecx), %edx
movl %edx, 24(%esp)
movl 8(%ecx), %edx
movl %edx, 16(%esp)
movl 12(%ecx), %edx
movl 16(%ecx), %esi
movl 20(%ecx), %edi
movl 24(%ecx), %ebx
movl %ebx, 28(%esp)
movl 28(%ecx), %ebx
movl 32(%ecx), %ebp
movl %ebp, 20(%esp)
movl 36(%ecx), %ecx
imull 24(%esp), %eax
imull 16(%esp), %eax
imull %edx, %eax
imull %esi, %eax
imull %edi, %eax
imull 28(%esp), %eax
imull %ebx, %eax
imull 20(%esp), %eax
imull %ecx, %eax
movl (%esp), %ebp
movl 4(%esp), %ebx
movl 8(%esp), %edi
movl 12(%esp), %esi
addl $32, %esp
ret
This code is basically trying to do all of the loads first, then execute all
of the multiplies. Because we run out of registers, lots of spill code happens.
We now generate this code for both cases:
regpressure1:
movl 4(%esp), %ecx
movl (%ecx), %eax
movl 4(%ecx), %edx
imull %edx, %eax
movl 8(%ecx), %edx
imull %edx, %eax
movl 12(%ecx), %edx
imull %edx, %eax
movl 16(%ecx), %edx
imull %edx, %eax
movl 20(%ecx), %edx
imull %edx, %eax
movl 24(%ecx), %edx
imull %edx, %eax
movl 28(%ecx), %edx
imull %edx, %eax
movl 32(%ecx), %edx
imull %edx, %eax
movl 36(%ecx), %ecx
imull %ecx, %eax
ret
which is much nicer (when we fold loads into the muls it will be even better).
The old instruction selector used to produce the good code for regpressure1
but not for regpressure2, as it depended on the order of operations in the
LLVM code.
llvm-svn: 19449
2005-01-11 03:11:44 +00:00
Chris Lattner
788bdba13d
The pattern isel is aggressively codegen'ing all of the loads in these
...
functions together at the start of the basic block, causing massive spillage.
The old isel codegened the loads wherever they happened to land, so it
generated good code for the first case, but bad code for the second.
We really want the pattern isel to generate (the same) good code for both.
llvm-svn: 19448
2005-01-11 03:05:03 +00:00
Chris Lattner
1308b488ea
Print SelectionDAGs bottom up, include extra info in the node labels
...
llvm-svn: 19447
2005-01-11 00:34:33 +00:00
Chris Lattner
39c5808fdb
Add support for bottom-up graphs.
...
llvm-svn: 19446
2005-01-11 00:24:59 +00:00
Chris Lattner
b241b443b6
Add a marker for the graph root.
...
llvm-svn: 19445
2005-01-10 23:52:04 +00:00
Chris Lattner
12be02722f
Put the operation name in each node, put the function name on the graph.
...
llvm-svn: 19444
2005-01-10 23:26:00 +00:00
Chris Lattner
9e4c76123c
Split out SDNode::getOperationName into its own method.
...
llvm-svn: 19443
2005-01-10 23:25:25 +00:00
Chris Lattner
7fa992e976
Add a helper method.
...
llvm-svn: 19442
2005-01-10 23:25:04 +00:00
Chris Lattner
7f65075be3
Implement initial selectiondag printing support. This gets us a nice
...
graph with no labels! :)
llvm-svn: 19441
2005-01-10 23:08:40 +00:00
Chris Lattner
e32371bad6
Add support for graph operations, and add a viewGraph method to SelectionDAG.
...
llvm-svn: 19440
2005-01-10 23:05:53 +00:00
Chris Lattner
da7c050442
Add a helper method
...
llvm-svn: 19439
2005-01-10 23:05:07 +00:00
Chris Lattner
1d13a92af4
Fold setcc instructions into selects.
...
llvm-svn: 19438
2005-01-10 22:10:13 +00:00
Chris Lattner
5b589ec0c4
Add conditional moves for the parity flag.
...
llvm-svn: 19437
2005-01-10 22:09:33 +00:00
Chris Lattner
be02d430a9
Lower to the correct functions. This fixes FreeBench/fourinarow
...
llvm-svn: 19436
2005-01-10 21:02:37 +00:00
Chris Lattner
750d38b5b7
Implement 8-bit multiply for X86.
...
llvm-svn: 19435
2005-01-10 20:55:48 +00:00
Chris Lattner
5326f35715
Rework constant pool handling so that function constant pools are no longer
...
leaked to the system. Now they are destroyed with the JITMemoryManager is
destroyed.
llvm-svn: 19434
2005-01-10 18:23:22 +00:00
Jeff Cohen
3e62e7c68b
Apply feedback from Chris.
...
llvm-svn: 19432
2005-01-10 04:23:32 +00:00
Jeff Cohen
703f7db254
Apply feed back from Chris:
...
1. Rename createLoaderPass to CreateProfileLoaderPass
2. Opt shouldn't use the pass registered in CodeGen.
llvm-svn: 19431
2005-01-10 03:56:27 +00:00
Chris Lattner
41b764144d
Implement a couple of more simplifications. This lets us codegen:
...
int test2(int * P, int* Q, int A, int B) {
return P+A == P;
}
into:
test2:
movl 4(%esp), %eax
movl 12(%esp), %eax
shll $2, %eax
cmpl $0, %eax
sete %al
movzbl %al, %eax
ret
instead of:
test2:
movl 4(%esp), %eax
movl 12(%esp), %ecx
leal (%eax,%ecx,4), %ecx
cmpl %eax, %ecx
sete %al
movzbl %al, %eax
ret
ICC is producing worse code:
test2:
movl 4(%esp), %eax #8.5
movl 12(%esp), %edx #8.5
lea (%edx,%edx), %ecx #9.9
addl %ecx, %ecx #9.9
addl %eax, %ecx #9.9
cmpl %eax, %ecx #9.16
movl $0, %eax #9.16
sete %al #9.16
ret #9.16
as is GCC (looks like our old code):
test2:
movl 4(%esp), %edx
movl 12(%esp), %eax
leal (%edx,%eax,4), %ecx
cmpl %edx, %ecx
sete %al
movzbl %al, %eax
ret
llvm-svn: 19430
2005-01-10 02:03:02 +00:00
Chris Lattner
00c231baa7
Fix incorrect constant folds, fixing Stepanov after the SHR patch.
...
llvm-svn: 19429
2005-01-10 01:16:03 +00:00
Jeff Cohen
c783e07a7c
Update System project in Visual Studio to reflect renamed files.
...
llvm-svn: 19428
2005-01-10 00:50:11 +00:00
Chris Lattner
0966a75e76
Constant fold shifts, turning this loop:
...
.LBB_Z5test0PdS__3: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
movl $16000, %ecx
sarl $3, %ecx
cmpl %eax, %ecx
fstpl 16(%esp)
#FP_REG_KILL
jg .LBB_Z5test0PdS__3 # no_exit.1
into:
.LBB_Z5test0PdS__3: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
cmpl $2000, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__3 # no_exit.1
llvm-svn: 19427
2005-01-10 00:07:15 +00:00
Reid Spencer
c892a0db9f
Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the silly
...
gdb debugger doesn't get confused on which file it is reading (the one in
lib/System or the one in lib/System/{Win32,Unix})
llvm-svn: 19426
2005-01-09 23:29:00 +00:00
Chris Lattner
fde3a212e2
Add some folds for == and != comparisons. This allows us to
...
codegen this loop in stepanov:
no_exit.i: ; preds = %entry, %no_exit.i, %then.i, %_Z5checkd.exit
%i.0.0 = phi int [ 0, %entry ], [ %i.0.0, %no_exit.i ], [ %inc.0, %_Z5checkd.exit ], [ %inc.012, %then.i ] ; <int> [#uses=3]
%indvar = phi uint [ %indvar.next, %no_exit.i ], [ 0, %entry ], [ 0, %then.i ], [ 0, %_Z5checkd.exit ] ; <uint> [#uses=3]
%result_addr.i.0 = phi double [ %tmp.4.i.i, %no_exit.i ], [ 0.000000e+00, %entry ], [ 0.000000e+00, %then.i ], [ 0.000000e+00, %_Z5checkd.exit ] ; <double> [#uses=1]
%first_addr.0.i.2.rec = cast uint %indvar to int ; <int> [#uses=1]
%first_addr.0.i.2 = getelementptr [2000 x double]* %data, int 0, uint %indvar ; <double*> [#uses=1]
%inc.i.rec = add int %first_addr.0.i.2.rec, 1 ; <int> [#uses=1]
%inc.i = getelementptr [2000 x double]* %data, int 0, int %inc.i.rec ; <double*> [#uses=1]
%tmp.3.i.i = load double* %first_addr.0.i.2 ; <double> [#uses=1]
%tmp.4.i.i = add double %result_addr.i.0, %tmp.3.i.i ; <double> [#uses=2]
%tmp.2.i = seteq double* %inc.i, getelementptr ([2000 x double]* %data, int 0, int 2000) ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2.i, label %_Z10accumulateIPddET0_T_S2_S1_.exit, label %no_exit.i
To this:
.LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i
fldl data(,%eax,8)
fldl 16(%esp)
faddp %st(1)
fstpl 16(%esp)
incl %eax
movl %eax, %ecx
shll $3, %ecx
cmpl $16000, %ecx
#FP_REG_KILL
jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i
instead of this:
.LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i
fldl data(,%eax,8)
fldl 16(%esp)
faddp %st(1)
fstpl 16(%esp)
incl %eax
leal data(,%eax,8), %ecx
leal data+16000, %edx
cmpl %edx, %ecx
#FP_REG_KILL
jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i
llvm-svn: 19425
2005-01-09 20:52:51 +00:00
Jeff Cohen
292845d2d9
Add last four createXxxPass functions
...
llvm-svn: 19424
2005-01-09 20:42:52 +00:00
Jeff Cohen
7d1670da3f
Fix VC++ compilation error
...
llvm-svn: 19423
2005-01-09 20:41:56 +00:00
Chris Lattner
e6f7882c27
Print the DAG out more like a DAG in nested format.
...
llvm-svn: 19422
2005-01-09 20:38:33 +00:00
Chris Lattner
1270acc1ce
Print out nodes sorted by their address to make it easier to find them in a list.
...
llvm-svn: 19421
2005-01-09 20:26:36 +00:00
Chris Lattner
cf8fd0c0db
Codegen (Reg|imm)+&GV as an LEA, because we cannot put it into the immediate field
...
of an ADDri (due to current restrictions on MachineOperand :( ). This allows
us to generate:
leal Data+16000, %edx
instead of:
movl $Data, %edx
addl $16000, %edx
llvm-svn: 19420
2005-01-09 20:20:29 +00:00
Chris Lattner
3d5d5022d5
Add a simple transformation. This allows us to compile one of the inner
...
loops in stepanov to this:
.LBB_Z5test0PdS__2: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
cmpl $2000, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2
instead of this:
.LBB_Z5test0PdS__2: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
movl $data, %ecx
movl %ecx, %edx
addl $16000, %edx
subl %ecx, %edx
movl %edx, %ecx
sarl $2, %ecx
shrl $29, %ecx
addl %ecx, %edx
sarl $3, %edx
cmpl %edx, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2
The old instruction selector produced:
.LBB_Z5test0PdS__2: # no_exit.1
fldl 24(%esp)
faddl data(,%eax,8)
fstl 24(%esp)
movl %eax, %ecx
incl %ecx
incl %eax
leal data+16000, %edx
movl $data, %edi
subl %edi, %edx
movl %edx, %edi
sarl $2, %edi
shrl $29, %edi
addl %edi, %edx
sarl $3, %edx
cmpl %edx, %ecx
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2 # no_exit.1
Which is even worse!
llvm-svn: 19419
2005-01-09 20:09:57 +00:00
Chris Lattner
66d3430236
Fix copy and pasto's for FP -> Int. This fixes fldry
...
llvm-svn: 19418
2005-01-09 19:49:59 +00:00
Chris Lattner
9242c504da
Fix a bug legalizing call instructions (make sure to remember all result
...
values), and eliminate some switch statements.
llvm-svn: 19417
2005-01-09 19:43:23 +00:00
Chris Lattner
02f5ce2077
Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
...
std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)
from libstdc++
llvm-svn: 19416
2005-01-09 19:07:54 +00:00
Chris Lattner
ec26b48d61
Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)
...
llvm-svn: 19415
2005-01-09 19:03:49 +00:00
Chris Lattner
282781c797
Initial implementation of FP->INT and INT->FP casts
...
Also, fix zero_extend from bool to i8, which fixes Shootout/objinst.
llvm-svn: 19414
2005-01-09 18:52:44 +00:00
Jeff Cohen
14903e0148
Get lib/Analysis/DataStructure to compile with VC++
...
llvm-svn: 19412
2005-01-09 04:18:28 +00:00
Jeff Cohen
39b0644b42
Workaround a VC++ bug. Microsoft puts the hash_map class in namespace stdext, but
...
this classes uses a utility function in namespace std. But Microsoft apparently
assumes everyone will "using namespace std;". As LLVM doesn't.... Add a
"use std::_Distance;" to get it working.
llvm-svn: 19411
2005-01-09 04:13:09 +00:00
Chris Lattner
fb217c6b94
Fix a subtle bug involving constant expr casts from int to fp
...
llvm-svn: 19410
2005-01-09 01:49:29 +00:00
Chris Lattner
a2c5d9168c
Handle static alloca arguments to PHI nodes.
...
llvm-svn: 19409
2005-01-09 01:16:24 +00:00
Chris Lattner
9f59d28d67
Implement varargs and returnaddress/frameaddress intrinsics. With this
...
patch, all of SingleSource/UnitTests passes.
llvm-svn: 19408
2005-01-09 00:01:27 +00:00
Chris Lattner
58cfd7945d
Use new interfaces to correctly lower varargs and return/frame address intrinsics.
...
llvm-svn: 19407
2005-01-09 00:00:49 +00:00
Chris Lattner
ccab396d01
Add interfaces to lower varargs and return/frame address intrinsics.
...
llvm-svn: 19406
2005-01-09 00:00:31 +00:00
Jeff Cohen
529d0068c8
Test fails on all platforms, not just linux
...
llvm-svn: 19405
2005-01-08 23:44:03 +00:00
Chris Lattner
18d2b34637
Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail now.
...
llvm-svn: 19404
2005-01-08 22:48:57 +00:00
Jeff Cohen
a1c2df7ae6
Fix VC++ compilation error
...
llvm-svn: 19403
2005-01-08 22:44:06 +00:00
Jeff Cohen
cede1ce95a
Add even more missing createXxxPass functions.
...
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Chris Lattner
d7a3ee6d20
rename linscan -> LLCBETA as it should be
...
llvm-svn: 19401
2005-01-08 21:03:58 +00:00
Chris Lattner
313ddb59c9
Okay 15th time is the charm. Looking at the vector size is useless as it
...
gets clobbered by a previous statement. This fixes all calls finally.
llvm-svn: 19399
2005-01-08 20:51:36 +00:00
Chris Lattner
f5bbe85879
Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
...
llvm-svn: 19398
2005-01-08 20:39:31 +00:00
Chris Lattner
c0f31c5e96
Tighten up assertions.
...
llvm-svn: 19397
2005-01-08 20:35:13 +00:00
Chris Lattner
a183eb75eb
Fix off by one error
...
llvm-svn: 19396
2005-01-08 20:31:34 +00:00
Chris Lattner
f806d9f2d0
Allow arrays to have more than 4G elements.
...
llvm-svn: 19395
2005-01-08 20:19:51 +00:00
Chris Lattner
d662b785ef
Allow array types to have 64-bit size.
...
llvm-svn: 19394
2005-01-08 20:19:27 +00:00
Jeff Cohen
1a26d15c80
Use size_t instead of long to represent memory usage. long is 32 bits
...
on 64-bit Windows.
llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Chris Lattner
4588542d39
Silence warnings
...
llvm-svn: 19392
2005-01-08 20:13:44 +00:00
Chris Lattner
df1f152420
Silence VS warnings.
...
llvm-svn: 19391
2005-01-08 20:13:19 +00:00
Chris Lattner
fa66dc7852
Silence VS warnings.
...
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Chris Lattner
feeab9f753
Silence VS warnings
...
llvm-svn: 19389
2005-01-08 20:05:34 +00:00
Chris Lattner
0b955fd2d5
Silence VS warnings
...
llvm-svn: 19388
2005-01-08 19:59:10 +00:00
Chris Lattner
a136c3b054
Adjust prototype
...
llvm-svn: 19387
2005-01-08 19:57:49 +00:00
Chris Lattner
e64ff1c4b2
Silence warnings from VS
...
llvm-svn: 19386
2005-01-08 19:55:00 +00:00
Chris Lattner
78100c41ca
Silence VS warnings
...
llvm-svn: 19385
2005-01-08 19:53:50 +00:00
Chris Lattner
d006195517
Silence VS warnings.
...
llvm-svn: 19384
2005-01-08 19:52:31 +00:00
Chris Lattner
798e84f59e
Fix VS warnings
...
llvm-svn: 19383
2005-01-08 19:48:40 +00:00
Chris Lattner
46fa04b531
Fix VS warnings.
...
llvm-svn: 19382
2005-01-08 19:45:31 +00:00
Chris Lattner
fdfe3e49fe
Fix uint64_t -> unsigned VS warnings.
...
llvm-svn: 19381
2005-01-08 19:42:22 +00:00
Chris Lattner
47f395cd85
Silence VS warnings.
...
llvm-svn: 19380
2005-01-08 19:37:20 +00:00
Chris Lattner
ce274ce93d
Silence warnings
...
llvm-svn: 19379
2005-01-08 19:34:41 +00:00
Chris Lattner
867158cefd
Do not throw away bits for no reason
...
llvm-svn: 19378
2005-01-08 19:32:59 +00:00
Chris Lattner
2c5e4ed8f9
Silence a VS warning.
...
llvm-svn: 19377
2005-01-08 19:31:31 +00:00
Chris Lattner
b52e041c80
Adjust to changes in LowerCallTo interface
...
Minor bugfixes
llvm-svn: 19376
2005-01-08 19:28:19 +00:00
Chris Lattner
7e6eeba6c5
Implement handling of most long operators through libcalls.
...
Fix a bug legalizing "ret (Val,Val)"
llvm-svn: 19375
2005-01-08 19:27:05 +00:00
Chris Lattner
1f45cd7418
Adjust to changes in LowerCAllTo interfaces
...
llvm-svn: 19374
2005-01-08 19:26:18 +00:00
Chris Lattner
9660014f8c
Make LowerCallTo more generic and useful.
...
llvm-svn: 19373
2005-01-08 19:25:39 +00:00
John Criswell
24a5692973
Another year, another copyright update.
...
llvm-svn: 19372
2005-01-08 19:10:44 +00:00
Jeff Cohen
a2c16d2555
Add a few more passes to LinkAllPasses.h
...
llvm-svn: 19371
2005-01-08 18:15:23 +00:00
Jeff Cohen
677babc4d4
Add more missing createXxxPass functions.
...
llvm-svn: 19370
2005-01-08 17:21:40 +00:00
Chris Lattner
2a6db3c351
Add support for FP->INT conversions and back.
...
llvm-svn: 19369
2005-01-08 08:08:56 +00:00
Chris Lattner
6209f1d294
Add operators for FP -> INT conversions and back.
...
llvm-svn: 19368
2005-01-08 08:08:49 +00:00
Chris Lattner
8da67af979
Wrap long line.
...
llvm-svn: 19367
2005-01-08 06:59:50 +00:00
Chris Lattner
e69daaf71d
Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
...
all targets.
llvm-svn: 19366
2005-01-08 06:25:56 +00:00
Chris Lattner
9a97e4d5b6
1ULL << 64 is undefined, don't do it.
...
llvm-svn: 19365
2005-01-08 06:24:30 +00:00
Chris Lattner
b923438fe6
The X86 instruction selector already handles codegen of:
...
store float 123.45, float* %P
as an integer store. This adds handling of float immediate stores as integers
for arguments passed function calls.
This is now tested by CodeGen/X86/store-fp-constant.ll
llvm-svn: 19364
2005-01-08 05:45:24 +00:00
Chris Lattner
e80eca3d1d
New testcase.
...
llvm-svn: 19363
2005-01-08 05:44:07 +00:00
Misha Brukman
6cd5f89778
Eliminate empty sub-list
...
llvm-svn: 19362
2005-01-08 01:11:15 +00:00
Chris Lattner
e0f1fe181a
Fix a pointer invalidation problem. This fixes Generic/badarg6.ll
...
llvm-svn: 19361
2005-01-07 23:32:00 +00:00
Chris Lattner
5c66e45b92
Fold conditional branches on constants away.
...
llvm-svn: 19360
2005-01-07 22:49:57 +00:00
Chris Lattner
cda3efa6e5
Fix a thinko in the reassociation code, fixing Generic/badlive.ll
...
llvm-svn: 19359
2005-01-07 22:44:09 +00:00
Chris Lattner
a65a2f0c36
Add support for truncating integer casts from long.
...
llvm-svn: 19358
2005-01-07 22:37:48 +00:00
Chris Lattner
ea4ca94cae
Fix a bug in load expansion legalization and ret legalization. This fixes
...
CodeGen/Generic/select.ll:castconst.
llvm-svn: 19357
2005-01-07 22:28:47 +00:00
Chris Lattner
68a12140c0
Legalize unconditional branches too
...
llvm-svn: 19356
2005-01-07 22:12:08 +00:00
Chris Lattner
924d100bd1
Cleanup a bunch of tests. In particular do not allow target directives in
...
the .ll file or it forces the V9 backend. This is the CodeGen/Generic dir,
so there is no use in doing that.
llvm-svn: 19355
2005-01-07 22:05:31 +00:00
Chris Lattner
19a83990e1
Implement support for long GEP indices on 32-bit archs and support for
...
int GEP indices on 64-bit archs.
llvm-svn: 19354
2005-01-07 21:56:57 +00:00
Chris Lattner
4d5ba99283
Simplify: truncate ({zero|sign}_extend (X))
...
llvm-svn: 19353
2005-01-07 21:56:24 +00:00
Chris Lattner
32f20bfa93
implement legalization of a bunch more operators.
...
llvm-svn: 19352
2005-01-07 21:45:56 +00:00
Chris Lattner
e3f06e9945
Make this test a bit more interesting by making there actually be a use of the
...
PHI node.
llvm-svn: 19351
2005-01-07 21:37:13 +00:00
Chris Lattner
fa854eb012
Fix another bug legalizing calls!
...
llvm-svn: 19350
2005-01-07 21:35:32 +00:00
Chris Lattner
8ea875fb05
Fix handling of dead PHI nodes.
...
llvm-svn: 19349
2005-01-07 21:34:19 +00:00
Chris Lattner
f025d6788c
Fix a bug legalizing calls
...
llvm-svn: 19348
2005-01-07 21:34:13 +00:00
Chris Lattner
44b30c9abb
modernize and clean up this test.
...
llvm-svn: 19347
2005-01-07 21:15:58 +00:00
Chris Lattner
473825ccec
After legalizing a DAG, delete dead nodes to save space.
...
llvm-svn: 19346
2005-01-07 21:09:37 +00:00
Chris Lattner
9c667933c1
Implement RemoveDeadNodes
...
llvm-svn: 19345
2005-01-07 21:09:16 +00:00
Chris Lattner
49811fcab6
Add a new SelectionDAG::RemoveDeadNodes method
...
llvm-svn: 19344
2005-01-07 21:08:55 +00:00
Jeff Cohen
86bbb1c56b
Fix include. Too easy to make mistakes like this on Windows :(
...
llvm-svn: 19343
2005-01-07 19:21:49 +00:00
Chris Lattner
6edb4d7b71
Remove the open projects page from the docs directory.
...
llvm-svn: 19342
2005-01-07 18:57:33 +00:00
Misha Brukman
a9ade831b6
Capitalize Bugpoint.
...
llvm-svn: 19341
2005-01-07 17:00:44 +00:00
Jeff Cohen
39c14e7bca
Get new SelectionDAG stuff building with Visual Studio.
...
llvm-svn: 19340
2005-01-07 15:52:36 +00:00
Chris Lattner
ec3fe7c4a8
Teach legalize how to handle condbranches
...
llvm-svn: 19339
2005-01-07 08:19:42 +00:00
Chris Lattner
001467a08c
Add a testcase I forgot to commit earlier.
...
llvm-svn: 19338
2005-01-07 07:56:08 +00:00
Chris Lattner
1ef74d6135
X86 BE requires SelectionDAG
...
llvm-svn: 19337
2005-01-07 07:51:25 +00:00
Chris Lattner
28ce94ce85
X86 JIT requires the selection dag library.
...
llvm-svn: 19336
2005-01-07 07:51:11 +00:00
Chris Lattner
ca4ca5520b
Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
...
For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.
llvm-svn: 19335
2005-01-07 07:50:50 +00:00
Chris Lattner
88c8a23891
Reimplementation of the X86 pattern isel. This is still missing many large
...
pieces, but can already do amazing things in some cases.
llvm-svn: 19334
2005-01-07 07:49:41 +00:00
Chris Lattner
ce413c8c9f
This file is now dead.
...
llvm-svn: 19333
2005-01-07 07:49:05 +00:00
Chris Lattner
ff9e21c8d3
Add a new prototype
...
llvm-svn: 19332
2005-01-07 07:48:33 +00:00
Chris Lattner
7a60d91953
Initial implementation of the SelectionDAGISel class. This contains most
...
of the code for lowering from LLVM code to a SelectionDAG.
llvm-svn: 19331
2005-01-07 07:47:53 +00:00
Chris Lattner
f8ba6987a4
This file is obsolete
...
llvm-svn: 19330
2005-01-07 07:47:23 +00:00
Chris Lattner
dc75059005
Initial implementation of the DAG legalization. This still has a long way
...
to go, but it does work for some non-trivial cases now.
llvm-svn: 19329
2005-01-07 07:47:09 +00:00
Jeff Cohen
510fa4bbf8
But not the identation of THAT line
...
llvm-svn: 19328
2005-01-07 07:46:40 +00:00
Chris Lattner
061a1ea9e3
Complete rewrite of the SelectionDAG class.
...
llvm-svn: 19327
2005-01-07 07:46:32 +00:00
Chris Lattner
56cc54f416
Common base class for SelectionDAG-based instruction selectors.
...
llvm-svn: 19326
2005-01-07 07:46:03 +00:00
Chris Lattner
78551084ef
Initial implementation of the nodes in a SelectionDAG.
...
llvm-svn: 19325
2005-01-07 07:45:27 +00:00
Chris Lattner
3a4d1b2721
First draft of new Target interface
...
llvm-svn: 19324
2005-01-07 07:44:53 +00:00
Chris Lattner
09b37583a4
First draft of a new Target interface
...
llvm-svn: 19323
2005-01-07 07:44:22 +00:00
Jeff Cohen
70e3e10aa4
Correct indentation levels
...
llvm-svn: 19322
2005-01-07 07:44:02 +00:00
Chris Lattner
07b522d106
Add convenience method.
...
llvm-svn: 19321
2005-01-07 07:40:32 +00:00
Misha Brukman
417ca179a9
Convert tabs to spaces
...
llvm-svn: 19320
2005-01-07 07:05:34 +00:00
Jeff Cohen
9a7ac16214
Add missing createXxxPass functions
...
llvm-svn: 19319
2005-01-07 06:57:28 +00:00
Jeff Cohen
d97ad08ef8
Remove bogus project folder
...
llvm-svn: 19318
2005-01-07 06:54:58 +00:00
Misha Brukman
28e210a8f2
Fix spelling.
...
llvm-svn: 19317
2005-01-07 06:45:07 +00:00
Jeff Cohen
e48bd7fcd4
Update list of passes
...
llvm-svn: 19316
2005-01-07 06:12:41 +00:00
Jeff Cohen
844410b48e
Add missing include
...
llvm-svn: 19315
2005-01-07 05:42:13 +00:00
Jeff Cohen
e15ae04fb3
Fix return type
...
llvm-svn: 19314
2005-01-07 05:41:39 +00:00
Chris Lattner
ae15482076
Codegen -1 and -0.0 more efficiently. This implements CodeGen/X86/negatize_zero.ll
...
llvm-svn: 19313
2005-01-06 21:19:16 +00:00
Chris Lattner
9eef99ef43
New testcase
...
llvm-svn: 19312
2005-01-06 21:18:53 +00:00
Chris Lattner
cd4003e228
No need to pessimize current code for future possibilities.
...
llvm-svn: 19311
2005-01-06 16:26:38 +00:00
Jeff Cohen
72f8f4cc3d
Get the #ifdef right on LinkAllPasses.h.
...
llvm-svn: 19310
2005-01-06 07:01:08 +00:00
Jeff Cohen
13932fb27f
Fix minor mistakes
...
llvm-svn: 19309
2005-01-06 06:29:42 +00:00
Jeff Cohen
11dca28b79
Get rid of those pesky tabs...
...
llvm-svn: 19308
2005-01-06 06:06:35 +00:00
Jeff Cohen
00d5508496
Add project opt to Visual Studio.
...
llvm-svn: 19307
2005-01-06 06:02:53 +00:00
Jeff Cohen
eca0d0f2da
Put createLoopUnswitchPass() into proper namespace
...
llvm-svn: 19306
2005-01-06 05:47:18 +00:00
Jeff Cohen
27595a4aec
Add missing include
...
llvm-svn: 19305
2005-01-06 05:46:44 +00:00
Jeff Cohen
56d649f574
Fix incorrect return type.
...
llvm-svn: 19304
2005-01-06 05:45:45 +00:00
Jeff Cohen
b56965be08
Fix CBE code so that it compiles with VC++.
...
llvm-svn: 19303
2005-01-06 04:21:49 +00:00
Chris Lattner
2812f0880b
Add required #include
...
llvm-svn: 19302
2005-01-06 03:25:27 +00:00
Chris Lattner
a930a9ab5e
Add a useful method
...
llvm-svn: 19301
2005-01-06 03:23:59 +00:00
Chris Lattner
770c354f7d
Add a list end sentinal
...
llvm-svn: 19299
2005-01-05 22:14:14 +00:00
Reid Spencer
1d183c4ab8
Add the SystemLibrary.html document now that its done.
...
llvm-svn: 19298
2005-01-05 19:01:20 +00:00
Reid Spencer
9d4d097dd1
Add a missing <div>
...
llvm-svn: 19297
2005-01-05 18:21:39 +00:00
Reid Spencer
6b9542b338
Bulk upgrade of this document. Cruft removed, new stuff added, general
...
reorganization of the content. This is now "done".
llvm-svn: 19296
2005-01-05 18:17:10 +00:00
Alkis Evlogimenos
eccb209b6e
The Java project now lives under projects/llvm-java.
...
llvm-svn: 19295
2005-01-05 17:57:28 +00:00
Reid Spencer
1fbccbe786
Make opt honor the quiet option when printing the bytecode warning.
...
llvm-svn: 19294
2005-01-05 17:31:55 +00:00
Reid Spencer
e153fb3523
1. Make sure that "dot" can be found in the path
...
2. Fix a bug where the lib directory specified also had to be cwd
3. Weight the output so archive->archive edges are shorter
4. Generate two different graphs: one for libraries, one for objects.
5. Adjust the properties of the graphs till it looks nice.
llvm-svn: 19293
2005-01-05 17:29:29 +00:00
Reid Spencer
c770a0f243
Ignore autoconf/aclocal generated stuff.
...
llvm-svn: 19292
2005-01-05 17:26:00 +00:00
Chris Lattner
1ee6dfa501
1. If a double FP constant must be put into a constant pool, but it can be
...
precisely represented as a float, put it into the constant pool as a
float.
2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed
division.
llvm-svn: 19291
2005-01-05 16:30:14 +00:00
Chris Lattner
a0d572707a
add an assertion
...
llvm-svn: 19290
2005-01-05 16:27:34 +00:00
Chris Lattner
0f7e786a6b
Minor optimization to allocate R8 registers in a better order.
...
llvm-svn: 19289
2005-01-05 16:09:16 +00:00
Chris Lattner
132e400d73
ignore generated file
...
llvm-svn: 19288
2005-01-05 16:01:00 +00:00
Chris Lattner
05788f97f4
Ignore generated file
...
llvm-svn: 19287
2005-01-05 16:00:42 +00:00
Chris Lattner
3c6909423d
Ignore .dir
...
llvm-svn: 19286
2005-01-05 16:00:00 +00:00
Chris Lattner
f0698314cd
Update this test to pass.
...
llvm-svn: 19285
2005-01-05 15:23:06 +00:00
Reid Spencer
6a0c6f6bf1
Cleanup configuration for Cygwin
...
llvm-svn: 19284
2005-01-05 06:41:10 +00:00
Jeff Cohen
05af8cfbd5
Make bison/flex build steps output the same message in Visual Studio as
...
on Unix.
llvm-svn: 19283
2005-01-04 06:18:10 +00:00
Jeff Cohen
a272e9a839
Add C backend to llc in Visual Studio.
...
llvm-svn: 19282
2005-01-04 06:01:55 +00:00
Chris Lattner
9742ac8c7c
Test that trivial constants are not printed in hex notation.
...
llvm-svn: 19281
2005-01-04 01:58:26 +00:00
Chris Lattner
472cc1062d
To not break TBAA rules, use a union.
...
llvm-svn: 19280
2005-01-04 01:56:57 +00:00
Chris Lattner
623bacf418
Do not let 'ftostr' return a string that starts with spaces. This allows
...
the AsmWriter to emit FP constants like 1.0 in normal exponential notation
instead of hex notation.
llvm-svn: 19279
2005-01-04 01:56:28 +00:00
Chris Lattner
91197b0b6a
Add a testcase to check that initializer that CAN be evaluated statically ARE.
...
These used to result in dynamic initializations.
llvm-svn: 19278
2005-01-03 22:27:58 +00:00
Chris Lattner
5dfdadde04
Fix this script to work with hyphenated llvm-gcc and friend.
...
llvm-svn: 19277
2005-01-03 22:26:38 +00:00
John Criswell
dc6650136a
Quote the paths and not the assignment of the PATH variable.
...
This seems to make things happier.
llvm-svn: 19276
2005-01-03 17:42:57 +00:00
John Criswell
34f603fcd7
Joining the quote fray...
...
Reverting the quote patch. For some reason, this breaks the building of
llvm/runtime (the shell doesn't like it for some reason). I might play
with it to see if I can get the quotes done in such a way that the shell
like it, but no promises.
llvm-svn: 19275
2005-01-03 17:41:56 +00:00
Jeff Cohen
f544d36614
Add additional header file to VS project. Patch submitted by Morten.
...
llvm-svn: 19274
2005-01-03 16:37:16 +00:00
Jeff Cohen
68f28730b7
Revert elimination of global variable hack... still needed.
...
llvm-svn: 19273
2005-01-03 16:34:19 +00:00
Reid Spencer
f309b441dc
Integrate dependency graphs.
...
Make it HTML 4.01 Strict compliant
Provide better explanations of the dependency information.
llvm-svn: 19272
2005-01-03 05:46:46 +00:00
Reid Spencer
1d3db42acf
Add library dependency and object dependency graphs.
...
llvm-svn: 19271
2005-01-03 05:30:57 +00:00
Chris Lattner
588d9471f3
new testcase for PR481
...
llvm-svn: 19270
2005-01-03 04:39:16 +00:00
Chris Lattner
e1329f4472
Bug fixed
...
llvm-svn: 19269
2005-01-03 04:20:21 +00:00
Chris Lattner
1859e90a1e
New testcase for PR487
...
llvm-svn: 19268
2005-01-03 04:15:11 +00:00
Reid Spencer
2f61775ee1
Make sure the path is properly set in the llvmgcc and llvmgxx variables.
...
llvm-svn: 19267
2005-01-03 04:05:32 +00:00
Reid Spencer
5041bdba19
Re-apply last (reverted) patch. Reverting doesn't solve the actual problem
...
and creates issues on other platforms like Cygwin and MingW.
llvm-svn: 19266
2005-01-03 04:04:54 +00:00
Jeff Cohen
c3d0ae2e48
Don't quote the PATH variable value just in case it has spaces in it, as
...
it breaks "gmake check".
llvm-svn: 19265
2005-01-03 02:44:54 +00:00
Chris Lattner
d4bb2bbce1
ADC and IMUL are also commutable.
...
llvm-svn: 19264
2005-01-03 01:27:59 +00:00
Chris Lattner
82787e90f3
This hunk:
...
- unsigned TrueValue = getReg(TrueVal, BB, BB->begin());
+ unsigned TrueValue = getReg(TrueVal);
Fixes the PPC regressions from last night.
The other hunk is just a clarity improvement.
llvm-svn: 19263
2005-01-02 23:07:31 +00:00
Chris Lattner
73bb15ed9a
Remove dead directories
...
llvm-svn: 19262
2005-01-02 22:55:16 +00:00
Chris Lattner
373f7faeca
This lib is dead
...
llvm-svn: 19261
2005-01-02 22:53:52 +00:00
Chris Lattner
196715cfb4
Remove a bunch of useless empty libraries
...
llvm-svn: 19260
2005-01-02 22:52:28 +00:00
Chris Lattner
bb2840b272
This is no longer needed.
...
llvm-svn: 19259
2005-01-02 22:50:00 +00:00
Chris Lattner
0982708a11
Testcase for PR494
...
llvm-svn: 19258
2005-01-02 21:11:11 +00:00
Chris Lattner
179457f062
xfail these tests, whcih require more info in the code generator to implement
...
correctly.
llvm-svn: 19257
2005-01-02 19:01:33 +00:00
Reid Spencer
34982d8dc8
Avoid use of -fomit-frame-pointer on FreeBSD platforms. It causes thrown
...
exceptions to abort() in cases where it should not.
Many thanks to Duraid Madina for doing the heavy lifting on the analysis
of this problem.
llvm-svn: 19256
2005-01-02 17:43:20 +00:00
Reid Spencer
74100aba4a
Quote the PATH variable value just in case it has spaces in it (like on
...
Cygwin).
llvm-svn: 19255
2005-01-02 09:45:54 +00:00
Reid Spencer
862ebf5277
Correct the case of a #include directory name, just in case.
...
llvm-svn: 19254
2005-01-02 09:45:04 +00:00
Jeff Cohen
70d13a979c
Cleanup some Visual Studio project dependencies.
...
llvm-svn: 19253
2005-01-02 04:44:36 +00:00
Jeff Cohen
2cf40e142c
Eliminate the use of the global variable hack in the X86 target that was used
...
to get Visual Studio to link in X86.lib to the executables that need it. There
is another way of doing it.
llvm-svn: 19252
2005-01-02 04:23:12 +00:00
Chris Lattner
733aac1270
Disable 2->3 address promotion of add and inc instructions to LEA's. In
...
addition to being three address, LEA's don't set the flags.
This fixes 186.crafty.
llvm-svn: 19251
2005-01-02 04:18:17 +00:00
Chris Lattner
252b68cfc8
Check in an old test that never made it into CVS
...
llvm-svn: 19250
2005-01-02 02:46:29 +00:00
Chris Lattner
e7228736e0
Add a new method.
...
llvm-svn: 19249
2005-01-02 02:38:18 +00:00
Chris Lattner
b62b45b3fc
Add support for SETNPr to lower to memory form.
...
llvm-svn: 19248
2005-01-02 02:37:46 +00:00
Chris Lattner
b7782d77c1
Implement the convertToThreeAddress method, add support for inverting JP/JNP
...
branches.
llvm-svn: 19247
2005-01-02 02:37:07 +00:00
Chris Lattner
295e45e60e
Two changes here:
...
1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
2. Set the isCommutable and isPromotableTo3Address bits on several
instructions.
llvm-svn: 19246
2005-01-02 02:35:46 +00:00
Chris Lattner
9590870a0d
Make the 2-address instruction lowering pass smarter in two ways:
...
1. If we are two-addressing a commutable instruction and the LHS is not the
last use of the variable, see if the instruction is the last use of the
RHS. If so, commute the instruction, allowing us to avoid a
register-register copy in many cases for common instructions like ADD, OR,
AND, etc on X86.
2. If #1 doesn't hold, and if this is an instruction that also existing in
3-address form, promote the instruction to a 3-address instruction to
avoid the register-register copy. We can do this for several common
instructions in X86, including ADDrr, INC, DEC, etc.
This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll,
overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it.
llvm-svn: 19245
2005-01-02 02:34:12 +00:00
Chris Lattner
835ae42300
Add several testcases for new optimizations in the code generator.
...
llvm-svn: 19244
2005-01-02 02:30:04 +00:00
Chris Lattner
733c82bfbf
Expose isConvertibleToThreeAddress and isCommutable bits to the code generator.
...
llvm-svn: 19243
2005-01-02 02:29:04 +00:00
Chris Lattner
a1a6be7e6e
Add some bits that can be set on instructions. Renumber existing bits so
...
they are dense. Add a virtual method that targets can choose to implement.
llvm-svn: 19242
2005-01-02 02:28:31 +00:00
Chris Lattner
182db0cac0
Add some bits that can be set for instructions.
...
llvm-svn: 19241
2005-01-02 02:27:48 +00:00
Reid Spencer
4e8dd44733
Make printing a warning message optional in CheckBytecodeOutputToConsole.
...
llvm-svn: 19240
2005-01-02 00:10:03 +00:00
Reid Spencer
742af2f2eb
Prevent output of bytecode to std::cout unless the --force flag is given.
...
This prevents bytecode splats with usage like: cat file.ll | llvm-as -
llvm-svn: 19239
2005-01-02 00:08:46 +00:00
Reid Spencer
c967184a50
Move the code for printing out a warning about bytecode output to a console
...
into lib/Support so it can be used with other tools.
llvm-svn: 19238
2005-01-01 23:57:01 +00:00
Reid Spencer
1263cfd14f
Implement a function to print a warning if bytecode output is to be sent to
...
a terminal/console.
llvm-svn: 19237
2005-01-01 23:56:20 +00:00
Jeff Cohen
b90c31fb49
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19236
2005-01-01 22:54:05 +00:00
Jeff Cohen
e98c7b6f26
Add llvm-link, Linker projects to Visual Studio.
...
llvm-svn: 19235
2005-01-01 22:32:26 +00:00
Jeff Cohen
8db20fe964
Add missing header files to projects.
...
llvm-svn: 19234
2005-01-01 22:30:19 +00:00
Reid Spencer
6f802ba876
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19233
2005-01-01 22:29:26 +00:00
Jeff Cohen
ca7d19e2af
Fix typo 'ompress' => 'compress'.
...
llvm-svn: 19232
2005-01-01 22:10:32 +00:00
Jeff Cohen
b06a83e285
Add llvm-ranlib project to Visual Studio.
...
llvm-svn: 19231
2005-01-01 22:05:56 +00:00
Jeff Cohen
5c3261e5f2
Add llvm-ar project to Visual Studio.
...
llvm-svn: 19230
2005-01-01 22:00:28 +00:00
Jeff Cohen
16034813e6
Add -v option to bison.
...
llvm-svn: 19229
2005-01-01 21:35:39 +00:00
Jeff Cohen
49123973f8
Add missing file SystemUtils.cpp to Support project.
...
llvm-svn: 19228
2005-01-01 21:34:18 +00:00
Jeff Cohen
1d2912470a
Add llvm-as project to Visual Studio
...
llvm-svn: 19227
2005-01-01 20:51:41 +00:00
Jeff Cohen
980d6098b6
Add llvm-dis project to Visual Studio
...
llvm-svn: 19226
2005-01-01 20:18:03 +00:00
Jeff Cohen
08f30c0c33
Put executables into a single directory
...
llvm-svn: 19225
2005-01-01 19:37:14 +00:00
Jeff Cohen
4560c21dd2
Fix bountiful sources of VC++ 'possible loss of data' warnings
...
llvm-svn: 19224
2005-01-01 18:58:23 +00:00
Jeff Cohen
031c3d891c
Improve TableGen dependencies
...
Move TableGen generated files out of the src tree
Add descriptions to the custom build steps
llvm-svn: 19223
2005-01-01 18:17:40 +00:00
Reid Spencer
3b8faf995d
Add HAVE_SBRK
...
llvm-svn: 19222
2005-01-01 18:16:16 +00:00
Reid Spencer
9f0ce1772c
Ignore some files
...
llvm-svn: 19221
2005-01-01 18:14:18 +00:00
Chris Lattner
86102b8ad5
This is a bulk commit that implements the following primary improvements:
...
* We can now fold cast instructions into select instructions that
have at least one constant operand.
* We now optimize expressions more aggressively based on bits that are
known to be zero. These optimizations occur a lot in code that uses
bitfields even in simple ways.
* We now turn more cast-cast sequences into AND instructions. Before we
would only do this if it if all types were unsigned. Now only the
middle type needs to be unsigned (guaranteeing a zero extend).
* We transform sign extensions into zero extensions in several cases.
This corresponds to these test/Regression/Transforms/InstCombine testcases:
2004-11-22-Missed-and-fold.ll
and.ll: test28-29
cast.ll: test21-24
and-or-and.ll
cast-cast-to-and.ll
zeroext-and-reduce.ll
llvm-svn: 19220
2005-01-01 16:22:27 +00:00
Chris Lattner
da15d4ba49
New testcases that we should combine.
...
llvm-svn: 19219
2005-01-01 16:14:46 +00:00
Chris Lattner
584e38313b
New testcase for common bitfield manipulation instruction sequences.
...
llvm-svn: 19218
2005-01-01 16:14:18 +00:00
Chris Lattner
421477885f
Add a bunch of tests for cases that should be eliminated.
...
llvm-svn: 19217
2005-01-01 16:13:43 +00:00
Chris Lattner
329d0255ae
Add a bunch of tests for ANDs that should be eliminated.
...
llvm-svn: 19216
2005-01-01 16:13:19 +00:00
Chris Lattner
ea4c66a083
This now works.
...
llvm-svn: 19215
2005-01-01 16:12:52 +00:00
Chris Lattner
83df5d25b7
Fix a FIXME: Select instructions on longs were miscompiled.
...
While we're at it, improve codegen of select instructions. For this
testcase:
int %test(bool %C, int %A, int %B) {
%D = select bool %C, int %A, int %B
ret int %D
}
We used to generate this code:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
b .LBB_test_3 ;
.LBB_test_2: ;
or r5, r4, r4
.LBB_test_3: ;
or r3, r5, r5
blr
Now we emit:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
or r4, r5, r5
.LBB_test_2: ;
or r3, r4, r4
blr
-Chris
llvm-svn: 19214
2005-01-01 16:10:12 +00:00
Chris Lattner
78394258ae
Substantially improve the code generated by non-folded setcc instructions.
...
In particular, instead of compiling this:
bool %test(int %A, int %B) {
%C = setlt int %A, %B
ret bool %C
}
to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
bl .LBBtest_1 !
nop
ba .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, 1, %i0
ba .LBBtest_3 !
nop
.LBBtest_2: !
or %g0, 0, %i0
ba .LBBtest_3 !
nop
.LBBtest_3: !
restore %g0, %g0, %g0
retl
nop
We now compile it to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
or %g0, 1, %i0
bl .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, %g0, %i0
.LBBtest_2: !
restore %g0, %g0, %g0
retl
nop
llvm-svn: 19213
2005-01-01 16:06:57 +00:00
Chris Lattner
3215bb6049
Implement SimplifyCFG/DeadSetCC.ll
...
SimplifyCFG is one of those passes that we use for final cleanup: it should
not rely on other passes to clean up its garbage. This fixes the "why are
trivially dead setcc's in the output of gccas" problem.
llvm-svn: 19212
2005-01-01 16:02:12 +00:00
Chris Lattner
21adf7d36e
Add new test to make sure simplifycfg doesn't leave around trivially
...
dead instructions.
llvm-svn: 19211
2005-01-01 16:00:56 +00:00
Chris Lattner
1ece6f83ba
Allow getZeroExtend and getSignExtend to work with boolean inputs.
...
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner
3196de7663
Add a useful accessor
...
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner
094e8b660b
Add two helper functions.
...
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Reid Spencer
97d6cf262f
Update to autoconf 2.59 standards.
...
llvm-svn: 19207
2005-01-01 09:26:55 +00:00
Reid Spencer
948499e820
Correct the conditional test for non-portable tools so that it will
...
correctly omit them for non-Unix operating systems.
llvm-svn: 19206
2004-12-31 22:56:14 +00:00
Reid Spencer
d7287e05e3
For PR351:
...
Make LLVM_ON_UNIX and LLVM_ON_WIN32 available in the makefiles
llvm-svn: 19205
2004-12-31 22:54:28 +00:00
Reid Spencer
cdf4d46551
Describe both objdir==srcdir and objdir!=srcdir methods of building LLVM
...
libraries and tools. Thanks to Henrik Bach for this suggestion.
llvm-svn: 19204
2004-12-31 19:48:59 +00:00
Jeff Cohen
b6ecaa2d1c
Where do these tabs keep coming from???
...
llvm-svn: 19203
2004-12-31 19:03:31 +00:00
Jeff Cohen
25dcdcc973
Mostly cleanup, but also some bug fixes, for win32/Path.cpp
...
llvm-svn: 19202
2004-12-31 19:01:08 +00:00
Reid Spencer
0f371a1637
Fix a compilation error for the case where mallinfo() is not available.
...
llvm-svn: 19201
2004-12-31 05:53:27 +00:00
Reid Spencer
0fcca1262b
For PR351:
...
* lib/System depends on sbrk(3), make sure we check for it.
llvm-svn: 19200
2004-12-31 05:49:15 +00:00
Jeff Cohen
63f13c4cbc
Get rid of those nasty tabs...
...
llvm-svn: 19199
2004-12-31 05:07:26 +00:00
Jeff Cohen
98aff88c9b
Bring win32/Path.cpp up to date with respect to Unix/Path.cpp
...
llvm-svn: 19198
2004-12-31 04:39:07 +00:00
Reid Spencer
234dc34c77
* Add missing libraries: Linker, Archive, SparcV8
...
* Make library descriptions consistently lower case.
llvm-svn: 19197
2004-12-31 00:13:14 +00:00
Reid Spencer
266325e6d8
* Don't include weak definitions as a definition
...
* Make subordinate libraries presented with a vertical list instead of all
listed on a single line.
llvm-svn: 19196
2004-12-30 23:13:12 +00:00
Reid Spencer
72767f611c
Add a section on library dependencies now that GenLibDeps.html is written.
...
llvm-svn: 19195
2004-12-30 23:12:04 +00:00
Reid Spencer
271ed74132
A Perl script to generate an HTML definition list containing the LLVM
...
library dependencies, for documentation purposes.
llvm-svn: 19194
2004-12-30 23:07:56 +00:00
Reid Spencer
e97198a38e
Fix the help documentation to not imply multiple archive files can be
...
processed.
llvm-svn: 19193
2004-12-30 17:51:57 +00:00
Reid Spencer
996ec72d48
For PR351:
...
* Place a try/catch block around the entire tool to Make sure std::string
exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
abort with a useless message but indicate than an unhandled exception was
generated.
llvm-svn: 19192
2004-12-30 05:36:08 +00:00
Jeff Cohen
a6d9c1415c
Fix MINGW compilation errors
...
llvm-svn: 19190
2004-12-30 03:02:31 +00:00
Reid Spencer
3d745d4378
* Fix a bug in an m4 macro that used an incorrect test operator
...
* Add CAN_DLOPEN_SELF so we can determine if dlopen(0) will open the
program or not.
* Correct a warning messages to be a little more specific on what it checks
llvm-svn: 19184
2004-12-29 07:07:57 +00:00
Reid Spencer
42eaef40d8
Fix a Bourne Shell syntax error in a test
...
llvm-svn: 19183
2004-12-29 06:59:36 +00:00
Reid Spencer
5309e843d3
Fix one of the names to not have a . in front of it.
...
llvm-svn: 19182
2004-12-29 05:47:04 +00:00
Chris Lattner
b5c253a58b
Bug fixed
...
llvm-svn: 19181
2004-12-29 04:39:50 +00:00
Chris Lattner
13516fe2e7
Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll
...
llvm-svn: 19180
2004-12-29 04:36:02 +00:00
Chris Lattner
f2a5963737
Add a comment, add a new testcase
...
llvm-svn: 19179
2004-12-29 04:35:30 +00:00
Chris Lattner
44b225d4d4
New testcase for PR491
...
llvm-svn: 19178
2004-12-29 04:27:26 +00:00
Chris Lattner
c6141111a5
Bug fixed
...
llvm-svn: 19177
2004-12-29 04:03:23 +00:00
Chris Lattner
93feeb18f1
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner
5c87df3b7b
new testcase for PR490
...
llvm-svn: 19175
2004-12-29 03:57:25 +00:00
Reid Spencer
46f8f24f15
XFAIL this test everywhere.
...
llvm-svn: 19174
2004-12-29 03:17:30 +00:00
Reid Spencer
28d2ad3396
XFAIL this everywhere, the CFE doesn't support bitfield initialization.
...
llvm-svn: 19173
2004-12-29 03:16:40 +00:00
Reid Spencer
9f4bb585f5
Remove potential platform portability issue with size of "int".
...
llvm-svn: 19172
2004-12-29 01:20:24 +00:00
Reid Spencer
b9f8de6efe
Correct the name of the variable for the LLVM examples directory so that
...
parallel builds don't attempt to create it twice.
llvm-svn: 19171
2004-12-28 07:59:22 +00:00
Reid Spencer
78d9e8763d
Make the x86_64 target names match between def and use. Thanks Misha.
...
llvm-svn: 19170
2004-12-28 07:56:14 +00:00
Reid Spencer
307435c2ae
Make the 64-bit x86 target named "x86_64" instead of "AMD64".
...
llvm-svn: 19169
2004-12-28 06:34:11 +00:00
Misha Brukman
c57b9eb581
Add a note about registering the backend so it's available in LLC and LLI
...
llvm-svn: 19168
2004-12-27 19:05:16 +00:00
Jeff Cohen
bb3d4a1b64
Bring VS projects up to date with respect to recent changes
...
llvm-svn: 19167
2004-12-27 16:49:34 +00:00
Reid Spencer
cf8f341c36
Don't create symbolic links for lib/System any more. It doesn't need them.
...
llvm-svn: 19166
2004-12-27 09:33:46 +00:00
Reid Spencer
c7f0a4733d
Clean up some autoconf cruft
...
* Make the source detection use a file unique to Stacker
* Configure Makefile.common.in with AC_CONFIG_FILES not AC_CONFIG_MAKEFILE
* Use new autoconf format for invoking AC_OUTPUT
llvm-svn: 19165
2004-12-27 08:51:55 +00:00
Reid Spencer
c4f0c739c9
Make it possible to reconfigure a project as well as just LLVM main dir.
...
llvm-svn: 19164
2004-12-27 08:50:27 +00:00
Reid Spencer
ad7bdf7400
Fix a bug that made the nightly tester *really* slow. During changes for
...
portability, the --track-space option was inadvertently ignored. This patch
fixes that so that sys::Process::GetMallocUsage() is only invoked if the
--track-spaces option is given. Apparently the mallinfo() call that
GetMallocUsage() uses is *very* slow, especially when processing very large
modules like projects/llvm-test/MultiSource/Applications/kimwitu++.
llvm-svn: 19163
2004-12-27 08:03:04 +00:00
Reid Spencer
a079b69981
For PR351:
...
* sys::PreventCoreFiles -> sys::Process::PreventCoreFiles
llvm-svn: 19162
2004-12-27 06:18:02 +00:00
Reid Spencer
e925d8b8b2
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Account for variations in time.h and sys/time.h inclusion.
* Add macros for getting wait(2) exit status correctly (per autoconf sugg.)
* Implement ThrowErrno in terms of strerror_r, strerror or none based on
what is available on the platform.
llvm-svn: 19161
2004-12-27 06:17:50 +00:00
Reid Spencer
efda887fe2
For PR351:
...
* Remove redundant #includes that are now in Unix.h
llvm-svn: 19160
2004-12-27 06:17:39 +00:00
Reid Spencer
cf15b874e8
For PR351:
...
* Move implementation of sys::PreventCoreFiles function to this file from
the now defunct SysConfig abstraction.
llvm-svn: 19159
2004-12-27 06:17:27 +00:00
Reid Spencer
d103e0851c
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Ensure variations in "dirent" structure are accounted for.
llvm-svn: 19158
2004-12-27 06:17:15 +00:00
Reid Spencer
47cd653411
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Consolidate implementation from operating system specific directory.
llvm-svn: 19157
2004-12-27 06:17:03 +00:00
Reid Spencer
d554bbcefd
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
llvm-svn: 19156
2004-12-27 06:16:52 +00:00
Reid Spencer
af6d3d5c8f
For PR351:
...
* Consolidate implementation for Unix systems into Unix/TimeValue.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19155
2004-12-27 06:16:38 +00:00
Reid Spencer
51ea06abf8
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Program.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19154
2004-12-27 06:16:25 +00:00
Reid Spencer
844f3fec49
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Signals.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19153
2004-12-27 06:16:11 +00:00
Reid Spencer
71383fb646
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Memory.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19152
2004-12-27 06:15:57 +00:00
Reid Spencer
1a7a435b49
For PR351:
...
* Consolidate implementation for Unix systems into Unix/MappedFile.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19151
2004-12-27 06:15:43 +00:00
Reid Spencer
97d4a17f04
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Process.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19150
2004-12-27 06:15:29 +00:00
Reid Spencer
0d1ad6ac34
For PR351:
...
SysConf abstraction was pointless because it had a single function in it that
pertained only to the current process. So merge it into the Process abstraction
and remove the files completely.
llvm-svn: 19149
2004-12-27 06:15:14 +00:00
Reid Spencer
b668158b7c
For PR351:
...
* Add checks for sterror and strerror_r functions
* Add check to determine if /dev/zero is needed for allocating RWX memory.
llvm-svn: 19148
2004-12-27 06:15:02 +00:00
Reid Spencer
826da2a721
For PR351:
...
Provide a check to determine if /dev/zero is needed for AllocateRWX function.
llvm-svn: 19147
2004-12-27 06:14:48 +00:00
Reid Spencer
189c677549
Oops, reverse the logic on a test for WITH_LLVMGCCDIR to make it define
...
the path names correctly.
llvm-svn: 19146
2004-12-27 03:15:28 +00:00
Reid Spencer
474a09ca20
Provide a value for HAVE_MMAP_ANONYMOUS variable, for consistency with
...
other #define's.
llvm-svn: 19145
2004-12-27 03:14:43 +00:00
Reid Spencer
6bfa7a4f7b
Describe the --with-llvmgccdir option to configure.
...
llvm-svn: 19144
2004-12-26 05:47:26 +00:00
Reid Spencer
d2020acea0
Revert the last patch so that the LLVMGCCDIR environment variable is
...
still viable and will make use of the resurrected --with-llvmgccdir
configure option.
llvm-svn: 19143
2004-12-26 05:21:13 +00:00
Reid Spencer
8bc110c097
For PR351:
...
* Make sure all headers used by lib/System have checks
* Use "standard" autoconf checks for certain problematic headers
For PR432:
* Resurrect --with-llvmgccdir so a specific llvm-gcc/llvm-g++ installation
can be specified.
llvm-svn: 19142
2004-12-25 07:31:29 +00:00
Jeff Cohen
f365c33b62
mingw doesn't support the official debug API.
...
Old versions of the C runtime somehow get loaded into the process. Make
sure they aren't searched for symbols.
llvm-svn: 19141
2004-12-25 04:50:17 +00:00
Jeff Cohen
683b1a5e3c
Get VC++ building again
...
llvm-svn: 19140
2004-12-24 16:26:47 +00:00
Reid Spencer
d06d026715
Ignore the autom4te.cache directoy.
...
llvm-svn: 19139
2004-12-24 15:11:23 +00:00
Reid Spencer
c005fba17b
Make sure llvm-g++ gets the right path for the llvm tools.
...
llvm-svn: 19138
2004-12-24 14:47:34 +00:00
Jeff Cohen
039b4abf6c
Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
...
ltdl's LGPL license would infect all of LLVM.
llvm-svn: 19137
2004-12-24 07:57:09 +00:00
Reid Spencer
c81ccb488a
Make the symbolic link using the correct variable!
...
llvm-svn: 19136
2004-12-24 06:49:16 +00:00
Reid Spencer
920b83d709
Remove references to LLVMGCCDIR because it was only used to provide a
...
value for the --with-llvmgccdir configure option which is no longer
supported.
llvm-svn: 19135
2004-12-24 06:32:54 +00:00
Reid Spencer
20540311e1
For PR351:
...
Merge implementations of isValid and GetTemporaryDirectory into this file. There
is not any point having the operating system specific files for such little
variation between the Unix family of systems.
llvm-svn: 19134
2004-12-24 06:29:42 +00:00
Reid Spencer
e7c870364f
For PR351:
...
This implementation is no longer needed, its been merged to Unix/Path.cpp since
there is such little variation between the platforms.
llvm-svn: 19133
2004-12-24 06:29:28 +00:00
Reid Spencer
328ee53573
For PR351:
...
Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation
instead of relying upon the "platform" link
llvm-svn: 19132
2004-12-24 06:29:17 +00:00
Reid Spencer
d3d6d9d691
For PR351:
...
Create new variables LLVM_ON_UNIX and LLVM_ON_WIN32 so we can start getting
rid of reliance upon a symbolic link to switch implementations in lib/System
llvm-svn: 19131
2004-12-24 06:29:05 +00:00
Reid Spencer
4befbf3f14
Resurrect this file.
...
llvm-svn: 19130
2004-12-24 06:03:31 +00:00
Reid Spencer
265b02ed3a
Remove these files as they are not being included any more. DynamicLibrary
...
is now implemented via ltdl.cpp which has its own way of dealing with
the different platforms.
llvm-svn: 19129
2004-12-24 03:59:46 +00:00
Reid Spencer
0f996fe02c
Make sure LLVMGCCWITHPATH is used instead of just LLVMGCC so that the
...
CFE tools can find the correct LLVM tools to invoke.
llvm-svn: 19128
2004-12-24 03:44:24 +00:00
Reid Spencer
69d897cc22
The dejagnu scripts need a path for llvm-gcc/llvm-g++ as well so use the
...
correct variable to get a "set the path first" invocation of those tools.
llvm-svn: 19127
2004-12-24 03:38:01 +00:00
Reid Spencer
35655d69b5
Two corrections:
...
* When reconfiguring, make sure the config.cache file is blown away so that
its (old) values don't short-circuit doing the tests. When a reconfigure
is done, it should be done from scratch, without the cache.
* For dist-check, don't pass --with-llvmgccdir any more because configure
doesn't have this option any more.
llvm-svn: 19126
2004-12-24 03:36:31 +00:00
Reid Spencer
b608aebc6c
Change llvmgcc/llvmg++ to llvm-gcc and llvm-g++ respectively.
...
llvm-svn: 19125
2004-12-24 03:34:31 +00:00
Jeff Cohen
d567bb6af6
Fix VC++ compilation error
...
llvm-svn: 19124
2004-12-24 02:38:34 +00:00
Reid Spencer
657b7343f3
Fix a bug in libtool's ltmain.sh. On Cygwin the "$output.exp" expression
...
expands to a full path name. Substitute $outputname.exp" instead and it
makes a viable temporary file name. This gets around the problem with lli
on Cygwin linking but not having any "C" library functions linked into it.
llvm-svn: 19123
2004-12-24 00:15:20 +00:00
Reid Spencer
c84ee1aee0
Put CopyFile in the sys namespace.
...
llvm-svn: 19122
2004-12-23 22:14:32 +00:00
Misha Brukman
e50986b39f
Wrap at 80 cols
...
llvm-svn: 19121
2004-12-23 21:17:41 +00:00
Reid Spencer
dee41307dc
Correct the comments and file header.
...
llvm-svn: 19120
2004-12-23 21:16:46 +00:00
Reid Spencer
454a8afc6d
Try to speed up gccld hot spot in BasicVN::getEqualNumberNodes by making
...
a function call at the core of the loop inline and removing unused
stack variables from an often called function. This doesn't improve things
much, the real saving will be by reducing the number of calls to this
function (100K+ when linking kimwitu++).
llvm-svn: 19119
2004-12-23 21:13:26 +00:00
Reid Spencer
0a54a58c63
Update the amd64 target detection checks.
...
Patch contributed by Markus F.X.J. Oberhumer.
llvm-svn: 19118
2004-12-23 21:08:52 +00:00
Reid Spencer
1097f7df5f
Add a caution about using experimental versions of gnu binutils when
...
building Cygwin.
llvm-svn: 19117
2004-12-23 19:49:54 +00:00
Reid Spencer
a8acd82275
Be specific about version of GCC and binutils on Cygwin since it matters.
...
llvm-svn: 19116
2004-12-23 19:39:54 +00:00
Misha Brukman
5ac308f43a
LLVM now builds and runs on Linux/amd64, but we don't have 64-bit codegen yet
...
llvm-svn: 19115
2004-12-23 07:14:56 +00:00
Jeff Cohen
cd80438755
Allow llc to recognize -march=x86. As it was, it didn't recognize any
...
architecture at all.
llvm-svn: 19114
2004-12-23 06:45:32 +00:00
Reid Spencer
864cee3355
Added support for detection of amd64 targets.
...
llvm-svn: 19113
2004-12-23 06:22:33 +00:00
Jeff Cohen
53fbecce6e
Patch to fix mingw compilation problem contributed by Henrik.
...
llvm-svn: 19112
2004-12-23 03:44:40 +00:00
Brian Gaeke
737d3e8794
Fix the build on PowerPC/Darwin - it thought we were declaring a new
...
function or something. Since FileRemover takes a const reference to
sys::Path, we need to pass an actual sys::Path variable.
llvm-svn: 19111
2004-12-22 22:33:33 +00:00
Reid Spencer
e0699f7466
* Remove an unnecessary step.
...
* Correct a path.
llvm-svn: 19110
2004-12-22 16:19:05 +00:00
Reid Spencer
d94c5f8cc9
Correct compilation for Cygwin. FindExecutable now returns a sys::Path.
...
llvm-svn: 19109
2004-12-22 13:50:17 +00:00
Reid Spencer
3b21e3539a
For PR351:
...
Include local FDHandle.h file now that FDHandle is local to this library
and not in lib/System/FileUtilities.
llvm-svn: 19108
2004-12-22 10:25:06 +00:00
Reid Spencer
756d023539
For PR351:
...
FDHandle class (non-portable) moved here from lib/Support/FileUtilities
llvm-svn: 19107
2004-12-22 10:24:55 +00:00
Reid Spencer
5260b5b46d
For PR351:
...
Move non-portable FDHandle class to its only user: lib/Debugger
llvm-svn: 19106
2004-12-22 10:24:43 +00:00
Reid Spencer
3e41cd50b4
Add a blurb about using the GCC 3.4.3 compiler on Cygwin (which works) for
...
the CFE instead of the default GCC 3.3.3 compiler that comes with Cygwin.
llvm-svn: 19104
2004-12-22 09:52:30 +00:00
Reid Spencer
c5f858ca52
For PR432:
...
* Remove the idiotic windows environment setting, its not needed.
* Remove an extraneous "mkdir" instruction.
llvm-svn: 19103
2004-12-22 09:07:51 +00:00
Reid Spencer
296cf274fd
Hopefully fix a link.
...
llvm-svn: 19102
2004-12-22 06:48:03 +00:00
Reid Spencer
85a38ded31
Fix the names of these executables now that they've been somewhat cast in
...
stone.
llvm-svn: 19101
2004-12-22 06:47:25 +00:00
Reid Spencer
31bf9a0371
Correct the name of the executables to which llvmgcc and llvmgxx variables
...
point to.
llvm-svn: 19100
2004-12-22 06:45:24 +00:00
Reid Spencer
c659a4b140
For PR432:
...
Rework the CFE build details to include the directions for using the
option --program-prefix=llvm- to the CFE's configure script. This ensures
that the CFE builds unique executable names and makes it possible to put
the $CFEINSTALL/bin directory into one's path.
llvm-svn: 19099
2004-12-22 06:40:29 +00:00
Reid Spencer
788b0fdab7
For PR432:
...
* llvmgcc -> llvm-gcc
* llvmg++ -> llvm-g++
* remove references to --with-llvmgccdir configure option
llvm-svn: 19098
2004-12-22 06:29:07 +00:00
Reid Spencer
c4de911191
For PR432:
...
* Use LLVMGCC and LLVMGXX variables instead of computing the name
llvm-svn: 19097
2004-12-22 05:57:50 +00:00
Reid Spencer
e301401118
For PR432:
...
* Variable name change: cferuntime_libdir -> CFERuntimeLibDir
llvm-svn: 19096
2004-12-22 05:57:33 +00:00
Reid Spencer
2bba41c760
For PR432:
...
* Cleanup LLVMGCXX and LLVMGCC by providing LLVMGXXWITHPATH and LLVMGCCWITHPATH
variables that add the $(LLVMToolDir) to the path so the CFE tools can find
the right LLVM tools they depend on.
* Standardize the name of a variable: cferuntime_libdir -> CFERuntimeLibDir
llvm-svn: 19095
2004-12-22 05:57:21 +00:00
Reid Spencer
0921255067
For PR432:
...
* Use new configuration variables to compute LLVMGCC and LLVMGXX variables.
llvm-svn: 19094
2004-12-22 05:57:09 +00:00
Reid Spencer
fd144e8655
For PR432:
...
* Remove --with-llvmgccdir, not needed any more
* Search path for llvm-gcc and llvm-gxx
* Compute LLVMGCCDIR based on install path of llvm-gcc
llvm-svn: 19093
2004-12-22 05:56:56 +00:00
Reid Spencer
2ac471060e
Get rid of old automake stuff
...
llvm-svn: 19092
2004-12-22 05:56:41 +00:00
Reid Spencer
e2b14e52c7
Support the gas option --traditional-format which, for some reason, gets
...
passed to gccas when the --program-prefix option is used to configure CFE.
llvm-svn: 19091
2004-12-22 02:58:43 +00:00
Misha Brukman
2261bff1a5
Ignore generated files
...
llvm-svn: 19090
2004-12-22 01:49:53 +00:00
Reid Spencer
5fb7160b0e
Revert last patch until we can figure out how to build executables named
...
llvmgcc and llvmg++ correctly.
llvm-svn: 19089
2004-12-22 01:37:47 +00:00
Misha Brukman
8295ac7098
Fix the Win32 build
...
llvm-svn: 19088
2004-12-22 01:37:33 +00:00
Reid Spencer
5d2d5db1b0
Revert last changes as they introduce CFE build problems.
...
llvm-svn: 19087
2004-12-22 01:36:27 +00:00
Reid Spencer
fc195422a5
Make parameters to CopyFile use explicit instantiation of sys::Path.
...
llvm-svn: 19086
2004-12-22 01:26:48 +00:00
Jeff Cohen
248192ac04
Add project Bytecode to Visual Studio
...
llvm-svn: 19085
2004-12-22 00:27:14 +00:00
Reid Spencer
0953cfc002
Remove instructions to make aliases for llvmgcc and llvmg++ as the CFE
...
Build instructions now direct the user to have the CFE generate executables
with those names via the --program-prefix=llvm configure option.
llvm-svn: 19084
2004-12-21 18:52:08 +00:00
Reid Spencer
7bb9d35be2
For PR432:
...
Add instructions for using the --program-prefix=llvm so that the CFE build
produces llvmgcc instead of gcc.
llvm-svn: 19083
2004-12-21 18:50:54 +00:00
Jeff Cohen
6486fab16d
Fix VC++ compilation error
...
llvm-svn: 19082
2004-12-21 15:40:41 +00:00
Reid Spencer
9e7acd465e
For PR351:
...
Remove unix specific code (use of errno and read) from the reader.
Thanks to Jeff Cohen for pointing this out.
llvm-svn: 19081
2004-12-21 07:51:33 +00:00
Jeff Cohen
fd0e3542f9
Visual Studio project Configure should place the configured header files
...
in the win32 subtree instead of the src subtree.
llvm-svn: 19080
2004-12-21 06:49:13 +00:00
Reid Spencer
107410613b
Put the CopyFile function explicitly in the sys namespace.
...
llvm-svn: 19079
2004-12-21 03:27:08 +00:00
Reid Spencer
4acff4056f
Use explicit construction of sys::Path from std::string because the
...
constructor is "explicit".
llvm-svn: 19078
2004-12-21 03:24:02 +00:00
Reid Spencer
fbad5d7d65
Include <cassert> for Cygwin.
...
llvm-svn: 19077
2004-12-21 00:22:51 +00:00
Reid Spencer
22dd8b15c0
Cygwin doesn't like .. through a link, so drop the ..
...
llvm-svn: 19076
2004-12-20 22:21:41 +00:00
Reid Spencer
92e8a5a0ea
Fix a bug where system time always equals user time
...
llvm-svn: 19075
2004-12-20 21:44:27 +00:00
Reid Spencer
d4c6988809
Implement GetTimeUsage correctly.
...
llvm-svn: 19074
2004-12-20 21:43:33 +00:00
Reid Spencer
08b4bd7496
Allow compilers that can't distinguish between a class instantiation and
...
the declaration of a function to compile this.
llvm-svn: 19073
2004-12-20 19:16:12 +00:00
Reid Spencer
8005e66f0a
Provide a getrusage based implementation of GetTotalMemoryUsage and use
...
the ru_maxrss field as an approximation.
llvm-svn: 19072
2004-12-20 16:33:37 +00:00
Reid Spencer
1cf74cee21
Consistently use the same #if style. Also, fix a bug testing for sbrk(3)
...
llvm-svn: 19071
2004-12-20 16:06:44 +00:00
Reid Spencer
1e10203375
Remove unnecessary #includes.
...
llvm-svn: 19070
2004-12-20 06:38:12 +00:00
Reid Spencer
cbd791c5e7
Be double sure about including sys/stat.h by wrapping the inclusion in
...
an "#if defined(HAVE_SYS_STAT_H)".
llvm-svn: 19069
2004-12-20 06:34:02 +00:00
Misha Brukman
db1fca91af
llvm/Config/unistd.h has gone away, far, far away
...
llvm-svn: 19068
2004-12-20 05:36:57 +00:00
Reid Spencer
b5e10bb05d
Remove the #include of llvm/Config/unistd.h as it is no longer needed.
...
llvm-svn: 19067
2004-12-20 04:52:04 +00:00
Reid Spencer
f3f9f4339f
Remove this file as there are no LLVM users of it any more.
...
llvm-svn: 19066
2004-12-20 04:35:20 +00:00
Reid Spencer
a2ff4f4634
Incorporate the contents of include/llvm/Config/unistd.h as this is the
...
last file in LLVM to require the header. After ths commmit, our unistd.h
will go away.
llvm-svn: 19065
2004-12-20 04:34:36 +00:00
Reid Spencer
beece98d9d
Remove this file as its not used by anything in LLVM any more. System
...
dependent behavior is now made through the lib/System interface.
llvm-svn: 19064
2004-12-20 04:25:53 +00:00
Reid Spencer
5e3a6d29bc
Remove these files as they are included by nothing in LLVM any more. The
...
system dependent functionality has been moved to lib/System.
llvm-svn: 19063
2004-12-20 04:24:32 +00:00
Reid Spencer
e4bd5e577a
Remove these headers. The files that used to #include them don't any more
...
as most system dependent behavior has been moved to lib/System.
llvm-svn: 19062
2004-12-20 04:20:37 +00:00
Reid Spencer
6b853b22cb
Remove un-needed #includes.
...
llvm-svn: 19061
2004-12-20 04:15:44 +00:00
Reid Spencer
f3b99a9c02
Add HAVE_SYSCONF
...
llvm-svn: 19060
2004-12-20 04:08:58 +00:00
Brian Gaeke
fe4e48e14b
Use Config/alloca.h instead of alloca.h - pointed out by Duraid and Misha
...
llvm-svn: 19059
2004-12-20 04:02:01 +00:00
Reid Spencer
ee556dd431
Put some header files back that Win32 needs.
...
llvm-svn: 19058
2004-12-20 03:59:23 +00:00
Jeff Cohen
7ae0bc7111
Keep up with lib/System changes
...
llvm-svn: 19057
2004-12-20 03:24:56 +00:00
Jeff Cohen
be92640355
Fix problems uncovered by VC++ (first time compiled by VC++)
...
llvm-svn: 19056
2004-12-20 03:23:46 +00:00
Reid Spencer
ac38f3a028
For PR351:
...
* Implement GetMallocUsage to get usage of malloc heap
* Implement GetMemoryUsage to get total memory usage of process
* Implement GetTimeUsage to get elapsed/user/system time
llvm-svn: 19055
2004-12-20 00:59:28 +00:00
Reid Spencer
27fa6c6d49
For PR351:
...
No need for Unix/SUS/Process.cpp any more, just ifdef it.
llvm-svn: 19054
2004-12-20 00:59:16 +00:00
Reid Spencer
2708881067
For PR351:
...
* Move system dependent implementation out of this file.
* Make implementation use sys::Process::GetMallocUsage where necessary.
* Make implementation use sys::Process::GetTimeUsage where necessary.
llvm-svn: 19053
2004-12-20 00:59:04 +00:00
Reid Spencer
8b44f87ef9
For PR351:
...
* Add checks for sbrk and getpagesize functions
* Alphebetize the checks for functions
llvm-svn: 19052
2004-12-20 00:59:04 +00:00
Reid Spencer
554368e4d9
For PR351:
...
* Add GetMallocUsage as a wrapper around mallinfo()
* Add GetTotalMemoryUsage to get approximate RSS size
* Add GetTimeUsage to get elapsed/system/user time
llvm-svn: 19051
2004-12-20 00:58:53 +00:00
Reid Spencer
47dff91dc2
Wrap long lines
...
llvm-svn: 19050
2004-12-20 00:58:41 +00:00
Reid Spencer
d816f9e935
For PR351:
...
This file is no longer needed as system dependent functions have been
encapsulated into lib/System.
llvm-svn: 19049
2004-12-20 00:58:25 +00:00
Misha Brukman
f06cb1db24
* Use "" for LLVM include files, not <>
...
* llvm/Config/alloca.h already #includes config.h
* Minor readability/stylistic changes
llvm-svn: 19048
2004-12-20 00:16:38 +00:00
Brian Gaeke
cb1b1e74eb
Make this compile on Solaris.
...
llvm-svn: 19047
2004-12-19 21:08:07 +00:00
Misha Brukman
0eb431c04c
Use <> for system #include files
...
llvm-svn: 19046
2004-12-19 19:27:11 +00:00
Brian Gaeke
8062bde121
Make references to 'struct sigaction' compile under Solaris.
...
llvm-svn: 19045
2004-12-19 18:58:11 +00:00
Reid Spencer
766ad0b77f
For PR351:
...
* Support changes in sys::Program::ExecuteAndWait interface
llvm-svn: 19044
2004-12-19 18:00:56 +00:00
Reid Spencer
6cb551b279
For PR351:
...
Move the functionality of RunProgramWithTimeout into the ExecuteAndWait
function: support a timeout and I/O redirects
llvm-svn: 19043
2004-12-19 18:00:44 +00:00
Reid Spencer
72d1627d16
For PR351:
...
Add a needed include.
llvm-svn: 19042
2004-12-19 18:00:32 +00:00
Reid Spencer
2d76ff5c85
For PR351:
...
* Pass sys::Path instead of std::string for paths
* Correct the types of arguments passed to RunProgramWithTimeout due to its
interface using sys::Path instead of std::string
* Replace "/dev/null" (not portable) with empty string which
sys::Program::ExecuteAndWait recognizes as "redirect to bit bucket"
llvm-svn: 19041
2004-12-19 18:00:21 +00:00
Reid Spencer
d44f845213
For PR351:
...
* Remove unneeded header files.
* Move RedirectFD static function to lib/System/Unix/Program.cpp
* Delete RunProgramWithTimeout, now implemented by
sys::Program::ExecuteAndWait. RunProgramWithTimeout is now a convenience func.
llvm-svn: 19040
2004-12-19 18:00:09 +00:00
Reid Spencer
4fea306f5e
For PR351:
...
Incorporate the abilities of RunPRogramWithTimeout into
sys::Program::ExecuteAndWait so that redirection and a timeout are optionally
supported.
llvm-svn: 19039
2004-12-19 17:59:57 +00:00
Reid Spencer
8d3bdca1b4
For PR351:
...
Turn path instance variables into sys::Path instead of std::string
llvm-svn: 19038
2004-12-19 17:59:45 +00:00
Reid Spencer
fb741b2700
For PR351:
...
Replace RunProgramWithTimeout with an inline function that calls
sys::Program::ExecuteAndWait. This is now just a convenience function.
llvm-svn: 19037
2004-12-19 17:59:33 +00:00
Jeff Cohen
033fed0205
Add llc project to Visual Studio
...
llvm-svn: 19036
2004-12-19 17:53:47 +00:00
Jeff Cohen
e14dc8bb79
Add lli project to Visual Studio
...
llvm-svn: 19035
2004-12-19 06:40:39 +00:00
Jeff Cohen
b49205c550
Enable browse information in Visual Studio
...
llvm-svn: 19034
2004-12-19 02:29:00 +00:00
Jeff Cohen
45efd8df99
Improve dependency management for lib/system/win32/* files. Instead of copying the
...
files from win32/* to platform/*, create one line files in platform that include the
corresponding file in win32. This makes life much more enjoyable!
The cruel irony is that NTFS has hard links just like Unix, but there's no way to
get to them from the DOS prompt!
llvm-svn: 19033
2004-12-18 08:01:43 +00:00
Jeff Cohen
ca9b7e66d0
Don't forget about release configuration...
...
llvm-svn: 19032
2004-12-18 07:05:59 +00:00
Jeff Cohen
c3ba60ece6
Rationalize warning suppression. First, 64-bit portability warnings are disabled. The
...
specific warnings they produced were being suppressed anyway. The truncation warnings
that were suppressed are now enabled, and the few that still occur ought to be fixed.
The only warnings suppressed now are the "negating an unsigned is still unsigned", the
validity of which Chris does not accept, and the "implicit conversion of <type> to bool
performance warning". Making the conversion explicit won't make it run any faster and
this is an easier way to shut the compiler up.
llvm-svn: 19031
2004-12-18 06:55:41 +00:00
Reid Spencer
5ababc6f33
sys::CopyFile returns void and throws an exception on error which will be
...
caught by llvm-ld's main function.
llvm-svn: 19030
2004-12-18 06:54:21 +00:00
Reid Spencer
8b086e3871
sys::CopyString throws an exception on error which will be caught by gccld
...
main function.
llvm-svn: 19029
2004-12-18 06:53:10 +00:00
Jeff Cohen
81184bb528
Fix win32 breakage
...
llvm-svn: 19028
2004-12-18 06:42:15 +00:00
Reid Spencer
16ce83c3a6
The CopyFile function got moved into the sys namespace.
...
llvm-svn: 19026
2004-12-18 00:19:32 +00:00
Reid Spencer
b3d3f1b579
Correct the name of the method. CopyFiles -> CopyFile.
...
llvm-svn: 19025
2004-12-18 00:14:24 +00:00
Chris Lattner
45382d34cc
Remove unused enum value
...
llvm-svn: 19024
2004-12-17 22:41:46 +00:00
Tanya Lattner
96f6909ae1
Always print out DejagnuTest results to stdout so that it gets emailed to the nightly test manager. Eventually Dejagnu should be merged into the added/removed tests.
...
llvm-svn: 19023
2004-12-17 20:58:34 +00:00
Reid Spencer
181cf4ce17
Move the #include of sys/stat.h inside the linux "hack" for the stat
...
family of functions so it gets noticed if we ever remove this.
llvm-svn: 19022
2004-12-17 19:09:16 +00:00
Chris Lattner
227010bb31
Remove unused #include
...
llvm-svn: 19021
2004-12-17 19:07:04 +00:00
Reid Spencer
0575a63578
Only #include sys/stat.h if we're on linux where we have the PR274 problem.
...
llvm-svn: 19020
2004-12-17 18:56:29 +00:00
Chris Lattner
5e5e3f4409
Make this testcase a bit more challanging
...
llvm-svn: 19019
2004-12-17 17:14:00 +00:00
Chris Lattner
a12b5df616
Actually overload the virtual method. This fixes
...
Regression/Analysis/GlobalsModRef/purecse.ll. Isn't this what the
-Woverload-whatever flag would warn about :)
llvm-svn: 19018
2004-12-17 17:12:24 +00:00
Chris Lattner
493cc12415
Change the test to check to see that CSE happens not dead call elim
...
llvm-svn: 19017
2004-12-17 17:11:41 +00:00
Chris Lattner
f953b24f4e
Make code fit in 80 cols
...
llvm-svn: 19016
2004-12-17 17:02:54 +00:00
Reid Spencer
1abfe0d655
Reverse the logic for Win32 to ensure that bugpoint and llvm-db are NOT
...
built on this platform.
llvm-svn: 19015
2004-12-17 08:00:40 +00:00
Reid Spencer
120aa08e1c
Fix this file to actually work. ifneq was incorrectly used. Subtract out
...
llvm-db and bugpoint for Win32 rather than add them in
subtr
llvm-svn: 19014
2004-12-17 07:59:53 +00:00
Reid Spencer
801643d737
Describe the new "reconfigure" and "spotless" targets.
...
llvm-svn: 19013
2004-12-17 07:46:45 +00:00
Reid Spencer
7ef8e66e50
Complete the implementation of the spotless rule and make it not depend on
...
the .. directory.
llvm-svn: 19012
2004-12-17 07:45:03 +00:00
Reid Spencer
19dd542a31
Makefile.JIT doesn't exist any more so it doesn't need to be distributed.
...
llvm-svn: 19009
2004-12-17 02:06:36 +00:00
Reid Spencer
0306c68c1f
Disable bugpoint and llvm-db tools for Win32. They can't be supported on
...
that platform without a lot of work because they depend on process image
copy behavior of fork(2).
llvm-svn: 19008
2004-12-17 01:46:41 +00:00
Chris Lattner
db0bf10e4a
Change the sentinal
...
llvm-svn: 19007
2004-12-17 00:46:51 +00:00
Chris Lattner
979b903916
Create a stack slot for the return address lazily instead of eagerly. This
...
save small amounts of time for functions that don't call llvm.returnaddress
or llvm.frameaddress (which is almost all functions).
llvm-svn: 19006
2004-12-17 00:07:46 +00:00
Tanya Lattner
991b5e9457
Chris is a pain ;) Removing reassociate.
...
llvm-svn: 19005
2004-12-16 23:16:16 +00:00
Tanya Lattner
a5528e89fd
Removing commented out lines.
...
llvm-svn: 19004
2004-12-16 23:13:16 +00:00
Tanya Lattner
08e19bb412
Removed LICM and GCSE.
...
llvm-svn: 19003
2004-12-16 23:07:36 +00:00
Tanya Lattner
c3a7bd7d0c
Linking in all of ScalarOpts.
...
llvm-svn: 19002
2004-12-16 23:07:13 +00:00
Reid Spencer
584cb0a8c1
For PR351:
...
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names
llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Reid Spencer
beb9946af8
For PR351:
...
* Make the OutputC and OutputAsm functions work with sys::Path for the output
file name instead of using std::string.
* Get rid of extraneous "toString" calls.
* Change "removeFile" to sys::Path::destroyFile()
llvm-svn: 19000
2004-12-16 23:01:34 +00:00
Reid Spencer
ea71e3c89b
For PR351:
...
* Remove the "removeFile" function, now implemented by the
sys::Path::destroyFile method.
* Make the FileRemove work with a sys::Path instead of a std::string
llvm-svn: 18999
2004-12-16 23:00:05 +00:00
Chris Lattner
867783adc4
X86 doesn't actually use SelectionDAG yet.
...
llvm-svn: 18996
2004-12-16 19:40:10 +00:00
Chris Lattner
eb5a2cf32b
No targets actually use this library
...
llvm-svn: 18995
2004-12-16 19:39:45 +00:00
Chris Lattner
5a4c66cfe9
Remove dead #include
...
llvm-svn: 18994
2004-12-16 19:32:38 +00:00
Reid Spencer
b193ec5a13
Fix a compile error. config.h is now needed because DataTypes.h doesn't
...
include it any more.
llvm-svn: 18993
2004-12-16 19:19:24 +00:00
Reid Spencer
6b9c46de92
Get rid of inclusion of config.h because this file is autoconf'd.
...
llvm-svn: 18992
2004-12-16 18:47:17 +00:00
Reid Spencer
afdc82c259
Some minor upgrades
...
* Convert "cmp" usage to $(CMP)
* Convert "cp" usage to $(CP)
* Fix some build messages to reflect what's actually going on
* Add a "reconfigure" target for forcing a reconfigure. Helps with testing
things like Chris's recent changes.
llvm-svn: 18991
2004-12-16 18:26:53 +00:00
Reid Spencer
d42d5d433f
Add CMP and CP configuration variables for the unix cmp and cp programs.
...
llvm-svn: 18990
2004-12-16 17:48:14 +00:00
Chris Lattner
f86914daae
Factor all of the .inc : .inc.tmp rules into one.
...
llvm-svn: 18989
2004-12-16 17:38:56 +00:00
Chris Lattner
22f937ae52
Add spaces between rule groups to make it more obvious which ones pair
...
Remove instrselector generation, remove Intel/ATT specifics from Makefile.rules.
llvm-svn: 18988
2004-12-16 17:34:04 +00:00
Chris Lattner
20d74fd986
Adjust to changes in asmwriter filenames
...
llvm-svn: 18987
2004-12-16 17:33:24 +00:00
Chris Lattner
2a02390beb
When tblgen changes, regenerate all .inc files, but do not rebuild any .o
...
files that USE the .inc file unless the contents of the .inc file changes.
This should fix the problem where reconfiguring causes all targets to be
completely rebuilt (because config.h is usually modified, causing libsystem
to be rebuilt, causing tblgen to be rebuilt, causing .inc files to be
rebuilt, causing .o files to be rebuilt).
This patch also checks in a gross hack where .o files now explicitly depend
on $(BUILT_SOURCES), to avoid problems where the .inc files are not completely
generated before the .o files start to compile.
llvm-svn: 18986
2004-12-16 17:28:50 +00:00
Chris Lattner
a38954dd64
Specify all of the targets built.
...
llvm-svn: 18985
2004-12-16 17:26:44 +00:00
Chris Lattner
03227509c0
Use the rules in Makefile.rules to build SparcV9GenCodeEmitter.inc instead
...
of custom rules.
llvm-svn: 18984
2004-12-16 16:47:56 +00:00
Chris Lattner
0bc3333ff4
Fix header
...
llvm-svn: 18983
2004-12-16 16:47:03 +00:00
Chris Lattner
0782e27d85
Factor out common .td file chunks.
...
llvm-svn: 18982
2004-12-16 16:31:57 +00:00
Reid Spencer
5581437308
Add a "make spotless" rule for environments with BUILD_OBJ_ROOT not equal
...
to BUILD_OBJ_SRC. This will save the config.status and mklib files, then
wipe out the BUILD_OBJ_ROOT, copy back config.status and mklib, and then
run config.status to regenerate the makefiles. This target gives you a
completely clean/fresh BUILD_OBJ_ROOT.
llvm-svn: 18981
2004-12-16 08:00:46 +00:00
Reid Spencer
aeea3cf764
Get rid of extraneous dependencies on $(BUILT_SOURCES) now that we've fixed
...
the bug with BUILT_SOURCES being dependencies of the user targets.
llvm-svn: 18980
2004-12-16 07:36:08 +00:00
Reid Spencer
97e40f1eb6
Fix a major bug with BUILT_SOURCES. You actually have to dereference a
...
variable before you can filter its value. Duh!
llvm-svn: 18979
2004-12-16 07:15:16 +00:00
Reid Spencer
3c90f0e3ed
Revert last patch which breaks PowerPC target because it fails to build
...
the 32bit and 64bit variants.
llvm-svn: 18978
2004-12-16 07:14:19 +00:00
Chris Lattner
56a874b0d6
Portability fix, thanks to Markus F.X.J. Oberhumer.
...
llvm-svn: 18977
2004-12-16 04:56:34 +00:00
Jeff Cohen
fc6ebc9cb7
Expository comment submitted by Henrik Bach
...
llvm-svn: 18976
2004-12-16 04:06:56 +00:00
Chris Lattner
b63ff380f1
Make %'s a bit more explicit
...
llvm-svn: 18975
2004-12-15 23:38:13 +00:00
Chris Lattner
298a7f8d8b
Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
...
llvm-svn: 18974
2004-12-15 23:13:15 +00:00
Reid Spencer
e56242780c
Change the signatures of the destroyFile and destroyDirectory methods to
...
const because they affect the file system, not the Path object.
llvm-svn: 18973
2004-12-15 23:02:10 +00:00
Reid Spencer
e13f84b186
Adjust documentation of GetBytecodeLibraryPaths after removing LLVMGCCDIR
...
support from it.
llvm-svn: 18972
2004-12-15 22:49:18 +00:00
Reid Spencer
0fb34f9c12
Remove LLVMGCCDIR.
...
llvm-svn: 18971
2004-12-15 22:28:35 +00:00
Reid Spencer
0f6abe6b90
Remove LLVMGCCDIR from the set of defines.
...
llvm-svn: 18970
2004-12-15 22:27:51 +00:00
Reid Spencer
35d15bdf52
Remove the CFE's lib directory from the bytecode path because LLVM should
...
be agnostic to the needs of any specific FE.
llvm-svn: 18969
2004-12-15 22:22:51 +00:00
Reid Spencer
879f11df3d
Remove automatic insertion of CFE's lib directory into the bytecode path
...
because LLVM should be agnostic to the needs of specific front ends.
llvm-svn: 18968
2004-12-15 22:21:42 +00:00
Reid Spencer
8240a916db
Unbreak all archive reading operations introduced by the last patch which
...
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.
llvm-svn: 18966
2004-12-15 21:58:03 +00:00
Chris Lattner
e340065558
Add a verifier assertion
...
llvm-svn: 18965
2004-12-15 20:23:49 +00:00
Chris Lattner
aefd5fa18a
Eliminate a virtual method call
...
llvm-svn: 18964
2004-12-15 18:14:04 +00:00
Chris Lattner
c0bd4b19b8
Make archive rules properly depend on llvm-ar.
...
llvm-svn: 18963
2004-12-15 17:14:06 +00:00
Chris Lattner
869d6a40a9
Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
...
llvm-svn: 18962
2004-12-15 17:13:24 +00:00
Reid Spencer
98ce23ffb0
Fix a file overwrite bug in llvm-ar introduced by changes to
...
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.
llvm-svn: 18961
2004-12-15 08:32:45 +00:00
Chris Lattner
5b489416c9
Disable libprofile as llvm-ar bus errors on it, and I don't want to break
...
the nightly testers.
llvm-svn: 18960
2004-12-15 08:15:48 +00:00
Chris Lattner
160a8a9725
Do not fail an assertion on a broken archive
...
llvm-svn: 18959
2004-12-15 07:44:15 +00:00
Chris Lattner
b17f3e13ec
Adjust to new interfaces
...
llvm-svn: 18958
2004-12-15 07:22:25 +00:00
Chris Lattner
71d04bce55
Adjust to new alias analysis interfaces
...
llvm-svn: 18957
2004-12-15 07:22:13 +00:00
Chris Lattner
fac211f5c4
Make the AliasAnalysis interface more precise for common cases.
...
llvm-svn: 18956
2004-12-15 07:21:39 +00:00
Chris Lattner
e09dbe2732
Move virtual method call out of loop
...
llvm-svn: 18955
2004-12-15 07:04:32 +00:00
Jeff Cohen
92e02d40cb
Make Win32 TimeValue::toString() re-entrant and work with mingw
...
llvm-svn: 18954
2004-12-15 04:28:44 +00:00
Jeff Cohen
e408341854
Fix VC++ compilation errors
...
llvm-svn: 18953
2004-12-15 04:08:15 +00:00
Reid Spencer
527ac0a1c7
Don't put newlines in AC macros that can't handle them!
...
llvm-svn: 18952
2004-12-15 04:01:48 +00:00
Reid Spencer
86960adfa3
Change LLVMGCCDIR/bytecode-libs -> LLVMGCCDIR/lib
...
llvm-svn: 18951
2004-12-15 01:54:37 +00:00
Reid Spencer
d8c5b71bd4
For PR351:
...
Remove #inclusion of Support/FileUtilities.h which isn't needed any more.
llvm-svn: 18950
2004-12-15 01:53:50 +00:00
Reid Spencer
30067f1eac
For PR351:
...
* Convert use of getUniqueFilename to sys::Path::makeUnique();
llvm-svn: 18949
2004-12-15 01:53:08 +00:00
Reid Spencer
9329172767
For PR351:
...
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()
llvm-svn: 18948
2004-12-15 01:51:56 +00:00
Reid Spencer
f66d93239e
For PR351:
...
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.
llvm-svn: 18947
2004-12-15 01:50:13 +00:00
Reid Spencer
320a20ac45
For PR351:
...
Remove getUniqueFilename and CopyFile. These are now implemented by
sys::Path::makeUnique and sys::CopyFile, respectively.
llvm-svn: 18946
2004-12-15 01:46:54 +00:00
Reid Spencer
1b916e1ced
Add some system specific functions we use
...
llvm-svn: 18945
2004-12-15 01:41:56 +00:00
Reid Spencer
360d6b71a3
Remove most references to LLVM_LIB_SEARCH_PATH. It now only exists in the
...
GettingStarted.html document in the environment section and only as an
optional feature.
llvm-svn: 18944
2004-12-15 00:14:01 +00:00
Reid Spencer
05d4d6026c
Fix the default install directory of modules from / to $(libdir) !
...
Many thanks to Vladimir Merzliakov for pointing this out!
llvm-svn: 18942
2004-12-14 22:44:05 +00:00
Chris Lattner
2617b5033b
Use user time, not wall time, for optimizer time.
...
llvm-svn: 18941
2004-12-14 22:42:59 +00:00
Reid Spencer
79e49cffb5
Correct documentation to reflect the change in location of the CFE runtime
...
libraries. They are now in $CFEINSTALL/lib not $CFEINSTALL/bytecode-lib.
llvm-svn: 18939
2004-12-14 22:07:29 +00:00
Chris Lattner
9ad0d55025
Constant exprs are not efficiently negatable in practice. This disables
...
turning X - (constantexpr) into X + (-constantexpr) among other things.
llvm-svn: 18935
2004-12-14 20:08:06 +00:00
Reid Spencer
c936ad1208
Add the getMagicNumber method.
...
Patch contributed by Henrik Bach. Thanks Henrik!
llvm-svn: 18933
2004-12-14 18:42:13 +00:00
Brian Gaeke
4bc39bef79
The mystery of Olden/tsp solved, and more opportunities for speedup.
...
llvm-svn: 18932
2004-12-14 09:10:10 +00:00
Brian Gaeke
36c14da84f
Get rid of shifts by zero in most cases.
...
llvm-svn: 18931
2004-12-14 08:21:02 +00:00
Jeff Cohen
2b60d39499
Implement Win32 Path::getStatusInfo(), TimeValue::toString()
...
llvm-svn: 18930
2004-12-14 05:26:43 +00:00
Reid Spencer
eedafda7bb
For PR351:
...
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense
llvm-svn: 18929
2004-12-14 04:20:08 +00:00
Reid Spencer
cdefe0aebc
For PR351:
...
Implement the new environment pointer for ExecuteAndWait
llvm-svn: 18928
2004-12-14 04:18:51 +00:00
Reid Spencer
c2e22fea42
For PR351:
...
* Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait
llvm-svn: 18927
2004-12-14 04:18:15 +00:00
Reid Spencer
a84c82f3bb
For PR351:
...
* Fix commentary, wrap lines, etc.
* Add an environment pointer to the ExecuteAndWait function.
llvm-svn: 18926
2004-12-14 04:17:12 +00:00
Reid Spencer
87ad666bb3
Revert the last patch as it causes a static destruction ordering problem.
...
llvm-svn: 18925
2004-12-14 03:55:21 +00:00
Reid Spencer
79dc8b79bb
For PR351:
...
Adjust to interface change for FindExecutable.
llvm-svn: 18920
2004-12-13 23:44:23 +00:00
Reid Spencer
d89ff0a5e1
For PR351:
...
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.
llvm-svn: 18919
2004-12-13 23:43:44 +00:00
Reid Spencer
dc49d865a1
For PR351:
...
* Remove isExecutable as its now implemented by sys::Path::executable
* Make FindExecutable a thin veneer over sys::Program::FindProgramByName.
llvm-svn: 18918
2004-12-13 23:41:37 +00:00
Reid Spencer
febc20eda1
For PR351:
...
* isExecutable -> sys::Path::executable()
* Adjust interface of FindExecutable to return a sys::Path
llvm-svn: 18917
2004-12-13 23:40:08 +00:00
Reid Spencer
b7c56070ca
For PR351:
...
llee was a nice hack, but it wasn't portable so its gone, with Misha's
approval. Operating systems have facilities available for making bytecode
directly executable without this utility.
llvm-svn: 18916
2004-12-13 23:15:32 +00:00
Chris Lattner
b3b1c279a2
When generating code for X86 targets, make sure the fp control word is set
...
to 64-bit precision, not 80 bits.
llvm-svn: 18915
2004-12-13 21:52:52 +00:00
Misha Brukman
318a44d867
Minor cleanups
...
llvm-svn: 18914
2004-12-13 21:42:16 +00:00
Brian Gaeke
f9639d2a74
Fix link error in PPC optimized build of 'opt'.
...
llvm-svn: 18913
2004-12-13 21:28:39 +00:00
Reid Spencer
e42f222d36
For PR351:
...
Remove AllocateRWXMemory as it is not used any more in LLVM. The function
has been replaced with sys::Memory::AllocateRWX several months ago.
llvm-svn: 18912
2004-12-13 20:14:30 +00:00
Chris Lattner
951e94e867
Add some notes
...
llvm-svn: 18911
2004-12-13 20:13:10 +00:00
Reid Spencer
6b8632850b
For PR351:
...
Remove the MakeFileReadable and MakeFileExecutable functions which are no
longer present in LLVM. They have been replaced with the sys::Path methods
makeReadable and makeExecutable, respectively.
llvm-svn: 18910
2004-12-13 20:08:14 +00:00
Reid Spencer
249eb144d9
For PR351:
...
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.
llvm-svn: 18909
2004-12-13 20:03:02 +00:00
Chris Lattner
8f430a3b59
Get rid of getSizeOf, using ConstantExpr::getSizeOf instead.
...
do not insert a prototype for malloc of: void* malloc(uint): on 64-bit u
targets this is not correct. Instead of prototype it as void *malloc(...),
and pass the correct intptr_t through the "...".
Finally, fix Regression/CodeGen/SparcV9/2004-12-13-MallocCrash.ll, by not
forming constantexpr casts from pointer to uint.
llvm-svn: 18908
2004-12-13 20:00:02 +00:00
Reid Spencer
94bf2265df
For PR351:
...
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.
llvm-svn: 18907
2004-12-13 19:59:50 +00:00
Chris Lattner
acc4e54552
Change this method to return ulong, not uint, for 64-bit targets.
...
llvm-svn: 18906
2004-12-13 19:48:51 +00:00
Chris Lattner
5417117a8f
New testcase that crashes the V9 backend.
...
llvm-svn: 18905
2004-12-13 19:10:32 +00:00
Reid Spencer
e05ab4a1ec
Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
...
available.
llvm-svn: 18904
2004-12-13 18:41:28 +00:00
Reid Spencer
73fc525557
For PR351:
...
The ReadFileIntoAddressSpace and UnmapFileFromAddressSpace functions are no
longer used by LLVM. Remove them. Replacement functionality for both
functions is now encapsulated in the sys::MappedFile class.
llvm-svn: 18903
2004-12-13 18:28:59 +00:00
Reid Spencer
cd89ca3040
For PR351:
...
Use sys::MappedFile instead of ReadFileIntoAddressSpace and
UnmapFileFromAddressSpace. sys::MappedFile has the nice property that it
cleans up after itself so exception handling can be removed.
llvm-svn: 18902
2004-12-13 18:25:27 +00:00
Alkis Evlogimenos
7c7705d108
Fix typo.
...
llvm-svn: 18901
2004-12-13 18:08:29 +00:00
Chris Lattner
2f65416429
Fix this test
...
llvm-svn: 18900
2004-12-13 17:53:11 +00:00
Alkis Evlogimenos
a20de02919
Add llvm tool variables.
...
llvm-svn: 18897
2004-12-13 17:44:14 +00:00
Reid Spencer
1a14e28ade
For PR351:
...
* Change use of ReadFileIntoAddressSpace to sys::MappedFile use.
* Shorten a line > 80 chars.
llvm-svn: 18896
2004-12-13 17:41:13 +00:00
Chris Lattner
c97cac3d32
Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
...
don't support long double anyway, and this gives us FP results closer to
other targets.
This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).
llvm-svn: 18895
2004-12-13 17:23:11 +00:00
Reid Spencer
0afe178f21
Make the loop termination condition clear when building the set of items to
...
pass to the Linker::LinkInItems function.
llvm-svn: 18894
2004-12-13 17:18:19 +00:00
Reid Spencer
f51f490b7b
For PR351: libLLVMSupport now depends on libLLVMSystem
...
llvm-svn: 18893
2004-12-13 17:02:08 +00:00
Reid Spencer
aa95684acd
For PR351: \
...
The getFileTimestamp and getFileSize functions have been removed from \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and \
Path::getSize,respectively.
llvm-svn: 18892
2004-12-13 17:01:53 +00:00
Reid Spencer
0b4a4bf96a
Added a size_type typedef to LLVM containers to make Visual Studio shut up
...
(and possibly to make LLVM more x86 64bit friendly).
llvm-svn: 18891
2004-12-13 16:28:53 +00:00
Reid Spencer
eb21d18b36
Add a convenience function for clearing the two global areas.
...
Patch contributed by Morten Ofsted.
llvm-svn: 18890
2004-12-13 16:22:32 +00:00
Reid Spencer
53bd3d0b1a
Get rid of some leaks found by VC leak detector.
...
Patch contributed by Morten Ofsted.
llvm-svn: 18889
2004-12-13 16:04:04 +00:00
Reid Spencer
a125162bb0
Minor syntactical change to make this a little easier to comprehend.
...
llvm-svn: 18888
2004-12-13 09:37:41 +00:00
Reid Spencer
ff17d0439d
Make use of the new Path inserter function.
...
llvm-svn: 18887
2004-12-13 08:53:36 +00:00
Reid Spencer
790100674a
Fix a bug where "." or any single character file name doesn't get the
...
terminating / when setDirectory is called.
llvm-svn: 18886
2004-12-13 07:51:52 +00:00
Reid Spencer
a85abc23d5
Remove an always false clause from an if statement.
...
llvm-svn: 18885
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
5b1a05fb7c
Fix a bug where directory names of length one or less where not set
...
properly (examples: "", ".", "a").
llvm-svn: 18883
2004-12-13 07:41:35 +00:00
Reid Spencer
c6de5b56a3
Use the new BYTECODE_DESTINATION to override the default bytecode install
...
destination for this library so that it goes to $(cferuntime_libdir) rather
than just $(libdir). Normal bytecode libraries should be installed in the
$(libdir), but these ones are "special" because they're part of the the
C/C++ front end.
llvm-svn: 18882
2004-12-13 07:40:50 +00:00
Reid Spencer
5ae8c5e5d6
More properly name bytecode_libdir cferuntime_libdir. This is only the
...
libdir for the CFE runtime libraries, not "all bytecode".
llvm-svn: 18881
2004-12-13 07:38:55 +00:00
Reid Spencer
efe3a82813
Finish the implementation of the BYTECODE_DESTINATION feature for modules
...
too and getting rid of the last remnants of bytecode_libdir.
llvm-svn: 18880
2004-12-13 07:38:07 +00:00
Reid Spencer
65086be55f
Implement a new feature, BYTECODE_DESTINATION, to allow a user makefile to
...
specify where the bytecode library is to be installed. This allows the
default location ($prefix/lib) to be overridden, for special case runtime
libraries like the cfe runtime libs.
llvm-svn: 18879
2004-12-13 07:28:21 +00:00
Reid Spencer
0230a5eead
* Add a std::ostream inserter for sys::Path
...
* Correct the std::string constructor to take a const reference.
llvm-svn: 18877
2004-12-13 06:57:15 +00:00
Jeff Cohen
ccd99b9b61
Fix recent breakage of win32 build
...
llvm-svn: 18876
2004-12-13 06:26:35 +00:00
Reid Spencer
85d55ad803
Make sure the archive doesn't have to exist before we remove it.
...
llvm-svn: 18873
2004-12-13 03:59:35 +00:00
Reid Spencer
72bf78d9f5
Always remove bytecode archives so that path mismatches don't cause the
...
contents to not be updated.
llvm-svn: 18872
2004-12-13 03:56:42 +00:00
Reid Spencer
92e97620be
* Fix header block.
...
* Fix loop style per standards
* Don't create a new Module when the Linker's module is released.
* Add/fix function comments.
llvm-svn: 18871
2004-12-13 03:50:50 +00:00
Reid Spencer
bf63444a41
Add missing space in a comment.
...
llvm-svn: 18870
2004-12-13 03:23:13 +00:00
Reid Spencer
ac9fe82875
Make sure the Archive gets deleted if there's an error.
...
llvm-svn: 18869
2004-12-13 03:22:31 +00:00
Reid Spencer
22b7eac855
Remove commented out functions that have been replaced with lib/System
...
functionality.
llvm-svn: 18868
2004-12-13 03:15:47 +00:00
Reid Spencer
0005214558
Fix header and function comments.
...
llvm-svn: 18867
2004-12-13 03:13:18 +00:00
Reid Spencer
0a0d582719
Implement new functions per new interface
...
llvm-svn: 18866
2004-12-13 03:03:42 +00:00
Reid Spencer
17e7444a61
PR351: \
...
Use sys::Path not FileUtilities to check file types
llvm-svn: 18865
2004-12-13 03:01:26 +00:00
Reid Spencer
8d206908d8
Convert to use new Linker class interface
...
llvm-svn: 18864
2004-12-13 03:01:14 +00:00
Reid Spencer
0ebb926c0a
LinkModules is now in the Linker class
...
llvm-svn: 18863
2004-12-13 03:01:03 +00:00
Reid Spencer
9b155dc4c0
For PR351: \
...
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
GetSystemLibraryPath1 and GetSystemLibraryPath2 methods
llvm-svn: 18862
2004-12-13 03:00:51 +00:00
Reid Spencer
66b8182866
For PR351: \
...
* Move generic isArchive method here from Unix/Path.cpp \
* Implement isDynamicLibrary \
* Implement FindLibrary for Linker
llvm-svn: 18861
2004-12-13 03:00:39 +00:00
Reid Spencer
4a23d3f8e5
This file contains basic Linker facilities needed by all tools
...
llvm-svn: 18860
2004-12-13 03:00:28 +00:00
Reid Spencer
c4e3153455
Make LinkModules a static member function
...
llvm-svn: 18859
2004-12-13 03:00:16 +00:00
Reid Spencer
9a5613962f
This file contains only the Linker's library linking support
...
llvm-svn: 18858
2004-12-13 03:00:04 +00:00
Reid Spencer
ebd3d9f8fc
For PR351: \
...
* Remove redundant static function LinkOneLibrary. \
* Remove unneded #includes \
* Convert FileSupport usage to sys::Path instead
llvm-svn: 18857
2004-12-13 02:59:52 +00:00
Reid Spencer
9ce11c3929
This file contains only the Linker's file linking support
...
llvm-svn: 18856
2004-12-13 02:59:41 +00:00
Reid Spencer
fe73bfcfdb
For PR351: \
...
* Convert functions to Linker:: methods. \
* Remove unneeded #includes \
* Utilize sys::Path utilities not FileSupport utilities \
* Move File & Library linking functions to other source files
llvm-svn: 18855
2004-12-13 02:59:29 +00:00
Reid Spencer
3aa1f3ca4f
For PR351: \
...
* Get file information from a MappedFile instance \
* Convert file type tests to sys::Path form
llvm-svn: 18854
2004-12-13 02:59:15 +00:00
Reid Spencer
a204547e32
Implement error handling in OpenAndLoad* functions so the Linker can handle it.
...
llvm-svn: 18853
2004-12-13 02:59:03 +00:00
Reid Spencer
35f16dd40b
Make the size() method const
...
llvm-svn: 18852
2004-12-13 02:58:51 +00:00
Reid Spencer
15681d988e
For PR351:\
...
* Modify file reading to use sys::MappedFile \
* Use sys::Path instead of std::string
llvm-svn: 18851
2004-12-13 02:58:40 +00:00
Reid Spencer
75bf03389f
Add LLVMGCCDIR for path lookup
...
llvm-svn: 18850
2004-12-13 02:58:28 +00:00
Reid Spencer
1caba396c4
Make the OpenAndLoad functions have an ErrorMessage argument.
...
llvm-svn: 18849
2004-12-13 02:58:16 +00:00
Reid Spencer
2ba6854903
Completely rewrite the interface to be class based
...
llvm-svn: 18848
2004-12-13 02:58:05 +00:00
Reid Spencer
35105469c5
For PR351:\
...
* Consolidate path retrieval into just two methods. \
* Add FindLibrary as a convenience function. \
* Add isDynamicLibrary for testing for dynamic libs. \
* Make toString constant and reference clean.
llvm-svn: 18847
2004-12-13 02:57:53 +00:00
Reid Spencer
21d9ef9e82
For PR351:Remove the file type checking methods (now in sys::Path)
...
llvm-svn: 18846
2004-12-13 02:57:41 +00:00
Reid Spencer
ec8bc9157d
Get LLVMGCCDIR into the #defines
...
llvm-svn: 18845
2004-12-13 02:16:51 +00:00
Brian Gaeke
cf2c1866cb
Add V8 SPEC status.
...
llvm-svn: 18844
2004-12-13 00:27:35 +00:00
Chris Lattner
a199e3c1e2
Change indentation of a whole bunch of code, no real changes here.
...
llvm-svn: 18843
2004-12-12 23:49:37 +00:00
Chris Lattner
14d07db44d
More substantial simplifications and speedups. This makes ADCE about 20% faster
...
in some cases.
llvm-svn: 18842
2004-12-12 23:40:17 +00:00
Chris Lattner
9115eb3024
More minor microoptimizations
...
llvm-svn: 18841
2004-12-12 22:44:30 +00:00
Chris Lattner
d4298781c1
Remove some more set operations
...
llvm-svn: 18840
2004-12-12 22:22:18 +00:00
Chris Lattner
a538439bf0
Reduce number of set operations.
...
llvm-svn: 18839
2004-12-12 22:16:13 +00:00
Chris Lattner
bf5b7cf638
Optimize div/rem + select combinations more.
...
In particular, implement div.ll:test10 and rem.ll:test4.
llvm-svn: 18838
2004-12-12 21:48:58 +00:00
Chris Lattner
9803a0a575
Add testcases for simple things we can handle that occur now in vortex.
...
llvm-svn: 18837
2004-12-12 21:40:22 +00:00
Chris Lattner
360cda5ffd
Dejagnu doesn't work if you do TESTSUITE=.../
...
You can't pass the trailing / into Dejagnu, so make the makefile strip it off
llvm-svn: 18836
2004-12-12 21:39:49 +00:00
Chris Lattner
cbd47631ea
Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
...
when compiled with debug information.
llvm-svn: 18835
2004-12-12 20:36:19 +00:00
Chris Lattner
a0dffecfbc
New testcase that the PPC backend miscompiles. It is emitting
...
.comm _X,0
For X, which makes the linker thing that X is never defined.
llvm-svn: 18834
2004-12-12 20:34:06 +00:00
Chris Lattner
10b637eade
CSE calls to getTypeSize.
...
llvm-svn: 18833
2004-12-12 20:31:00 +00:00
Chris Lattner
745196a5fc
Properly implement copying of a global, fixing the 255.vortex & povray
...
failures from last night.
llvm-svn: 18832
2004-12-12 19:34:41 +00:00
Chris Lattner
88deefa303
Simplify code and do not invalidate iterators.
...
This fixes a crash compiling TimberWolfMC that was exposed due to recent
optimizer changes.
llvm-svn: 18831
2004-12-12 18:23:20 +00:00
Chris Lattner
17550c456c
Use the target triple to pick this target.
...
llvm-svn: 18830
2004-12-12 17:40:28 +00:00
Chris Lattner
1adea147ba
Get rid of subbullets for all of the "known problems" section. None of the
...
other sections have subbullets, and it make the TOC look like the whole
document is known problems!
llvm-svn: 18829
2004-12-12 17:20:23 +00:00
Brian Gaeke
23b2bc54b0
Complete the list of MultiSource failures.
...
llvm-svn: 18826
2004-12-12 08:22:11 +00:00
Chris Lattner
b92fd6006c
Do not internalize a module if -link-as-library is passed.
...
llvm-svn: 18825
2004-12-12 07:53:51 +00:00
Brian Gaeke
ed9346820d
hbd should be working now.
...
llvm-svn: 18824
2004-12-12 07:42:59 +00:00
Brian Gaeke
27358a44d1
Finally enable the setcc-branch folding code.
...
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.
llvm-svn: 18823
2004-12-12 07:42:58 +00:00
Brian Gaeke
e5351ad5f0
Add (currently disabled) code for canFoldSetCC
...
llvm-svn: 18820
2004-12-12 06:22:30 +00:00
Chris Lattner
1cbd5be7a1
Though the previous xform applies to literally dozens (hundreds?) of variables
...
in SPEC, the subsequent optimziations that we are after don't play with
with FP values, so disable this xform for them. Really we just don't want
stuff like:
double G; (always 0 or 412312.312)
= G;
turning into:
bool G_b;
= G_b ? 412312.312 : 0;
We'd rather just do the load.
-Chris
llvm-svn: 18819
2004-12-12 06:03:06 +00:00
Brian Gaeke
aa40b7d080
Add stubs for setcc-branch folding support.
...
llvm-svn: 18818
2004-12-12 06:01:26 +00:00
Chris Lattner
40e4cec9ee
If a variable can only hold two values, and is not already a bool, shrink it
...
down to actually BE a bool. This allows simple value range propagation
stuff work harder, deleting comparisons in bzip2 in some hot loops.
This implements GlobalOpt/integer-bool.ll, which is the essence of the
loop condition distilled into a testcase.
llvm-svn: 18817
2004-12-12 05:53:50 +00:00
Chris Lattner
17fbc80f31
New testcase. Shrinking the variable to a bool allows instcombine to delete
...
the condition.
llvm-svn: 18816
2004-12-12 05:52:12 +00:00
Chris Lattner
cbc0161d1f
If one side of and/or is known to be 0/-1, it doesn't matter
...
if the other side is overdefined.
This allows us to fold conditions like: if (X < Y || Y > Z) in some cases.
llvm-svn: 18807
2004-12-11 23:15:19 +00:00
Chris Lattner
2c14b32e2b
New testcase. If one side of and/or is known to be 0/-1, it doesn't matter
...
if the other side is overdefined.
llvm-svn: 18806
2004-12-11 23:14:40 +00:00
Brian Gaeke
25ac83565e
Print llvm code one function at a time.
...
llvm-svn: 18805
2004-12-11 22:17:07 +00:00
Chris Lattner
8d0b1b2a82
Check in the file I forgot last night, to solve all of the crashes in every
...
test in the suite. :(
llvm-svn: 18804
2004-12-11 22:10:29 +00:00
Brian Gaeke
72daaa46eb
JIT should print LLVM each function before selecting instructions for it.
...
llvm-svn: 18803
2004-12-11 18:41:09 +00:00
Reid Spencer
5625dec232
Rename Path::get -> Path::toString
...
llvm-svn: 18802
2004-12-11 17:37:01 +00:00
Chris Lattner
cc6037f8e6
Update test
...
llvm-svn: 18801
2004-12-11 17:13:19 +00:00
Chris Lattner
263b0a1669
Only cound if we actually made a change.
...
llvm-svn: 18800
2004-12-11 17:00:14 +00:00
Chris Lattner
ffefea0772
The split bb is really the exit of the old function
...
llvm-svn: 18799
2004-12-11 16:59:54 +00:00
Reid Spencer
8f72ce0fd2
A little cleanup on this file.
...
llvm-svn: 18798
2004-12-11 07:16:54 +00:00
Chris Lattner
7bf2e54dc2
New feature
...
llvm-svn: 18797
2004-12-11 06:10:52 +00:00
Chris Lattner
2f687fd9d6
Two bug fixes:
...
1. Actually increment the Statistic for the GV elim optzn
2. When resolving undef branches, only resolve branches in executable blocks,
avoiding marking a bunch of completely dead blocks live. This has a big
impact on the quality of the generated code.
With this patch, we positively rip up vortex, compiling Ut_MoveBytes to a
single memcpy call. In vortex we get this:
12 ipsccp - Number of globals found to be constant
986 ipsccp - Number of arguments constant propagated
1378 ipsccp - Number of basic blocks unreachable
8919 ipsccp - Number of instructions removed
llvm-svn: 18796
2004-12-11 06:05:53 +00:00
Chris Lattner
8525ebe465
Do not delete the entry block to a function.
...
llvm-svn: 18795
2004-12-11 05:32:19 +00:00
Brian Gaeke
b3095dd88f
Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
...
ctor parameters can be defaulted.
Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.
llvm-svn: 18794
2004-12-11 05:19:04 +00:00
Brian Gaeke
ba5e9f107c
Look for many more moves to fold (previously, we only
...
*or g0, x add g0, x recognized * as a move)
or x, g0 add x, g0
or 0, x add 0, x
or x, 0 add x, 0
llvm-svn: 18793
2004-12-11 05:19:03 +00:00
Brian Gaeke
52a9ed63b5
Make GEPs not suck so much:
...
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.
Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).
llvm-svn: 18792
2004-12-11 05:19:02 +00:00
Brian Gaeke
cba3135ba8
Update lists of failing benchmarks, including info on which
...
ones are failing in cbe.
llvm-svn: 18791
2004-12-11 05:19:01 +00:00
Chris Lattner
91dbae6fee
Implement Transforms/SCCP/ipsccp-gvar.ll, by tracking values stored to
...
non-address-taken global variables.
llvm-svn: 18790
2004-12-11 05:15:59 +00:00
Chris Lattner
01bd4624c4
New testcase that ipsccp should handle.
...
llvm-svn: 18789
2004-12-11 05:14:55 +00:00
Reid Spencer
a179968c4e
Fix some minor spellos and grammaros.
...
llvm-svn: 18788
2004-12-11 05:12:57 +00:00
Reid Spencer
d58e09a275
Revert the last patch. We really do need SimplyCFG.
...
llvm-svn: 18787
2004-12-11 03:03:54 +00:00
Chris Lattner
99e1295645
Fix a bug where we could delete dead invoke instructions with uses.
...
In functions where we fully constant prop the return value, replace all
ret instructions with 'ret undef'.
llvm-svn: 18786
2004-12-11 02:53:57 +00:00
Reid Spencer
5ccfd5a48b
Path::get -> Path::toString
...
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Reid Spencer
eef4420578
Remove this pass as its no longer needed.
...
llvm-svn: 18783
2004-12-10 22:55:35 +00:00
Chris Lattner
dea2bde08f
This pass is no longer needed.
...
llvm-svn: 18782
2004-12-10 22:30:32 +00:00
Chris Lattner
bae4b64553
Implement SCCP/ipsccp-conditional.ll, by totally deleting dead blocks.
...
llvm-svn: 18781
2004-12-10 22:29:08 +00:00
Chris Lattner
f92cc45975
New testcase
...
llvm-svn: 18780
2004-12-10 22:28:49 +00:00
Reid Spencer
2da81ceb3d
Get rid of warning from flex.
...
llvm-svn: 18779
2004-12-10 21:59:47 +00:00
Chris Lattner
7285f43836
Fix SCCP/2004-12-10-UndefBranchBug.ll
...
llvm-svn: 18776
2004-12-10 20:41:50 +00:00
Chris Lattner
45c6251140
Add missing accessor.
...
llvm-svn: 18775
2004-12-10 20:35:47 +00:00
Chris Lattner
b7f5916e01
Make sure to link the target-triple as well, so it ends up in the .llvm.bc file
...
llvm-svn: 18774
2004-12-10 20:26:15 +00:00
Chris Lattner
9e8141fb3e
New testcase that SCCP miscompiles. Luckily this is extremely unlikely to
...
happen in practice, but IP-SCCP can trigger it.
llvm-svn: 18773
2004-12-10 20:10:23 +00:00
Reid Spencer
993b95e796
Fix output for Flexing to not print full path of source.
...
llvm-svn: 18769
2004-12-10 19:44:16 +00:00
Chris Lattner
f13b7ee8aa
Check in the right test
...
llvm-svn: 18767
2004-12-10 17:43:43 +00:00
Chris Lattner
4fc998da2e
Fix Regression/Transforms/SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll,
...
and the failure on make_dparser last night.
llvm-svn: 18766
2004-12-10 17:42:31 +00:00
Chris Lattner
88bd77c73d
New testcase for a bug exposed by the ipsccp pass, causing dparser to fail
...
last night.
llvm-svn: 18765
2004-12-10 17:41:43 +00:00
Chris Lattner
7c0241ce9b
Fix typo
...
llvm-svn: 18764
2004-12-10 16:27:34 +00:00
John Criswell
dfe6a86b0b
Merged in RELEASE_14 changes.
...
llvm-svn: 18763
2004-12-10 15:51:16 +00:00
Brian Gaeke
2e2f3e26ba
Move -lowerselect later in the chain; some select instructions were
...
slipping through into the instruction selector, which can't deal with
them yet.
llvm-svn: 18758
2004-12-10 08:39:30 +00:00
Brian Gaeke
2ccff7c256
Add the rest of the multiply instructions.
...
llvm-svn: 18757
2004-12-10 08:39:29 +00:00
Brian Gaeke
4bfd3f7c98
Support binary operations with immediates for <= cInt.
...
llvm-svn: 18756
2004-12-10 08:39:28 +00:00
Brian Gaeke
428037be05
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
4a03a2d433
Turn on ipsccp by default instead of simple IPCP
...
llvm-svn: 18753
2004-12-10 08:03:43 +00:00
Chris Lattner
b439464c61
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
Chris Lattner
3b33c7a3c6
New prototype
...
llvm-svn: 18751
2004-12-10 07:55:01 +00:00
Chris Lattner
c2965a6d0e
New testcase
...
llvm-svn: 18750
2004-12-10 07:54:51 +00:00
Brian Gaeke
81c7fd2fce
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Alkis Evlogimenos
991d6ad208
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
a93b4520a7
Do not allow empty label names.
...
llvm-svn: 18743
2004-12-10 05:40:19 +00:00
Alkis Evlogimenos
5b9754bd48
Update testcase
...
llvm-svn: 18742
2004-12-10 05:39:57 +00:00
Chris Lattner
fcec9d6dec
Implement test/Feature/escaped_label.ll
...
llvm-svn: 18741
2004-12-10 05:27:29 +00:00
Chris Lattner
dfabbb29f2
Simple testcase for quoted label.
...
llvm-svn: 18740
2004-12-10 05:27:14 +00:00
Brian Gaeke
af10b76b6c
Link V8 backend into llc.
...
llvm-svn: 18739
2004-12-10 05:04:13 +00:00
Brian Gaeke
836727ea84
Add SparcV8 target back into the build
...
llvm-svn: 18738
2004-12-10 04:54:21 +00:00
Brian Gaeke
1d0fe16906
Adjust paths: Sparc/V8 --> SparcV8
...
llvm-svn: 18737
2004-12-10 04:48:57 +00:00
Brian Gaeke
a14476c9bf
Make this file self-contained.
...
llvm-svn: 18736
2004-12-10 04:46:30 +00:00
Brian Gaeke
cb3b98586d
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
5183f22a64
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
Misha Brukman
61cf9c8811
Missed moving bugpoint link over to CommandGuide/html/
...
llvm-svn: 18732
2004-12-09 23:28:09 +00:00
Misha Brukman
4f1f92e323
Generated HTML documentation is now back in CommandGuide/html/
...
llvm-svn: 18731
2004-12-09 23:25:59 +00:00
Chris Lattner
f3a7c24617
Rip out the guts of this document to prepare it for LLVM 1.5 progress
...
llvm-svn: 18726
2004-12-09 22:22:58 +00:00
Chris Lattner
0793bfc457
Clean up this man page
...
llvm-svn: 18724
2004-12-09 21:16:40 +00:00
Chris Lattner
6e8183063f
Add new pseudo target
...
llvm-svn: 18723
2004-12-09 21:06:32 +00:00
Misha Brukman
32f139a169
The textual description is gone from this manpage, only the options and a quick
...
summary remain. The manpage references Bugpoint.html as the repository for more
detailed info.
llvm-svn: 18722
2004-12-09 20:28:42 +00:00
Misha Brukman
cda6a9b9eb
* Straighten a comment to a single line
...
* Block off the section correctly with <!-- ***** -->
llvm-svn: 18721
2004-12-09 20:27:37 +00:00
Misha Brukman
f4315374aa
We now have a real Bugpoint doc, not just a huge man page.
...
llvm-svn: 18720
2004-12-09 20:26:53 +00:00
Misha Brukman
a078d57848
Convert from being a copy of the man page to a full-fledged document.
...
This doc keeps all the descriptive info from the man page, but not the options.
llvm-svn: 18719
2004-12-09 20:26:20 +00:00
Brian Gaeke
34f7c3d37a
We're continuing to make progress on MultiSource.
...
llvm-svn: 18714
2004-12-09 18:54:31 +00:00
Brian Gaeke
847c05deef
Bytes and shorts are aligned differently from words.
...
llvm-svn: 18713
2004-12-09 18:51:02 +00:00
Brian Gaeke
bac69b7df9
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
Reid Spencer
641f5c9878
More grammaro's fixed.
...
llvm-svn: 18708
2004-12-09 18:13:12 +00:00
Reid Spencer
8f08d805d4
Clean up some grammaro's.
...
llvm-svn: 18705
2004-12-09 18:02:53 +00:00
Reid Spencer
098fce4727
Correct the version numbers for automake, Perl, and CVS.
...
llvm-svn: 18703
2004-12-09 17:55:37 +00:00
Chris Lattner
74d3f82b6e
Fully document the LLVM constants. This should go into LLVM 1.4
...
llvm-svn: 18701
2004-12-09 17:30:23 +00:00
Chris Lattner
d79749a110
Reflow and clean up some of the HTML in the initial section, split linkage
...
types into its own section.
llvm-svn: 18697
2004-12-09 16:36:40 +00:00
Chris Lattner
6af02f3961
Move the "High Level Structure" to before "Type System"
...
llvm-svn: 18695
2004-12-09 16:11:40 +00:00
Reid Spencer
09e39d17d1
More QMTest cruft gone!
...
llvm-svn: 18694
2004-12-09 07:43:06 +00:00
Chris Lattner
36d39cecb4
note to self: Do not check in debugging code!
...
llvm-svn: 18693
2004-12-09 07:15:52 +00:00
Chris Lattner
f17a2fb849
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
6225146f20
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
07a900f0b7
Fix residual Visual Studio build problems
...
llvm-svn: 18688
2004-12-09 05:51:11 +00:00
Test Commit
ecf3c41054
Test commit
...
llvm-svn: 18687
2004-12-09 05:46:48 +00:00
Chris Lattner
2cdf54c0f0
Remove #include inadvertently added
...
llvm-svn: 18686
2004-12-09 04:53:17 +00:00
Chris Lattner
e44907012a
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
346ee4c9fb
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
39c98bb31c
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
b1ff6d7921
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
Chris Lattner
8665367885
new testcase
...
llvm-svn: 18675
2004-12-08 23:41:16 +00:00
Alkis Evlogimenos
a1291a0679
Fix this regression and remove the XFAIL from this test.
...
llvm-svn: 18674
2004-12-08 23:10:30 +00:00
Reid Spencer
ca06c8e851
Remove last remnants of Python/QMTest support
...
llvm-svn: 18672
2004-12-08 23:07:27 +00:00
Reid Spencer
4e197480e1
Implement the LLVM_DO_NOT_BUILD feature. If a file of that name is
...
present in a directory that LLVM normally builds, it will skip building
the directory entirely. This is useful for allowing a bunch of projects to
live in the source tree but not be compiled from time to time.
llvm-svn: 18671
2004-12-08 22:58:34 +00:00
Chris Lattner
8f30caf549
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
...
llvm-svn: 18670
2004-12-08 22:20:34 +00:00
Chris Lattner
ace35e9be6
This testcase causes the instruction combiner to go spiraling into
...
an infinite loop.
llvm-svn: 18669
2004-12-08 22:18:35 +00:00
Chris Lattner
f14c40dc57
Move method out of line
...
llvm-svn: 18666
2004-12-08 21:04:10 +00:00
Chris Lattner
5a0680245f
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
8351112192
Properly extern this.
...
llvm-svn: 18664
2004-12-08 21:00:59 +00:00
Chris Lattner
3e4445cd03
Define the pointer hash struct before the string one, to improve compatibility
...
with ICC. Patch contributed by Bjørn Wennberg.
llvm-svn: 18663
2004-12-08 20:59:18 +00:00
John Criswell
6430772035
The noreturn GCC extension is now supported.
...
Fixed some minor typos.
llvm-svn: 18658
2004-12-08 20:35:47 +00:00
Chris Lattner
630729c97e
Turn this error back into a warning, fixing the povray regression
...
llvm-svn: 18655
2004-12-08 20:01:10 +00:00
Chris Lattner
292e6602ac
Test commit
...
llvm-svn: 18654
2004-12-08 19:05:44 +00:00
Reid Spencer
0601d01f43
Build the man and ps versions of the command guide as well when
...
BUILD_FOR_WEBSITE is set.
llvm-svn: 18653
2004-12-08 19:01:01 +00:00
Chris Lattner
923737fcff
ignore generated file
...
llvm-svn: 18652
2004-12-08 19:00:45 +00:00
Alkis Evlogimenos
84d060ae7a
Mark this as an XFAIL until a fix is worked out.
...
llvm-svn: 18651
2004-12-08 18:43:39 +00:00
Tanya Lattner
0e6622157a
Fixed broken link to Bruce Eckle's book.
...
llvm-svn: 18650
2004-12-08 18:34:56 +00:00
Tanya Lattner
7591b82df6
Fixed a broken link to gcc manual.
...
llvm-svn: 18649
2004-12-08 18:29:38 +00:00
Tanya Lattner
6337134822
Fixed broken link.
...
llvm-svn: 18648
2004-12-08 18:25:34 +00:00
Tanya Lattner
9d2df71d38
Fixed broken links.
...
llvm-svn: 18647
2004-12-08 18:13:51 +00:00
John Criswell
945f80273f
Mention in the exposition that lli can JIT on PowerPC now.
...
llvm-svn: 18646
2004-12-08 18:04:14 +00:00
John Criswell
ba739a8e56
We don't have python test classes anymore.
...
llvm-svn: 18645
2004-12-08 18:01:27 +00:00
Reid Spencer
92815e5483
Add llvm-ld tool
...
Note that both llvmc and llvm-ld are experimental in 1.4
llvm-svn: 18644
2004-12-08 18:00:30 +00:00
John Criswell
6ab273c032
Minor fixups.
...
llvm-svn: 18643
2004-12-08 17:53:54 +00:00
Tanya Lattner
d8697049e3
Fixed typo in Dejagnu section.
...
llvm-svn: 18642
2004-12-08 17:37:21 +00:00
Tanya Lattner
9a1b8935d6
Removed QMTest reference.
...
llvm-svn: 18641
2004-12-08 17:35:31 +00:00
Tanya Lattner
e6ebbd70ca
Removed QMTest reference.
...
llvm-svn: 18640
2004-12-08 17:25:46 +00:00
Tanya Lattner
c31724bfe2
Removed QMTest referrences. Updated ordering of notes.
...
llvm-svn: 18639
2004-12-08 17:12:52 +00:00
John Criswell
33e0f06258
Fix spell'os.
...
llvm-svn: 18638
2004-12-08 16:55:27 +00:00
Reid Spencer
cce6755360
Move documentation for various configuration options applicabe only to the
...
llvm-test directory into this document from GettingStarted.html.
llvm-svn: 18637
2004-12-08 16:52:51 +00:00
Reid Spencer
dfcf790d28
Various 1.4ish corrections and additions.
...
llvm-svn: 18636
2004-12-08 16:51:31 +00:00
John Criswell
c8808f57dc
Update the version numbers of the pre-built LLVM GCC frontends.
...
llvm-svn: 18635
2004-12-08 16:47:14 +00:00
John Criswell
241011e6b0
Fix llvmgcc to use the TestRunner substition mechanism.
...
llvm-svn: 18634
2004-12-08 16:41:34 +00:00
John Criswell
02fa673e6f
xfail this across all platforms.
...
llvm-svn: 18633
2004-12-08 16:31:06 +00:00
Reid Spencer
3991dce79e
* Change version numbers of tarballs from 1.3 to 1.4
...
* Add llvm-test-1.4.tar.gz as the tarball for the llvm-test module
* Highlight the tarball name a little.
llvm-svn: 18632
2004-12-08 16:25:25 +00:00
Chris Lattner
1c539a86c9
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
d349d4a49c
Work correctly with ICC, Patch contributed by Bjørn Wennberg
...
llvm-svn: 18630
2004-12-08 16:22:26 +00:00
Reid Spencer
5be4f0490f
Add descriptions of missing top level directories.
...
llvm-svn: 18629
2004-12-08 16:18:26 +00:00
Chris Lattner
4270bcbab7
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
674ce86cd0
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
6ef473f53c
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
407000c497
Remove unneeded class qualifier, contributed by Bjørn Wennberg
...
llvm-svn: 18625
2004-12-08 16:05:02 +00:00
Alkis Evlogimenos
148215f758
Add regression
...
llvm-svn: 18624
2004-12-08 07:25:10 +00:00
Reid Spencer
359df30f3d
When -link-as-library, add -l options to Module's deplibs
...
llvm-svn: 18617
2004-12-08 05:17:40 +00:00
Reid Spencer
8f59e90cef
Make an alternate version of this Makefile that can be used in an
...
unconfigured tree for rebuilding the html files from POD sources for the
website update on cvs commit.
llvm-svn: 18616
2004-12-08 04:43:40 +00:00
Reid Spencer
cd7d6cf6a6
Remove -Woverloaded-virtual usage that was committed by accident.
...
llvm-svn: 18615
2004-12-08 04:34:51 +00:00
Reid Spencer
cc52c2ce8a
Remove variables that are not used by any of the LLVM makefiles
...
llvm-svn: 18614
2004-12-08 04:26:23 +00:00
Reid Spencer
6838b3c245
Remove useless -L switch now that gccld -link-as-library bug is fixed.
...
llvm-svn: 18613
2004-12-08 04:22:47 +00:00
Alkis Evlogimenos
ca6a649c9d
Use getOperand() and remove getElementAt() function.
...
llvm-svn: 18612
2004-12-08 03:45:20 +00:00
Chris Lattner
db38fe94ae
Revert this disgusting hack, John has a much nicer solution
...
llvm-svn: 18611
2004-12-08 03:31:14 +00:00
Chris Lattner
79a993ea0d
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
Chris Lattner
040c3868b3
This test is xfail right now, to keep DJ clean, also mention the PR# in testcases.
...
llvm-svn: 18609
2004-12-08 02:25:32 +00:00
Reid Spencer
55684c3b26
* Eliminate redundancies
...
* Fix grammaro's
* HTML 4.01 Strict compliance
llvm-svn: 18604
2004-12-07 08:39:08 +00:00
Reid Spencer
9273d480ad
For PR387:\
...
Add doInitialization method to avoid overloaded virtuals
llvm-svn: 18602
2004-12-07 08:11:36 +00:00
Reid Spencer
5c132bc3af
For PR387:\
...
Add getModRefInfo method to avoid overloaded virtuals
llvm-svn: 18601
2004-12-07 08:11:24 +00:00
Reid Spencer
c332610d52
For PR387:\
...
Add runPass methods to remove -Woverloaded-virtual warnings are not \
present and circumvent possible inheritance bugs.
llvm-svn: 18600
2004-12-07 08:11:11 +00:00
Chris Lattner
b5bb597405
Commit the cleanup of the LLVM 1.4 release notes. This should clearly go
...
into the release :)
llvm-svn: 18599
2004-12-07 08:04:13 +00:00
Reid Spencer
b95f8ab3ef
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
ae056bdd36
Provide a missing header file.
...
llvm-svn: 18597
2004-12-07 07:08:08 +00:00
Reid Spencer
744d95e8c7
Fix some comments.
...
llvm-svn: 18596
2004-12-07 07:06:47 +00:00
Alkis Evlogimenos
2b91842092
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
784a0dcbd0
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
9083936835
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
1c48c2deee
For PR387:
...
Make this compile without warning when -Woverloaded-virtual is used.
llvm-svn: 18588
2004-12-06 23:42:37 +00:00
Reid Spencer
2ea2100e9d
PR409 fixed.
...
llvm-svn: 18586
2004-12-06 22:32:33 +00:00
Reid Spencer
a8288d93ae
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
95044d0071
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
John Criswell
ff845b4f96
This test still fails on Darwin and Sparc/Solaris.
...
llvm-svn: 18583
2004-12-06 22:05:02 +00:00
Reid Spencer
10afebddcc
Test case for PR409:
...
Make sure that floating point constant values outside the range of a float
cannot be assigned to a constant.
llvm-svn: 18582
2004-12-06 21:57:59 +00:00
John Criswell
b2249635ae
Remove the last pieces of QMTest.
...
llvm-svn: 18581
2004-12-06 21:35:32 +00:00
Reid Spencer
46f5c4f214
Revert previous changes to remove -enable-linscan and the *BETA columns of
...
the nightly test. These are still needed for iterative linear scan testing.
llvm-svn: 18577
2004-12-06 20:14:45 +00:00
Reid Spencer
ecec7939bc
Rather than break all the nightly test invocations, permit -enable-linscan
...
option to be specified, but do nothing with it.
llvm-svn: 18575
2004-12-06 18:33:54 +00:00
Reid Spencer
1443c4f039
Remove LLC-BETA and linear scan options as they are no longer reported.
...
llvm-svn: 18574
2004-12-06 18:29:14 +00:00
Reid Spencer
ca1baad120
Change check to check-local per Makefile.rules changes.
...
llvm-svn: 18568
2004-12-06 05:35:38 +00:00
Reid Spencer
3f5ed7b1f7
Upgrade documentation to reflect Makefile.rules changes.
...
llvm-svn: 18567
2004-12-06 05:35:25 +00:00
Reid Spencer
8b5ebe561e
Add the check target so all projects can have this
...
functionality.
llvm-svn: 18566
2004-12-06 05:35:13 +00:00
Reid Spencer
876ae54f63
Remove the check target. Its now in Makefile.rules
...
llvm-svn: 18565
2004-12-06 05:35:00 +00:00
Tanya Lattner
4d69018fe9
Added DejaGNU information to the testing guide. This should go into the 1.4 release.
...
I left the QMTest stuff in place but made it appear to be optional.
llvm-svn: 18564
2004-12-06 02:11:52 +00:00
Reid Spencer
ffcf42329a
PR139 fixed.
...
llvm-svn: 18551
2004-12-05 20:19:45 +00:00
Alkis Evlogimenos
75a93f23b3
Add accessors for Constants in a ConstantStruct.
...
llvm-svn: 18550
2004-12-05 20:09:18 +00:00
Reid Spencer
ef96665753
Fix PR139:\
...
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles
llvm-svn: 18549
2004-12-05 19:15:29 +00:00
Reid Spencer
9f1cf33a54
Make use of the LLVMGCCStdCXXLibDir variable to link objects
...
llvm-svn: 18548
2004-12-05 19:15:06 +00:00
Reid Spencer
1014afc7ea
Fix PR139: \
...
Implement LinkItems and BuildLinkItems interfaces.
llvm-svn: 18547
2004-12-05 19:14:55 +00:00
Reid Spencer
a3df351820
Fix PR139: \
...
Add support for ordered linking with the LinkItems function
llvm-svn: 18546
2004-12-05 19:14:43 +00:00
Reid Spencer
e96b620570
Describe the MODULE_NAME control variable
...
llvm-svn: 18545
2004-12-05 19:14:31 +00:00
Reid Spencer
6d6503a9b3
Provide a variable to compute where the libstdc++.a is
...
llvm-svn: 18544
2004-12-05 19:14:19 +00:00
Chris Lattner
db332473fa
Suggest people run cvs up -P -d after checking out the tree so they don't
...
get empty directories
llvm-svn: 18543
2004-12-05 17:48:03 +00:00
Chris Lattner
a34f9da4b4
Properly implement a fix for PR475
...
llvm-svn: 18537
2004-12-05 07:19:16 +00:00
Chris Lattner
cc6d1928d2
Make this test actually capable of passing.
...
llvm-svn: 18536
2004-12-05 07:15:21 +00:00
Chris Lattner
1a0117f641
Revert this patch, it broke a ton of programs.
...
llvm-svn: 18535
2004-12-05 06:59:59 +00:00
Chris Lattner
f878f75d46
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
fa171f11b8
Change this test to not require execution of the program.
...
llvm-svn: 18533
2004-12-05 06:45:30 +00:00
Chris Lattner
97e36f211b
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
b392d30761
Add a new method
...
llvm-svn: 18531
2004-12-05 06:43:27 +00:00
Chris Lattner
0ba8f4e191
Fix typeo
...
llvm-svn: 18530
2004-12-05 06:33:15 +00:00
Chris Lattner
a6086ef48d
New testcase for the bug affecting 255.vortex in CBE mode.
...
llvm-svn: 18529
2004-12-05 06:18:35 +00:00
Reid Spencer
cceae4217f
Correct build script for stkr_runtime module
...
llvm-svn: 18526
2004-12-05 05:18:28 +00:00
Reid Spencer
d8d9fb325f
Build a module instead of a library so main() is not missed
...
llvm-svn: 18525
2004-12-05 05:18:16 +00:00
Reid Spencer
107f576732
Make a const method const
...
llvm-svn: 18524
2004-12-05 05:17:34 +00:00
Reid Spencer
d78077dd13
Add ability to make a single bytecode module from others
...
llvm-svn: 18523
2004-12-05 05:17:22 +00:00
Alkis Evlogimenos
7527cd53fa
Remove unneeded code
...
llvm-svn: 18516
2004-12-05 02:03:16 +00:00
Alkis Evlogimenos
8c5affedd1
Fix PR475.
...
llvm-svn: 18515
2004-12-05 01:51:20 +00:00
Alkis Evlogimenos
a90f19621b
Match codegen string better
...
llvm-svn: 18514
2004-12-05 01:50:32 +00:00
Alkis Evlogimenos
58355ab372
Add testcast for bug475
...
llvm-svn: 18513
2004-12-05 01:44:46 +00:00
Chris Lattner
d9791b0007
Darwin and solaris don't support echo -e. This should get the test passing
...
for them.
llvm-svn: 18511
2004-12-04 23:44:42 +00:00
Chris Lattner
59ed56e232
This fails due to the sun headers.
...
llvm-svn: 18510
2004-12-04 23:24:30 +00:00
Chris Lattner
02d5676936
This test passes on all platforms
...
llvm-svn: 18509
2004-12-04 23:21:41 +00:00
Chris Lattner
b5fd4a2f85
These tests pass on darwin now that the __ thing is fixed.
...
llvm-svn: 18508
2004-12-04 23:20:14 +00:00
Reid Spencer
20275c1d5d
Failing Feature/Regression test should fail the build
...
llvm-svn: 18507
2004-12-04 22:34:47 +00:00
Reid Spencer
895ad73daa
Use the FAKE_SOURCES feature for proper distribution of contents
...
llvm-svn: 18506
2004-12-04 22:34:33 +00:00
Reid Spencer
ca49210f65
Distribute headers and license files too
...
llvm-svn: 18505
2004-12-04 22:34:21 +00:00
Reid Spencer
81546587d5
Getting dist-check to work:\
...
* Implement the FAKE_SOURCES feature for GCCLibraries/crtend \
* Search for distribution files >first< in srcdir and >second< in objdir \
* Make dist-hook only run in top level directory. \
* Make dist-check run correctly in parallel builds \
* Wrap lines to 80 cols \
* Standardize variable names
llvm-svn: 18504
2004-12-04 22:34:09 +00:00
Reid Spencer
b16e4b7ca5
CVS directory elimination moved to Makefile.rules
...
llvm-svn: 18503
2004-12-04 22:33:58 +00:00
Reid Spencer
ef510c0279
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
Reid Spencer
5ae9a04e40
Print out something useful instead of a blank table when the external tests
...
are skipped by user option.
llvm-svn: 18501
2004-12-04 22:18:28 +00:00
Chris Lattner
8145bd5006
Check in some patches for better assertions
...
llvm-svn: 18500
2004-12-04 21:28:47 +00:00
Chris Lattner
a27dd47e7a
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
77e8f43c72
Move the dejagnu section to immediately before the 'trends' section.
...
llvm-svn: 18497
2004-12-04 20:18:21 +00:00
Chris Lattner
af045fa120
Remove last remnants of qmtest stuff
...
llvm-svn: 18496
2004-12-04 19:57:27 +00:00
Chris Lattner
5b87507304
Update the win32 project files, contributed by Morton Ofstad!
...
llvm-svn: 18495
2004-12-04 19:14:38 +00:00
Chris Lattner
a57c105687
Fix linkage of mismatched weak globals. This unbreaks 300.twolf
...
llvm-svn: 18494
2004-12-04 18:54:48 +00:00
Reid Spencer
9cb0f7097c
Use the install-bytecode target to install just the bytecode libs into
...
the CFE's install/bytecode-libs directory.
llvm-svn: 18493
2004-12-04 08:13:20 +00:00
Chris Lattner
144924cbaa
Clean feature also
...
llvm-svn: 18491
2004-12-04 06:47:07 +00:00
Tanya Lattner
03dfe165e1
Run dejagnu by default.
...
llvm-svn: 18490
2004-12-04 06:35:14 +00:00
Tanya Lattner
24726f9a5d
Removed QMTest functions. The nightly tester no longer runs qmtest. It now runs dejagnu by default and you must turn it off using -nodejagnu.
...
llvm-svn: 18489
2004-12-04 06:25:50 +00:00
Tanya Lattner
26a1367d8a
Made it default to check instead of check-dejagnu.
...
llvm-svn: 18488
2004-12-04 06:25:08 +00:00
Chris Lattner
8f97278c49
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
73a1914131
Fix compilation error on Darwin.
...
llvm-svn: 18485
2004-12-04 04:17:20 +00:00
Alkis Evlogimenos
be526cfba4
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
b92de19116
Make error msg reflect what exactly went wrong.
...
llvm-svn: 18478
2004-12-04 01:25:06 +00:00
Chris Lattner
5684f4817f
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
Misha Brukman
68ef9a9a4d
Use the standard PR### notation for referencing bugs in bugzilla
...
llvm-svn: 18476
2004-12-04 00:45:09 +00:00
Misha Brukman
47d186cf55
Remove more smileys. I kept the one in WritingAnLLVMPass because it is actually
...
funny.
llvm-svn: 18475
2004-12-04 00:33:34 +00:00
Misha Brukman
6d1686c18b
Documentation which contains smileys won't be taken seriously by some people.
...
llvm-svn: 18474
2004-12-04 00:32:12 +00:00
Chris Lattner
997153df35
Update for changes to check targets.
...
llvm-svn: 18473
2004-12-04 00:04:48 +00:00
Misha Brukman
8d9a83a908
* Link to the license file from release 1.3 (should we link to CVS version
...
instead?)
* Encapsulate code and header file names with <tt> and </tt>
* Arrange <p> and </p> tags to be inline with the text they contain
llvm-svn: 18472
2004-12-03 23:58:18 +00:00
Chris Lattner
e175aa5cc1
check is now a single colon rule. Also make it default to running dejagnu instead of qmtest
...
llvm-svn: 18471
2004-12-03 23:57:00 +00:00
Chris Lattner
1701409c9a
Remove all recursive check support from Makefile.rules
...
llvm-svn: 18470
2004-12-03 23:56:41 +00:00
Misha Brukman
9976d3486f
Remove extraneous space in link
...
llvm-svn: 18468
2004-12-03 23:26:23 +00:00
Chris Lattner
87a756f09f
Remove darwin specific majik
...
llvm-svn: 18467
2004-12-03 23:02:55 +00:00
Chris Lattner
4cf8b36469
Move darwin-specific majik here.
...
llvm-svn: 18466
2004-12-03 23:02:42 +00:00
Chris Lattner
fc61de3902
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
John Criswell
8e18e88392
Removed QMTests as I will be zapping them soon.
...
I've done some testing, and this seems to work, but if people who use
the nightly tester regularly could spot check these changes, I'd be
appreciative.
llvm-svn: 18464
2004-12-03 21:56:30 +00:00
Chris Lattner
661a714d2c
'make check' at the top level shouldn't recurse through the sourcedirs
...
llvm-svn: 18463
2004-12-03 21:05:57 +00:00
Reid Spencer
d4bd375d37
Resurrect the install-bytecode target for installing just the bytecode
...
libraries to the CFE.
llvm-svn: 18462
2004-12-03 20:08:48 +00:00
Chris Lattner
2434bb968c
Do not multiply define symbol
...
llvm-svn: 18461
2004-12-03 19:48:10 +00:00
Chris Lattner
b3d140deaa
Bug fixed
...
llvm-svn: 18460
2004-12-03 17:21:33 +00:00
Chris Lattner
26d9c22832
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
1cc226eba1
new testcase for PR472
...
llvm-svn: 18458
2004-12-03 17:18:42 +00:00
Chris Lattner
9019e5cfa0
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
John Criswell
ebaef2c0d9
Fixed typo.
...
llvm-svn: 18455
2004-12-03 15:59:26 +00:00
Chris Lattner
5a4dc8ca5a
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
608a6dae43
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
Reid Spencer
2b1b83a520
Pass -strip-debug to gccas when bytecode libraries are being built.
...
llvm-svn: 18452
2004-12-03 06:04:35 +00:00
Chris Lattner
0558e23872
Add -strip-debug option
...
remove the temporary -disable-dse option
llvm-svn: 18451
2004-12-03 05:45:58 +00:00
Tanya Lattner
c0d9dcdfac
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
9d76c236f7
Fix a regression caused by the previous patch
...
llvm-svn: 18449
2004-12-03 05:13:15 +00:00
John Criswell
f29f760354
These lookup symbols with leading underscores, which currently fails in
...
the PowerPC JIT.
Hence, they are XFAILs.
llvm-svn: 18443
2004-12-02 21:28:37 +00:00
Chris Lattner
99a7c3d26f
Adjust to change in pass name
...
llvm-svn: 18442
2004-12-02 21:27:35 +00:00
Chris Lattner
4913b65616
Recognize --strip-all as a synonym for -s.
...
Add -S and --strip-debug option support.
llvm-svn: 18441
2004-12-02 21:26:10 +00:00
Chris Lattner
e8ebcb3300
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
a4c9808603
This pass is moving to lib IPO
...
llvm-svn: 18439
2004-12-02 21:24:40 +00:00
Chris Lattner
4459cb260a
Move the strip pass from Scalar to IPO lib
...
llvm-svn: 18438
2004-12-02 21:24:19 +00:00
Chris Lattner
e3d98f1fd8
Quiet!
...
llvm-svn: 18437
2004-12-02 21:23:43 +00:00
Chris Lattner
7651614c4d
The stripping pass as we know it is about to disappear
...
llvm-svn: 18436
2004-12-02 21:05:01 +00:00
John Criswell
335c342440
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
420847f879
Add a note
...
llvm-svn: 18434
2004-12-02 18:21:45 +00:00
Chris Lattner
33660426a5
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
96b14e18bb
Consider 64-bit registers to be FP as well.
...
llvm-svn: 18432
2004-12-02 17:57:21 +00:00
Chris Lattner
fa83510f94
Document beta pass
...
llvm-svn: 18431
2004-12-02 17:20:17 +00:00
Reid Spencer
53c59689d1
Standardize the makefiles with space around = to match the rest of LLVM.
...
llvm-svn: 18429
2004-12-02 09:58:09 +00:00
Reid Spencer
f78508b25e
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
d6dcad7745
Standardize the format of the runtime libraries makefiles.
...
* Don't have lines longer than 80 cols
* Blank line after the header
* Reduce spaces in var definitions.
llvm-svn: 18427
2004-12-02 09:31:40 +00:00
Reid Spencer
dbaac1ff17
For PR466:
...
Much of what this Makefile did to make a libcrtend.a file is now supported
by Makefile.rules when BYTECODE_LIBRARY=1 is specified. So, we've
simplified the make rules for building this library.
llvm-svn: 18426
2004-12-02 09:29:49 +00:00
Reid Spencer
32f7e42744
For PR466:
...
Change construction of bytecode libraries from producing a single bytecode
file to producing a library containing bytecode files. This gets around the
problem of multiple symbol definitions in the linker if something like
-lc -lc is attempted on the command line. Previously this happened because
the linker would find libc.bc as a "library". It will now find libc.a which
it can simply search for missing symbols instead of linking in wholesale.
llvm-svn: 18425
2004-12-02 09:28:21 +00:00
Reid Spencer
59d89f598c
Remove this left-over crud from the automake experiment.
...
llvm-svn: 18424
2004-12-02 09:23:51 +00:00
Reid Spencer
295a3bbb18
Implement file replacement correctly even with the f (TruncateNames) flag
...
set. The member name comparison was failing for truncated names. This patch
fixes that. Truncated names are now properly replaced.
llvm-svn: 18423
2004-12-02 09:21:55 +00:00
Reid Spencer
f473185cbc
Fix seriously broken implementation of GetMagicNumber.
...
llvm-svn: 18422
2004-12-02 09:09:48 +00:00
Reid Spencer
1c8a34ff77
Search for tclsh last so we don't find the FreeBSD warning script too early
...
llvm-svn: 18421
2004-12-02 07:31:22 +00:00
Reid Spencer
188a22fc14
Search for tclsh last so we don't find the FreeBSD warning script.
...
llvm-svn: 18420
2004-12-02 07:29:17 +00:00
Tanya Lattner
201e972dc4
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
c0677c081d
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
3b18139b3c
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
Reid Spencer
7784c2f12e
Fix the tclsh test to find tclsh8.[34] and tclsh8.[34].X as well.
...
llvm-svn: 18415
2004-12-02 04:17:20 +00:00
Reid Spencer
8d61104f97
* Make sure the cache variable gets cached
...
* Don't search a bunch of .. directories for something we'd never find,
because we don't imbed tclsh into LLVM.
* Look for various tclsh versions because some platforms don't install the
tclsh link but just have tclsh8.3 or tclsh8.4 or some such.
llvm-svn: 18414
2004-12-02 04:15:24 +00:00
Chris Lattner
434f90ff2d
Remove dead field
...
llvm-svn: 18412
2004-12-02 02:35:38 +00:00
Chris Lattner
9cf32444bb
This program doesn't break anything anymore.
...
llvm-svn: 18411
2004-12-02 02:26:18 +00:00
Misha Brukman
3ae96e3727
Reid has implemented llvm-ranlib. Thanks, Reid!
...
llvm-svn: 18410
2004-12-01 21:07:40 +00:00
Misha Brukman
d0bb8bebc8
* Hyphenate ``constant-propagate''
...
* Add testing notes to the instruction section similar as for intrinsics
* Mention adding codegen support for new instructions
llvm-svn: 18409
2004-12-01 20:58:54 +00:00
Misha Brukman
e070ae69fc
Remove duplicated link to "Machine backend"
...
llvm-svn: 18408
2004-12-01 19:12:27 +00:00
Tanya Lattner
e94b466a8e
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
e58bf09138
Initial support for packed types, contributed by Morten Ofstad
...
llvm-svn: 18406
2004-12-01 17:14:28 +00:00
Chris Lattner
9a43d294b9
Remove unneeded cast.
...
llvm-svn: 18405
2004-12-01 17:13:05 +00:00
Chris Lattner
cf2e128758
Get GEP's working with packed types. Contributed by Morten Ofstad!
...
llvm-svn: 18404
2004-12-01 17:12:16 +00:00
Chris Lattner
9812dbcc76
Add line # info
...
llvm-svn: 18403
2004-12-01 17:10:36 +00:00
John Criswell
51f8ded5e7
Fixed pathname to LLVM tools.
...
Thanks to Vladimir Merzliakov for finding this.
llvm-svn: 18402
2004-12-01 14:12:30 +00:00
Reid Spencer
f6a10fa333
Be a little more explicit about how to configure LLVM with the --prefix
...
option so that permissions errors don't occur if the default, /usr/local,
is taken.
llvm-svn: 18401
2004-12-01 05:15:44 +00:00
Chris Lattner
2a2ebd1829
Fix typeo, thanks to Duraid for pointing it out
...
llvm-svn: 18400
2004-12-01 04:16:29 +00:00
Reid Spencer
3f2352e23e
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
798e0349c0
Do not let GCC emit a warning for INT64_MIN
...
llvm-svn: 18398
2004-11-30 21:33:58 +00:00
Brian Gaeke
86deaf2211
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
Tanya Lattner
33f621acf8
Added TCLSH var to site.exp.
...
llvm-svn: 18396
2004-11-30 19:13:06 +00:00
Chris Lattner
a6992ae74f
Move this from the C test suite
...
llvm-svn: 18395
2004-11-30 18:25:12 +00:00
Chris Lattner
bf3a546a5b
This is a c++ test
...
llvm-svn: 18394
2004-11-30 18:25:05 +00:00
Chris Lattner
3f9b831041
Add back -e, which apparently works in sh's echo but not tcsh's, which does
...
not need it. Also, grep some output so we know that this command does something.
llvm-svn: 18393
2004-11-30 17:47:13 +00:00
Chris Lattner
4114c7d87c
If TESTSUITE is set, we obviously want to run dejagnu
...
llvm-svn: 18392
2004-11-30 17:45:08 +00:00
Chris Lattner
56bac30683
Fix the JIT when being used from llvm-db
...
llvm-svn: 18391
2004-11-30 17:41:49 +00:00
Chris Lattner
f4b262a3ec
do not pass -e into llvm-db as a command.
...
llvm-svn: 18390
2004-11-30 17:13:13 +00:00
Chris Lattner
c7edfa52a4
Put the output in the temporary location
...
llvm-svn: 18389
2004-11-30 17:12:00 +00:00
Chris Lattner
3f6419949c
This is a cross platform fail, failing on freebsd as well
...
llvm-svn: 18388
2004-11-30 17:10:47 +00:00
Chris Lattner
951673a94c
This pass is completely broken.
...
llvm-svn: 18387
2004-11-30 17:09:06 +00:00
Chris Lattner
37a14496c5
RevisionNum is read by error(), initialize it early.
...
llvm-svn: 18386
2004-11-30 16:58:18 +00:00
Chris Lattner
d7f028e4e3
This was fixed with the recent tester changes.
...
llvm-svn: 18385
2004-11-30 16:48:26 +00:00
Brian Gaeke
5c9fa5bcee
Update list of failing benchmarks.
...
llvm-svn: 18384
2004-11-30 08:15:44 +00:00
Brian Gaeke
1d6b926ab6
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
Reid Spencer
105d4152d7
Add a check for the tclsh program needed by dejagnu. This can have weird
...
names that have version numbers in it so this macro, DJ_AC_PATH_TCLSH will
make the necessary checks. The makefile variable TCLSH is set to the path
found.
llvm-svn: 18382
2004-11-30 08:11:54 +00:00
Chris Lattner
019445715e
Squelch warning
...
llvm-svn: 18381
2004-11-30 07:47:34 +00:00
Chris Lattner
b15064a776
This passes on darwin now
...
llvm-svn: 18380
2004-11-30 07:38:41 +00:00
Chris Lattner
bd11625469
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
95729469cc
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
868ae13dc0
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
7562a05735
Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.ll
...
llvm-svn: 18376
2004-11-30 06:40:04 +00:00
Chris Lattner
16c07fdd15
New testcase that crashes the PPC BE
...
llvm-svn: 18375
2004-11-30 06:39:45 +00:00
Chris Lattner
ce350cbd3a
Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll
...
llvm-svn: 18374
2004-11-30 06:36:11 +00:00
Chris Lattner
c45bdadaf8
New testcase
...
llvm-svn: 18373
2004-11-30 06:35:52 +00:00
Tanya Lattner
97b21a06a3
Adding timeout for a test.
...
llvm-svn: 18372
2004-11-30 06:29:45 +00:00
Chris Lattner
9eeb2033ff
Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll
...
llvm-svn: 18371
2004-11-30 06:29:10 +00:00
Chris Lattner
90e62de4e9
New testcase that crashes the PPC backend
...
llvm-svn: 18370
2004-11-30 06:28:53 +00:00
Chris Lattner
fd8cbc257e
Alkis noticed that this variable is dead. Thanks!
...
llvm-svn: 18369
2004-11-30 04:01:44 +00:00
Chris Lattner
0b6ebd8d10
Add method
...
llvm-svn: 18368
2004-11-30 02:51:53 +00:00
Chris Lattner
889e91d58d
New testcase for simplifycfg
...
llvm-svn: 18367
2004-11-30 00:31:16 +00:00
Chris Lattner
389cfac0d1
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
e0c207d2d3
Remove extraneous namespacification. In particular, don't define llvm::llvm::createInternalGlobalMapperPass
...
llvm-svn: 18365
2004-11-30 00:22:59 +00:00
John Criswell
fc1a1dd203
Fix a typo.
...
Corrected a potential grammary issue.
llvm-svn: 18364
2004-11-29 21:46:29 +00:00
Chris Lattner
6e455608e2
Allow hoisting loads of globals and alloca's in conditionals.
...
llvm-svn: 18363
2004-11-29 21:26:12 +00:00
Chris Lattner
0ea40c935f
Make built bytecode libraries depend on gccas/gccld as appropriate. This
...
should fix the stale runtime libraries problem.
llvm-svn: 18361
2004-11-29 19:47:58 +00:00
Reid Spencer
e1cb6b9e2e
Fix two bugs:
...
1. Nothing should happen on "make all". Doc generation is quick, but we
don't want to do it unless we're installing.
2. Correct a dependency for the *.ps files .. didn't notice this before
because of cruft in my directory. It failed on a clean build.
llvm-svn: 18359
2004-11-29 14:46:29 +00:00
Reid Spencer
4f44c95967
Functionality moved to portable lib/System/DynamicLibrary.cpp
...
implementation
llvm-svn: 18358
2004-11-29 14:11:41 +00:00
Reid Spencer
70e37278cb
Use System/DynamicLibrary instead of Support/DynamicLinker
...
llvm-svn: 18357
2004-11-29 14:11:29 +00:00
Reid Spencer
9ec2761bb7
Use System/DynamicLibrary instead of Support/DynamicLinker to implement.
...
llvm-svn: 18356
2004-11-29 14:07:46 +00:00
Reid Spencer
0e6a4fc448
Implement two new functions: LoadLibraryPermanently and
...
SearchForAddressOfSymbol.
llvm-svn: 18355
2004-11-29 13:33:28 +00:00
Reid Spencer
c4c3f5a980
Add in some methods for use by the JIT. LoadLibraryPermanently brings the
...
library into the address space permanently. SearchForAddressOfSymbol looks
in all previously permanently loaded libraries and any currently open
libraries for a symbol, instead of just one library like GetAddressOfSymbol
llvm-svn: 18354
2004-11-29 13:27:56 +00:00
Reid Spencer
d1697bf2f7
Shared library extension is now in LTDL_SHLIB_EXT
...
llvm-svn: 18353
2004-11-29 12:40:21 +00:00
Reid Spencer
3468ae1a87
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
50f3487fad
Allow reconfig from any directory, not just the top build directory, by
...
changing directory first. Also make sure that we don't attempt to run
config.status if the recheck didn't work.
llvm-svn: 18351
2004-11-29 12:37:44 +00:00
Reid Spencer
c680f05aeb
Changes resulting from AC_LIB_LTDL usage.
...
llvm-svn: 18350
2004-11-29 12:36:16 +00:00
Reid Spencer
a40c687fe8
* Implement embedding libltdl into LLVM which required some rearranging.
...
llvm-svn: 18349
2004-11-29 12:29:58 +00:00
Reid Spencer
7905a70840
* Update instructions about upgrading libtool
...
* Add instructions about upgrading autoconf
llvm-svn: 18348
2004-11-29 12:28:47 +00:00
Reid Spencer
54f36c677f
Don't include ltdl.h any more. Its nested in lib/System now.
...
llvm-svn: 18347
2004-11-29 12:12:11 +00:00
Reid Spencer
47430cf2a5
Mods for compilation with llvm.
...
llvm-svn: 18346
2004-11-29 12:04:27 +00:00
Reid Spencer
11ba920d55
Original version of ltdl.h from libtool 1.5.10
...
llvm-svn: 18345
2004-11-29 12:02:48 +00:00
Reid Spencer
6717b80ba2
Original version of ltdl.c from libtool 1.5.10
...
llvm-svn: 18344
2004-11-29 12:02:25 +00:00
Reid Spencer
2c7c2a0774
Converted with autoupdate for autoconf 2.50 -> 2.59 differences.
...
llvm-svn: 18343
2004-11-29 11:27:12 +00:00
Reid Spencer
8b3fd7639e
This file contains macros that allow us to incorporate the ltdl source into
...
our own library so that it is magically hidden and we don't have to depend
on linking with -lltdl option.
llvm-svn: 18342
2004-11-29 10:56:45 +00:00
Reid Spencer
72a7457a90
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
Reid Spencer
073173568d
Make the default constructor cause the program's symbols to be loaded as
...
if it was a dynamic library.
llvm-svn: 18340
2004-11-29 10:38:54 +00:00
Reid Spencer
1a8b379d84
Make it HTML 4.01 Strict compliant.
...
llvm-svn: 18339
2004-11-29 07:47:16 +00:00
Reid Spencer
6bc24e4e65
* Document how to turn on doxygen documentation generation
...
* Document the new "LLVMLIBS=JIT" feature to make building JIT programs
super easy.
llvm-svn: 18338
2004-11-29 07:44:51 +00:00
Reid Spencer
5686dc714d
No longer necessary, moved Makefile.rules
...
llvm-svn: 18337
2004-11-29 07:17:31 +00:00
Reid Spencer
bb9932c96a
Use LLVMLIBS=JIT to get JIT libraries
...
llvm-svn: 18333
2004-11-29 07:17:18 +00:00
Reid Spencer
af4495a8c4
Incorporate tools/Makefile.JIT
...
llvm-svn: 18332
2004-11-29 07:17:07 +00:00
Reid Spencer
3ec3fc9870
Make sure the program's symbols can be dlsym'd as well.
...
llvm-svn: 18331
2004-11-29 06:23:19 +00:00
Chris Lattner
f9c5dc9fb4
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
Reid Spencer
fc66af4476
* Allow date command to be printed in verbose mode
...
* Get rid of appending -lbz2 and -lz to ExtraLibs now that we don't need
them any more.
* Fix the dist-check target so that EXTRA_DIST can be defined AFTER the
include of Makefile.common. This is needed because Makefile.common
provides variable definitions that may need to be used in computing the
value of EXTRA_DIST.
* Clean up some "distdir" target output.
llvm-svn: 18329
2004-11-29 05:00:33 +00:00
Reid Spencer
51877c95d3
Add "docs" as a descendable directory (at the end)
...
llvm-svn: 18328
2004-11-29 04:57:55 +00:00
Reid Spencer
0194c9a64c
* allow doxygen documentation to be enabled/disabled (default off)
...
* organize programs we test for properly
* add new programs needed for documentation generation
* Adjust install paths so llvm stuff doesn't muck up /usr/local or /usr if
$prefix is set to those.
llvm-svn: 18327
2004-11-29 04:56:35 +00:00
Reid Spencer
2c22f50c38
* Get additional configured values into the makefiles
...
* Provide support for ENABLE_DOXYGEN
* New tools that documentation generation requires
llvm-svn: 18326
2004-11-29 04:53:50 +00:00
Reid Spencer
da2a9e6b0c
Make the check a little quieter.
...
llvm-svn: 18325
2004-11-29 04:51:58 +00:00
Reid Spencer
1c2aaab680
* Make this makefile compliant with LLVM makefile standards
...
* Implement optional doxygen doc generation
* Implement HTML and doxygen installation
llvm-svn: 18324
2004-11-29 04:47:35 +00:00
Reid Spencer
dc8f4286c6
Moved --> doxygen.cfg.in
...
llvm-svn: 18323
2004-11-29 04:46:12 +00:00
Tanya Lattner
d8cc4facd0
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
Reid Spencer
9d3b50038d
* Get rid of extraneous directories
...
* Ensure things installed to same place are all getting there by using a
variable to name that place.
* Make sure missing index.html, images and *.css files get installed.
llvm-svn: 18321
2004-11-29 04:34:05 +00:00
Reid Spencer
f8685399eb
* add llvmc and llvm-ld
...
* fix the links to not be in an html subdir as that's not how this gets
installed (anymore).
llvm-svn: 18320
2004-11-29 04:32:37 +00:00
Reid Spencer
3776794cc5
Adjust this so that doxygen doesn't barf on it.
...
llvm-svn: 18319
2004-11-29 03:47:37 +00:00
Reid Spencer
94ade72d66
* Adjust so this falls in line with LLVM Makefile standards.
...
* Implement installation of doxygen and html documentation
* Fix it so it works with objdir != srcdir.
llvm-svn: 18318
2004-11-29 03:45:02 +00:00
Reid Spencer
7d42417cc5
* Fix an item list.
...
* Add an ENVIRONMENT section to describe LLVM_LIB_SEARCH_PATH
llvm-svn: 18317
2004-11-29 03:43:29 +00:00
Reid Spencer
0f9dabd0f8
Add a link.
...
llvm-svn: 18316
2004-11-29 03:37:54 +00:00
Reid Spencer
ad60af2874
For PR393:
...
This file was originally doxygen.cfg, but it needs to be configured to get
the right srcdir/objdir paths for things. This is needed because building
the doxygen will now be part of the install and dist-check targets.
llvm-svn: 18315
2004-11-29 03:33:22 +00:00
Tanya Lattner
341828ee64
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
f8085812d9
Update the test to match the optimization. The optimization can let some
...
casts through, but they will only be sbyte -> ubyte in this test case so
make sure we don't let any other kinds through.
llvm-svn: 18313
2004-11-28 21:36:52 +00:00
Reid Spencer
279fa256a2
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
c0f8a1c721
The LLVM bool type shall have 1 byte alignment on PPC.
...
llvm-svn: 18311
2004-11-28 21:16:45 +00:00
Chris Lattner
6ea2888832
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
1b784b117d
Fix DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll
...
llvm-svn: 18308
2004-11-28 20:30:15 +00:00
Chris Lattner
1222964f2a
New testcase. The store is not dead here.
...
llvm-svn: 18307
2004-11-28 19:54:02 +00:00
Chris Lattner
ebb54c55e1
Fix SingleSource/UnitTests/2004-11-28-GlobalBoolLayout.c, and hopefully
...
PR449
llvm-svn: 18306
2004-11-28 17:56:47 +00:00
Chris Lattner
9d313cfa1c
new testcase for PR463
...
llvm-svn: 18304
2004-11-28 16:47:46 +00:00
Chris Lattner
aef74b55de
Fix PR463
...
llvm-svn: 18303
2004-11-28 16:45:45 +00:00
Reid Spencer
ad3016a273
Correct the RUN line to remove unneeded parameters and make sure the test
...
case is testing the right thing.
llvm-svn: 18302
2004-11-28 08:15:33 +00:00
Reid Spencer
2530e82275
Test case for PR454
...
llvm-svn: 18301
2004-11-28 04:29:29 +00:00
Reid Spencer
8a3312cab3
Compute the firstFileOffset correctly after reading the LLVM symbol table.
...
llvm-svn: 18300
2004-11-28 03:13:02 +00:00
Chris Lattner
e8d482e76d
Bug fixed
...
llvm-svn: 18299
2004-11-28 01:25:20 +00:00
Chris Lattner
296f82b6cc
New testcase for PR447
...
llvm-svn: 18298
2004-11-28 01:22:49 +00:00
Chris Lattner
c1f5d47b95
Bug fixed
...
llvm-svn: 18297
2004-11-28 00:43:59 +00:00
Chris Lattner
7a887d7c6c
New testcase for PR360
...
llvm-svn: 18296
2004-11-28 00:39:58 +00:00
Chris Lattner
d997b02b6f
Bug fixed
...
llvm-svn: 18295
2004-11-28 00:09:38 +00:00
Chris Lattner
fc19d3f070
New testcase for PR244
...
llvm-svn: 18294
2004-11-28 00:06:07 +00:00
Chris Lattner
83c1780d73
Bug fixed
...
llvm-svn: 18293
2004-11-27 23:27:26 +00:00
Chris Lattner
f377ca43b3
New testcase for PR397
...
llvm-svn: 18292
2004-11-27 23:24:23 +00:00
Chris Lattner
dcc1599599
Bug fixed
...
llvm-svn: 18291
2004-11-27 22:47:08 +00:00
Chris Lattner
212ade1830
new testcase
...
llvm-svn: 18290
2004-11-27 22:43:51 +00:00
Reid Spencer
8de460528b
Remove a dead check at the end of the configure script that was a left over
...
from the bzip2 support. This dead check produced the error:
test: -ne: unary operator expected
llvm-svn: 18289
2004-11-27 22:01:43 +00:00
Reid Spencer
ff6110ebff
Get the cache variable name right.
...
llvm-svn: 18288
2004-11-27 21:59:57 +00:00
Chris Lattner
3229b565c3
Move this to the QOI section
...
llvm-svn: 18287
2004-11-27 21:33:28 +00:00
Chris Lattner
4d09fff8bd
Mention dj
...
llvm-svn: 18286
2004-11-27 21:29:43 +00:00
Chris Lattner
c57da980b3
Bug fixed
...
llvm-svn: 18285
2004-11-27 20:34:25 +00:00
Chris Lattner
94336bd4c7
New testcase
...
llvm-svn: 18284
2004-11-27 20:31:59 +00:00
Chris Lattner
d2c3a1a8d4
Pass in llvmgxx
...
llvm-svn: 18283
2004-11-27 20:31:14 +00:00
Chris Lattner
b3d2adea45
Add notes
...
llvm-svn: 18282
2004-11-27 19:50:58 +00:00
Chris Lattner
9d63271caa
New testcase for PR424
...
llvm-svn: 18281
2004-11-27 19:44:07 +00:00
Chris Lattner
e026714f53
Add some notes
...
llvm-svn: 18280
2004-11-27 19:24:06 +00:00
Chris Lattner
e792a74cd0
Add bzip2
...
llvm-svn: 18279
2004-11-27 19:20:23 +00:00
Chris Lattner
12b1b42bea
These have been removed
...
llvm-svn: 18278
2004-11-27 19:19:44 +00:00
Chris Lattner
b9a052eb7f
Remove zlib from the llvm tarball. This is only used (in theory by povray-31
...
which is part of llvm-test). If anyone is interested in adding it to llvm-test,
feel free to go for it.
This is part of PR417
llvm-svn: 18277
2004-11-27 19:18:35 +00:00
Chris Lattner
0957123d03
Remove zlib from the llvm tarball. This is only used (in theory by povray-31
...
which is part of llvm-test). If anyone is interested in adding it to llvm-test,
feel free to go for it.
llvm-svn: 18276
2004-11-27 19:18:05 +00:00
Chris Lattner
24bba4d237
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
3e511dd739
Change interface to this method a bit
...
llvm-svn: 18274
2004-11-27 18:37:04 +00:00
Chris Lattner
14f3cdc227
Implement Regression/Transforms/InstCombine/getelementptr_cast.ll, which
...
occurs many times in crafty
llvm-svn: 18273
2004-11-27 17:55:46 +00:00
Chris Lattner
7c4026ae24
New testcase
...
llvm-svn: 18272
2004-11-27 17:55:20 +00:00
Reid Spencer
a7c28bcd6d
Don't depend on grep or sed to be portable at all. Just compare against
...
static test files.
llvm-svn: 18271
2004-11-27 06:44:10 +00:00
Reid Spencer
79d941f784
Put the expected tables of contents of the test archives into separate
...
files so we don't have to process them at test time at all.
llvm-svn: 18270
2004-11-27 06:43:03 +00:00
Reid Spencer
4f102dd7fa
Use grep instead of sed because on Solaris sed doesn't copy null bytes and
...
it needs to in order for the bug in MacOSX archives to be tested correctly.
llvm-svn: 18269
2004-11-27 06:27:30 +00:00
Reid Spencer
532a662c80
Accommodate the braindead Solaris "diff" that doesn't understand the -q
...
option.
llvm-svn: 18268
2004-11-27 06:00:36 +00:00
Nate Begeman
43123c9f7a
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
eeaa29c377
Add a new interface
...
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner
b137409926
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
f30656b437
When evaluating an AA, pass in size info
...
llvm-svn: 18264
2004-11-26 21:05:39 +00:00
Chris Lattner
b50fd9262d
There is no reason to store <x,x>, just store <x>.
...
llvm-svn: 18263
2004-11-26 20:25:17 +00:00
Chris Lattner
63b45b4768
The trick with globals actually works with allocas and malloc too
...
llvm-svn: 18262
2004-11-26 20:01:48 +00:00
Chris Lattner
75819a81b2
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
Chris Lattner
bfee2ccd5b
new testcase basicaa should handle
...
llvm-svn: 18260
2004-11-26 19:19:28 +00:00
Reid Spencer
6caee97dc2
Indicate that PR427 won't be fixed.
...
llvm-svn: 18259
2004-11-25 22:43:58 +00:00
Reid Spencer
493d9c242b
* Add features I implemented this release.
...
* Wrap long lines at 80 cols
* Indent lists so structure of document is a little more clear
* Make the page HTML 4.01 Strict compliant.
llvm-svn: 18258
2004-11-25 22:38:30 +00:00
Reid Spencer
d3f2e95e6c
Add LLVMbzip2 library, now required.
...
llvm-svn: 18255
2004-11-25 20:22:06 +00:00
Reid Spencer
550df1bbef
Remove HAVE_BZLIB and HAVE_BZIP2. We always have bzip2 now.
...
llvm-svn: 18254
2004-11-25 20:21:53 +00:00
Reid Spencer
cf5ca279ec
Always pass -D_GNU_SOURCE to cc1plus
...
llvm-svn: 18253
2004-11-25 19:38:51 +00:00
Reid Spencer
d7390bbd27
Always pass -D_GNU_SOURCE to cc1
...
llvm-svn: 18252
2004-11-25 19:38:39 +00:00
Reid Spencer
d49013f0b8
Add bzip2 subdirectory
...
llvm-svn: 18251
2004-11-25 19:38:28 +00:00
Reid Spencer
fa8d2e0b27
Remove zlib support in favor of our own bzip2 library
...
llvm-svn: 18250
2004-11-25 19:38:16 +00:00
Reid Spencer
af6fd29a08
Adjust to Compressor interface change
...
llvm-svn: 18249
2004-11-25 19:38:05 +00:00
Reid Spencer
969f0bd44c
Restrict the interface to not allow algorithm selection
...
llvm-svn: 18248
2004-11-25 19:37:42 +00:00
Reid Spencer
02c571be96
Add some instructions about ranlib'ing the CFE runtime libraries so that
...
they link faster. This should eventually be codified into the CFE's
makefile.
llvm-svn: 18247
2004-11-25 17:13:17 +00:00
Reid Spencer
c51e80a09f
Revise to LLVM makefile standards.
...
llvm-svn: 18246
2004-11-25 16:12:25 +00:00
Reid Spencer
a01ef71032
Initial Version from bzip2 Release 1.0.2.
...
llvm-svn: 18245
2004-11-25 16:11:36 +00:00
Reid Spencer
953e80db76
Correct the configuration variable used to find the bin directory.
...
llvm-svn: 18244
2004-11-25 09:36:28 +00:00
Reid Spencer
8bb258d1ea
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
2c4f9a484c
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
Reid Spencer
334782733f
Add a convenience target to build all three modes: Debug, Release, Profile
...
llvm-svn: 18241
2004-11-25 09:08:54 +00:00
Reid Spencer
9dc4ba54dc
Gack. Actually use the correct variable name in setting the JIT support.
...
llvm-svn: 18240
2004-11-25 07:28:19 +00:00
Nate Begeman
3f76eb69f6
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
d0af8e24b5
The PPC backend is basically stable, and has a JIT now.
...
llvm-svn: 18238
2004-11-25 06:33:10 +00:00
Chris Lattner
6345ee29b3
Bug fixed
...
llvm-svn: 18237
2004-11-25 06:31:42 +00:00
Chris Lattner
d0b3983275
New testcase for PR451
...
llvm-svn: 18236
2004-11-25 06:25:13 +00:00
Chris Lattner
8cbad8efcf
Fix the build on non ppc machines
...
llvm-svn: 18235
2004-11-25 06:14:45 +00:00
Reid Spencer
2686464378
PR256 fixed.
...
llvm-svn: 18234
2004-11-25 06:07:42 +00:00
Reid Spencer
3d50017178
Fix the lib/System/platform link by using proper cached variable name.
...
llvm-svn: 18233
2004-11-25 06:03:14 +00:00
Reid Spencer
0241e38ef7
For PR256:
...
* cache more values
* standardize cache value names
* organize configure script per autoconf recommendations (10 sections)
* Eliminate some redundancies and complexities in the script
* Provide better documentation in the script.
llvm-svn: 18232
2004-11-25 04:51:04 +00:00
Reid Spencer
7c93739bc5
Cache the value of this test.
...
llvm-svn: 18231
2004-11-25 04:44:46 +00:00
Reid Spencer
0388846f25
Tidy up the indentation. Give the cache variable a proper name.
...
llvm-svn: 18230
2004-11-25 04:43:54 +00:00
Reid Spencer
026eda3ec8
Eliminate duplicate "checking" message.
...
llvm-svn: 18229
2004-11-25 04:42:25 +00:00
Chris Lattner
497a622376
The JIT works enough
...
llvm-svn: 18228
2004-11-25 04:14:54 +00:00
Chris Lattner
da76c16ba4
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
305f78f646
Fix encoding of fneg instruction
...
llvm-svn: 18226
2004-11-25 03:53:44 +00:00
Chris Lattner
191e525bae
Fix encoding of swari, fixing several programs, including Olden/mst
...
llvm-svn: 18225
2004-11-25 03:40:20 +00:00
Reid Spencer
58a9fe55fa
Make the check print something, give the cache var an llvm specific name.
...
llvm-svn: 18224
2004-11-25 03:33:03 +00:00
Chris Lattner
5d8ae54267
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
dd516799d7
* 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
e49936af54
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
078b6f2b62
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
659d72e319
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
cb9af557e7
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
80bb693109
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
7217642438
Update list of failing benchmarks.
...
llvm-svn: 18202
2004-11-24 04:07:42 +00:00
Brian Gaeke
1139802b98
Fix bug in emitGEPOperation with large struct-member offsets.
...
llvm-svn: 18201
2004-11-24 04:07:33 +00:00
Chris Lattner
130888ad37
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
022e271db5
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
57542fcfc2
Loads are relocatable too
...
llvm-svn: 18198
2004-11-24 02:03:44 +00:00
Chris Lattner
7b1cf0d6c6
Calls do not need a MovPCtoLR instruction
...
llvm-svn: 18197
2004-11-24 02:00:06 +00:00
Chris Lattner
6a7ebe034e
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
13c71ca7b6
Forced branches to be first to be scheduled.
...
llvm-svn: 18195
2004-11-24 01:49:10 +00:00
Chris Lattner
193b6f3281
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
b55f748b1a
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
674fe0bb60
Fix encoding of bctrl, and remove some unused instructions
...
llvm-svn: 18192
2004-11-24 00:16:37 +00:00
Reid Spencer
67386ceacc
Make sure additional C++ suffixes are recognized by llvmc.
...
llvm-svn: 18191
2004-11-24 00:01:57 +00:00
Reid Spencer
a61edd8e92
Add the configurable configuration files for llvmc.
...
llvm-svn: 18190
2004-11-23 23:48:45 +00:00
Reid Spencer
cfa51ff82b
* Adjust the options to make them either accept multiple occurrences or be
...
optional so that compatibility with GCC is accomplished.
* Implement the -print-file-name option in an attempt to provide the same
functionality as GCC. Unfortunately, without loading the cpp or c config
files, this option won't help much.
llvm-svn: 18189
2004-11-23 23:47:58 +00:00
Reid Spencer
cd893a9c50
* Don't pass empty arguments to ExecuteAndWait because it can cause the
...
sub-tool to start reading its standard input instead of the specified
input.
* Clean up ouput of path names on error.
* Extend GetPathForLinkageItem to always search the LibraryPaths and thus
make it suitable for an interface function (required by llvmc.cpp).
* Implement support for language-specific default library paths.
llvm-svn: 18188
2004-11-23 23:45:49 +00:00
Reid Spencer
5e1e6b9f82
Configuration data now supports a vector of library paths.
...
Add the GetPathForLinkageItem method to the interface so full paths can
be generated for a given linkage item.
llvm-svn: 18187
2004-11-23 23:40:06 +00:00
Reid Spencer
fe6dd9da55
Add the c and cpp configuration files.
...
llvm-svn: 18186
2004-11-23 23:38:46 +00:00
Reid Spencer
e1ae9d7c00
Removed in favor of configurable (*.in) versions.
...
llvm-svn: 18185
2004-11-23 23:38:07 +00:00
Reid Spencer
d51dfe3946
Make various adjustments to parsing so that the separator character doesn't
...
terminate options or paths, so that SPACE tokens legally separate options
on a command line, and so that the lang.libs paths are parsed properly.
llvm-svn: 18184
2004-11-23 23:37:26 +00:00
Reid Spencer
513587fbe6
SPACE is a legitimate token now, to separate option words.
...
llvm-svn: 18183
2004-11-23 23:35:50 +00:00
Reid Spencer
6a0d9b99df
Handle space, separators, bad substitutions, and library search path better
...
than before.
llvm-svn: 18182
2004-11-23 23:35:16 +00:00
Reid Spencer
c14e53efb8
Configurable language configuration files.
...
llvm-svn: 18181
2004-11-23 23:33:08 +00:00
Reid Spencer
a193f3cdbf
Allow reading of member names that begin with an _ character.
...
llvm-svn: 18179
2004-11-23 22:35:39 +00:00
Chris Lattner
c7eeae4661
Fix encoding of blr and bctr
...
llvm-svn: 18178
2004-11-23 22:06:24 +00:00
John Criswell
fd769457b8
Added remark about GCC 3.2.2. Someone with more knowledge of the problem
...
can elaborate.
llvm-svn: 18177
2004-11-23 22:06:24 +00:00
Nate Begeman
c5fc6f5717
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
617760687a
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
578dfd5e42
Fix the encoding of OR, AND and many other instructions
...
llvm-svn: 18174
2004-11-23 21:17:35 +00:00
Brian Gaeke
94c58dc877
Support shr long/ulong.
...
llvm-svn: 18173
2004-11-23 21:10:50 +00:00
Brian Gaeke
8d4a5ad55c
Support printing ConstantAggregateZeros.
...
llvm-svn: 18172
2004-11-23 21:10:49 +00:00
Brian Gaeke
2e7f71863f
Update failing SingleSource test-case list.
...
llvm-svn: 18171
2004-11-23 21:10:48 +00:00
Chris Lattner
a630adebc7
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
be39b8f541
Get rid of flags that are dead
...
llvm-svn: 18169
2004-11-23 20:37:41 +00:00
Misha Brukman
c3184445de
We also provide a source distribution of the GCC front-end
...
llvm-svn: 18166
2004-11-23 19:26:24 +00:00
Chris Lattner
5f4b0e1bf7
Fix encoding of rlwinm?
...
llvm-svn: 18165
2004-11-23 19:23:32 +00:00
Chris Lattner
1238cca6df
Fix encodings
...
llvm-svn: 18164
2004-11-23 19:23:18 +00:00
Chris Lattner
431e0132ef
Enumerate CR registers
...
llvm-svn: 18162
2004-11-23 18:59:59 +00:00
Chris Lattner
a8936af13e
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
febc3eb8fa
This method is dead
...
llvm-svn: 18160
2004-11-23 18:47:55 +00:00
Chris Lattner
24ad93f55c
Remove this method.
...
llvm-svn: 18159
2004-11-23 18:47:42 +00:00
Reid Spencer
f675b49722
Make sure the timing output is also sent to the log file for dejagnu, not
...
the log file of the NightlyTest.pl script.
llvm-svn: 18158
2004-11-23 16:23:50 +00:00
Chris Lattner
cccd49f1b7
Squelch a bogus warning
...
llvm-svn: 18157
2004-11-23 15:57:01 +00:00
Chris Lattner
b1fd07a862
Squelch a bogus warning.
...
llvm-svn: 18156
2004-11-23 15:56:38 +00:00
Nate Begeman
7e7a08dba5
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
bde370eb58
pseudocode for 64-bit lshr.
...
llvm-svn: 18154
2004-11-23 08:14:09 +00:00
Chris Lattner
40ff89c212
Fix a minor bug
...
llvm-svn: 18153
2004-11-23 06:56:31 +00:00
Chris Lattner
5369ab3e24
Be really paranoid about not breaking stuff yet
...
llvm-svn: 18152
2004-11-23 06:56:18 +00:00
Chris Lattner
4ff117585d
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
Chris Lattner
96826dbaf3
Change formats, as suggested by Duraid
...
llvm-svn: 18150
2004-11-23 06:51:14 +00:00
Brian Gaeke
d3311665cc
Add more known-failing tests.
...
llvm-svn: 18149
2004-11-23 06:39:50 +00:00
Brian Gaeke
2491727b5d
Add the rest of the logical instructions.
...
llvm-svn: 18148
2004-11-23 06:39:37 +00:00
Chris Lattner
7445c5eadc
Implement the stub needed to get into compilation callback.
...
llvm-svn: 18147
2004-11-23 06:27:02 +00:00
Chris Lattner
e1187d46a1
Simplify code a bit
...
llvm-svn: 18146
2004-11-23 06:05:44 +00:00
Chris Lattner
8296c4c323
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
743a43424f
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
Reid Spencer
39d6a6116a
Allow configuration files to be themselves configured and found in the
...
OBJ dir instead of only in the SRC dir.
llvm-svn: 18143
2004-11-23 05:59:53 +00:00
Chris Lattner
1c95751676
Implement all of the methods
...
llvm-svn: 18142
2004-11-23 05:57:57 +00:00
Chris Lattner
0b4eb3f806
Initial checkin of the 32-bit PPC relocation types
...
llvm-svn: 18141
2004-11-23 05:57:38 +00:00
Chris Lattner
f5363dc789
Move JITInfo from PPCTM to PPC32TM
...
llvm-svn: 18140
2004-11-23 05:56:40 +00:00
Chris Lattner
ae670d5895
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
Chris Lattner
6500c6d332
LA is really addi. Be consistent with operand ordering to avoid confusing the code emitter
...
llvm-svn: 18138
2004-11-23 05:54:25 +00:00
Tanya Lattner
c3a7394291
Changed the CreateCodeToLoadConst function to preserve SSA form. This basically means adding extra tmp instructions for intermediate values.
...
llvm-svn: 18137
2004-11-23 04:22:29 +00:00
Chris Lattner
69e4cc55ef
Remove some dead code
...
llvm-svn: 18136
2004-11-22 23:07:22 +00:00
Chris Lattner
40565d72d4
Comment out a couple of unused instructions.
...
llvm-svn: 18135
2004-11-22 23:07:01 +00:00
Chris Lattner
a76f09d0d3
Do not push two return addresses on the stack when we call external functions who have their addresses taken. This fixes test-call.ll
...
llvm-svn: 18134
2004-11-22 22:25:30 +00:00
Chris Lattner
b769690ab3
Add a note about the JIT changes.
...
llvm-svn: 18133
2004-11-22 22:09:58 +00:00
Chris Lattner
c5753055ea
Rename Emitter.cpp -> JITEmitter.cpp
...
llvm-svn: 18132
2004-11-22 22:00:25 +00:00
Chris Lattner
88dc917c72
Fix the FIXME, nuke the JIT specific forceCompilationOf method.
...
llvm-svn: 18131
2004-11-22 21:54:35 +00:00
Chris Lattner
0e7faedde7
Disable this.
...
llvm-svn: 18130
2004-11-22 21:51:40 +00:00
Chris Lattner
213e39ee7c
These methods are obsolete
...
llvm-svn: 18129
2004-11-22 21:48:33 +00:00
Chris Lattner
ad3840a2cc
These methods are now obsolete
...
llvm-svn: 18128
2004-11-22 21:48:01 +00:00
Chris Lattner
8e9ed2747c
This chunk of code needs to be rewritten
...
llvm-svn: 18127
2004-11-22 21:45:54 +00:00
Chris Lattner
54e1b22ea3
Remove some dead vars and some useless namespacification
...
llvm-svn: 18126
2004-11-22 21:42:40 +00:00
Chris Lattner
80ad8871e7
Implement a disgusting hack to work around broken machine code emission of
...
the RDCCR instruction. This fixes a bunch of programs with the JIT.
llvm-svn: 18124
2004-11-22 21:25:10 +00:00
Tanya Lattner
ab9cf27cd0
Fixed a bug where I was trying to ModuloSchedule a loop with no instructions but a terminator.
...
Fixed a bug in the schedule generation that was always using the start cycle.
llvm-svn: 18123
2004-11-22 20:41:24 +00:00
Chris Lattner
c15c120342
Remove JIT-specific code from the code emitter.
...
llvm-svn: 18122
2004-11-22 20:25:10 +00:00
Chris Lattner
8edcdaa6eb
New methods implemented
...
llvm-svn: 18121
2004-11-22 20:24:42 +00:00
Chris Lattner
b098ce7c8e
Implement the Sparc JIT interfaces, including relocation support.
...
llvm-svn: 18120
2004-11-22 20:24:27 +00:00
Chris Lattner
f251eec757
Exit only with a value from 0-255.
...
llvm-svn: 18119
2004-11-22 19:50:41 +00:00
Chris Lattner
53e86c4bac
%p is expanded by dejagnu, avoid it in the test.
...
llvm-svn: 18118
2004-11-22 19:25:45 +00:00
Chris Lattner
2bcd603149
Pull out failing test into a seperate file, which is xfailed
...
llvm-svn: 18117
2004-11-22 19:24:11 +00:00
Chris Lattner
a6b1e0e787
This was fixed
...
llvm-svn: 18116
2004-11-22 19:19:11 +00:00
Chris Lattner
9e90720658
Fix test/Regression/CFrontend/2003-11-01-EmptyStructCrash.c
...
llvm-svn: 18115
2004-11-22 19:15:27 +00:00
Chris Lattner
0157ac2de4
These tests really are failing, do not let them accidentally be XPASS.
...
Note that apparently 'failing command | succeeding command' is a fail on
csh but not on sh. :(
llvm-svn: 18114
2004-11-22 19:11:40 +00:00
Chris Lattner
ee59b6bf22
Don't stop make if there are XFAIL or XPASSes
...
llvm-svn: 18113
2004-11-22 19:06:22 +00:00
Reid Spencer
b4e3ec8509
Add a note about the name change of libraries.
...
llvm-svn: 18112
2004-11-22 18:40:51 +00:00
Tanya Lattner
69ecc03683
Moved dejagnu log link to the template.
...
llvm-svn: 18111
2004-11-22 18:36:12 +00:00
Chris Lattner
540e5f92b4
Do not count debugger intrinsics in size estimation.
...
llvm-svn: 18110
2004-11-22 17:23:57 +00:00
Chris Lattner
79e87e39eb
Ignore debugger intrinsics when doing inlining size computations.
...
llvm-svn: 18109
2004-11-22 17:21:44 +00:00
Chris Lattner
6d048a0d32
Do not consider debug intrinsics in the size computations for loop unrolling.
...
Patch contributed by Michael McCracken!
llvm-svn: 18108
2004-11-22 17:18:36 +00:00
Chris Lattner
a343a36713
Add a new debug intrinsic parent class. Patch contributed by Michael
...
McCracken, thanks!
llvm-svn: 18107
2004-11-22 17:18:05 +00:00
John Criswell
3249e3ef8c
Fixed typo.
...
llvm-svn: 18106
2004-11-22 17:16:26 +00:00
Tanya Lattner
94556b33eb
Changed to catch stderror of dejagnu and fixed missing quote.
...
llvm-svn: 18105
2004-11-22 17:16:01 +00:00
Chris Lattner
22ce929332
This is the proper code for this method, thanks to Reid for getting CVS working
...
again.
llvm-svn: 18103
2004-11-22 16:54:54 +00:00
John Criswell
41509625a0
Moved into the poolalloc tree.
...
llvm-svn: 18102
2004-11-22 16:32:35 +00:00
Reid Spencer
3c51c6c533
Implement a missing function called by JIT/Emitter.cpp but never defined.
...
NOTE: Its not clear that this implementation is correct.
CHRIS: Please review this!
llvm-svn: 18101
2004-11-22 12:38:36 +00:00
Brian Gaeke
dd10ba214e
Add stub method for long shift codegen.
...
llvm-svn: 18100
2004-11-22 08:02:06 +00:00
Brian Gaeke
d1502c5c5d
Update to-do list.
...
llvm-svn: 18099
2004-11-22 08:02:05 +00:00
Chris Lattner
50c2e117b3
Support targets that require stubs for external functions better
...
llvm-svn: 18098
2004-11-22 07:24:43 +00:00
Reid Spencer
db372c707b
Fix a comment to imply the correct semantics.
...
llvm-svn: 18097
2004-11-22 02:58:47 +00:00
Reid Spencer
4aa5f67a2e
Make sure output goes in the temporary/output directory.
...
llvm-svn: 18096
2004-11-22 02:46:31 +00:00
Chris Lattner
96304f816f
Initial checkin of the V9 relocation types
...
llvm-svn: 18095
2004-11-22 00:40:51 +00:00
Reid Spencer
d0572b45b1
* Undo previous commit that breaks the test.
...
* Correct the test to work when srcdir == objdir.
NOTE: Since multiple tests run from the same source archive and llvm-ranlib
changes the archive, these tests MUST work on a copy of the archive or else
this test corrupts the archive file subsequent tests or subsequent runs of
the test suite.
llvm-svn: 18094
2004-11-21 21:28:56 +00:00
Reid Spencer
687b0fa8fb
* Undo previous commit that breaks the test.
...
* Correct the test to work when srcdir == objdir.
NOTE: Since multiple tests run from the same source archive and llvm-ranlib
changes the archive, these tests MUST work on a copy of the archive or else
this test corrupts the archive file subsequent tests or subsequent runs of
the test suite.
llvm-svn: 18093
2004-11-21 21:22:56 +00:00
Reid Spencer
3f4f1e3511
First version of manual page for llvm-ld.
...
llvm-svn: 18092
2004-11-21 18:20:16 +00:00
John Criswell
e965bcd10e
Fixed another typo.
...
llvm-svn: 18091
2004-11-21 15:11:37 +00:00
John Criswell
8f002b6b50
Corrected spelling mistakes.
...
llvm-svn: 18090
2004-11-21 14:58:12 +00:00
John Criswell
a9f34caf42
It looks like I'm fixing a spelling mistake, but I'm really trying to
...
replicate the CVS performance problems that Reid is seeing.
llvm-svn: 18089
2004-11-21 14:34:34 +00:00
Brian Gaeke
29a4b354a3
Implement setcc on longs.
...
llvm-svn: 18088
2004-11-21 08:11:28 +00:00
Brian Gaeke
8ab27507fd
Add all the rest of the ADD and SUB variants, some of which are important for
...
64-bit support.
llvm-svn: 18087
2004-11-21 07:13:17 +00:00
Brian Gaeke
46cdc9e043
Support add, sub, mul, div, rem on longs/ulongs (latter 3 by emitting libcalls).
...
Add a big comment containing my notes on how to do setcc for longs/ulongs.
llvm-svn: 18086
2004-11-21 07:13:16 +00:00
Brian Gaeke
07ef7e0ae1
Update to-do list.
...
llvm-svn: 18085
2004-11-21 07:13:15 +00:00
Nate Begeman
6c9375b20c
Fix Shootout-C++/wc, which was broken by my recent changes to emit fewer
...
reg-reg copies. The necessary conditions for this bug are a GEP that is
used outside the basic block in which it is defined, whose components
other than the pointer are all constant zero, and where the use is
selected before the definition (backwards branch to successsor block).
llvm-svn: 18084
2004-11-21 05:14:06 +00:00
Chris Lattner
f530831f84
Fix a warning
...
llvm-svn: 18083
2004-11-21 04:42:32 +00:00
Chris Lattner
d68ebaacc0
There is no reason to emit function stubs for direct calls.
...
llvm-svn: 18082
2004-11-21 03:46:06 +00:00
Chris Lattner
9de8e2225f
Clean up DEBUG output
...
llvm-svn: 18081
2004-11-21 03:44:32 +00:00
Chris Lattner
65f6638822
Allow targets to avoid emitting a stub for EVERY lazily resolved call. In
...
most cases (e.g. direct calls) no stub is needed.
llvm-svn: 18080
2004-11-21 03:37:42 +00:00
Brian Gaeke
016bd3ba11
Fix extraStack calculation -- I think in fact it might be getting a bit *too*
...
much stack, but that's better than not enough, which leads to miscompilations.
Fix FP vaarg.
llvm-svn: 18079
2004-11-21 03:35:22 +00:00
Brian Gaeke
83189cdff3
Update list of failing benchmarks & to-do list.
...
llvm-svn: 18078
2004-11-21 03:35:21 +00:00
Chris Lattner
75178bfaea
Add another bit, to make the JIT a bit more efficient.
...
llvm-svn: 18077
2004-11-21 03:27:13 +00:00
Reid Spencer
19bea847bc
Test archive built with GNU ar(1).
...
llvm-svn: 18076
2004-11-21 01:36:59 +00:00
Tanya Lattner
72aca859c2
Made dejagnu option lower case.
...
llvm-svn: 18075
2004-11-21 00:10:12 +00:00
Tanya Lattner
c3d696fe04
Added the ability to run Dejagnu tests.
...
llvm-svn: 18074
2004-11-21 00:02:40 +00:00
Chris Lattner
894bf8eed0
ignore generated files
...
llvm-svn: 18073
2004-11-21 00:01:54 +00:00
Chris Lattner
aee9a76f52
ignore generated files.
...
llvm-svn: 18072
2004-11-21 00:00:54 +00:00
Chris Lattner
5c8c75fbe5
Ignore generated files
...
llvm-svn: 18071
2004-11-21 00:00:04 +00:00
Chris Lattner
fed24b6b04
Ignore files
...
llvm-svn: 18070
2004-11-20 23:58:43 +00:00
Chris Lattner
60d815a18b
Implement relocation support by adding a target independent resolver interface.
...
llvm-svn: 18069
2004-11-20 23:57:07 +00:00
Chris Lattner
d02c9eb697
Remove all JIT specific code and switch the code generator over to emitting
...
relocations for global references.
llvm-svn: 18068
2004-11-20 23:55:15 +00:00
Chris Lattner
b7e72cba22
Implement the X86 JIT interfaces
...
llvm-svn: 18067
2004-11-20 23:54:33 +00:00
Chris Lattner
8f2ed923ea
Describe the X86 target-specific relocations.
...
llvm-svn: 18066
2004-11-20 23:54:19 +00:00
Chris Lattner
8c645ec0d3
We implement these interfaces
...
llvm-svn: 18065
2004-11-20 23:53:56 +00:00
Chris Lattner
5f3d274f5f
Adjust to changed interfaces
...
llvm-svn: 18064
2004-11-20 23:53:26 +00:00
Chris Lattner
292bb60053
Change this interface a bit
...
llvm-svn: 18063
2004-11-20 23:52:43 +00:00
Tanya Lattner
f3c3ba6b7a
Adding missing dg file.
...
llvm-svn: 18062
2004-11-20 23:51:38 +00:00
Chris Lattner
374301ecb9
This method does not exist any longer.
...
llvm-svn: 18061
2004-11-20 23:51:03 +00:00
Chris Lattner
e7322e2ee9
Add new methods that a target should implement
...
llvm-svn: 18060
2004-11-20 23:50:02 +00:00
Tanya Lattner
017b0ec39b
Removing unnecessary copies. Use %p to reference them.
...
llvm-svn: 18059
2004-11-20 23:47:23 +00:00
Chris Lattner
858d87b907
Add missing #include
...
llvm-svn: 18058
2004-11-20 23:40:54 +00:00
Tanya Lattner
d27b014459
Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.
...
llvm-svn: 18057
2004-11-20 23:35:20 +00:00
Reid Spencer
9afecaf4ff
Cast the void* handle data member to HMODULE* to keep the VC++ compiler
...
happy. Thanks to Henrik Bach for pointing this out.
llvm-svn: 18056
2004-11-20 23:30:55 +00:00
Brian Gaeke
a8ea7d9cdb
Support most cases of vaarg (except double).
...
llvm-svn: 18055
2004-11-20 22:50:42 +00:00
Brian Gaeke
a45e7c40d4
Update failing test cases & to-do list.
...
llvm-svn: 18054
2004-11-20 22:50:41 +00:00
Reid Spencer
db7249e609
Use llvmc to compile test cases
...
llvm-svn: 18053
2004-11-20 21:03:34 +00:00
Reid Spencer
66c2d807a3
Get the -o option right
...
llvm-svn: 18052
2004-11-20 20:45:33 +00:00
Reid Spencer
835060938c
Get the -o option right
...
llvm-svn: 18051
2004-11-20 20:39:33 +00:00
Reid Spencer
27962c7997
Not needed any more.
...
llvm-svn: 18050
2004-11-20 20:27:20 +00:00
Reid Spencer
72f75bc3b7
Content moved to llvm-ld.cpp
...
llvm-svn: 18049
2004-11-20 20:15:08 +00:00
Reid Spencer
0c66f97ae6
Incorporate GenerateCode.cpp. Make static things static.
...
llvm-svn: 18048
2004-11-20 20:02:56 +00:00
Reid Spencer
dac73aa00a
First cut at implementing generic link-time Optimization
...
llvm-svn: 18047
2004-11-20 19:43:28 +00:00
Reid Spencer
0e8c76ed90
The Archive class now has differentiation for BSD4.4 and SVR4 style archive
...
symbol tables. Adjust our usage to compensate.
llvm-svn: 18046
2004-11-20 18:01:22 +00:00
Reid Spencer
ab8bf46913
Test floating point constants
...
llvm-svn: 18045
2004-11-20 07:29:51 +00:00
Reid Spencer
7a32486483
Distinguish between BSD4.4 and SVR4 symbol tables
...
llvm-svn: 18044
2004-11-20 07:29:40 +00:00
Reid Spencer
e1b2aabf10
An llvm-ar test.
...
llvm-svn: 18043
2004-11-20 07:25:41 +00:00
Reid Spencer
ead62081ea
Provide the srcdir variable.
...
llvm-svn: 18042
2004-11-20 07:25:10 +00:00
Reid Spencer
b4dd52ae4a
Describe the Archive test suite.
...
llvm-svn: 18041
2004-11-20 07:24:28 +00:00
Reid Spencer
374df50e95
Contents separated into individual tests.
...
llvm-svn: 18040
2004-11-20 07:23:56 +00:00
Chris Lattner
233e9bb546
This method was never implemented
...
llvm-svn: 18039
2004-11-20 04:19:47 +00:00
Chris Lattner
6f01b4cf1f
Remove this method, it's not clear how it could be implemented indep of 32 or 64-bit mode
...
llvm-svn: 18038
2004-11-20 04:17:17 +00:00
Chris Lattner
ae5ac03c1d
getJITStubForFunction is optional and unimplemented, just remove it for now.
...
llvm-svn: 18037
2004-11-20 04:15:38 +00:00
Chris Lattner
f0c6aff268
getJITStubForFunction is optional and unimplemented, just remove it.
...
llvm-svn: 18036
2004-11-20 04:14:44 +00:00
Chris Lattner
6cf7a43603
Add getCurrentPCOffset() and addRelocation() methods.
...
Add stub support for relocations to finishFunction
llvm-svn: 18035
2004-11-20 03:46:14 +00:00
Chris Lattner
f6fcf39aed
Add getCurrentPCOffset() and addRelocation() methods.
...
llvm-svn: 18034
2004-11-20 03:44:39 +00:00
Chris Lattner
50e498fac6
Add the getRelocationType method that I forgot
...
llvm-svn: 18033
2004-11-20 03:43:50 +00:00
Chris Lattner
6ee028a42a
Allow targets to implement relocation support.
...
llvm-svn: 18032
2004-11-20 03:43:27 +00:00
Brian Gaeke
774e978e0d
Implement vacopy and vanext.
...
llvm-svn: 18031
2004-11-20 03:32:12 +00:00
Chris Lattner
b7b78508a8
Add accessor
...
llvm-svn: 18030
2004-11-20 03:11:07 +00:00
Chris Lattner
1caf0161f2
New file
...
llvm-svn: 18029
2004-11-20 03:05:50 +00:00
Misha Brukman
72a57c3259
Allow constructor parameter to override aggregating args; fix spacing
...
llvm-svn: 18028
2004-11-20 02:20:27 +00:00
Chris Lattner
91a88ae6d1
Remove dead #include
...
llvm-svn: 18027
2004-11-20 02:17:03 +00:00
Misha Brukman
29d3d46c36
If we're going to mention mv and cp, clearly, we also need `rm'
...
llvm-svn: 18026
2004-11-20 01:27:40 +00:00
Misha Brukman
4bf11e1618
Revert the patch that adds Function* for each 64-bit libc div/mul/rem that we
...
want to do; instead, we can use MachineInstr::addExternalSymbol(char*, bool) and
thus we don't have to modify the Module as we are code generating for it
llvm-svn: 18025
2004-11-20 00:10:20 +00:00
Tanya Lattner
2e4f222045
Made modsched hidden and changed so it matches the style of other options.
...
llvm-svn: 18024
2004-11-19 23:34:33 +00:00
Misha Brukman
f1ccebba3d
Fix grammar
...
llvm-svn: 18023
2004-11-19 23:09:40 +00:00
Tanya Lattner
5615a28d13
Forgot to join srcdir and subdir for complete path for input files.
...
llvm-svn: 18022
2004-11-19 23:00:19 +00:00
Tanya Lattner
8287d24dd3
Adding srcdir arg. Added ability to specify the path to an input file. This is needed for when srcdir != objdir.
...
llvm-svn: 18021
2004-11-19 22:46:23 +00:00
Tanya Lattner
f1e4bf5b66
Adding srcdir arg
...
llvm-svn: 18020
2004-11-19 22:45:25 +00:00
Misha Brukman
ce75b2c2cf
Add protoypes for 64-bit long/ulong div, mul, and rem functions
...
llvm-svn: 18019
2004-11-19 22:14:35 +00:00
Misha Brukman
dbe04afcb9
Fix file comment header
...
llvm-svn: 18018
2004-11-19 22:09:21 +00:00
Misha Brukman
a559eee32f
Ignore files generated by pod2html
...
llvm-svn: 18017
2004-11-19 21:54:43 +00:00
Misha Brukman
1ed0fa5cdf
* Remove disk space requirements, they vary wildly, depend on the number of
...
tools built, the build type, and we don't keep them up-to-date on all
platforms
* AIX, Linux on PowerPC aren't fully-supported systems
llvm-svn: 18016
2004-11-19 21:53:22 +00:00
Misha Brukman
cb178bd478
Handle GhostLinkage case for completeness (should not be seen by the asm writer)
...
llvm-svn: 18015
2004-11-19 21:49:19 +00:00
Reid Spencer
7ac3426f3b
Test case for reading MacOSX archives.
...
llvm-svn: 18014
2004-11-19 21:30:15 +00:00
Reid Spencer
23790aded8
MacOSX test archive (buggy).
...
llvm-svn: 18013
2004-11-19 21:29:45 +00:00
Brian Gaeke
1db83f7b73
Add VANext and VAArg stubs.
...
llvm-svn: 18012
2004-11-19 21:08:18 +00:00
Brian Gaeke
1c014df436
Implement va_start.
...
llvm-svn: 18011
2004-11-19 20:57:24 +00:00
Chris Lattner
4cd9def8b7
Dont' forget to switch back to decimal output
...
llvm-svn: 18010
2004-11-19 20:57:07 +00:00
Chris Lattner
c27389815d
Match change in MachineCodeEmitter prototype.
...
llvm-svn: 18009
2004-11-19 20:56:46 +00:00
Chris Lattner
2d1c4962f3
External symbols are const char*'s now, change this to match.
...
llvm-svn: 18008
2004-11-19 20:56:22 +00:00
Chris Lattner
b3e3840e5c
Instead of storing std::string's for ExternalSymbol references, rely on the
...
fact that all ExternalSymbols are actually string literals with static storage.
Thus we don't have to do anything special to hold them and we certainly don't
have to copy string data around.
llvm-svn: 18007
2004-11-19 20:46:15 +00:00
Brian Gaeke
3db46bd0e1
First part of varargs support: getting all varargs which could possibly
...
be in registers into memory.
llvm-svn: 18006
2004-11-19 20:31:08 +00:00
Chris Lattner
e404d724ea
Fix a bug that caused stuff like this:
...
main at ./eh.cpp:1414 -> printf("a\n");
to be printed, instead of this:
main at ./eh.cpp:14
14 -> printf("a\n");
llvm-svn: 18005
2004-11-19 19:45:44 +00:00
Brian Gaeke
8bb29bf3f6
va_end can safely be codegen'd to nothing on v8.
...
llvm-svn: 18004
2004-11-19 19:21:34 +00:00
Brian Gaeke
201535d102
A very sorry stub implementation of varargs intrinsics...
...
llvm-svn: 18003
2004-11-19 18:53:59 +00:00
Brian Gaeke
1810073046
Update list of expected test failures.
...
llvm-svn: 18002
2004-11-19 18:48:29 +00:00
Brian Gaeke
3effd0d769
Fix bug in casting to long/ulong.
...
llvm-svn: 18001
2004-11-19 18:48:10 +00:00
Reid Spencer
b8930d72ae
Make sure we can read an archive after it has been ranlib'd
...
llvm-svn: 18000
2004-11-19 18:44:31 +00:00
Chris Lattner
a8a8a03a85
Fix memory leaks, patch contributed by Morten Ofstad!
...
llvm-svn: 17999
2004-11-19 17:09:48 +00:00
Chris Lattner
37bcd99622
Patches to avoid "leaking" memory on process exit. Patch contributed by
...
Morten Ofstad!
llvm-svn: 17998
2004-11-19 17:08:15 +00:00
Reid Spencer
78e12c73e5
Correct the computation of when to add the padding. It is not based on the
...
member's size. It is based on the oddness/evenness of the file pointer.
This fixes a bug with llvm-ar not being able to read archives produced by
llvm-ranlib when there are members with odd long file name lengths.
llvm-svn: 17997
2004-11-19 17:08:00 +00:00
Chris Lattner
446948e094
Fix the exposed prototype for the lower packed pass, thanks to
...
Morten Ofstad.
llvm-svn: 17996
2004-11-19 16:49:34 +00:00
Chris Lattner
99a669b110
Add hooks to free all memory allocated by the singleton factories in these
...
files. Patch contributed by Morten Ofstad!
llvm-svn: 17995
2004-11-19 16:39:44 +00:00
Chris Lattner
083ce459c7
Add static functions to clear singleton maps. Patch contributed by
...
Morten Ofstad!
llvm-svn: 17994
2004-11-19 16:39:04 +00:00
Chris Lattner
8943604aeb
These methods are long gone, ConstantPointerRef is dead.
...
llvm-svn: 17993
2004-11-19 16:25:42 +00:00
Chris Lattner
d137be2d0d
CPR is dead.
...
llvm-svn: 17992
2004-11-19 16:24:57 +00:00
Chris Lattner
ddf3b7997f
Add note that this is for old bytecode files.
...
llvm-svn: 17991
2004-11-19 16:24:05 +00:00
Chris Lattner
1b4e78d9e6
Mission accomplished!
...
llvm-svn: 17990
2004-11-19 16:22:24 +00:00
Reid Spencer
dc23fe9ded
Allow this to compile even on machines that HAVE the bzlib library but do
...
NOT have the bzlib.h header file. Go figure.
llvm-svn: 17989
2004-11-19 15:56:28 +00:00
Chris Lattner
d215992b35
This is a horrible hack to work around libstdc++ bugs :(
...
llvm-svn: 17988
2004-11-19 08:44:07 +00:00
Nate Begeman
488f4a4352
Eliminate another 6k register copies that the register allocator would just
...
coalesce out of hbd. Speeds up compilation by 2% (0.6s)
llvm-svn: 17987
2004-11-19 08:01:16 +00:00
Chris Lattner
dad1823703
Fix a bug in the checkin where I adjusted this code to work when
...
LinkModules nukes the second module argument.
llvm-svn: 17986
2004-11-19 07:09:40 +00:00
Reid Spencer
0bcf9e4da6
Undo last change as its unnecessary.
...
llvm-svn: 17985
2004-11-19 04:59:07 +00:00
Reid Spencer
33fe653a94
Test case for xpg4 style archive files.
...
llvm-svn: 17984
2004-11-19 04:46:10 +00:00
Reid Spencer
866b586851
Test reading of SVR4 style archives with llvm-ar
...
llvm-svn: 17983
2004-11-19 04:45:19 +00:00
Reid Spencer
a8f3ed701a
Test case for reading SVR4 style archives.
...
llvm-svn: 17982
2004-11-19 04:33:13 +00:00
Reid Spencer
fc9f779039
Don't save an iterator, just use post-increment.
...
llvm-svn: 17981
2004-11-19 03:44:10 +00:00
Reid Spencer
6abd4457e7
Solaris built archives in SVR4 and XPG4 styles.
...
llvm-svn: 17980
2004-11-19 03:41:57 +00:00
Reid Spencer
3356325996
Eliminate unsightly ;;
...
llvm-svn: 17979
2004-11-19 03:27:05 +00:00
Reid Spencer
9aa7a2b468
A test file that goes into the test archive.
...
llvm-svn: 17978
2004-11-19 03:24:02 +00:00
Reid Spencer
5d76fa0a3c
Make a cast explicit.
...
llvm-svn: 17977
2004-11-19 03:20:09 +00:00
Reid Spencer
39a0347b79
Make findModulesDefiningSymbols modify its symbols argument so we can \
...
eliminate symbols defined by the archive efficiently
llvm-svn: 17976
2004-11-19 03:18:22 +00:00
Reid Spencer
c2455ca7b7
Reduce the amount of work in LinkInArchive by not searching the archive for
...
symbols it has already identified as not defining.
llvm-svn: 17975
2004-11-19 03:13:25 +00:00
Reid Spencer
519a247cf1
Obligatory DejaGnu/expect file.
...
llvm-svn: 17974
2004-11-19 02:26:35 +00:00
Nate Begeman
f4fd759f9e
Generate fewer reg-reg copies for the register allocator to deal with.
...
This eliminates over 2000 in hbd alone.
llvm-svn: 17973
2004-11-19 02:06:40 +00:00
Tanya Lattner
0b40ee68e2
Fixed a typo.
...
llvm-svn: 17972
2004-11-19 01:26:37 +00:00
Tanya Lattner
fb966bac52
Added link to information on Statistic which is in the Programmers Manual.
...
llvm-svn: 17971
2004-11-19 01:25:14 +00:00
Chris Lattner
953075442d
Delete stoppoints that occur for the same source line.
...
llvm-svn: 17970
2004-11-18 21:41:39 +00:00
Chris Lattner
4c9c99bda8
Add support for llvm.dbg.stoppoint
...
llvm-svn: 17969
2004-11-18 21:41:16 +00:00
Chris Lattner
2487431dee
Line numbers are go for 1.4! :)
...
llvm-svn: 17967
2004-11-18 21:25:11 +00:00
Chris Lattner
af87e2c2b8
libpng is not even used by povray3.1 in the current configuration, just
...
drop it completely.
llvm-svn: 17966
2004-11-18 21:21:54 +00:00
Chris Lattner
ee21a973a1
Add MMC
...
llvm-svn: 17965
2004-11-18 21:04:21 +00:00
Reid Spencer
0dbf101c90
Duh, put tools in *bin* directory, not *tools* directory as per
...
PR456.
llvm-svn: 17964
2004-11-18 20:04:39 +00:00
Chris Lattner
7fd27e2c35
Remove debugging code, unneuter this functionality
...
llvm-svn: 17963
2004-11-18 19:42:50 +00:00
Chris Lattner
8cb483b335
remove debugging code
...
llvm-svn: 17962
2004-11-18 19:40:13 +00:00
Tanya Lattner
cb0da4f1b7
Fixed to fit in 80 columns.
...
llvm-svn: 17961
2004-11-18 18:47:29 +00:00
Reid Spencer
e4190faa0c
Add notes about makefile changes and llvm-ar.
...
llvm-svn: 17960
2004-11-18 18:38:58 +00:00
Tanya Lattner
21590db8fd
Adding option to llc for ModuloScheduling. By default it is turned off.
...
llvm-svn: 17959
2004-11-18 18:38:01 +00:00
Chris Lattner
de5626cd40
These methods are inlined
...
llvm-svn: 17958
2004-11-18 17:47:13 +00:00
Chris Lattner
8a8e988766
Update comments, now that CPR's are gone, inline the methods
...
llvm-svn: 17957
2004-11-18 17:46:57 +00:00
Chris Lattner
c08ac110df
Check in hook that I forgot
...
llvm-svn: 17956
2004-11-18 17:24:20 +00:00
Reid Spencer
7e9e0b0c82
Fix PR456:\
...
Tools and libraries will be built into $(BUILD_OBJ_ROOT)/$(BuildMode)/bin and \
$(BUILD_OBJ_ROOT)/$(BuildMode)/lib, respectively. Furthermore, the example \
programs will go in $(BUILD_OBJ_ROOT)/$(BuildMode)/examples to keep them \
separate from the tools and hopefully out of the PATH. Install targets \
have not changed.
llvm-svn: 17953
2004-11-18 10:03:46 +00:00
Reid Spencer
231e4d7772
Include ltdl.h if we have it.
...
llvm-svn: 17952
2004-11-18 09:50:00 +00:00
Reid Spencer
6d854b0b07
Add checks for HAVE_LTDL_H and HAVE_LT_DLOPEN
...
llvm-svn: 17951
2004-11-18 09:49:13 +00:00
Reid Spencer
c4b5cfc602
Changes for testing presence of ltdl.h and lt_dlopen(), libtool functions
...
for cross-platform dynamic loading of shared objects.
llvm-svn: 17950
2004-11-18 09:47:37 +00:00
Brian Gaeke
de6e536849
Rewrite LoadArgumentsToVirtualRegs, making it match almost exactly how
...
visitCallInst works. Support cast of byte/short/int to long.
llvm-svn: 17949
2004-11-18 07:43:33 +00:00
Brian Gaeke
2c6b9c914b
Update current expected failures list - expand it to include all of
...
SingleSource. Update to-do list (open-coding refers to binary operations on
longs, not to passing them into functions, which we already support.)
llvm-svn: 17948
2004-11-18 07:43:32 +00:00
Nate Begeman
2b575bec80
Eliminate another common source of moves that the register allocator
...
shouldn't be forced to coalesce for us: folded GEP operations. This too
fires thousands of times across the testsuite.
llvm-svn: 17947
2004-11-18 07:22:46 +00:00
Nate Begeman
5d9c292e7f
When accessing the base register for global variables, use the register
...
directly rather than making a copy for the register allocator to coalesce.
This kills thousands of live intervals across the testsuite.
llvm-svn: 17946
2004-11-18 06:51:29 +00:00
Chris Lattner
b75e790a2b
* There is no reason for SpillWeights to be an instance var
...
* Do not put fixed registers into the unhandled set. This means they will
never find their way into the inactive, active, or handled sets, so we
can simplify a bunch of code.
llvm-svn: 17945
2004-11-18 06:01:45 +00:00
Chris Lattner
e3b9cb9959
There is no need to check to see if j overflowed in this loop as we're only
...
incrementing i.
llvm-svn: 17944
2004-11-18 05:28:21 +00:00
Chris Lattner
6e0c3f44ba
Moderate head scratching reveals that this conditional is not needed. If
...
i->start == j->start, then certainly i->end > j->start.
llvm-svn: 17943
2004-11-18 05:19:02 +00:00
Nate Begeman
51f6635e42
Clean up and fix cast codegen by removing cases that are handled elsewhere,
...
and properly emitting signed short to unsigned int. This fixes the last
regression vs. the CBE, MultiSource/Applications/hbd.
llvm-svn: 17942
2004-11-18 04:56:53 +00:00
Reid Spencer
dfa81ff3ff
Dynamic Library abstraction. This makes the abstraction of a single dynamic
...
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.
llvm-svn: 17941
2004-11-18 04:33:40 +00:00
Reid Spencer
4a763ca854
Dynamic Library abstraction. This makes the abstraction of a single dynamic
...
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.
llvm-svn: 17940
2004-11-18 04:33:39 +00:00
Chris Lattner
08ec603bb0
Fix a couple of bugs where we considered physregs past their range as possibly
...
intersecting an interval.
llvm-svn: 17939
2004-11-18 04:33:31 +00:00
Chris Lattner
cf972ff7cb
Fix typeo
...
llvm-svn: 17938
2004-11-18 04:31:10 +00:00
Chris Lattner
49ff5f0477
Start using the iterators in the fixed_ intervals to avoid having to binary
...
search physreg intervals every time we access it. This takes another
half second off of linscan.
llvm-svn: 17937
2004-11-18 04:13:02 +00:00
Chris Lattner
7598c316e5
Take another .7 seconds off of linear scan time.
...
llvm-svn: 17936
2004-11-18 04:02:11 +00:00
Chris Lattner
850852c789
Add a counter for the number of times linscan has to backtrack. Start using
...
the iterator hints we have to speed up overlaps(). This speeds linscan up
by about .2s (out of 8.7) on 175.vpr for PPC.
llvm-svn: 17935
2004-11-18 03:49:30 +00:00
Chris Lattner
cb0c9655bf
Add ability to give hints to the overlaps routines.
...
llvm-svn: 17934
2004-11-18 03:47:34 +00:00
Chris Lattner
a1f7779876
* Improve comments/documentation substantially
...
* Eliminate the releaseMemory method, this is not an analysis
* Change the fixed, active, and inactive lists of intervals to maintain an
iterator for the current position in the interval. This allows us to do
constant time increments of the iterator instead of having to do a binary
search to find our liverange in our liveinterval all of the time, which
substantially speeds up cases where LiveIntervals have many LiveRanges
- which is very common for physical registers. On targets with many
physregs, this can make a noticable difference.
With a release build of LLC for PPC, this halves the time in
processInactiveIntervals and processActiveIntervals, from 1.5s to .75s.
This also lays the ground for more to come.
llvm-svn: 17933
2004-11-18 02:42:27 +00:00
Chris Lattner
0624f95175
Add new advanceTo method
...
llvm-svn: 17932
2004-11-18 02:37:31 +00:00
Chris Lattner
7d92fc7e89
Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
...
llvm-svn: 17931
2004-11-18 01:34:44 +00:00
Chris Lattner
a51f5eeac1
Rename some methods, use 'begin' instead of 'start', add new LiveInterval
...
iterator/begin/end members.
llvm-svn: 17930
2004-11-18 01:29:39 +00:00
Brian Gaeke
1553b58f39
Allocate fewer registers and tighten up alignment restrictions.
...
llvm-svn: 17929
2004-11-18 00:25:20 +00:00
Brian Gaeke
2a3e8a7268
Update to-do list.
...
llvm-svn: 17927
2004-11-17 22:33:55 +00:00
Brian Gaeke
3b10744e0f
Update list of failing SingleSource Benchmarks
...
llvm-svn: 17926
2004-11-17 22:33:28 +00:00
Brian Gaeke
f1233fb84f
We were (somehow) getting the wrong branch opcode for setcc float instrs.
...
llvm-svn: 17925
2004-11-17 22:06:56 +00:00
Alkis Evlogimenos
531e901deb
Make ReturnInst accept a value of type void as the return value. The
...
ReturnInst constructed is the same as if NULL was passed instead of
the void value.
llvm-svn: 17923
2004-11-17 21:02:25 +00:00
Reid Spencer
f8d6f7e973
Add a standards section.
...
llvm-svn: 17921
2004-11-17 20:19:18 +00:00
Reid Spencer
91234ff57a
Fix PR458:
...
* Don't include Makefile.rules in set of preconditions, it never has to be
copied to objdir.
* Enable the "update makefile first before executing targets" feature in
gnu make by *not* using a full path to the Makefile in the rule.
llvm-svn: 17920
2004-11-17 19:08:44 +00:00
Reid Spencer
67c46c8d70
Fix some things for Mac OSX archives:
...
* ensure trailing spaces are eliminated so they don't factor into the
length of a member's name.
* make sure all the bytes of a name are written even if the name ends in
multiple null characters (bug in OSX ar)
* make sure we provide the full member name when searching for symbols so
the module name is not accidentally duplicated.
llvm-svn: 17918
2004-11-17 18:28:29 +00:00
Reid Spencer
b58bf5fa28
Make sure we parse bytecode with a module identifier that reflects the full
...
name of the module: "Archive.a(object.o)"
llvm-svn: 17917
2004-11-17 18:25:21 +00:00
Chris Lattner
d5f5288066
Make this more accurate
...
llvm-svn: 17916
2004-11-17 18:19:32 +00:00
Chris Lattner
1c18011de6
New prototype for lowerpacked pass.
...
llvm-svn: 17915
2004-11-17 18:01:49 +00:00
Chris Lattner
ba18b9a0da
Generalize this code to turn any cast-to-first-element-of into a gep constexpr
...
llvm-svn: 17914
2004-11-17 17:59:35 +00:00
Chris Lattner
c368b63515
Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll
...
by saying what we mean
llvm-svn: 17913
2004-11-17 17:39:39 +00:00
Chris Lattner
9d339a75ae
New testcase that crashes licm
...
llvm-svn: 17912
2004-11-17 17:39:19 +00:00
Chris Lattner
7a3767521d
-disable-opt is not -O0, it's okay for it to disable internalize.
...
llvm-svn: 17911
2004-11-17 16:41:19 +00:00
Reid Spencer
1154bb6b43
Adjust long file name writing to match BSD 4.4 and Mac OSX style archives.
...
llvm-svn: 17910
2004-11-17 16:14:21 +00:00
Reid Spencer
0dea46fe67
Despite documentation to the contrary, Mac OSX and BSD 4.4 archive formats
...
*do* include the length of the long file in the length of the member and
they are *not* null terminated.
llvm-svn: 17909
2004-11-17 16:13:11 +00:00
Tanya Lattner
7beb51cd29
Added my own defMap. Only saving values that are not loop invariant. Fixed a couple of assertions that were triggered due to registers not being allocated. These both had to do with PHINodes.
...
llvm-svn: 17907
2004-11-16 21:31:37 +00:00
Chris Lattner
6d7c8d6801
Minor cleanup and speedup. This reduces link-time for 252.eon from 35.5s
...
to 34.7s with a profile build.
llvm-svn: 17906
2004-11-16 20:39:04 +00:00
Chris Lattner
b38dd7cf54
Make this function work with non-abstract types.
...
llvm-svn: 17905
2004-11-16 20:30:53 +00:00
Chris Lattner
f27514df9d
Don't increment a dead iterator
...
llvm-svn: 17904
2004-11-16 19:04:40 +00:00
Chris Lattner
05fe0244e1
Even with -disable-opt we should still internalize and strip if requested.
...
llvm-svn: 17903
2004-11-16 18:59:20 +00:00
Chris Lattner
2004d90f97
Fix a major bug in the signed shr code, which apparently only breaks 134.perl!
...
llvm-svn: 17902
2004-11-16 18:40:52 +00:00
Reid Spencer
1b13a7cdb8
* Use low-level unix I/O interface since we're on Unix.
...
* Don't use variable length arrays (replaced with alloca)
llvm-svn: 17901
2004-11-16 17:14:08 +00:00
Chris Lattner
7391dde138
Simplify the remapper by only needing one map, since the body of the functions
...
being linked do not need to be remapped any longer.
llvm-svn: 17900
2004-11-16 17:12:38 +00:00
Reid Spencer
be01508f75
Make the comment for LinkFiles a bit more precise and easily understood.
...
llvm-svn: 17899
2004-11-16 16:46:22 +00:00
Chris Lattner
6e7336cc81
New testcase for recent patch to SCCP, thanks to Nate Begeman for pointing
...
out this recent regression
llvm-svn: 17898
2004-11-16 16:39:20 +00:00
Chris Lattner
27af257ea0
Do not delete dead invoke instructions!
...
llvm-svn: 17897
2004-11-16 16:32:28 +00:00
Misha Brukman
c356686749
Erase non-applicable Unix comment, this is Win32
...
llvm-svn: 17896
2004-11-16 07:35:32 +00:00
Brian Gaeke
b21ea3cb41
Update list of failing benchmarks
...
llvm-svn: 17895
2004-11-16 07:32:58 +00:00
Brian Gaeke
97f8adffff
Correct the implicit-defs information for indirect and direct calls.
...
You can't have implicit defs that overlap explicit defs, or implicit
defs that alias one another.
llvm-svn: 17894
2004-11-16 07:32:09 +00:00
Chris Lattner
2f0557d0e4
Take advantage of the fact that we are allowed to clobber the input module
...
by splicing function bodies from the src module to the destination module.
This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build. One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???
In any case, this is just a first step. We can trivially get rid of the
LocalMap now and do other simplifications.
llvm-svn: 17893
2004-11-16 07:31:51 +00:00
Reid Spencer
4c66d89b33
Fix typeo in comment.
...
llvm-svn: 17892
2004-11-16 07:05:16 +00:00
Reid Spencer
7cdcb2b0cb
Remove useless #include.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17891
2004-11-16 07:00:23 +00:00
Reid Spencer
f070b6c4ac
Simplify code.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17890
2004-11-16 06:59:53 +00:00
Reid Spencer
f5e3cfe6d6
Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++
...
Patch contributed by Jeff Cohen.
llvm-svn: 17889
2004-11-16 06:58:55 +00:00
Reid Spencer
2732be9e52
Remove dupliate buid of Signals.cpp
...
Patch contributed by Jeff Cohen.
llvm-svn: 17888
2004-11-16 06:57:30 +00:00
Brian Gaeke
a057cd2401
Give a better message for a common assertion failure.
...
llvm-svn: 17887
2004-11-16 06:52:35 +00:00
Reid Spencer
f0173e0c48
Add a comment to some code that at first glance just doesn't look right.
...
llvm-svn: 17886
2004-11-16 06:50:36 +00:00
Reid Spencer
5208a11440
Per code review:\
...
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)
llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Reid Spencer
8d784fbd3f
Per code review:\
...
* Make the numVbrBytes function more efficient and better documented \
* Fix a bug in name truncation \
* Add comments before functions \
* Get rid of functions that are now inlined into the header \
* Do not have Archive doing symbol table printing \
* Put assert comments into the assert so they print out \
* Make sure foreign symbol tables are written
llvm-svn: 17884
2004-11-16 06:47:30 +00:00
Reid Spencer
4abd79e8ea
Per code review:\
...
* Make sure we write out the foreign symbol table if we read one \
* Make the padding calculation more efficiently and avoid Solaris warnings
llvm-svn: 17883
2004-11-16 06:47:19 +00:00
Reid Spencer
40878f35de
Per code review:\
...
* Make sure all members are initialized upon construction
llvm-svn: 17882
2004-11-16 06:47:07 +00:00
Reid Spencer
6d737f5d24
Per code review:\
...
* Use STL names for STL operations \
* Do not have Archive doing symbol table printing \
* Avoid compiler warnings about only having private constructors.
llvm-svn: 17881
2004-11-16 06:46:55 +00:00
Chris Lattner
f2e808449d
The second arg may be clobbered by this function
...
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Chris Lattner
5d6c23606d
Document this as clobbering the second arg, make the second arg be non-const
...
llvm-svn: 17879
2004-11-16 06:41:21 +00:00
Reid Spencer
66dc515ed6
Per code review: \
...
* Make static things static \
* Get rid of unused TmpArchive variable \
* Implement symbol table printing \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.
llvm-svn: 17878
2004-11-16 06:41:20 +00:00
Reid Spencer
9fc38b1712
Per code review: \
...
* hide the compatibility option \
* Make static things static \
* Use cl::extrahelp instead of cl::MoreHelp (defunct) \
* Use cl::PrintHelpMessage instead of our own printUse function \
* Use a std::set<sys::Path> for the path list because its now required by \
the sys::Path class and also ensues directories are traversed in sorted \
order.\
* Implement symbol table printing locally instead of in libLLVMArchive \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.
llvm-svn: 17877
2004-11-16 06:41:09 +00:00
Reid Spencer
2df70a7e2f
Per code review:\
...
* Get rid of memory leaks on exception \
* Provide better comments of how the memory handling works
llvm-svn: 17876
2004-11-16 06:41:05 +00:00
Chris Lattner
2981914302
use an autoptr
...
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Chris Lattner
d308797cae
Make this code not depend on LinkModules leaving the second argument unmolested.
...
llvm-svn: 17874
2004-11-16 06:31:38 +00:00
Reid Spencer
09e9f2a37b
Per code review:
...
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32
llvm-svn: 17873
2004-11-16 06:22:17 +00:00
Reid Spencer
91f505eae9
Per code review:
...
* Clean up the StatusInfo constructor to construct all members and give
them reasonable values.
* Get rid of the Vector typedef and make the interface to
getDirectoryContent use a std::set instead of a std::vector so the dir
content is sorted.
* Make the getStatusInfo method const and not return a useless boolean.
llvm-svn: 17872
2004-11-16 06:15:19 +00:00
Reid Spencer
5e5547045b
Per code review:
...
*Implement/Document the cl::extrahelp feature instead of the MoreHelp ptr.
llvm-svn: 17871
2004-11-16 06:11:52 +00:00
Chris Lattner
f242979cd0
Simplify namespaces
...
llvm-svn: 17870
2004-11-16 04:47:33 +00:00
Chris Lattner
6b7652fae5
Remove a dead function, which died when we got GAS emission working (phwew,
...
hold your nose!)
llvm-svn: 17869
2004-11-16 04:34:29 +00:00
Chris Lattner
c927072b50
Implement a simple FIXME: if we are emitting a basic block address that has
...
already been emitted, we don't have to remember it and deal with it later,
just emit it directly.
llvm-svn: 17868
2004-11-16 04:30:51 +00:00
Chris Lattner
2e182fc39b
* Merge some win32 ifdefs together
...
* Get rid of "emitMaybePCRelativeValue", either we want to emit a PC relative
value or not: drop the maybe BS. As it turns out, the only places where
the bool was a variable coming in, the bool was a dynamic constant.
llvm-svn: 17867
2004-11-16 04:21:18 +00:00
Misha Brukman
b4bd8de9a4
* Change test/projects => projects/llvm-test
...
* Add link to complete Command Guide in the "brief intro to major tools" section
llvm-svn: 17866
2004-11-15 23:20:51 +00:00
Chris Lattner
58d5b2a9bb
Add an accessor
...
llvm-svn: 17865
2004-11-15 23:20:19 +00:00
Chris Lattner
1edd79a1bc
Now that we have ghost linkage, we can force resolution of external symbols
...
immediately instead of lazily.
In this program, for example:
int main() {
printf("hello world\n");
printf("hello world\n");
printf("hello world\n");
printf("hello world\n");
}
We used to have to go through compilation callback 4 times (once for each
call to printf), now we don't go to it at all.
Thanks to Misha for noticing this, and for adding the initial ghost linkage
patches.
llvm-svn: 17864
2004-11-15 23:20:04 +00:00
Chris Lattner
b264f7f428
There is no reason to try to materialize the function from bytecode if it
...
already has been. This may be a small speedup.
llvm-svn: 17863
2004-11-15 23:18:09 +00:00
Chris Lattner
9cc2dac7c1
Add debug-only=jit printout, so we see when lazily resolved symbols are
...
set up.
llvm-svn: 17862
2004-11-15 23:16:55 +00:00
Chris Lattner
34b754d99b
Simplify and rearrange long shift code
...
llvm-svn: 17861
2004-11-15 23:16:34 +00:00
Chris Lattner
97f5c0e5df
Update to reflect recent change
...
llvm-svn: 17860
2004-11-15 22:54:50 +00:00
Chris Lattner
3b6bb48c16
Do not emit FunctionBlock blocks for external functions. This shrinks
...
bytecode files by about 8 bytes per external function
llvm-svn: 17859
2004-11-15 22:39:49 +00:00
Chris Lattner
642f8c5ed4
Use a per-function flag bit to indicate whether or not there is a function
...
body for the function.
llvm-svn: 17858
2004-11-15 22:38:52 +00:00
Chris Lattner
9b457e1c73
Disable this change, it was premature
...
llvm-svn: 17857
2004-11-15 21:56:33 +00:00
Chris Lattner
7d04cdab77
Make *SURE* to null out the pointer before throwing an exception, otherwise
...
the dtor for the BytecodeReader class will try to free it again!
llvm-svn: 17856
2004-11-15 21:55:33 +00:00
Chris Lattner
36c95e38b0
Cleanups. Null out pointer after freeing it for paranoia
...
llvm-svn: 17855
2004-11-15 21:55:06 +00:00
Chris Lattner
94bd315c3f
If a function is external, do not output a FunctionBlock for the function
...
AT ALL. This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.
llvm-svn: 17854
2004-11-15 21:46:40 +00:00
Chris Lattner
55d85402f6
Make functions default to having external linkage if they have no
...
FunctionBlock.
llvm-svn: 17853
2004-11-15 21:43:03 +00:00
Reid Spencer
16d3f968ba
Remove useless/confusing namespace qualifier.
...
llvm-svn: 17852
2004-11-15 21:27:05 +00:00
Misha Brukman
a8c99d4daf
Add BCTR and LWZU instruction opcodes
...
llvm-svn: 17851
2004-11-15 21:20:09 +00:00
Reid Spencer
38fcf309fc
Merge content of RequiredSoftware.html into GettingStarted.html
...
Remove now defunct RequiredSoftware.html.
llvm-svn: 17850
2004-11-15 21:15:12 +00:00
Misha Brukman
dca7238d56
* Add entry for Linux/PowerPC
...
* Mark MacOS X/PPC support as 32-bit-only
* Fix FreeBSD space usage -- it's in MB, not GB
llvm-svn: 17848
2004-11-15 21:05:08 +00:00
Misha Brukman
ef8d601a53
Be less verbose when The' and command' just aren't necessary
...
llvm-svn: 17846
2004-11-15 20:39:30 +00:00
Misha Brukman
6c668c4fba
No need for the verbose the llvm-link command' when simply llvm-link' will do
...
llvm-svn: 17845
2004-11-15 20:36:39 +00:00
Misha Brukman
16c9176043
Force a short link to gccld's man page
...
llvm-svn: 17844
2004-11-15 20:32:58 +00:00
Misha Brukman
da25907381
Fix syntax within a B<> tag
...
llvm-svn: 17843
2004-11-15 20:30:19 +00:00
Reid Spencer
e51e5724b7
Remove personal email address.
...
llvm-svn: 17842
2004-11-15 20:25:08 +00:00
Misha Brukman
4055d31868
Add the PowerPC 32-bit ABI output option
...
llvm-svn: 17840
2004-11-15 20:22:49 +00:00
Chris Lattner
cc93ee5b45
Bump version. Shouldn't this come from somewhere else??
...
llvm-svn: 17839
2004-11-15 20:06:11 +00:00
Misha Brukman
a8e1718932
* Add an entry for llvm-ranlib
...
* Add missing dashes
llvm-svn: 17838
2004-11-15 19:53:43 +00:00
Misha Brukman
774a6be462
This is llvm-ar, not llvm-as.
...
llvm-svn: 17837
2004-11-15 19:50:15 +00:00
Reid Spencer
d4d25bdb2b
Remove reference to llvm-ld.
...
llvm-svn: 17836
2004-11-15 19:47:20 +00:00
Reid Spencer
38f5a1c6c4
Terminate a list.
...
Remove reference to llvm-ld
llvm-svn: 17835
2004-11-15 19:45:29 +00:00
Misha Brukman
d92f54ae6e
Remove extra space char
...
llvm-svn: 17834
2004-11-15 19:30:05 +00:00
Tanya Lattner
8213dae317
This file was originally developed by the LLVM research group so this comment should stay. I also do NOT want my name explicity listed on src files. I am already mentioned in the credits.
...
llvm-svn: 17833
2004-11-15 19:21:49 +00:00
Reid Spencer
bfa25440e7
Changes/corrections suggested from Chris Lattner's review.
...
llvm-svn: 17832
2004-11-15 19:12:06 +00:00
Chris Lattner
a2b02a8b05
Warning fixes for VC++, contributed by Morten Ofstad!
...
llvm-svn: 17831
2004-11-15 19:02:35 +00:00
Reid Spencer
9339638e9c
Remove unused variable for compilation by VC++.
...
Patch contributed by Morten Ofstad.
llvm-svn: 17830
2004-11-15 17:29:41 +00:00
Reid Spencer
b40098e334
Updates to Visual C++ project files for building on win32.
...
Patch contributed by Morten Ofstad.
llvm-svn: 17829
2004-11-15 17:28:08 +00:00
Reid Spencer
6e886d051c
Update relative files.
...
Patch contributed by Morten Ofstad.
llvm-svn: 17828
2004-11-15 17:27:00 +00:00
Reid Spencer
1ae1656363
Provide the ThrowErrno utility.
...
Patch contributed by Morten Ofstad
llvm-svn: 17827
2004-11-15 17:21:57 +00:00
Reid Spencer
b96afe4b7e
Adjust implementation to match new interface.
...
Patch provided by Morten Ofstad
llvm-svn: 17826
2004-11-15 17:20:28 +00:00
Chris Lattner
1890f94413
Minor cleanups. There is no reason for SCCP to derive from instvisitor anymore.
...
llvm-svn: 17825
2004-11-15 07:15:04 +00:00
Chris Lattner
9a038a3a5e
Count more accurately
...
llvm-svn: 17824
2004-11-15 07:02:42 +00:00
Brian Gaeke
55157f0865
Update list of failing Benchmarks.
...
llvm-svn: 17823
2004-11-15 05:57:26 +00:00
Brian Gaeke
9dcb2fe161
Expand Defs to encompass all the possibly-call-clobbered regs.
...
llvm-svn: 17822
2004-11-15 05:56:53 +00:00
Chris Lattner
97013636cd
Quiet warnings on the persephone tester
...
llvm-svn: 17821
2004-11-15 05:54:07 +00:00
Chris Lattner
d18c16b842
Two minor improvements:
...
1. Speedup getValueState by having it not consider Arguments. It's better
to just add them before we start SCCP'ing.
2. SCCP can delete the contents of dead blocks. No really, it's ok! This
reduces the size of the IR for subsequent passes, even though
simplifycfg would do the same job. In practice, simplifycfg does not
run until much later than sccp in gccas
llvm-svn: 17820
2004-11-15 05:45:33 +00:00
Misha Brukman
b068167941
Replace the textual description with table specifying disk space requirements
...
llvm-svn: 17819
2004-11-15 05:19:53 +00:00
Chris Lattner
4f0316229c
rename InstValue to LatticeValue, as it holds for more than instructions.
...
llvm-svn: 17818
2004-11-15 05:03:30 +00:00
Reid Spencer
dacbf466c8
Actually get the #include correct so it compiles .. duh.
...
llvm-svn: 17817
2004-11-15 04:47:22 +00:00
Chris Lattner
074be1f6e4
Substantially refactor the SCCP class into an SCCP pass and an SCCPSolver
...
class. The only changes are minor:
* Do not try to SCCP instructions that return void in the rewrite loop.
This is silly and fool hardy, wasting a map lookup and adding an entry
to the map which is never used.
* If we decide something has an undefined value, rewrite it to undef,
potentially leading to further simplications.
llvm-svn: 17816
2004-11-15 04:44:20 +00:00
Reid Spencer
315efa1a84
Make it actually compile on Solaris.
...
llvm-svn: 17815
2004-11-15 04:42:44 +00:00
Reid Spencer
9b3a69175d
Consolidate the implementation of TimeValue::now() for Unix to use the
...
seemingly ubiquitous gettimeofday(3) call.
llvm-svn: 17814
2004-11-15 04:36:36 +00:00
Reid Spencer
bfb7b3eb68
Consolidate the implementation of TimeValue::now() for Unix to use the
...
seemingly ubiquitous gettimeofday(3) call.
llvm-svn: 17813
2004-11-15 04:36:35 +00:00
Reid Spencer
cbd9aeb587
* Make sure the string table gets read even if there isn't a foreign
...
symbol table.
* Make sure we update the file pointer for each member when rebuilding the
symbol table.
llvm-svn: 17812
2004-11-15 01:40:20 +00:00
Reid Spencer
fcf5ef7a4a
Changes necessary to enable linking of archives without LLVM symbol tables.
...
llvm-svn: 17811
2004-11-15 01:20:11 +00:00
Reid Spencer
a67b6e1874
Remove a forgotten debug output line.
...
llvm-svn: 17810
2004-11-14 23:49:55 +00:00
Reid Spencer
7705ec231c
Implement functionality suggested from code review: getStatusInfo should
...
returnn false if the file doesn't exist rather than throw ane exception.
llvm-svn: 17809
2004-11-14 23:30:38 +00:00
Reid Spencer
e554760178
Changes per code review:
...
* Document StatusInfo fields better
* No lines > 80 cols
* Have getStatusInfo return bool if file doesn't exist
* Don't document in detail how temporary file name should be created.
llvm-svn: 17808
2004-11-14 23:29:00 +00:00
Reid Spencer
9b0ddbbe2c
Linker.h moved to include/llvm from include/llvm/Support.
...
llvm-svn: 17807
2004-11-14 23:27:04 +00:00
Reid Spencer
6881623775
Make sure IdentifyFileType is in the sys namespace.
...
llvm-svn: 17806
2004-11-14 23:26:18 +00:00
Reid Spencer
4cee8e3365
Linker.h moved to include/llvm.
...
llvm-svn: 17805
2004-11-14 23:25:32 +00:00
Reid Spencer
aede779b1c
bugpoint needs LLVMLinker.a now.
...
llvm-svn: 17804
2004-11-14 23:23:18 +00:00
Reid Spencer
b3eaba688d
Correct call of methods whose names have changed.
...
llvm-svn: 17803
2004-11-14 23:17:41 +00:00
Reid Spencer
36c3a58557
This program needs libLLVMLinker.a now
...
llvm-svn: 17802
2004-11-14 23:12:22 +00:00
Reid Spencer
16c3bb3198
Linker.h has a new home.
...
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer
6456d2f26d
Moved to lib/Bytecode/Archive.
...
llvm-svn: 17800
2004-11-14 22:38:32 +00:00
Alkis Evlogimenos
55117fa471
Add missing include.
...
llvm-svn: 17799
2004-11-14 22:37:42 +00:00
Reid Spencer
b2d0fa0823
Fix usage of changed function prototype
...
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Reid Spencer
34fae46c87
A tool for adding a symbol table to LLVM Archives
...
llvm-svn: 17797
2004-11-14 22:29:21 +00:00
Reid Spencer
30227fde87
Makefile for llvm-ranlib tool
...
llvm-svn: 17796
2004-11-14 22:28:33 +00:00
Reid Spencer
54a20f2009
*Fix usage of changed function prototype*Use Archive interface to symbol table for archives
...
llvm-svn: 17795
2004-11-14 22:27:46 +00:00
Reid Spencer
c762abe046
This tool needs libLLVMArchive now
...
llvm-svn: 17794
2004-11-14 22:27:00 +00:00
Reid Spencer
0cb8c8c2af
Remove linking declarations (in Linker.h now)
...
llvm-svn: 17793
2004-11-14 22:25:26 +00:00
Reid Spencer
e7814f62b9
We need the libLLVMArchive library now
...
llvm-svn: 17792
2004-11-14 22:23:31 +00:00
Reid Spencer
8d3f9038c1
Moved to lib/Linker (common with gccld)
...
llvm-svn: 17791
2004-11-14 22:22:45 +00:00
Reid Spencer
84a12bfbd0
Total rewrite using Archive library & new functionality
...
llvm-svn: 17790
2004-11-14 22:20:07 +00:00
Reid Spencer
23dcddf47f
This tool needs the libLLVMArchive library now.
...
llvm-svn: 17789
2004-11-14 22:19:21 +00:00
Reid Spencer
5f7d9675d4
Remove linking declarations (in Linker.h now)
...
llvm-svn: 17788
2004-11-14 22:17:49 +00:00
Reid Spencer
5ccfd9aea1
Provide exception handling
...
llvm-svn: 17787
2004-11-14 22:17:03 +00:00
Reid Spencer
3afabd441b
Moved to lib/Linker
...
llvm-svn: 17786
2004-11-14 22:15:31 +00:00
Reid Spencer
22f42243cc
Add the llvm-ranlib tool
...
llvm-svn: 17785
2004-11-14 22:13:59 +00:00
Reid Spencer
e37b2fbcd4
Use llvm-ar not ar for constructing archive. Wrap at 80 cols.
...
llvm-svn: 17784
2004-11-14 22:13:13 +00:00
Reid Spencer
2dd5e71836
Forget strerror_r, it causes problems. Fix later when threading matters
...
llvm-svn: 17783
2004-11-14 22:10:54 +00:00
Reid Spencer
0d455997f8
Implement the toString method
...
llvm-svn: 17782
2004-11-14 22:10:08 +00:00
Reid Spencer
26e2bd44f2
Update for prototype changes
...
llvm-svn: 17781
2004-11-14 22:09:22 +00:00
Reid Spencer
c1d474f069
* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
...
llvm-svn: 17780
2004-11-14 22:08:36 +00:00
Reid Spencer
60c72a339b
Fix bugs in class invariant
...
llvm-svn: 17779
2004-11-14 22:07:50 +00:00
Reid Spencer
8b89b8333e
Include the correct implementation file
...
llvm-svn: 17778
2004-11-14 22:07:04 +00:00
Reid Spencer
05be57b518
Don't exceed 80 columns.
...
llvm-svn: 17777
2004-11-14 22:06:18 +00:00
Reid Spencer
0d0d07e0f0
Implement IdentifyFileType function
...
llvm-svn: 17776
2004-11-14 22:05:32 +00:00
Reid Spencer
cf602a8e67
Implement the high level interface to make (de)compression easier.
...
llvm-svn: 17775
2004-11-14 22:04:46 +00:00
Reid Spencer
1f4ab8b449
Implement the MoreHelp utility that calls a function to printmore help information if the MoreHelp global is not null.
...
llvm-svn: 17774
2004-11-14 22:04:00 +00:00
Reid Spencer
c470261d27
Don't bother with a re-linked library, ensure archive library is built.
...
llvm-svn: 17773
2004-11-14 22:03:14 +00:00
Reid Spencer
9db61d9e3a
*Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
...
llvm-svn: 17772
2004-11-14 22:02:27 +00:00
Reid Spencer
71f51e603c
Simplify compression code by using the high level interface to the Compressor
...
llvm-svn: 17771
2004-11-14 22:01:41 +00:00
Reid Spencer
0ce0d938b1
Add wrappers to get defined symbols from bytecode
...
llvm-svn: 17770
2004-11-14 22:00:48 +00:00
Reid Spencer
f01fc688ba
Simplify handling of decompression
...
llvm-svn: 17769
2004-11-14 22:00:09 +00:00
Reid Spencer
0e36b8afb9
Simplify decompression code by using the high level interface to the Compressor
...
llvm-svn: 17768
2004-11-14 21:59:21 +00:00
Reid Spencer
f0c201b34d
Completely rewritten to allow reading of archives and symbol table lookup in a more efficient manner.
...
llvm-svn: 17767
2004-11-14 21:58:33 +00:00
Reid Spencer
948ff3d628
Implementation declarations for Archive
...
llvm-svn: 17766
2004-11-14 21:57:46 +00:00
Reid Spencer
ba09b3bf28
First working version
...
llvm-svn: 17765
2004-11-14 21:56:59 +00:00
Reid Spencer
044adab53a
Add the Archive library
...
llvm-svn: 17764
2004-11-14 21:55:27 +00:00
Reid Spencer
c9e91ee004
Add the Linker library
...
llvm-svn: 17763
2004-11-14 21:54:41 +00:00
Reid Spencer
cbbc7dc9a4
*Make naming convention consistent.*Add convertion to/from Unix Epoch time.*Add ability to convert to readable string.
...
llvm-svn: 17762
2004-11-14 21:53:55 +00:00
Reid Spencer
95eecc880c
Make the remove*OnSignal functions deal with Paths not strings
...
llvm-svn: 17761
2004-11-14 21:53:09 +00:00
Reid Spencer
21488afc70
*Put the StatusInfo type in the right section. *Provide the ability to rename a file.*Provide the ability to get/set stat(2) information.*Provide the ability to identify LLVM file types.
...
llvm-svn: 17760
2004-11-14 21:52:22 +00:00
Reid Spencer
c9e20eac69
Allow explicit closing of the MappedFile, before destruction
...
llvm-svn: 17759
2004-11-14 21:51:36 +00:00
Reid Spencer
b457a6bcbc
Linker is its own module now. Moved to include/llvm/Linker.h
...
llvm-svn: 17758
2004-11-14 21:50:50 +00:00
Reid Spencer
01d36a4cc1
Add higher level interface to simplify use of Compressor
...
llvm-svn: 17757
2004-11-14 21:50:00 +00:00
Reid Spencer
8a09893f02
Add the MoreHelp function pointer. If non-null, this specifies a function to be called to print out additional help information
...
llvm-svn: 17756
2004-11-14 21:49:13 +00:00
Reid Spencer
04fbc475ef
Remove ReadArchiveFile (functionality moved to Archive.h). Add an alternate form for GetBytecodeSymbols.
...
llvm-svn: 17755
2004-11-14 21:48:27 +00:00
Reid Spencer
791ad3829a
Complete rewrite to get first working version.
...
llvm-svn: 17754
2004-11-14 21:47:41 +00:00
Reid Spencer
ec7a80bad2
Add a command for using llvm-ar correctly.
...
llvm-svn: 17753
2004-11-14 21:46:55 +00:00
Reid Spencer
c1bb479c54
Interface to Linker (revised/expanded from Support/Linker.h)
...
llvm-svn: 17752
2004-11-14 21:46:08 +00:00
Misha Brukman
704576301f
GhostLinkage not allowed in LLVM AsmWriter, either
...
llvm-svn: 17751
2004-11-14 21:04:34 +00:00
Misha Brukman
7f245d47c5
GhostLinkage should not reach asm printing stage
...
llvm-svn: 17750
2004-11-14 21:03:49 +00:00
Misha Brukman
e225fa12ab
Handle GhostLinkage (should not ever reach the assembly printing stage!)
...
llvm-svn: 17749
2004-11-14 21:03:30 +00:00
Misha Brukman
b2e062c9d5
Mark an unmaterialized function as having GhostLinkage
...
llvm-svn: 17748
2004-11-14 21:02:55 +00:00
Misha Brukman
f236e784f0
Add GhostLinkage for marking functions before they're fully materialized
...
llvm-svn: 17747
2004-11-14 21:02:28 +00:00
Chris Lattner
28eeb73f2f
If a global is just loaded and restored, realize that it is not changing
...
value. This allows us to turn more globals into constants and eliminate them.
This patch implements GlobalOpt/load-store-global.llx.
Note that this patch speeds up 255.vortex from:
Output/255.vortex.out-cbe.time:program 7.640000
Output/255.vortex.out-llc.time:program 9.810000
to:
Output/255.vortex.out-cbe.time:program 7.250000
Output/255.vortex.out-llc.time:program 9.490000
Which isn't bad at all!
llvm-svn: 17746
2004-11-14 20:50:30 +00:00
Chris Lattner
78d31c13ff
New testcase. Believe it or not, this happens a LOT in vortex
...
llvm-svn: 17745
2004-11-14 20:41:39 +00:00
Misha Brukman
8b8ba9fcf7
Fix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)
...
llvm-svn: 17744
2004-11-14 20:34:01 +00:00
Reid Spencer
b75e2d9224
Moved from include/llvm/Support/Linker.h
...
llvm-svn: 17743
2004-11-14 20:21:58 +00:00
Reid Spencer
b9e561e90c
Moved to lib/Bytecode/Archive in preparation for re-write.
...
llvm-svn: 17742
2004-11-14 19:59:40 +00:00
Chris Lattner
46dd5a6304
This optimization makes MANY phi nodes that all have the same incoming value.
...
If this happens, detect it early instead of relying on instcombine to notice
it later. This can be a big speedup, because PHI nodes can have many
incoming values.
llvm-svn: 17741
2004-11-14 19:29:34 +00:00
Chris Lattner
7515cabe2a
Implement instcombine/phi.ll:test6 - pulling operations through PHI nodes.
...
This exposes subsequent optimization possiblities and reduces code size.
This triggers 1423 times in spec.
llvm-svn: 17740
2004-11-14 19:13:23 +00:00
Chris Lattner
fd6a717b95
New testcase: the phi can be eliminated if the casts are sucked into it.
...
Note that this reduces code size anyway (as well as making further
optimizations simpler) so it's always a win.
llvm-svn: 17739
2004-11-14 19:12:17 +00:00
Chris Lattner
2d6843c2f7
Fix typo
...
llvm-svn: 17738
2004-11-14 17:54:58 +00:00
Chris Lattner
8875ae91a4
add a testcase, which we already handle
...
llvm-svn: 17737
2004-11-14 17:54:27 +00:00
Chris Lattner
15ff1e1885
Transform this:
...
%X = alloca ...
%Y = alloca ...
X == Y
into false. This allows us to simplify some stuff in eon (and probably
many other C++ programs) where operator= was checking for self assignment.
Folding this allows us to SROA several additional structs.
llvm-svn: 17735
2004-11-14 07:33:16 +00:00
Chris Lattner
5a8b003a09
Remove note to self
...
llvm-svn: 17734
2004-11-14 06:57:47 +00:00
Brian Gaeke
e13c960415
Fix problem with insertion point for ADJCALLSTACKDOWN.
...
llvm-svn: 17733
2004-11-14 06:32:08 +00:00
Brian Gaeke
a281ebc490
Update lists of failing unit tests.
...
Exclude bigfib, so that we effectively exclude all C++ benchmarks.
Update to-do list: mention va_start.
llvm-svn: 17732
2004-11-14 06:32:07 +00:00
Chris Lattner
a86e8783e8
Oops, make this test the right thing.
...
llvm-svn: 17731
2004-11-14 06:11:41 +00:00
Chris Lattner
af555adc15
If a function always returns a constant, replace all calls sites with that
...
constant value. This makes the return value dead and allows for
simplification in the caller.
This implements IPConstantProp/return-constant.ll
This triggers several dozen times throughout SPEC.
llvm-svn: 17730
2004-11-14 06:10:11 +00:00
Chris Lattner
37d2cd7cd6
New testcase
...
llvm-svn: 17729
2004-11-14 06:02:46 +00:00
Brian Gaeke
347a000be6
Fix NotTest - round up extraStack to the nearest doubleword, if it is
...
not zero.
llvm-svn: 17728
2004-11-14 05:19:00 +00:00
Chris Lattner
fe3f4e6ebd
Teach SROA how to promote an array index that is variable, if the dimension
...
of the array is just two. This occurs 8 times in gcc, 6 times in crafty, and
12 times in 099.go.
This implements ScalarRepl/sroa_two.ll
llvm-svn: 17727
2004-11-14 05:00:19 +00:00
Chris Lattner
8076a5de30
New testcase, SROA with variable array index
...
llvm-svn: 17726
2004-11-14 04:58:40 +00:00
Brian Gaeke
e90176e171
Update failing Benchmarks; point out that I'm skipping Shootout-C++.
...
llvm-svn: 17725
2004-11-14 04:43:12 +00:00
Chris Lattner
8881912d71
Rearrange some code, no functionality changes.
...
llvm-svn: 17724
2004-11-14 04:24:28 +00:00
Brian Gaeke
18b6015b11
Update expected UnitTests failures.
...
llvm-svn: 17723
2004-11-14 03:22:08 +00:00
Brian Gaeke
e6b47514a3
Rewrite outgoing arg handling to handle more weird corner cases.
...
llvm-svn: 17722
2004-11-14 03:22:07 +00:00
Brian Gaeke
07097e12d5
Support UndefValue emission.
...
llvm-svn: 17721
2004-11-14 03:22:05 +00:00
Tanya Lattner
0fbc9c8350
setting path to prcontext.tcl script. Right now it searches for tclsh in your path, but this should be obtained from configure.
...
llvm-svn: 17720
2004-11-13 23:36:18 +00:00
Chris Lattner
9fa7f0ae0a
Remove debugging code
...
llvm-svn: 17719
2004-11-13 23:32:53 +00:00
Chris Lattner
244031d306
Argument promotion transforms functions to unconditionally load their
...
argument pointers. This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid. Make sure to do the required checks.
This fixed ArgumentPromotion/control-flow.ll and the Burg program.
llvm-svn: 17718
2004-11-13 23:31:34 +00:00
Chris Lattner
0a205ead8b
Add a testcase we should continue to argpromote
...
llvm-svn: 17717
2004-11-13 23:30:22 +00:00
Chris Lattner
70496c1728
Add a testcase for a function we cannot legally promote the argument of.
...
llvm-svn: 17716
2004-11-13 23:28:39 +00:00
Chris Lattner
7024d6b23e
Add useful method, minor cleanups
...
llvm-svn: 17715
2004-11-13 23:28:10 +00:00
Chris Lattner
56c4c99cca
Don't print unneeded labels
...
llvm-svn: 17714
2004-11-13 23:27:11 +00:00
Tanya Lattner
79d046ba70
Run prcontext.tcl with tclsh and let it be found in the path. This should be found by configure.
...
llvm-svn: 17713
2004-11-13 23:16:17 +00:00
Tanya Lattner
4afaf40a28
Adding subdirectory dg.exp files in order to be able to use dejagnu to only run specific tests (located in some subdirectory of Regression)
...
llvm-svn: 17712
2004-11-13 23:00:45 +00:00
Tanya Lattner
bb05cd7f85
Changed to use tcl script.
...
llvm-svn: 17711
2004-11-13 22:55:51 +00:00
Chris Lattner
073f6ca344
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
llvm-svn: 17710
2004-11-13 22:21:56 +00:00
Chris Lattner
a259bd9d67
New testcase
...
llvm-svn: 17709
2004-11-13 22:21:15 +00:00
Tanya Lattner
b947fb3e95
Rewrote prcontext.py in tcl.
...
llvm-svn: 17708
2004-11-13 21:03:22 +00:00
Chris Lattner
049d33a717
shld is a very high latency operation. Instead of emitting it for shifts of
...
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).
For example, instead of compiling this:
long long X2(long long Y) { return Y << 2; }
to:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $2, %eax, %edx
shll $2, %eax
ret
Compile it to:
X2:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $30, %edx
leal (%edx,%ecx,4), %edx
shll $2, %eax
ret
Likewise, for << 3, compile to:
X3:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $29, %edx
leal (%edx,%ecx,8), %edx
shll $3, %eax
ret
This matches icc, except that icc open codes the shifts as adds on the P4.
llvm-svn: 17707
2004-11-13 20:48:57 +00:00
Chris Lattner
ef6bd92a8c
Add missing check
...
llvm-svn: 17706
2004-11-13 20:04:38 +00:00
Chris Lattner
8d521bb16e
Compile:
...
long long X3_2(long long Y) { return Y+Y; }
int X(int Y) { return Y+Y; }
into:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
addl %eax, %eax
adcl %edx, %edx
ret
X:
movl 4(%esp), %eax
addl %eax, %eax
ret
instead of:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $1, %eax, %edx
shll $1, %eax
ret
X:
movl 4(%esp), %eax
shll $1, %eax
ret
llvm-svn: 17705
2004-11-13 20:03:48 +00:00
Chris Lattner
8c3e7b92af
Simplify handling of shifts to be the same as we do for adds. Add support
...
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:
Y+Y+Y+Y+Y+Y+Y+Y
into
%tmp.8 = shl long %Y, ubyte 3 ; <long> [#uses=1]
instead of
%tmp.4 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.12 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.8 = add long %tmp.4, %tmp.12 ; <long> [#uses=1]
This implements add.ll:test25
Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18
llvm-svn: 17704
2004-11-13 19:50:12 +00:00
Chris Lattner
f6392b4616
New testcase
...
llvm-svn: 17703
2004-11-13 19:49:39 +00:00
Chris Lattner
6912370a78
Add support for shifts
...
llvm-svn: 17702
2004-11-13 19:32:45 +00:00
Chris Lattner
4efe20a103
Fold:
...
(X + (X << C2)) --> X * ((1 << C2) + 1)
((X << C2) + X) --> X * ((1 << C2) + 1)
This means that we now canonicalize "Y+Y+Y" into:
%tmp.2 = mul long %Y, 3 ; <long> [#uses=1]
instead of:
%tmp.10 = shl long %Y, ubyte 1 ; <long> [#uses=1]
%tmp.6 = add long %Y, %tmp.10 ; <long> [#uses=1]
llvm-svn: 17701
2004-11-13 19:31:40 +00:00
Chris Lattner
2858e17538
Lazily create the abort message, so only translation units that use unwind
...
will actually get it.
llvm-svn: 17700
2004-11-13 19:07:32 +00:00
Chris Lattner
9b0291b18d
Fix: CodeExtractor/2004-11-12-InvokeExtract.ll
...
llvm-svn: 17699
2004-11-13 00:06:45 +00:00
Chris Lattner
8cc98850f9
New testcase
...
llvm-svn: 17698
2004-11-13 00:06:32 +00:00
Chris Lattner
5bcca6058a
Fix a bug where the code extractor would get a bit confused handling invoke
...
instructions, setting DefBlock to a block it did not have dom info for.
llvm-svn: 17697
2004-11-12 23:50:44 +00:00
Chris Lattner
5c1d84c769
Simplify handling of constant initializers
...
llvm-svn: 17696
2004-11-12 22:42:57 +00:00
Reid Spencer
a81f8197eb
Makefile for lib/Linker
...
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer
361e513db0
This file originated in lib/VMCore/Linker.cpp but now lives in
...
lib/Linker/LinkModules.cpp
llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer
1cfa8d60f8
This file originated in tools/gccld/Linker.cpp but now lives in
...
lib/Linker/LinkArchives.cpp
llvm-svn: 17693
2004-11-12 20:34:32 +00:00
Reid Spencer
aee67e6547
* Clean up all the shared library output on uninstall
...
* Provide the correct set of input directories to the TAGS target
* Provide a CTAGS target for building Vi style ctags files.
llvm-svn: 17688
2004-11-12 02:27:36 +00:00
Reid Spencer
2ea5ae618c
Document the new llvm-ranlib command.
...
llvm-svn: 17687
2004-11-12 00:18:35 +00:00
Reid Spencer
ffb9f06135
Correctly terminate a list.
...
llvm-svn: 17686
2004-11-12 00:16:51 +00:00
Reid Spencer
2e34034d80
Document the modifiers and the file format.
...
llvm-svn: 17685
2004-11-12 00:15:43 +00:00
Chris Lattner
738c89ecec
Make this build in release mode
...
llvm-svn: 17684
2004-11-11 22:11:17 +00:00
Reid Spencer
e448500e6d
Add llvm-ar to the index.
...
llvm-svn: 17682
2004-11-11 09:30:00 +00:00
Reid Spencer
8beeb49594
First attempt at llvm-ar documentation. Modifiers need a little more
...
explanation.
llvm-svn: 17681
2004-11-11 09:21:18 +00:00
Chris Lattner
9621dfab3f
Actually, leave the check in. This prevents us from counting dead arguments
...
as IPCP opportunities.
llvm-svn: 17680
2004-11-11 07:47:54 +00:00
Chris Lattner
5fa696f8e4
Fix bug: IPConstantProp/deadarg.ll
...
llvm-svn: 17679
2004-11-11 07:46:29 +00:00
Chris Lattner
ba582f0d11
new testcase
...
llvm-svn: 17678
2004-11-11 07:46:11 +00:00
Reid Spencer
45dc1394cd
Fix documentation for Makefile target name change. install-bytecode is now
...
just "install" in the runtime directory.
llvm-svn: 17677
2004-11-11 07:30:27 +00:00
Chris Lattner
c1d24cd859
Make IP Constant prop more aggressive about handling self recursive calls.
...
This implements IPConstantProp/recursion.ll
llvm-svn: 17666
2004-11-10 19:43:59 +00:00
Chris Lattner
59e5462557
New testcase
...
llvm-svn: 17665
2004-11-10 19:43:31 +00:00
John Criswell
04570265a5
Correct the name of stosd for the AT&T syntax:
...
It's stosl (l for long == 32 bit).
llvm-svn: 17658
2004-11-10 04:48:15 +00:00
Chris Lattner
0d3773d8b1
Do not let dead constant expressions hanging off of functions prevent IPCP.
...
This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)
llvm-svn: 17657
2004-11-09 20:47:30 +00:00
Reid Spencer
e5142be411
Provide conversion from posix time.
...
llvm-svn: 17656
2004-11-09 20:29:10 +00:00
Reid Spencer
202eaeb272
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
llvm-svn: 17655
2004-11-09 20:27:23 +00:00
Reid Spencer
fb1f7357c2
* Implement getStatusInfo for getting stat(2) like information
...
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.
llvm-svn: 17654
2004-11-09 20:26:31 +00:00
Reid Spencer
abbefecf8e
Make sure llee can deal with compressed bytecode too.
...
llvm-svn: 17652
2004-11-09 20:21:25 +00:00
John Criswell
623dc9c5c0
Recognize compressed LLVM bytecode files.
...
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.
llvm-svn: 17648
2004-11-09 19:37:07 +00:00
Reid Spencer
6a1a10aa54
Tune compression:
...
bzip2: block size 9 -> 5, reduces memory by 400Kbytes, doesn't affect speed
or compression ratio on all but the largest bytecode files (>1MB)
zip: level 9 -> 6, this speeds up compression time by ~30% but only
degrades the compressed size by a few bytes per megabyte. Those few
bytes aren't worth the effort.
llvm-svn: 17647
2004-11-09 17:58:09 +00:00
Chris Lattner
436285e75d
Change this back so that I get stable numbers to reflect the change from the
...
nightly testers
llvm-svn: 17646
2004-11-09 08:05:23 +00:00
Reid Spencer
981afd7c1c
Document quick-test target.
...
llvm-svn: 17644
2004-11-09 06:32:58 +00:00
Reid Spencer
3006081612
Add a quick-test target that uses QUICKTEST variable to quickly run a
...
portion of the test suite. e.g.:
make quck-test QUICKTEST=Regression/Bytecode
llvm-svn: 17643
2004-11-09 06:28:32 +00:00
Chris Lattner
1f0a97c6cb
Fix bug: 2004-11-08-FreeUseCrash.ll
...
llvm-svn: 17642
2004-11-09 05:10:56 +00:00
Chris Lattner
1276fbe8ba
Name file properly
...
llvm-svn: 17641
2004-11-09 05:07:01 +00:00
Chris Lattner
5a1e9bf72f
Hrm, don't ask how I ran into this bug
...
llvm-svn: 17640
2004-11-09 05:06:23 +00:00
Misha Brukman
3e5dd6d34c
* Convert tabs to spaces
...
* Order #includes according to style guide
* Remove extraneous blank lines
llvm-svn: 17639
2004-11-09 04:27:19 +00:00
Misha Brukman
8d5c13c3e3
Output the program name (in this case, gccld) with warning about invalid files
...
llvm-svn: 17638
2004-11-09 04:24:59 +00:00
Nate Begeman
1164955bf1
Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
...
llvm-svn: 17637
2004-11-09 04:01:18 +00:00
Misha Brukman
1df8148b01
Handle headers for compressed bytecode files
...
llvm-svn: 17634
2004-11-08 22:03:32 +00:00
Misha Brukman
465e7fb8ef
Don't silently ignore invalid files: tell the user!
...
llvm-svn: 17633
2004-11-08 22:03:10 +00:00
Chris Lattner
068c0cf56a
Fix a bug that was preventing povray and namd from pool allocating correctly.
...
llvm-svn: 17632
2004-11-08 21:08:46 +00:00
Chris Lattner
1feea5ffc9
Handle assert_fail special
...
llvm-svn: 17631
2004-11-08 21:08:28 +00:00
Misha Brukman
e97fc87e61
Remove extra spaces
...
llvm-svn: 17629
2004-11-08 19:01:03 +00:00
Chris Lattner
bb65a7f10e
This file is gone
...
llvm-svn: 17627
2004-11-08 18:46:09 +00:00
Reid Spencer
05d033159d
Add a --disable-compression option to gccas so the default compression of
...
bytecode can be defeated.
llvm-svn: 17626
2004-11-08 17:37:04 +00:00
Reid Spencer
4d910edf39
Make writing compressed bytecode the default.
...
llvm-svn: 17625
2004-11-08 17:35:34 +00:00
Reid Spencer
f8b4a8e988
Implement and document the TOOL_VERBOSE option that asks each tool invoked
...
to be verbose about its actions too.
llvm-svn: 17624
2004-11-08 17:32:12 +00:00
Reid Spencer
1619c72a92
Fix typo.
...
llvm-svn: 17623
2004-11-08 09:10:50 +00:00
Reid Spencer
812aa2ba19
Document compressed bytecode details.
...
llvm-svn: 17622
2004-11-08 08:55:21 +00:00
Reid Spencer
e7d98cccd9
Fix a typo: isvalid -> isValid
...
llvm-svn: 17621
2004-11-08 08:27:51 +00:00
Alkis Evlogimenos
eb4dbfd4e2
Move path override in test/Makefile.
...
llvm-svn: 17613
2004-11-08 05:44:05 +00:00
Alkis Evlogimenos
d91bca6941
Override PATH to submake so that all tools are found if the PATH is
...
not set up properly (it also avoids using different tools that happen
to be in the path).
llvm-svn: 17612
2004-11-08 05:35:03 +00:00
Misha Brukman
c350bd2056
* Add support for f2c and the -f2c switch to enable Fortran benchmarks
...
* Remove spurious spaces between variable names and `=' (they're not lined up
anyway and there's no hope of doing that)
llvm-svn: 17611
2004-11-08 03:28:27 +00:00
Tanya Lattner
8fabe17ced
Now using path to python found by configure.
...
llvm-svn: 17610
2004-11-08 03:26:59 +00:00
Misha Brukman
043ad9ec12
First draft of compendium of documents relevant to writers of LLVM machine
...
target backends
llvm-svn: 17609
2004-11-08 02:47:08 +00:00
Nate Begeman
0822032c95
Put int the getReg cast optimization from x86 so that we generate fewer
...
move instructions for the register allocator to coalesce.
llvm-svn: 17608
2004-11-08 02:25:40 +00:00
Reid Spencer
3fbf26aebe
Recommend that new users read the documentation before they get started,
...
with a little twist of humor. This more than anything else will help
people get started with LLVM.
llvm-svn: 17605
2004-11-08 00:29:22 +00:00
Reid Spencer
47e49e1269
Correct and Explain the first rule of thumb better.
...
llvm-svn: 17604
2004-11-08 00:26:32 +00:00
Reid Spencer
60ee2a2519
Fix typo.
...
llvm-svn: 17603
2004-11-08 00:24:43 +00:00
Misha Brukman
26ecf23a74
Fix grammar: use commas in a list of entities
...
llvm-svn: 17602
2004-11-08 00:22:22 +00:00
Misha Brukman
624685d9a1
Implement ExecutionEngine::freeMachineCodeForFunction()
...
llvm-svn: 17601
2004-11-07 23:58:46 +00:00
Misha Brukman
0dcaaafa0b
Add method to delete machine code generated for a Function
...
llvm-svn: 17600
2004-11-07 23:58:02 +00:00
Reid Spencer
6bf36bdefb
Add the RUNTEST autoconf onfiguration variable for Deja-gnu support. This
...
tool runs Deja-gnu test suites. The 'make' variable RUNTEST is now set
automatically in the Makefile.config file.
llvm-svn: 17599
2004-11-07 23:29:39 +00:00
Tanya Lattner
d8f25acec4
Changed TEST to TESTSUITE
...
llvm-svn: 17598
2004-11-07 23:26:13 +00:00
Tanya Lattner
5f06ac1762
Fix for objdir != srcdir.
...
llvm-svn: 17597
2004-11-07 23:24:21 +00:00
Tanya Lattner
7095a68e49
More srcdir != objdir changes.
...
llvm-svn: 17596
2004-11-07 23:21:50 +00:00
Misha Brukman
35c91c2740
* Fix file-relative links: they need '#' prepended to the target name
...
* Balance an open parenthesis
llvm-svn: 17595
2004-11-07 22:42:37 +00:00
Misha Brukman
fb279f652e
Use LLVMToolDir instead of ToolDir because the latter is no longer set (?)
...
llvm-svn: 17594
2004-11-07 22:26:43 +00:00
Tanya Lattner
c7392e0662
Made changes to support objdir!=srcdir.
...
llvm-svn: 17590
2004-11-07 22:04:21 +00:00
Chris Lattner
49fa1ecd04
VERY large functions that are only called from one place are not really
...
exciting to inline. Only inline medium or small sized functions with a
single call site.
llvm-svn: 17588
2004-11-07 21:46:47 +00:00
Tanya Lattner
dd157e31fd
Removed passing TARGET.
...
llvm-svn: 17587
2004-11-07 21:43:57 +00:00
Tanya Lattner
71a3368fdd
Changed check-dejagnu to take TESTSUITE as its args instead of TEST in order to not conflict with other stuff. Added path for test/Scripts. Also added a check to deal with TESTSUITE and runtest flags.
...
llvm-svn: 17586
2004-11-07 21:39:41 +00:00
Nate Begeman
f5f0b6b6b0
Disable bogus cast elimination when the cast is used by a setcc instruction.
...
llvm-svn: 17583
2004-11-07 20:23:42 +00:00
Reid Spencer
f45ec621cc
Add TARGET_TRIPLE
...
llvm-svn: 17581
2004-11-07 19:12:53 +00:00
Reid Spencer
9caa76c982
First version of this document listing the required software. Might need
...
to be made platform specific. Contents reflect my Linux build environment.
llvm-svn: 17580
2004-11-07 19:07:06 +00:00
Reid Spencer
796e531721
* Comments & cleanup per CL code review.
...
* Accept 'llvc' as signature for compressed bytecode
llvm-svn: 17579
2004-11-07 18:20:55 +00:00
Reid Spencer
899ad356f5
Add comments per CL code review.
...
llvm-svn: 17578
2004-11-07 18:19:00 +00:00
Reid Spencer
37041670c0
Make compression the default on writing.
...
llvm-svn: 17577
2004-11-07 18:18:11 +00:00
Reid Spencer
f3e639fc6a
* Add comments and cleanup per CL code review
...
* Make signature for compressed bytecode llvc instead of unreadable
* Make the CompressionContext have a constructor and destructor.
llvm-svn: 17576
2004-11-07 18:17:38 +00:00
Tanya Lattner
9119b9cff5
Minor error.
...
llvm-svn: 17573
2004-11-07 08:29:03 +00:00
Tanya Lattner
7aad4fef81
Added support to specify which test suite dejagnu should run (Feature or Regression). Use TEST=suite
...
llvm-svn: 17572
2004-11-07 08:24:59 +00:00
Chris Lattner
db83a85dbf
Revert back to r1.1, I'm just thoroughly confused :)
...
llvm-svn: 17571
2004-11-07 07:46:15 +00:00
Chris Lattner
1126abf1e9
Add new (old) testcase
...
llvm-svn: 17570
2004-11-07 07:41:32 +00:00
Tanya Lattner
84f7fda32f
Added RUN lines and dejagnu support for Feature dir.
...
llvm-svn: 17568
2004-11-07 06:08:43 +00:00
Reid Spencer
505b225e82
Rename the option for defeating compression to be a little more specific.
...
llvm-svn: 17567
2004-11-07 05:50:16 +00:00
Reid Spencer
f0adf68dfa
Enable compression by default.
...
llvm-svn: 17566
2004-11-07 05:43:51 +00:00
Reid Spencer
7b05ef63f1
* Enable bytecode compression by default
...
* Provide a -no-compress option to defeat compression.
llvm-svn: 17565
2004-11-07 05:41:32 +00:00
Reid Spencer
feb3d5097f
Turn on compression by default.
...
Change --compress to --no-compress so compression can be turned off.
llvm-svn: 17564
2004-11-07 05:37:27 +00:00
Reid Spencer
1f9e18e7c5
* Provide option for specifying bytecode compression
...
* Enabled bytecode compression by default.
llvm-svn: 17563
2004-11-07 05:30:43 +00:00
Chris Lattner
fbb15f39b8
Add missing file header
...
Add some comments
Switch to use 'find' to do the clean instead of globbing
llvm-svn: 17559
2004-11-07 05:05:37 +00:00
Tanya Lattner
90b172ea93
Removing old Modulosched tests since that version of modulosched does not exist anymore and llc does not support modulosched by default.
...
llvm-svn: 17558
2004-11-07 05:04:58 +00:00
Tanya Lattner
3b71027e18
With the changes to these files, the Regression test suite should be tested by dejagnu without anyproblem.
...
Some variables could be made global.
llvm-svn: 17557
2004-11-07 05:02:56 +00:00
Tanya Lattner
62f096877f
Added RUN line.
...
llvm-svn: 17556
2004-11-07 05:01:34 +00:00
Tanya Lattner
9082d7a6fd
Added rough support for dejagnu testing. Changes need to be made to autoconf to provide the target_triplet and to check for 'grep -C' which would be used instead of the python script we have now. Eventually the python script should be converted to bash.
...
The dejagnu-clean needs to be fixed to use find.
llvm-svn: 17555
2004-11-07 04:59:52 +00:00
Tanya Lattner
902d8d58f6
Changed to XFAIL
...
llvm-svn: 17554
2004-11-07 04:37:08 +00:00
Chris Lattner
df925ce4cd
Add a section for PPC, though it's empty for now
...
llvm-svn: 17553
2004-11-07 01:55:32 +00:00
Chris Lattner
4c5a8055c9
Update this to expect AT&T syntax
...
llvm-svn: 17552
2004-11-07 01:46:16 +00:00
Misha Brukman
68dbbe46b8
* Add note about benchmarking programs and submitting reduced test cases
...
* Replace llvm.org with llvm.cs.uiuc.edu
llvm-svn: 17551
2004-11-07 01:03:59 +00:00
Misha Brukman
aeee58fc16
Replace llvm.org => llvm.cs.uiuc.edu
...
llvm-svn: 17550
2004-11-07 00:59:58 +00:00
Misha Brukman
8a75d2e73b
Replace uses of llvm.org with llvm.cs.uiuc.edu
...
llvm-svn: 17549
2004-11-07 00:58:38 +00:00
Misha Brukman
7ee6c5525e
Consistently use llvm.cs.uiuc.edu instead of llvm.org
...
llvm-svn: 17548
2004-11-07 00:58:20 +00:00
Chris Lattner
b3ba9319f1
Decompose* is V9 specific, make it internal
...
llvm-svn: 17547
2004-11-07 00:43:24 +00:00
Chris Lattner
bf5d39fe3e
This is V9 specific stuff
...
llvm-svn: 17546
2004-11-07 00:42:29 +00:00
Chris Lattner
595016d090
This is V9 specific, move it there.
...
llvm-svn: 17545
2004-11-07 00:39:26 +00:00
Chris Lattner
3dadadc837
Move this file from lib/Transforms/Scalar
...
llvm-svn: 17544
2004-11-07 00:39:09 +00:00
Chris Lattner
f32f1ce8ab
Tests for this xforms should be .ll files, and they should have run lines.
...
llvm-svn: 17543
2004-11-07 00:38:16 +00:00
Chris Lattner
b3841e5234
Remove dead tests
...
llvm-svn: 17542
2004-11-07 00:36:30 +00:00
Chris Lattner
7b81822fc0
This is not part of the test
...
llvm-svn: 17541
2004-11-07 00:34:45 +00:00
Chris Lattner
f4d3fb930e
Fix a test.
...
These other tests should be in test/Programs/SingleSource/UnitTests if anyone
cares enough to save them
llvm-svn: 17540
2004-11-07 00:33:14 +00:00
Chris Lattner
f02a1137f9
Nuke useless testcases
...
llvm-svn: 17539
2004-11-07 00:30:51 +00:00
Chris Lattner
5993ea5da2
These files are all moved to test/Regression/CodeGen/Generic
...
llvm-svn: 17538
2004-11-07 00:24:14 +00:00
Chris Lattner
0624d4fd2f
This test is obsolete and incorrect
...
llvm-svn: 17537
2004-11-06 23:42:32 +00:00
Tanya Lattner
2acf9b07fa
Adding RUN lines.
...
llvm-svn: 17536
2004-11-06 23:32:43 +00:00
Reid Spencer
2e49204e0f
Add support for compressed bytecode
...
llvm-svn: 17535
2004-11-06 23:17:23 +00:00
Tanya Lattner
6b01c01171
Adding RUN line.
...
llvm-svn: 17534
2004-11-06 23:16:51 +00:00
Tanya Lattner
16b222c6fd
Adding RUN lines.
...
llvm-svn: 17533
2004-11-06 23:08:26 +00:00
Tanya Lattner
ca21187847
Adding RUN lines.
...
llvm-svn: 17532
2004-11-06 22:41:00 +00:00
Tanya Lattner
d9a3cebc49
Adding RUN lines.
...
llvm-svn: 17529
2004-11-06 22:29:57 +00:00
Tanya Lattner
32f81a5f58
Adding RUN lines.
...
llvm-svn: 17528
2004-11-06 22:07:09 +00:00
Tanya Lattner
f14e76db43
Adding RUN lines.
...
llvm-svn: 17527
2004-11-06 21:40:51 +00:00
Chris Lattner
0ff1828349
Adjust to printing user+system times instead of wall times. Run the olden
...
numbers in 'stable' mode so that the numbers are more stable.
llvm-svn: 17525
2004-11-06 21:35:40 +00:00
Chris Lattner
1f0758cb95
Add missing run line
...
llvm-svn: 17522
2004-11-06 21:11:04 +00:00
Tanya Lattner
b2b06fa405
First crack at support to run tests using dejagnu. This file contains a procedure to run a test like TestRunner.sh does.
...
llvm-svn: 17521
2004-11-06 21:07:41 +00:00
Chris Lattner
726ecb840b
Add a run line
...
llvm-svn: 17520
2004-11-06 21:07:31 +00:00
Chris Lattner
cddf99256e
Add a missing run line
...
llvm-svn: 17519
2004-11-06 21:03:41 +00:00
Chris Lattner
ca8e39d91f
This pass has been removed from LLVM
...
llvm-svn: 17518
2004-11-06 21:02:30 +00:00
Chris Lattner
7ffc0d97aa
Add missing run line
...
llvm-svn: 17517
2004-11-06 21:01:45 +00:00
Tanya Lattner
1d28bdac94
Adding XFAIL lines for dejagnu support.
...
llvm-svn: 17514
2004-11-06 20:38:27 +00:00
Chris Lattner
331854d283
From Jeff Cohen:
...
I checked out from cvs directly on Windows and I ran into another
problem with the project files. Evidently, the files were initially
checked in on Unix, and the files were transfered to Unix without
converting the CR/LF line endings first. When checked out on Windows,
cvs converts the files to DOS format, resulting in two CRs for each LF.
llvm-svn: 17504
2004-11-06 17:07:36 +00:00
Reid Spencer
c686a2b64b
Implement the GetBytecodeSymbols interface function to extract just the
...
externally visible defined symbols from a bytecode file.
llvm-svn: 17503
2004-11-06 08:56:40 +00:00
Reid Spencer
20f6dc0156
Provide an interface for getting just the external symbols from a
...
Bytecode file.
llvm-svn: 17502
2004-11-06 08:54:47 +00:00
Reid Spencer
ef24b9139a
Deprecate constructors we don't want users to use.
...
Temporarily comment out two interface methods we might not implement.
llvm-svn: 17501
2004-11-06 08:53:59 +00:00
Reid Spencer
0f8359b061
Makefile for the LLVMArchive library.
...
llvm-svn: 17500
2004-11-06 08:52:36 +00:00
Reid Spencer
0cc653e59b
First kinda/sorta working version of the Archive library. Reading is not
...
yet supported but writing works. Way too early to review this. More to come
llvm-svn: 17499
2004-11-06 08:51:45 +00:00
Reid Spencer
0c6a283b2a
Stop propagating method names that violate the coding standard
...
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
Reid Spencer
ed3f95892d
Go ahead and trust the client not to mess with the ModuleProvider* returned
...
by the findModuleContainingSymbol method.
llvm-svn: 17491
2004-11-05 18:48:02 +00:00
Reid Spencer
6d2c0efec5
* Documentation corrections (thanks to Chris for nit-picking)
...
* Remove dead typedefs.
* Redefine how getAllPaths treats its argument.
llvm-svn: 17489
2004-11-05 17:44:26 +00:00
John Criswell
ab79288e37
Fix compilation problem; make the cast and the LHS be the same type.
...
llvm-svn: 17488
2004-11-05 16:17:06 +00:00
Reid Spencer
50b78a6342
First version of the interface to Archive files. This introduces the
...
llvm::Archive class to provide for reading, writing, indexing and search
functions on standard ar(1) format files that contain bytecode modules.
Implementation to follow.
llvm-svn: 17487
2004-11-05 09:19:17 +00:00
Chris Lattner
303bdd1e4b
Remove dead var
...
llvm-svn: 17485
2004-11-05 04:52:08 +00:00
Chris Lattner
429aaa5855
Quiet VC++ warnings
...
llvm-svn: 17484
2004-11-05 04:50:59 +00:00
Chris Lattner
c22ffc26b0
Do not make i have bigger scope that we need
...
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Chris Lattner
3c670cb65a
Remove dead vars
...
llvm-svn: 17482
2004-11-05 04:46:22 +00:00
Chris Lattner
33eb909939
Fix some warnings on VC++
...
llvm-svn: 17481
2004-11-05 04:45:43 +00:00
Chris Lattner
6f38d28817
Remove this file as suggested by Jeff Cohen
...
llvm-svn: 17480
2004-11-05 04:17:19 +00:00
Chris Lattner
7d7f23b7db
Fix project file, patch contributed by Jeff Cohen
...
llvm-svn: 17479
2004-11-05 04:15:30 +00:00
Misha Brukman
a73e7cae72
Clean up code layout, delete extra blank line, say fibonacci' instead of foo'
...
llvm-svn: 17478
2004-11-05 04:11:40 +00:00
Nate Begeman
bff3d4abf0
Thanks to sabre for pointing out that we were incorrectly codegen'ing
...
int test(int x) { return 32768 - x; }
Fixed by teaching the function that checks a constant's validity to be used
as an immediate argument about subtract-from instructions.
llvm-svn: 17476
2004-11-04 19:43:18 +00:00
Chris Lattner
adb5342ae8
Fix typeo
...
llvm-svn: 17466
2004-11-04 05:00:18 +00:00
Brian Gaeke
0da246f535
Handle "call" operands of type long/ulong passed in registers.
...
llvm-svn: 17464
2004-11-04 00:27:04 +00:00
Chris Lattner
bd2886d1f0
Cleanup this example, simplifying it and making it conform to LLVM coding
...
standards
llvm-svn: 17459
2004-11-03 21:43:03 +00:00
Chris Lattner
a67a030d9d
Don't call Constant::getNullValue when the argument could be VoidTy
...
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
f305b0ae1b
defining __STDC_LIMIT_MACROS on the command line is not really necessary
...
for Visual Studio, and is a bit of a pain when you want to include the
LLVM headers from your own project, so I moved the check a bit down into
the Unix case to avoid the hassle... Here is a patch
Patch by Morten Ofstad!
llvm-svn: 17450
2004-11-03 17:15:45 +00:00
Brian Gaeke
1845e9b4c7
CONFIGURATION isn't spelled Configuration, it's spelled BuildMode.
...
Due to qmtest's or llvm.py's lousy error checking, this single error
causes qmtest to fork-bomb the machine, filling the process table with
python processes that do nothing. Clearly, better error checking is
needed.
llvm-svn: 17449
2004-11-03 17:11:23 +00:00
Reid Spencer
7206bf9e9f
Top level files for building natively on win32
...
llvm-svn: 17447
2004-11-03 16:14:40 +00:00
Reid Spencer
67b62fbaa7
MS Visual Studio files for building LLVM on Win32 platforms.
...
llvm-svn: 17446
2004-11-03 16:13:14 +00:00
Chris Lattner
cff3b41e95
Fix this function to not say that longs have 8-byte alignment on X86/PPC.
...
This method is really a gross hack, but at least we can make it work on
the targets we support right now.
This bug fix stops a crash in a testcase reduced from 176.gcc
llvm-svn: 17443
2004-11-02 22:18:18 +00:00
Tanya Lattner
444be61ea6
Added gross hacks such as creating my own def-use map, and picking on Instruction that I can add all my TmpInstructions to its MCFI.
...
llvm-svn: 17441
2004-11-02 21:04:56 +00:00
Chris Lattner
de7a85895c
Graphs that are part of equivalence sets can be multi-function SCC's
...
themselves. Make sure to update DSInfo correctly. This fixes a testcase
reduced from Prolangs-C++/objects
llvm-svn: 17439
2004-11-02 20:31:06 +00:00
Chris Lattner
661b8552bb
Correctly handle new SCC's found as a result of merging EQ graphs do to
...
function pointer equivalences. This fixes many problems, including a testcase
reduced Prolangs-C++/objects.
llvm-svn: 17437
2004-11-02 19:29:59 +00:00
Chris Lattner
ddb4d2a524
Substantially cleanup/speedup the eq graphs pass by walking the callgraph
...
a DSGraph at a time instead of a function at a time. This is also more
correct, though it doesn't seem to fix any programs.
llvm-svn: 17435
2004-11-02 17:51:11 +00:00
Chris Lattner
32b01c3143
Fix typo, contributed by Henrik Bach!
...
llvm-svn: 17434
2004-11-02 17:31:02 +00:00
Reid Spencer
651dd3ad5a
* New Recursive Target: clean-all. This target will recursively descend the
...
$(ObjDir) and clean out all build modes (Debug, Release, Profile) in
addition to the normal "clean" rules.
* Fix "clean" problems with Lex/Yacc so all files are remove properly.
* Ensure errors from "rm" don't thwart the uninstall and clean targets.
llvm-svn: 17433
2004-11-02 16:56:15 +00:00
Reid Spencer
9d0c1e0de6
* New Recursive Target: clean-all
...
llvm-svn: 17432
2004-11-02 16:36:03 +00:00
Chris Lattner
99d7bb3378
Fix a warning
...
llvm-svn: 17431
2004-11-02 15:27:57 +00:00
Chris Lattner
e5370f56ae
Minor cleanups
...
llvm-svn: 17428
2004-11-02 06:38:58 +00:00
Chris Lattner
96f6616479
* Rearrange code slightly
...
* Disable broken transforms for simplifying (setcc (cast X to larger), CI)
where CC is not != or ==
llvm-svn: 17422
2004-11-02 03:50:32 +00:00
Reid Spencer
9df63b4e52
List the individual tools for easier reference.
...
Make the bugpoint link reference the man page in the CommandGuide until
the Bugpoint.html file can describe bugpoint in a little more of a tutorial
style instead of just being a man page.
llvm-svn: 17416
2004-11-01 21:57:35 +00:00
Reid Spencer
2ed33b46d5
Add compliant header.
...
NOTE: This doc needs to describe the bugpoint "subsystem" not the tool.
llvm-svn: 17415
2004-11-01 21:55:46 +00:00
Reid Spencer
10c6d3f372
Add missing tag.
...
llvm-svn: 17414
2004-11-01 21:31:39 +00:00
Chris Lattner
b93914d06c
Remove more dead methods
...
llvm-svn: 17413
2004-11-01 21:07:05 +00:00
Chris Lattner
76a5a2eb2a
Delete a dead method
...
llvm-svn: 17412
2004-11-01 21:04:47 +00:00
Chris Lattner
773ca922a7
Rename FoldedGraph -> DSInfo to be consistent with other passes
...
delete some dead methods
llvm-svn: 17410
2004-11-01 21:02:23 +00:00
Reid Spencer
6b6557c5eb
Update table to llvm.css standards.
...
llvm-svn: 17409
2004-11-01 20:47:22 +00:00
Reid Spencer
a4e9b54222
Get rid of bogus entity references.
...
llvm-svn: 17408
2004-11-01 20:41:01 +00:00
Chris Lattner
5e9b3540d1
Get rid of the EquivClassGraphArgsInfo class, and the map that held it.
...
We only need one instance of the vector that it contains at a time.
llvm-svn: 17407
2004-11-01 20:37:00 +00:00
Chris Lattner
720eb217a7
Add placeholder variable to make Win32 work, applied for Morten Ofstad
...
llvm-svn: 17406
2004-11-01 20:10:20 +00:00
Chris Lattner
ef41cbb97d
Eliminate the cloneGraph method
...
llvm-svn: 17405
2004-11-01 19:54:06 +00:00
Reid Spencer
1e64cad5ff
Attempt CSS 2 compliance.
...
llvm-svn: 17404
2004-11-01 09:26:57 +00:00
Reid Spencer
4ffe4a7733
Attempt CSS 2 validation.
...
llvm-svn: 17403
2004-11-01 09:25:03 +00:00
Reid Spencer
7336a6c337
HTML 4.01 Strict compliance.
...
llvm-svn: 17402
2004-11-01 09:22:49 +00:00
Reid Spencer
271fe88b3f
Correct the document type declaration.
...
llvm-svn: 17401
2004-11-01 09:21:32 +00:00
Reid Spencer
fea14b5599
Add the HTML 4.01 and CSS icons with links to validators.
...
llvm-svn: 17400
2004-11-01 09:19:53 +00:00
Reid Spencer
0777321b8f
Attempt HTML 4.01 Strict compliance.
...
llvm-svn: 17399
2004-11-01 09:16:30 +00:00
Reid Spencer
f0714dd617
Cleanup the constants section.
...
llvm-svn: 17398
2004-11-01 09:02:53 +00:00
Reid Spencer
49fb40c6d9
Remove spurious end tag, fix indentation.
...
llvm-svn: 17397
2004-11-01 08:30:14 +00:00
Reid Spencer
9f16cad663
Make HTML 4.01 Strict compliant.
...
llvm-svn: 17396
2004-11-01 08:26:25 +00:00
Reid Spencer
4d21242e66
Fix tag placement to make HTML 4.01 Strict compliant.
...
llvm-svn: 17395
2004-11-01 08:24:13 +00:00
Reid Spencer
c3c4c4f843
Minor format tweask for tables.
...
llvm-svn: 17394
2004-11-01 08:19:36 +00:00
Reid Spencer
ad44f5c0be
Add layout classes for table elements so tables can be used for layouts.
...
This is easier than attempting to figure out dual purpose columnar layouts
for multiple browser types. All browsers understand tables.
llvm-svn: 17393
2004-11-01 08:18:06 +00:00
Reid Spencer
0be901556b
Configuration -> BuildMode
...
llvm-svn: 17392
2004-11-01 07:53:17 +00:00
Reid Spencer
b5b92fbaf6
Eliminate redundant variable definition. Rename Configuration -> BuildMode
...
Make lex/yacc output cleaned only if in a directory that has those sources.
llvm-svn: 17391
2004-11-01 07:50:27 +00:00
Chris Lattner
8af7424920
Speed up the tail duplication pass on the testcase below from 68.2s to 1.23s:
...
#define CL0(a) case a: f(); goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This comes from GCC PR 15524
llvm-svn: 17390
2004-11-01 07:05:07 +00:00
Chris Lattner
93d1e39f3e
Do not compute the predecessor list for a block unless we need it.
...
This speeds up simplifycfg on this program, from 44.87s to 0.29s (with
a profiled build):
#define CL0(a) case a: goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This testcase is contrived to expose N^2 behavior, but this patch should speedup
simplifycfg on any programs that use large switch statements. This testcase
comes from GCC PR17895.
llvm-svn: 17389
2004-11-01 06:53:58 +00:00
Chris Lattner
615e7fbcf3
When compiling a file, indicate what build it is for
...
llvm-svn: 17388
2004-11-01 06:14:59 +00:00
Chris Lattner
01f2381c72
* Do not refer to ActualCallees in CBU, when we can do it locally.
...
* *DO NOT* print CBU graphs when asked to print our own. This is just
FREAKING confusing and misleading: it's better to not print anything.
* Simplify and clean up some code
* Add some more paranoia assertion checking code that I found to track
down this bug:
* Fix a nasty bug that was causing us to crash on Prolangs-C++/objects,
where we were missing processing some graphs. This hunk is the bugfix:
- if (!I->isExternal() && !FoldedGraphsMap.count(I))
+ if (!I->isExternal() && !ValMap.count(I))
urg!
llvm-svn: 17386
2004-10-31 23:41:26 +00:00
Reid Spencer
b1454879b3
Wrap to 80 cols
...
llvm-svn: 17385
2004-10-31 23:24:31 +00:00
Reid Spencer
0b40fdb0ad
Add UsingLibraries.html link.
...
llvm-svn: 17384
2004-10-31 23:02:38 +00:00
Chris Lattner
aeb2b16c45
Simplify graph traversal, improve grammar
...
llvm-svn: 17383
2004-10-31 23:01:34 +00:00
Reid Spencer
1e3586ee1d
Give table headers the striped background.
...
llvm-svn: 17382
2004-10-31 23:01:02 +00:00
Reid Spencer
0d6d8d0af5
* Moved from ObjectFiles.html
...
* Changed names of libraries to reflect new naming scheme
* Added some more introductory material
* Added a rule of thumb.
llvm-svn: 17381
2004-10-31 23:00:25 +00:00
Reid Spencer
67fe9440e6
Renamed UsingLibraries.html
...
llvm-svn: 17380
2004-10-31 22:59:06 +00:00
Reid Spencer
737424ced3
Get the shared library extension right on all platforms, regardless of what
...
Chris wants on his platform.
llvm-svn: 17379
2004-10-31 22:53:06 +00:00
Chris Lattner
d49bd175f0
Do not do horrible things to the CBU graphs. In particular, we do NOT own
...
the CBU graphs, copy them instead of hacking on the CBU graphs.
Also, instead of forwarding request from ECGraphs clients to the CBU graphs
clients, service them ourselves.
Finally, remove a broken "optimization"
llvm-svn: 17378
2004-10-31 21:56:11 +00:00
Chris Lattner
e3c00e9eee
Fix comment
...
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Reid Spencer
68172d44c2
Fix output for building shared libraries per Chris' requirements
...
llvm-svn: 17376
2004-10-31 21:07:34 +00:00
Chris Lattner
70fdac83e3
Improve comment
...
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Reid Spencer
991f66abc1
Actually use the correct variable name for building bytecode files.
...
llvm-svn: 17374
2004-10-31 18:52:15 +00:00
Reid Spencer
8adaaf474a
Add the preconditions target per suggestion by Henrik Bach.
...
llvm-svn: 17373
2004-10-31 18:50:34 +00:00
Chris Lattner
d3d23f8aa0
Fix another bug in Prolangs-C++/objects
...
llvm-svn: 17372
2004-10-31 18:13:19 +00:00
Reid Spencer
bbc642ee5e
One more missing end tag.
...
llvm-svn: 17371
2004-10-31 17:58:58 +00:00
Reid Spencer
301f20a824
Correct tag usage for HTML 4.01 Strict compliance
...
llvm-svn: 17370
2004-10-31 17:56:50 +00:00
Reid Spencer
f4215f71d3
Add a tutorial and some more general concepts.
...
llvm-svn: 17369
2004-10-31 17:51:38 +00:00
Chris Lattner
7ca10b1faf
Only call getNodeForValue on pointer arguments! this fixes a problem running
...
on Prolangs-C++/objects
llvm-svn: 17368
2004-10-31 17:47:48 +00:00
Chris Lattner
3f7dbfc898
Add more paranoid assertions :)
...
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Misha Brukman
619a24c4d9
No, really, the library name is `LLVMexecve'
...
llvm-svn: 17366
2004-10-31 17:30:52 +00:00
Vikram S. Adve
254afc4614
Fix patterns to match only one-char words.
...
llvm-svn: 17365
2004-10-30 23:11:26 +00:00
Reid Spencer
965ff465eb
Add a few more terms.
...
llvm-svn: 17364
2004-10-30 21:40:28 +00:00
Reid Spencer
1fdc95c239
Complete the description of public variables. Internal variables are listed
...
but not described. It might just stay that way.
llvm-svn: 17363
2004-10-30 21:39:42 +00:00
Reid Spencer
a537198f2c
Change macro names per naming standard in Makefile.rules.
...
llvm-svn: 17361
2004-10-30 09:26:22 +00:00
Reid Spencer
f22aa469c9
Correct macro names per naming standard in Makefile.rules
...
llvm-svn: 17360
2004-10-30 09:25:27 +00:00
Reid Spencer
f88808ae43
Internalize variable names to prevent recursive assignment. Cleanup docs.
...
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Chris Lattner
c76fef1248
Fix some more problems where we called getOffset before getNode()
...
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
8aa0bafe1a
Fix three bugs:
...
1. Calls to external global VARIABLES should not be treated as a call to an
external function
2. Efficiently deleting an element from a vector by using std::swap with
the back, then pop_back is NOT a good way to keep the vector sorted.
3. Our hope of having stuff get deleted by making them redundant just won't
work. In particular, if we have three calls in sequence that should be
merged: A, B, C first we unify B into A. To be sure that they appeared
identical (so B would be erased) we set B = A. On the next step, we
unified C into A and set C = A. Unfortunately, this is no guarantee that
C = B, so we would fail to delete the dead call. Switch to a more
explicit scheme.
llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
bc740090a9
Fix more undefined behavior
...
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
ba96f0fd83
* Add a method
...
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
evaluation of arguments to function calls to ensure that getNode() was
called before getOffset(). In practice, this was NOT happening.
llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Chris Lattner
334df0463d
Add an assertion and a method
...
llvm-svn: 17353
2004-10-30 04:03:47 +00:00
Chris Lattner
b508b00e6b
No really, this is LLVM!
...
llvm-svn: 17352
2004-10-30 00:57:52 +00:00
Tanya Lattner
ddebd1eeaa
Fixed bug with infinite epilogues.
...
Fixed issue with generating the partial order. It now adds the nodes not in recurrences in sets for each connected component.
llvm-svn: 17351
2004-10-30 00:39:07 +00:00
Misha Brukman
b56287dfd2
Fix file header comment
...
llvm-svn: 17350
2004-10-29 23:26:09 +00:00
Misha Brukman
c7c8d88804
* Fix compilation on AIX: GCC's fixincludes eliminates isinf() declaration
...
* Move file comment to the top of the header where it belongs
llvm-svn: 17349
2004-10-29 23:17:45 +00:00
Reid Spencer
bd44bbdc0e
Don't modify user vars because they will get passed down (modified) to
...
sub-makes and recursively append causing huge command lines and incorrect
compilation results.
Also, fix the printvars target to align its output and ensure that the
contents of variables can't get interpreted by the shell.
llvm-svn: 17348
2004-10-29 22:14:56 +00:00
Brian Gaeke
b87e08e0ef
Change name of target lib to conform to new naming scheme.
...
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
6254a798ca
Remove dependency on MRegisterInfo::getRegClass
...
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
3415c77f59
Fix grammar (i.e.)
...
llvm-svn: 17343
2004-10-29 19:20:42 +00:00
Reid Spencer
e6b944f2f5
Disable the build in the samples directory so that llvmc dependencies don't
...
mess up the build.
llvm-svn: 17342
2004-10-29 18:43:49 +00:00
Misha Brukman
a8816d3fe2
The Alpha (tm) intrinsics aren't even being used
...
llvm-svn: 17341
2004-10-29 18:43:43 +00:00
Misha Brukman
8d8fc6529e
The Alpha (tm) intrinsics have never been used anywhere
...
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Misha Brukman
8600a7ac84
LLEE execve() wrapper library has changed its name and location
...
llvm-svn: 17339
2004-10-29 18:36:51 +00:00
Brian Gaeke
9a51b8ca7c
When emitting debug msgs for function stubs, don't truncate the
...
printed pointer value if sizeof(unsigned) != pointer size. Instead,
use uintptr_t.
llvm-svn: 17338
2004-10-29 18:22:45 +00:00
Vikram S. Adve
089ade78fd
Print P and [AR] files on update.
...
llvm-svn: 17337
2004-10-29 17:43:19 +00:00
Reid Spencer
8b091689db
Make sure the LLVM_CONFIG_DIR environment variable is set so we don't get
...
error messages from the compiler.
llvm-svn: 17335
2004-10-29 06:42:38 +00:00
Reid Spencer
da86a3778a
Make the list of automatic Makefile* files updated explicit instead of
...
generally wildcarded.
llvm-svn: 17334
2004-10-29 04:47:33 +00:00
Misha Brukman
ad279bfe07
* Add spaces between function names for readability
...
* Separate paragraphs, flush HTML text to left margin for ease of editing
llvm-svn: 17333
2004-10-29 04:33:19 +00:00
Chris Lattner
124ea873ca
This line breaks FreeBSD and apparently isn't useful anymore.
...
llvm-svn: 17332
2004-10-29 03:46:38 +00:00
John Criswell
98b355b6b2
Commented out the _Alloc_traits specialization entirely, as it is only
...
supported by specific versions of GCC.
It is left in place in case anyone wants to updated it for GCC 3.4 or
re-use it for earlier versions of GCC where it works.
llvm-svn: 17324
2004-10-28 18:21:41 +00:00
John Criswell
158737a76c
Only add the _Alloc_traits specialization in if we're compiling for
...
Linux and not compiling for Sparc.
This is still probably not correct, or portable, but it'll do for now.
llvm-svn: 17321
2004-10-28 17:31:46 +00:00
Reid Spencer
4b04c85125
Fix the dependency of lex.o on gram.tab.h
...
llvm-svn: 17320
2004-10-28 16:48:13 +00:00
John Criswell
033d215ccb
Added the poolalloc module to the list of projects to configure, if present.
...
llvm-svn: 17319
2004-10-28 13:35:00 +00:00
Reid Spencer
9c7bfc96e0
Bug Fixes:
...
* Move rules that build directories earlier in the file so that they are
always built before the things that depend on them. This enables a
parallel "dist-check" target.
* Fix use of TOOLLINKOPTS and TOOLLINKOPTSB (thanks to Henrik Bach)
* Standardize the output - some scripts using plain echo instead of $(ECHO)
llvm-svn: 17318
2004-10-28 09:15:28 +00:00
Reid Spencer
be6a4e9b7f
Make parallel "install" and "uninstall" targets not step on itself.
...
llvm-svn: 17315
2004-10-28 07:57:28 +00:00
Alkis Evlogimenos
23e565484a
Gep indices must be of int, uint, long or ulong type.
...
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Reid Spencer
8eb04a7713
Make sure the sources get distributed (use EXTRA_DIST)
...
Add the goof.st sample.
llvm-svn: 17312
2004-10-28 06:42:34 +00:00
Brian Gaeke
56dbc4ca15
Fix library names for sparc
...
llvm-svn: 17311
2004-10-28 06:39:10 +00:00
Reid Spencer
c833eddfe6
Fix library name.
...
llvm-svn: 17307
2004-10-28 05:37:24 +00:00
Alkis Evlogimenos
6bbc57ec12
Fix library name.
...
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
49cc2cf279
Fix library name.
...
llvm-svn: 17305
2004-10-28 05:32:01 +00:00
Reid Spencer
37d45f6934
Fix name of library
...
llvm-svn: 17304
2004-10-28 05:30:54 +00:00
Brian Gaeke
ae050e0b65
Regenerated after fixing typo.
...
llvm-svn: 17303
2004-10-28 05:06:45 +00:00
Reid Spencer
cae2d8a951
Make sure we test the right variable for the AC_DEFINE
...
llvm-svn: 17302
2004-10-28 05:04:20 +00:00
Brian Gaeke
591f5d6622
It's spelled IEEEFP
...
llvm-svn: 17301
2004-10-28 04:17:05 +00:00
Reid Spencer
47fcbef63e
Use llvmc to compile the Stacker programs
...
llvm-svn: 17300
2004-10-28 04:08:05 +00:00
Reid Spencer
0ac18e0385
Add the samples directory to the build
...
llvm-svn: 17299
2004-10-28 04:07:54 +00:00
Reid Spencer
f828c812bd
Remove the FORCE token, rename VERSION to VERSION_TOK so it doesn't
...
conflict with configuration variables and #defines.
llvm-svn: 17298
2004-10-28 04:06:15 +00:00
Reid Spencer
aec50b98e0
Implement linking.
...
llvm-svn: 17297
2004-10-28 04:05:06 +00:00
Reid Spencer
04b92192ec
Eliminate the force flag, configuration item, and related support
...
llvm-svn: 17296
2004-10-28 04:04:38 +00:00
Reid Spencer
ffe5f97f17
Pass -f to stkrc to ensure the output file is always written.
...
llvm-svn: 17295
2004-10-28 03:57:49 +00:00
Reid Spencer
1002e454cb
Eliminate the -F option (for forcing output) .. not needed
...
Create GCC compatible -Wx, aliases for the existing -T options.
llvm-svn: 17294
2004-10-28 03:56:16 +00:00
Reid Spencer
e8ee9b2432
Add llvm-ld to the subdirs to be built
...
llvm-svn: 17293
2004-10-28 03:53:02 +00:00
Reid Spencer
548e1c2a03
Convert to new library names.
...
llvm-svn: 17292
2004-10-28 03:50:43 +00:00
Reid Spencer
4bc9b0ff4a
Get rid of drivel.
...
Ensure the lex/yacc output are specified as BUILT_SOURCES so they get
built first.
llvm-svn: 17290
2004-10-28 01:25:28 +00:00
Reid Spencer
c9bbb35c6f
Make sure that the yacc and lex output are specified as BUILT_SOURCES.
...
Correct the dependency of the Lexer.o file on the constructed
llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on
the header, its the output of compiling Lexer.cpp, Lexer.o
llvm-svn: 17289
2004-10-28 00:43:24 +00:00
Reid Spencer
b7f710ae7b
Bug Fixes:
...
* Ensure that BUILT_SOURCES depends on OBJ_DIR/Makefile so that they do not
get built before the Makefile is updated.
* Fix build script for yacc & lex files by stopping it from thwarting the
dependencies on the file. If the .y file changes, it needs to be rebuilt.
This also cleans up the problem with llvmAsmParser ALWAYS rebuilding its
Yacc files just to throw them away because there's no change.
llvm-svn: 17288
2004-10-28 00:41:43 +00:00
Reid Spencer
34bb03c61b
Update for library name change.
...
llvm-svn: 17287
2004-10-28 00:11:43 +00:00
Reid Spencer
57cbe39d1e
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
9f337bf96f
Add the HAVE_RAND48 define.
...
llvm-svn: 17285
2004-10-27 23:09:31 +00:00
Reid Spencer
f9676539bb
Changes to support rand48 tests
...
llvm-svn: 17284
2004-10-27 23:03:44 +00:00
Reid Spencer
c8c272ffb1
Fix auto-reconfigure bug: make sure we actually reconfigure not just
...
regenerate the config.status script.
llvm-svn: 17283
2004-10-27 22:48:58 +00:00
Chris Lattner
e721eb007c
Add a couple of new features
...
llvm-svn: 17282
2004-10-27 16:28:17 +00:00
Chris Lattner
7dfc2d29ac
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
cebf2bbe9e
Give sumant credit too!
...
llvm-svn: 17280
2004-10-27 15:54:23 +00:00
Nate Begeman
a2b117c68a
Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre.
...
llvm-svn: 17278
2004-10-27 06:00:53 +00:00
Chris Lattner
70c2039b39
Hrm, this code was severely botched. As it turns out, this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html
exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill
the zion nightly tester disk up and make the tester barf.
This is obviously not a good thing, so lets fix this bug shall we? :)
llvm-svn: 17276
2004-10-27 05:57:15 +00:00
Nate Begeman
c193790dbb
Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid
...
llvm-svn: 17275
2004-10-27 05:44:23 +00:00
Nate Begeman
5e8cce5313
Remove dead data member in MRegisterInfo class. Thanks sabre!
...
llvm-svn: 17274
2004-10-27 04:51:58 +00:00
Reid Spencer
94105c7b19
Get the *.inc files to depend on tblgen so if tblgen gets fixed, all the
...
*.inc files get regenerated.
llvm-svn: 17273
2004-10-27 04:34:35 +00:00
Chris Lattner
845afe9b20
Initialize with the correct constant type
...
llvm-svn: 17270
2004-10-27 03:55:24 +00:00
Reid Spencer
d94bb33911
Make sure that Makefile.rules and Makefile.config.in are not candidates for
...
automatic makefile update.
llvm-svn: 17269
2004-10-26 23:10:00 +00:00
Reid Spencer
77a46d25a5
Cleanup/Fixes:
...
* Force preconditions to be met FIRST
* Fix dist-check dependency
* Add some variables to the printvars target
* Automatically update Makefile.* as well as just Makefile
llvm-svn: 17268
2004-10-26 22:26:33 +00:00
Reid Spencer
938aa3e4af
* Make the libcrtend.a installation depend on the bytecode-libs directory
...
* Conform output to standard.
llvm-svn: 17267
2004-10-26 21:30:31 +00:00
Chris Lattner
e43c9c2db2
Unless someone seriously objects, I don't think we really need this. Sorry
...
resistor :(
llvm-svn: 17265
2004-10-26 20:02:50 +00:00
Chris Lattner
6ee2c57128
Plug a memory leak in the asmparser. It turns out that we were leaking
...
the strings for basic block labels in some cases. This amounted to about
120K of memory for namd, a medium sized program.
llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Misha Brukman
75e5700227
Wrap comments at 80 cols
...
llvm-svn: 17261
2004-10-26 18:00:03 +00:00
Chris Lattner
fda51a5933
add support for UndefValue
...
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
e9e73bd3b1
Fix header
...
llvm-svn: 17259
2004-10-26 16:19:57 +00:00
Misha Brukman
03f87d527d
Use <tt> around "#include" and "std::endl"
...
llvm-svn: 17258
2004-10-26 16:18:43 +00:00
Misha Brukman
4f056d55d5
* DataTypesFix.h moved to AIXDataTypesFix.h
...
* Condition #inclusion of AIXDataTypes.h on the _AIX preprocessor symbol to
prevent extra I/O on non-AIX systems. Thus, no #ifdef in AIXDataTypes.h
llvm-svn: 17257
2004-10-26 16:15:18 +00:00
Misha Brukman
d73c8428f1
Use <tt> around header names
...
llvm-svn: 17256
2004-10-26 16:07:46 +00:00
Misha Brukman
0c7e1420c1
* Thanks to Morten Ofstad for the Visual C++ compatibility fixes
...
* Added Paolo's email address
llvm-svn: 17255
2004-10-26 15:55:12 +00:00
Misha Brukman
f2499137d7
* Fix spelling and grammar errors
...
* Close <p> tags properly
* Break up paragraphs with blank lines, clean up text alignment
* Delete unbalanced "
llvm-svn: 17254
2004-10-26 15:45:13 +00:00
Chris Lattner
4336b87f2c
Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
...
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
29f1999571
Remove the unused MachineBasicBlock2IndexFunctor class.
...
Move method bodies that depend on <algorithm> out of line to
MachineBasicBlock.cpp. Patch contributed by Morten Ofstad!
llvm-svn: 17252
2004-10-26 15:41:13 +00:00
Chris Lattner
c8b07dd339
Clean up the MachineBasicBlock.h file, percolating #includes into this file.
...
Patch contributed by Morten Ofstad
llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Reid Spencer
8da1b5df59
* Implement the "dist-check" target that verifies the contents of a zipped
...
tarball.
* Fix bugs in the "dist" target (a precursor to dist-check).
* Correct the implementation of the "install" targets so that they ensure
the installation directories are created before attmpting to install
directories in them.
* Reduce the verbosity of the output of the makefile system
* Ensure output includes the configuration whenever libraries or tools are
built, installed, or uninstalled.
llvm-svn: 17250
2004-10-26 07:09:33 +00:00
Reid Spencer
4a9b5ff536
Reduce the number of EXTRA_DIST files since Makefile.rules now handles the
...
autoconf directory automagically.
llvm-svn: 17249
2004-10-26 07:05:09 +00:00
Reid Spencer
7e8825fc62
Make sure the samples and test directories get distributed.
...
llvm-svn: 17248
2004-10-26 07:04:18 +00:00
Reid Spencer
c6c87c1378
Make sure the include files get distributed.
...
llvm-svn: 17247
2004-10-26 07:03:39 +00:00
Reid Spencer
9b7a83838a
Add the export symbols list files as extra distribution files.
...
llvm-svn: 17246
2004-10-26 07:02:58 +00:00
Nate Begeman
7fed324ffc
Remove include of MRegisterInfo.h, since it is already included by
...
SkeletonGenRegisterInfo.h.inc
llvm-svn: 17245
2004-10-26 06:04:23 +00:00
Nate Begeman
dd8f1d8b77
Remove file that is no longer used, and move include of MRegisterInfo.h
...
from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually
needed.
llvm-svn: 17244
2004-10-26 06:02:38 +00:00
Nate Begeman
f94bedc26a
Remove method getRegClass from MRegisterInfo, as it is no longer used.
...
llvm-svn: 17243
2004-10-26 06:00:31 +00:00
Reid Spencer
e7d8dff1f7
Really get mkinstalldirs to shut up about what its doing .. who cares?
...
llvm-svn: 17242
2004-10-26 05:49:38 +00:00
Chris Lattner
3939800123
Improve help output from llvm-db 'info' command. Patch contributed by
...
Michael McCracken!
llvm-svn: 17241
2004-10-26 05:46:17 +00:00
Nate Begeman
47b9d33f5b
Eliminate usage of MRegisterInfo::getRegClass(physreg)
...
llvm-svn: 17240
2004-10-26 05:40:45 +00:00
Chris Lattner
d7a7a3f42f
Fix the interpreter crash that Michael McCracken found
...
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Chris Lattner
b56cb729bd
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 17238
2004-10-26 05:29:18 +00:00
Nate Begeman
4c6e1d694c
Update to-do list
...
llvm-svn: 17235
2004-10-26 04:10:53 +00:00
Nate Begeman
26feb4f6d8
Fix treecc. Also fix a latent bug in emitBinaryConstOperation that would
...
allow and const, 0 to be incorrectly codegen'd into a rlwinm instruction.
llvm-svn: 17234
2004-10-26 03:48:25 +00:00
Reid Spencer
aa4887b482
Add EXTRA_DIST for additional files to be distributed.
...
llvm-svn: 17233
2004-10-26 03:12:11 +00:00
Chris Lattner
a47b641a85
Give a useful hint
...
llvm-svn: 17232
2004-10-26 02:58:10 +00:00
Chris Lattner
bff6472b39
Bug fixed
...
llvm-svn: 17231
2004-10-25 22:13:02 +00:00
Chris Lattner
ff43ef3cc5
Disable the JIT until it can sorta kinda work.
...
llvm-svn: 17230
2004-10-25 20:53:41 +00:00
Chris Lattner
024627bc94
add a link to the makefile guide, eliminate redundant link to coding stds
...
llvm-svn: 17226
2004-10-25 19:39:46 +00:00
Chris Lattner
a555183507
Make a sentence easier to parse
...
llvm-svn: 17225
2004-10-25 19:37:46 +00:00
Chris Lattner
5b7c967b54
Fix spellos
...
llvm-svn: 17224
2004-10-25 19:28:03 +00:00
Chris Lattner
3fe79addf7
Remove template args that are the same as the default
...
llvm-svn: 17223
2004-10-25 19:09:41 +00:00
Chris Lattner
574fecb59e
Remove a dead class. Thanks to Morten Ofstad for pointing this out.
...
llvm-svn: 17222
2004-10-25 19:07:43 +00:00
Chris Lattner
21c6c41dcc
Remove dead assert
...
llvm-svn: 17221
2004-10-25 19:04:01 +00:00
Chris Lattner
d3642d720c
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17220
2004-10-25 18:47:10 +00:00
Chris Lattner
2e493d9e75
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17219
2004-10-25 18:46:05 +00:00
Chris Lattner
d57638c4a7
Fix compatibility with MSVC, patch by Morten Ofstad
...
llvm-svn: 17218
2004-10-25 18:45:16 +00:00
Chris Lattner
6180881673
Do not use variable sized arrays in C++, they are non-portable. Patch
...
contributed by Morten Ofstad
llvm-svn: 17217
2004-10-25 18:44:14 +00:00
John Criswell
7eeed938bf
Removed dead method, printPHICopiesForSuccessors().
...
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
Chris Lattner
111c3e827e
Patch to support MSVC better, contributed by Morten Ofstad
...
llvm-svn: 17215
2004-10-25 18:40:47 +00:00
Chris Lattner
43df507fef
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17214
2004-10-25 18:40:08 +00:00
Chris Lattner
778963766c
Patch to support MSVC correctly, contributed by Morten Ofstad!
...
llvm-svn: 17213
2004-10-25 18:38:05 +00:00
John Criswell
a564e9e0ba
Modified switch generation so that only the phi values associated with the
...
destination basic block are copied.
llvm-svn: 17212
2004-10-25 18:30:09 +00:00
Reid Spencer
100080cc38
New Makefile Features:
...
* "dist" target now builds tar.gz, tar.bz2, and zip files suitable for
distribution. "dist" can only be run from $(BUILD_OBJ_ROOT) and implies
a "check".
* made the preconditions not do a recursive make and ensured that they are
executed sequentially.
* made the messages output by the makefile be prefixed with "llvm" and the
make level (e.g. llvm[1]: ) in the same way that make does so that the
messages are uniform and more readable.
* Fixed the tags target so that tags depends on TAGS which contains the
rules to build a file named TAGS
* Implemented the EXTRA_DIST feature in a few directories to make sure it
works.
llvm-svn: 17210
2004-10-25 08:27:37 +00:00
Reid Spencer
65cb53fe2f
Teach mkinstalldirs how to shut up about making directories.
...
llvm-svn: 17209
2004-10-25 08:21:09 +00:00
Reid Spencer
8d0d005998
Add a check for the tar program.
...
llvm-svn: 17208
2004-10-25 08:18:47 +00:00
Nate Begeman
74b7c1f3e0
Implement more complete and correct codegen for bitfield inserts, as tested
...
by the recently committed rlwimi.ll test file. Also commit initial code
for bitfield extract, although it is turned off until fully debugged.
llvm-svn: 17207
2004-10-24 10:33:30 +00:00
Nate Begeman
30e30c76ae
Initial checkin of regression test for generating the PowerPC rlwimi
...
instruction, which performs bitfield inserts. All tests should compile
to one rlwimi instruction.
llvm-svn: 17206
2004-10-24 10:30:22 +00:00
Reid Spencer
4fe72ed44f
First draft. More to come.
...
llvm-svn: 17205
2004-10-24 08:48:59 +00:00
Reid Spencer
dcba778871
Fix uninstall from rebuilding everything (wrong dependency)
...
llvm-svn: 17204
2004-10-24 08:21:04 +00:00
Reid Spencer
70969c005b
Move top level rules for tags and installing headers to Makefile.rules
...
llvm-svn: 17203
2004-10-24 08:20:10 +00:00
Reid Spencer
12a3a0553d
Implemented New Features:
...
* Fixed the install target to install files correctly
* Implemented the uninstall target to remove files from install dirs
* Isolated the top level targets (dist, dist-check, dist-clean, tags) so
they only run/exist from the top level directory
* Put if/endif gaurds around potentially dangerous $(RM) commands.
* Implemented place-holder rules for distribution targets to just say that
they aren't implemented yet.
* Implemented tags target in Makefile.rules so all projects can use it
* Made a pony for resistor
llvm-svn: 17202
2004-10-24 07:53:21 +00:00
Chris Lattner
3ff9289476
Fix the previous bug the correct way. This fixes ptrdist/bc
...
llvm-svn: 17201
2004-10-24 04:27:59 +00:00
Misha Brukman
fa2f3010c1
Fix grammar in comments to getSizeOf()
...
llvm-svn: 17200
2004-10-24 03:18:30 +00:00
Alkis Evlogimenos
ba28dc8c54
Make this actually work.
...
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
ed962e31e2
Improve comments and wrap to 80 columns.
...
llvm-svn: 17198
2004-10-24 03:01:32 +00:00
Reid Spencer
e057811423
Make the $(OBJDIR) go away on clean-local.
...
llvm-svn: 17197
2004-10-24 02:26:09 +00:00
Alkis Evlogimenos
da5de05b9b
Add ConstantExpr::getSizeOf(Type*).
...
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Misha Brukman
9ce0da9e90
* Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
...
* Stop the confusion of using rv and Addr for global addresses: just use rv
llvm-svn: 17195
2004-10-23 23:47:34 +00:00
Misha Brukman
f1f6270708
Add BA, BL, and BLA opcodes
...
llvm-svn: 17193
2004-10-23 20:29:24 +00:00
Reid Spencer
81cd049e8c
Several Changes:
...
* Fix parallel build problem on generated dependency files
* Fix rule confusion between .a and .la libraries so that parallel builds
don't get confused on who is building which .o and which library it is
going into.
* Fix dependency inclusion to only include C/C++ dependency files because
other types of sources won't have dependencies auto generated.
* Change "Source" to "SOURCES" for naming consistency
* Update parallel build rules for new recursive targets
* Implement EXPERIMENTAL_DIRS (failure allowed) feature
* Implement -local version of targets (all-local, clean-local, etc)
* Implement recursive targets in terms of their local counterparts
* Clarify names of some internal variables
* Move documentation to docs/MakefileGuide.html
* Clean up commentary
llvm-svn: 17192
2004-10-23 20:04:14 +00:00
Reid Spencer
eebdfe5896
Make clean quieter.
...
llvm-svn: 17191
2004-10-23 19:49:20 +00:00
Misha Brukman
421c3c1ec4
* Do not emit IMPLICIT_DEF pseudo-instructions
...
* Convert register numbers from their opcode value to the real value, e.g.
PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
implement ha16() and lo16()
llvm-svn: 17190
2004-10-23 18:28:01 +00:00
Reid Spencer
83e5e2801f
Fix nightly build by avoiding shared library construction.
...
llvm-svn: 17187
2004-10-23 15:30:30 +00:00
Reid Spencer
282e13c942
* Actually ignore build errors in optional directories
...
* Use LLVM_SRC_ROOT as the anchor for the Target.td file
* Use MFLAGS instead of MAKEFLAGS for recursive makes so we don't try
to build a target "w" or "s" mysteriously.
llvm-svn: 17186
2004-10-23 08:19:37 +00:00
Reid Spencer
70b3e231a7
Remove the clean target.
...
llvm-svn: 17185
2004-10-23 08:01:27 +00:00
Reid Spencer
72ba9da52d
First cut at the LLVM Makefile Guide. There's lots to correct and lots more
...
to write, but this is all my brain can muster for tonight.
llvm-svn: 17184
2004-10-23 07:57:22 +00:00
Misha Brukman
15b0fb5678
DForm_1, particularly used by store instructions, needs the immediate operand to
...
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents
llvm-svn: 17183
2004-10-23 06:08:38 +00:00
Misha Brukman
e882d30aa1
Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
...
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.
llvm-svn: 17182
2004-10-23 06:05:49 +00:00
Misha Brukman
55a3ccd035
The value of the XO field for MFLR and MFCTR is 339, not 399
...
llvm-svn: 17181
2004-10-23 05:38:55 +00:00
Misha Brukman
101d5d62d5
Remove extraneous blank line
...
llvm-svn: 17180
2004-10-23 04:59:22 +00:00
Chris Lattner
87a1061559
Make VC happier, patch contributed by Morten Ofstad
...
llvm-svn: 17179
2004-10-23 04:58:50 +00:00
Misha Brukman
cea2e46821
Align function arguments in function headers
...
llvm-svn: 17178
2004-10-23 04:58:32 +00:00
Chris Lattner
46131bd16f
Fix a bug that Brian brought to my attention. This corrects:
...
Assembler/2004-10-22-BCWriterUndefBug.llx
llvm-svn: 17177
2004-10-23 03:10:23 +00:00
Chris Lattner
8e97254431
New testcase
...
llvm-svn: 17176
2004-10-23 03:10:01 +00:00
Nate Begeman
6cadac8f43
Kill casts from integer types to unsigned byte, when the cast was only used
...
as the shift amount operand to a shift instruction. This was causing us to
emit unnecessary clear operations for code such as:
int foo(int x) { return 1 << x; }
llvm-svn: 17175
2004-10-23 00:50:23 +00:00
Misha Brukman
37a7102ccb
Use cleaner quoting and eliminate blank space
...
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer
4755617619
Clean up the output from this makefile so its not verbose.
...
llvm-svn: 17173
2004-10-22 23:24:39 +00:00
Reid Spencer
23a703706c
Make sure that we don't set up a circular dependency if OBJDIR == SRCDIR
...
llvm-svn: 17172
2004-10-22 23:06:30 +00:00
Reid Spencer
49d6d1eb9f
Remove double colon rule for gram.tab.h so it doesn't conflict with the
...
auto-generated dependency rule.
llvm-svn: 17171
2004-10-22 23:05:46 +00:00
Misha Brukman
0de42869bf
Pull in Target.td using absolute path from source root instead of relative path;
...
this allows us to have sub-targets whose depth in the tree is not the same as it
is for the standard X86/PowerPC/Sparc.
llvm-svn: 17170
2004-10-22 22:18:27 +00:00
Misha Brukman
e60a3fb063
Adjust rules for building .inc files due to Reid's changes of Makefile.rules
...
llvm-svn: 17169
2004-10-22 22:16:24 +00:00
Reid Spencer
5fd95ce095
We're not doing automake any more
...
llvm-svn: 17168
2004-10-22 21:02:23 +00:00
Reid Spencer
30d8baea8d
Adjust to changes in Makefile.rules
...
llvm-svn: 17167
2004-10-22 21:02:08 +00:00
Reid Spencer
f206bd761f
Shorten the rules, speed it up, correct library contruction, add *.td rules
...
llvm-svn: 17166
2004-10-22 21:01:56 +00:00
Reid Spencer
357f771b1a
Remove the unused SourceDir variable (use BUILD_SRC_DIR)
...
llvm-svn: 17165
2004-10-22 21:01:44 +00:00
Reid Spencer
fa70bb9042
One more file to remove now that we're not doing automake.
...
llvm-svn: 17164
2004-10-22 19:33:22 +00:00
Reid Spencer
fad217c847
Eliminate compilation warning on uninitialized variable.
...
llvm-svn: 17163
2004-10-22 16:10:39 +00:00
Chris Lattner
fe9abf92de
*** empty log message ***
...
llvm-svn: 17161
2004-10-22 06:43:28 +00:00
Chris Lattner
96502da2c0
New testcase. Check for the ability to promote a malloc whose initialzed state is checked by the program
...
llvm-svn: 17160
2004-10-22 06:43:07 +00:00
Chris Lattner
5c3c21e10a
Fix a bug Nate noticed, where we miscompiled a simple testcase
...
llvm-svn: 17157
2004-10-22 04:53:16 +00:00
Reid Spencer
35572eb6f9
Remove automake support.
...
llvm-svn: 17156
2004-10-22 03:39:08 +00:00
Reid Spencer
c1c320c335
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Misha Brukman
a6ecf271db
Remove debug code emitter from the JIT
...
llvm-svn: 17151
2004-10-21 03:07:38 +00:00
Alkis Evlogimenos
757cc0e84c
Make this compile.
...
llvm-svn: 17150
2004-10-21 02:44:16 +00:00
Misha Brukman
2beb63a65a
* Added basic support for JITing functions, basic blocks, instruction encoding,
...
including registers, constants, and partial support for global addresses
* The JIT is disabled by default to allow building llvm-gcc, which wants to test
running programs during configure
llvm-svn: 17149
2004-10-21 01:42:02 +00:00
Nate Begeman
86b5f8075c
Don't clear or sign extend bool->int. This fires a few dozen times on the test suite
...
llvm-svn: 17147
2004-10-20 21:55:41 +00:00
Brian Gaeke
c9d8b4d45c
Explain what this pass does.
...
llvm-svn: 17146
2004-10-20 19:38:58 +00:00
John Criswell
85b380582e
Small performance improvement in generated C code:
...
Instead of unconditionally copying all phi node values into temporaries for
all successor blocks, generate code that will determine what successor
block will be called and then copy only those phi node values needed by
the successor block.
This seems to cut down namd execution time from being 8% higher than GCC to
4% higher than GCC.
llvm-svn: 17144
2004-10-20 14:38:39 +00:00
Misha Brukman
e2ada0413e
* Add baseline structural JIT code, but disable the JIT to allow llvm-gcc builds
...
- Support added for functions, basic blocks, constant pool, constants,
registers, and some basic support for globals, all untested
* Turn assert()s into abort()s so that unimplemented functions fail in release
llvm-svn: 17143
2004-10-19 19:49:42 +00:00
Chris Lattner
257b284038
Hrm, some people complain when the compiler cheerfully tells them what it's
...
doing... I guess they're right.
llvm-svn: 17142
2004-10-19 06:33:16 +00:00
Misha Brukman
648ad57b85
Fix some grammar
...
llvm-svn: 17141
2004-10-19 05:55:54 +00:00
Misha Brukman
65af14766f
If we're going to make the braces of functions line up for ease of readability
...
and aesthetic reasons, might as well finish the job
llvm-svn: 17140
2004-10-19 05:50:34 +00:00
Misha Brukman
471400c09b
Remove unnecessary spaces in function signature
...
llvm-svn: 17139
2004-10-19 05:49:46 +00:00
Brian Gaeke
f3499acc16
Simplify mapping info generation. In particular, the LLVM-to-MachineInstr map
...
is no longer emitted, and we do not reference any MachineCodeForInstruction
information.
llvm-svn: 17138
2004-10-19 05:15:21 +00:00
Misha Brukman
fc62cd1a85
* Fit constructor initializer on a single line
...
* Delete blank chars at end of line to fit into 80 cols
llvm-svn: 17137
2004-10-19 00:29:16 +00:00
Reid Spencer
6a11a75f31
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Misha Brukman
9cba8b39be
Move code to redefine INT64_{MIN,MAX} on AIX/PowerPC to a separate header,
...
because #undef becomes commented out in DataTypes.h.in due to autoheader
llvm-svn: 17135
2004-10-18 22:14:48 +00:00
Nate Begeman
b18121e6a9
Initial implementation of the strength reduction for GEP instructions in
...
loops. This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag. There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)
This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times
llvm-svn: 17134
2004-10-18 21:08:22 +00:00
Misha Brukman
947cd4569f
* AIX on Power defines INT64_MIN and INT64_MAX in ways that annoy GCC, so
...
special-case those definitions
* Add comments in #ifdef/#else/#endif clauses for ease of reading
llvm-svn: 17132
2004-10-18 18:35:21 +00:00
Misha Brukman
22cf52374e
AIX does not have mkdtemp() so emulate its behavior using mktemp() and mkdir()
...
llvm-svn: 17131
2004-10-18 17:39:45 +00:00
Chris Lattner
c1f91b5e11
Fix miscompilations in the SparcV9 backend that were induced by this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041011/019311.html
llvm-svn: 17130
2004-10-18 17:19:20 +00:00
Chris Lattner
fbc070bfdc
Improve compatibility with VC++, patch contributed by Morten Ofstad!
...
llvm-svn: 17126
2004-10-18 15:54:17 +00:00
Chris Lattner
88a8a329c3
Get this file compiling with VC++, patch contributed by Morten Ofstad. Thanks Morten!
...
llvm-svn: 17125
2004-10-18 15:43:46 +00:00
Reid Spencer
69274ad96a
Declare a function in the correct namespace.
...
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17124
2004-10-18 14:43:45 +00:00
Reid Spencer
ce0783318b
Correction to allow compilation with Visual C++.
...
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17123
2004-10-18 14:38:48 +00:00
Chris Lattner
5edb2f32d0
Simplify code by deleting instructions that preceed unreachable instructions.
...
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
llvm-svn: 17116
2004-10-18 04:07:22 +00:00
Chris Lattner
033e156b54
New testcase
...
llvm-svn: 17115
2004-10-18 04:06:41 +00:00
Reid Spencer
1be07bb526
Actually link all the analysis passes and their dependencies.
...
llvm-svn: 17114
2004-10-18 03:32:12 +00:00
Reid Spencer
e5068ed336
Remove extra comma.
...
llvm-svn: 17113
2004-10-18 03:26:21 +00:00
Reid Spencer
2097b94c8b
Actually link in all the analysis passes.
...
llvm-svn: 17112
2004-10-18 03:22:48 +00:00
Chris Lattner
a67dd32004
Turn store -> null/undef into the LLVM unreachable instruction! This simple
...
change hacks off 10K of bytecode from perlbmk (.5%) even though the front-end
is not generating them yet and we are not optimizing the resultant code.
This isn't too bad.
llvm-svn: 17111
2004-10-18 03:00:50 +00:00
Chris Lattner
8ba9ec9bbb
Turn things with obviously undefined semantics into 'store -> null'
...
llvm-svn: 17110
2004-10-18 02:59:09 +00:00
Chris Lattner
3b92f17165
My friend the invoke instruction does not dominate all basic blocks if it
...
occurs in the entry node of a function
llvm-svn: 17109
2004-10-18 01:48:31 +00:00
Chris Lattner
34ae670706
Fix a bug that occurs when the constant value is the result of an invoke. In
...
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
llvm-svn: 17108
2004-10-18 01:21:17 +00:00
Chris Lattner
53058663aa
Print a semicolon for the unreacahble instruction. This fixes problems
...
where C requires semicolons in some cases to indicate null statements.
llvm-svn: 17107
2004-10-17 23:49:11 +00:00
Chris Lattner
6a792feb02
Getting ADCE to interact well with unreachable instructions seems like a nontrivial
...
exercise that I'm not interested in tackling right now. Just punt and treat them
like unwind's.
This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll
llvm-svn: 17106
2004-10-17 23:45:06 +00:00
Chris Lattner
61011accfd
New testcase that ADCE shouldn't crash on
...
llvm-svn: 17105
2004-10-17 23:44:02 +00:00
Chris Lattner
6e79e55aea
Fix Regression/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll
...
If a function had no return instruction in it, and the result of the inlined
call instruction was used, we would crash.
llvm-svn: 17104
2004-10-17 23:21:07 +00:00
Chris Lattner
5f8becb224
New testcase that crashes the inliner
...
llvm-svn: 17103
2004-10-17 23:20:29 +00:00
Nate Begeman
e5e5b37b79
Pass -single_module option to gcc when linking dynamic libraries for use with bugpoint, so that we can bugpoint multiple .cp files
...
llvm-svn: 17102
2004-10-17 23:03:32 +00:00
Nate Begeman
844186b8b4
Generate correct stubs for weak-linked symbols
...
llvm-svn: 17101
2004-10-17 23:01:34 +00:00
Chris Lattner
f60137501f
fold gep undef, ... -> undef
...
This comes up many times in perlbmk and probably others.
llvm-svn: 17100
2004-10-17 21:54:55 +00:00
Chris Lattner
107c15c33d
Remove printout, realize that instructions in the entry block dominate all
...
other blocks.
llvm-svn: 17099
2004-10-17 21:31:34 +00:00
Chris Lattner
215c7ebaa6
When inserting PHI nodes, don't insert any phi nodes that are obviously
...
unneccesary. This allows us to delete several hundred phi nodes of the
form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well.
This implements Mem2Reg/UndefValuesMerge.ll
llvm-svn: 17098
2004-10-17 21:25:56 +00:00
Chris Lattner
d047673192
New testcase, no PHI should be inserted.
...
llvm-svn: 17097
2004-10-17 21:25:32 +00:00
Chris Lattner
96db59e48a
Enhance hasConstantValue to ignore undef values in phi nodes. This allows it
...
to think that PHI[4, undef] == 4.
llvm-svn: 17096
2004-10-17 21:23:26 +00:00
Chris Lattner
e29d634a94
hasConstantValue will soon return instructions that don't dominate the PHI node,
...
so prepare for this.
llvm-svn: 17095
2004-10-17 21:22:38 +00:00
Chris Lattner
621c413a1b
The first hunk corrects a bug when printing undef null values. We would print
...
0->field, which is illegal. Now we print ((foo*)0)->field.
The second hunk is an optimization to not print undefined phi values.
llvm-svn: 17094
2004-10-17 17:48:59 +00:00
Chris Lattner
068555314b
Don't print stuff out from the code generator. This broke the JIT horribly
...
last night. :) bork!
llvm-svn: 17093
2004-10-17 17:40:50 +00:00
Reid Spencer
cb13f6e51f
Add HAVE_BZLIB_H and HAVE_ZLIB_H tests.
...
llvm-svn: 17092
2004-10-17 17:07:29 +00:00
Reid Spencer
c1f295a66c
Update to reflect building zlib for LLVM
...
llvm-svn: 17091
2004-10-17 15:02:47 +00:00
Reid Spencer
6889cc2d74
Add missing targets for install/clean
...
llvm-svn: 17090
2004-10-17 15:01:59 +00:00
Reid Spencer
f476d84b69
Make the library name SparcV9 specific
...
llvm-svn: 17089
2004-10-17 15:01:12 +00:00
Reid Spencer
b7c9d5444b
Consolidate the definitions
...
llvm-svn: 17088
2004-10-17 15:00:26 +00:00
Reid Spencer
de028a4a69
PPC32GenCodeEmitter instead of PowerPCGenCodeEmitter
...
llvm-svn: 17087
2004-10-17 14:59:38 +00:00
Reid Spencer
85f1cd7893
Add runtime directories
...
llvm-svn: 17086
2004-10-17 14:58:49 +00:00
Reid Spencer
60be648481
Support bytecode generation, GenCodeEmitter, etc.
...
llvm-svn: 17085
2004-10-17 14:57:12 +00:00
Reid Spencer
c833b76f00
Add runtime directory, include Makefile_rules
...
llvm-svn: 17084
2004-10-17 14:56:15 +00:00
Chris Lattner
839abf57a6
Rewrite support for cast uint -> FP. In particular, we used to compile this:
...
double %test(uint %X) {
%tmp.1 = cast uint %X to double ; <double> [#uses=1]
ret double %tmp.1
}
into:
test:
sub %ESP, 8
mov %EAX, DWORD PTR [%ESP + 12]
mov %ECX, 0
mov DWORD PTR [%ESP], %EAX
mov DWORD PTR [%ESP + 4], %ECX
fild QWORD PTR [%ESP]
add %ESP, 8
ret
... which basically zero extends to 8 bytes, then does an fild for an
8-byte signed int.
Now we generate this:
test:
sub %ESP, 4
mov %EAX, DWORD PTR [%ESP + 8]
mov DWORD PTR [%ESP], %EAX
fild DWORD PTR [%ESP]
shr %EAX, 31
fadd DWORD PTR [.CPItest_0 + 4*%EAX]
add %ESP, 4
ret
.section .rodata
.align 4
.CPItest_0:
.quad 5728578726015270912
This does a 32-bit signed integer load, then adds in an offset if the sign
bit of the integer was set.
It turns out that this is substantially faster than the preceeding sequence.
Consider this testcase:
unsigned a[2]={1,2};
volatile double G;
void main() {
int i;
for (i=0; i<100000000; ++i )
G += a[i&1];
}
On zion (a P4 Xeon, 3Ghz), this patch speeds up the testcase from 2.140s
to 0.94s.
On apoc, an athlon MP 2100+, this patch speeds up the testcase from 1.72s
to 1.34s.
Note that the program takes 2.5s/1.97s on zion/apoc with GCC 3.3 -O3
-fomit-frame-pointer.
llvm-svn: 17083
2004-10-17 08:01:28 +00:00
Chris Lattner
112fd88a05
Unify handling of constant pool indexes with the other code paths, allowing
...
us to use index registers for CPI's
llvm-svn: 17082
2004-10-17 07:49:45 +00:00
Chris Lattner
af19d396ac
Give the asmprinter the ability to print memrefs with a constant pool index,
...
index reg and scale
llvm-svn: 17081
2004-10-17 07:16:32 +00:00
Chris Lattner
653d8663fe
fold:
...
%X = and Y, constantint
%Z = setcc %X, 0
instead of emitting:
and %EAX, 3
test %EAX, %EAX
je .LBBfoo2_2 # UnifiedReturnBlock
We now emit:
test %EAX, 3
je .LBBfoo2_2 # UnifiedReturnBlock
This triggers 581 times on 176.gcc for example.
llvm-svn: 17080
2004-10-17 06:10:40 +00:00
Chris Lattner
e234a21488
All of these labels are off by one now that the unreachable instruction exists
...
llvm-svn: 17079
2004-10-17 05:37:47 +00:00
Nate Begeman
2c873ca365
Implement bitfield insert by recognizing the following pattern:
...
1. optional shift left
2. and x, immX
3. and y, immY
4. or z, x, y
==> rlwimi z, x, y, shift, mask begin, mask end
where immX == ~immY and immX is a run of set bits. This transformation
fires 32 times on voronoi, once on espresso, and probably several
dozen times on external benchmarks such as gcc.
To put this in terms of actual code generated for
struct B { unsigned a : 3; unsigned b : 2; };
void storeA (struct B *b, int v) { b->a = v;}
void storeB (struct B *b, int v) { b->b = v;}
Old:
_storeA:
rlwinm r2, r4, 0, 29, 31
lwz r4, 0(r3)
rlwinm r4, r4, 0, 0, 28
or r2, r4, r2
stw r2, 0(r3)
blr
_storeB:
rlwinm r2, r4, 3, 0, 28
rlwinm r2, r2, 0, 27, 28
lwz r4, 0(r3)
rlwinm r4, r4, 0, 29, 26
or r2, r2, r4
stw r2, 0(r3)
blr
New:
_storeA:
lwz r2, 0(r3)
rlwimi r2, r4, 0, 29, 31
stw r2, 0(r3)
blr
_storeB:
lwz r2, 0(r3)
rlwimi r2, r4, 3, 27, 28
stw r2, 0(r3)
blr
llvm-svn: 17078
2004-10-17 05:19:20 +00:00
Chris Lattner
192eaccc1a
Fix constant folding relational operators with undef operands.
...
llvm-svn: 17077
2004-10-17 04:01:51 +00:00
Chris Lattner
0e4818c99a
Reid added --version to the CommandLine lib. Don't conflict with it.
...
llvm-svn: 17076
2004-10-17 02:49:08 +00:00
Chris Lattner
f6666db032
I forgot that sparc no longer uses the shared asmwriter. Give it support
...
for undef.
llvm-svn: 17075
2004-10-17 02:44:45 +00:00
Chris Lattner
37b138a00b
Add support for unreachable and undef
...
llvm-svn: 17074
2004-10-17 02:42:42 +00:00
Reid Spencer
94ffa656eb
Initial Makefile.am for building with automake
...
llvm-svn: 17073
2004-10-17 00:24:24 +00:00
Reid Spencer
3d99608cc4
Initial Makefile.am for building with automake.
...
llvm-svn: 17072
2004-10-17 00:20:42 +00:00
Reid Spencer
c0ec7a65a6
Make sure that for systems where the string functions are actually macros
...
that we undefine the macro before using its name in the definition. This
can happen on Linux if _GNU_SOURCE is defined.
llvm-svn: 17071
2004-10-17 00:17:54 +00:00
Chris Lattner
fd7bf724d3
Implement constant folding of undef values.
...
llvm-svn: 17070
2004-10-16 23:31:32 +00:00
Chris Lattner
67f0545daf
Fix a type violation
...
llvm-svn: 17069
2004-10-16 23:28:04 +00:00
Nate Begeman
29dc5f2a3e
Finally fix one of the oldest FIXMEs in the PowerPC backend: correctly
...
flag rotate left word immediate then mask insert (rlwimi) as a two-address
instruction, and update the ISel usage of the instruction accordingly.
This will allow us to properly schedule rlwimi, and use it to efficiently
codegen bitfield operations.
llvm-svn: 17068
2004-10-16 20:43:38 +00:00
Chris Lattner
684c5c6587
Kill the bogon that slipped into my buffer before I committed.
...
llvm-svn: 17067
2004-10-16 19:46:33 +00:00
Chris Lattner
6580e09fef
Implement InstCombine/getelementptr.ll:test9, which is the source of many
...
ugly and giant constnat exprs in some programs.
llvm-svn: 17066
2004-10-16 19:44:59 +00:00
Chris Lattner
d2c8ed1170
New testcase, rework testcases to fail if there are any gep's other than those
...
involving %B instead of allowing any geps except %A's.
llvm-svn: 17065
2004-10-16 19:44:23 +00:00
Misha Brukman
bbd150eaa7
* Add a space between words
...
* Wrap at 80 cols
llvm-svn: 17064
2004-10-16 19:13:58 +00:00
Chris Lattner
eba3f46b2f
Do not erroneously accept revision 6 bytecode files when the format hasn't
...
been defined yet!
llvm-svn: 17063
2004-10-16 18:56:02 +00:00
Chris Lattner
552663387b
Update release notes
...
llvm-svn: 17062
2004-10-16 18:35:57 +00:00
Chris Lattner
17ce82f71d
New testcase
...
llvm-svn: 17061
2004-10-16 18:28:01 +00:00
Chris Lattner
5a02a3e963
Add support for undef and unreachable
...
llvm-svn: 17059
2004-10-16 18:24:35 +00:00
Chris Lattner
aef20fbbb9
testcases for undefined and unreachable
...
llvm-svn: 17058
2004-10-16 18:24:11 +00:00
Chris Lattner
fcfe78eaf8
Fix fix fix
...
llvm-svn: 17057
2004-10-16 18:21:50 +00:00
Chris Lattner
98e541457b
Add support for unreachable
...
llvm-svn: 17056
2004-10-16 18:21:33 +00:00
Chris Lattner
61753bf847
Add support for undef
...
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Chris Lattner
770709befe
Add support for undef, unreachable, and function flags
...
llvm-svn: 17054
2004-10-16 18:18:16 +00:00
Chris Lattner
4ff314968e
Parse undef and unreachable
...
llvm-svn: 17053
2004-10-16 18:17:13 +00:00
Chris Lattner
2978437b76
Add support
...
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Chris Lattner
ea9a85abe4
Add support for undef and unreachable
...
llvm-svn: 17051
2004-10-16 18:14:10 +00:00
Chris Lattner
a3f3c8a1ad
ADd support for undef and unreachable
...
llvm-svn: 17050
2004-10-16 18:13:47 +00:00
Chris Lattner
e4bea062c7
Teach the X86 backend about unreachable and undef. Among other things, we
...
now compile:
'foo() {}' into "ret" instead of "mov EAX, 0; ret"
llvm-svn: 17049
2004-10-16 18:13:05 +00:00
Chris Lattner
583dfdcf86
Add support for unreachable and undef
...
llvm-svn: 17048
2004-10-16 18:12:13 +00:00
Chris Lattner
81a7a23494
Optimize instructions involving undef values. For example X+undef == undef.
...
llvm-svn: 17047
2004-10-16 18:11:37 +00:00
Chris Lattner
7e6d4a12b5
Add support for UndefValue
...
llvm-svn: 17046
2004-10-16 18:10:31 +00:00
Chris Lattner
c0e2e82477
When promoting mem2reg, make uninitialized values become undef isntead of 0.
...
llvm-svn: 17045
2004-10-16 18:10:06 +00:00
Chris Lattner
646354bae1
Handle undef values as undefined on the constant lattice
...
ignore unreachable instructions
llvm-svn: 17044
2004-10-16 18:09:41 +00:00
Chris Lattner
6ac3ef950d
Add note
...
llvm-svn: 17043
2004-10-16 18:09:25 +00:00
Chris Lattner
8e71c6a33d
Add support for the undef value. Implement a new optimization based on globals
...
that are initialized with undef. When promoting malloc to a global, start out
initialized to undef
llvm-svn: 17042
2004-10-16 18:09:00 +00:00
Chris Lattner
5e0b9f2eec
Add support for undef and unreachable
...
llvm-svn: 17041
2004-10-16 18:08:06 +00:00
Chris Lattner
d5f67d8ca6
Implement UndefValue class
...
llvm-svn: 17040
2004-10-16 18:07:16 +00:00
Chris Lattner
38a6969894
Add support for the unreachable instruction
...
llvm-svn: 17039
2004-10-16 18:06:43 +00:00
Chris Lattner
bcf508cf6f
Add new UndefValueVal type
...
llvm-svn: 17038
2004-10-16 18:06:07 +00:00
Chris Lattner
3384f9ad40
Add new UnreachableInst class
...
llvm-svn: 17037
2004-10-16 18:05:54 +00:00
Chris Lattner
278e1dab8e
Add new unreachable instruction
...
llvm-svn: 17036
2004-10-16 18:05:37 +00:00
Chris Lattner
9d4d20b71c
Add new UndefValue class
...
llvm-svn: 17035
2004-10-16 18:05:25 +00:00
Chris Lattner
d57b37d1fa
UndefValue's are constants
...
llvm-svn: 17034
2004-10-16 18:05:10 +00:00
Chris Lattner
08b7d5b032
Document unreachable instruction
...
llvm-svn: 17033
2004-10-16 18:04:13 +00:00
Chris Lattner
cd196a9444
Add missing 'Instruction Opcodes' bullet to TOC
...
Update for changes in LLVM 1.4 bytecode format.
llvm-svn: 17032
2004-10-16 18:03:55 +00:00
Chris Lattner
1a709646e7
Add a missing dependency
...
llvm-svn: 17031
2004-10-16 17:12:55 +00:00
Chris Lattner
947ecace14
Fix file header
...
llvm-svn: 17030
2004-10-16 16:37:42 +00:00
Chris Lattner
3c3e058406
Be more careful about looking for constants when we really want constantint's.
...
llvm-svn: 17029
2004-10-16 16:07:10 +00:00
Chris Lattner
db6a9fdf38
None of these have actually been implemented yet.
...
llvm-svn: 17027
2004-10-16 00:29:30 +00:00
Chris Lattner
f22be93428
Move the implementation of the instructions clone methods to this file so
...
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.
llvm-svn: 17026
2004-10-15 23:52:53 +00:00
Chris Lattner
a47839f165
Move the implementation of the clone method for these classes to
...
Instructions.cpp, so that a vtable is not emitted into every translation unit
that uses the classes.
llvm-svn: 17025
2004-10-15 23:52:05 +00:00
Misha Brukman
b889b2ad97
Fix hyphenation and quoting style for great justice
...
llvm-svn: 17024
2004-10-15 23:22:48 +00:00
Chris Lattner
c4f93ac159
There is no reason not to build these in parallel
...
llvm-svn: 17023
2004-10-15 23:22:15 +00:00
Misha Brukman
65c23ee5d3
Add a space between the type and name of value when printing error message
...
llvm-svn: 17022
2004-10-15 23:08:50 +00:00
Chris Lattner
0bc0f1d8de
Don't print a bunch of metrics that are meaningless for external functions
...
llvm-svn: 17017
2004-10-15 19:40:31 +00:00
Chris Lattner
cf809786dc
Fix broken links
...
llvm-svn: 17016
2004-10-15 17:04:28 +00:00
Chris Lattner
15914416ec
Instruction select globals with offsets better. For example, on this test
...
case:
int C[100];
int foo() {
return C[4];
}
We now codegen:
foo:
mov %EAX, DWORD PTR [C + 16]
ret
instead of:
foo:
mov %EAX, OFFSET C
mov %EAX, DWORD PTR [%EAX + 16]
ret
Other impressive features may be coming later.
This patch is contributed by Jeff Cohen!
llvm-svn: 17011
2004-10-15 05:05:29 +00:00
Chris Lattner
3b78938b9e
Give the X86 JIT the ability to encode global+disp constants. Patch
...
contributed by Jeff Cohen!
llvm-svn: 17010
2004-10-15 04:53:13 +00:00
Chris Lattner
19025d5ad0
Give the X86 asm printer the ability to print out addressing modes that have
...
constant displacements from global variables. Patch by Jeff Cohen!
llvm-svn: 17009
2004-10-15 04:44:53 +00:00
Chris Lattner
df7b984f5a
Allow X86 addressing modes to represent globals with offsets. Patch contributed
...
by Jeff Cohen!
llvm-svn: 17008
2004-10-15 04:43:20 +00:00
Chris Lattner
3065220deb
Allow machine operands to represent global variables with offsets. This is
...
useful when you have a reference like:
int A[100];
void foo() { A[10] = 1; }
In this case, &A[10] is a single constant and should be treated as such.
Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.
This is another fine patch contributed by Jeff Cohen!!
llvm-svn: 17007
2004-10-15 04:38:41 +00:00
Chris Lattner
2152236351
This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.
...
The problem occurred when trying to reload this instruction:
MOV32mr %reg2326, 8, %reg2297, 4, %reg2295
The value of reg2326 was available in EBX, so it was reused from there, instead
of reloading it into EDX.
The value of reg2297 was available in EDX, so it was reused from there, instead
of reloading it into EDI.
The value of reg2295 was not available, so we tried reloading it into EBX, its
assigned register. However, we checked and saw that we already reloaded
something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded
into that register instead.
Unfortunately EDX had already been used by reg2297, so reloading into EDX
clobbered the value used by the reg2326 operand, breaking the program.
The fix for this is to check that the newly picked register is ok. In this
case we now find that EDX is already used and try using EDI, which succeeds.
llvm-svn: 17006
2004-10-15 03:19:31 +00:00
Chris Lattner
9af0572a37
This patch adds and improves debugging output. No functionality changes.
...
llvm-svn: 17005
2004-10-15 03:16:29 +00:00
Nate Begeman
a15c246af9
Better codegen of binary integer ops with 32 bit immediate operands.
...
This transformation fires a few dozen times across the testsuite.
For example, int test2(int X) { return X ^ 0x0FF00FF0; }
Old:
_test2:
lis r2, 4080
ori r2, r2, 4080
xor r3, r3, r2
blr
New:
_test2:
xoris r3, r3, 4080
xori r3, r3, 4080
blr
llvm-svn: 17004
2004-10-15 00:50:19 +00:00
Misha Brukman
aa8f87c83c
The field is called imm22', not simply imm'
...
llvm-svn: 17003
2004-10-14 22:33:32 +00:00
Misha Brukman
b03f27c96c
Synthetic instructions RET and RETL need to have all 3 parameters specified
...
llvm-svn: 17002
2004-10-14 22:32:49 +00:00
Misha Brukman
b34fcdaa46
Class F2_1 already inherits the imm22 field from class F2
...
llvm-svn: 17001
2004-10-14 22:32:24 +00:00
Misha Brukman
7183fc3a84
Generate the SparcV8 code emitter from .td files
...
llvm-svn: 17000
2004-10-14 21:57:19 +00:00
Misha Brukman
98ebcd88f2
* In the F3_1 class, default asi to 0 because it's not currently used
...
* In the F3_3 class, remove mention of asi because it's not part of the format
llvm-svn: 16999
2004-10-14 21:53:39 +00:00
Misha Brukman
692979c1e2
* We don't use the ENABLE_*_JIT flags in the source base anymore
...
* Convert references to Sparc to SparcV9 to clearly identify CPU type
llvm-svn: 16998
2004-10-14 20:06:36 +00:00
Chris Lattner
5d33e8e73a
Fix a bug John tracked down in libstdc++ where we were incorrectly deleting
...
weak functions. Thanks for finding this John!
llvm-svn: 16997
2004-10-14 19:53:50 +00:00
Brian Gaeke
1f864b5583
Add FSTOI, FDTOI (fp to integer cast) instructions.
...
llvm-svn: 16996
2004-10-14 19:39:35 +00:00
Brian Gaeke
1519c24cff
Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, and
...
adding emitFPToIntegerCast.
llvm-svn: 16995
2004-10-14 19:39:34 +00:00
Brian Gaeke
38a4dd3d15
Add list of libc procedures we'll use, at some point.
...
Update list of currently failing tests.
ADJCALLSTACK* support is done.
llvm-svn: 16994
2004-10-14 19:39:33 +00:00
Misha Brukman
f9898d7189
Use the shared Makefile.JIT for JIT-enablement, which also enables the examples
...
to have the JIT functioning on more platforms than just x86
llvm-svn: 16993
2004-10-14 19:02:13 +00:00
Misha Brukman
7c169be339
Use the shared Makefile.JIT for JIT-enablement
...
llvm-svn: 16992
2004-10-14 19:01:25 +00:00
Misha Brukman
c04ade7c4f
Add Makefile.JIT to the list of Makefiles transferred to the build dir to give
...
tools and examples a simple way to JIT-enable themselves
llvm-svn: 16991
2004-10-14 18:59:42 +00:00
Misha Brukman
e62f4dd7b9
Transfer Makefile.JIT into the build tree for JIT-enabling tools and examples
...
llvm-svn: 16990
2004-10-14 18:59:09 +00:00
Misha Brukman
68baa6a7a9
Since several tools and examples want JIT support, factor out the process of
...
adding the right libs for any given architecture's JIT into a single place
llvm-svn: 16989
2004-10-14 18:58:19 +00:00
Misha Brukman
9372c95fde
Convert tabs to spaces
...
llvm-svn: 16988
2004-10-14 18:47:56 +00:00
Chris Lattner
eb6b8e5772
Make sure any client of Dominators.h links in Dominators.cpp
...
Patch by Morten Ofstad
llvm-svn: 16987
2004-10-14 15:47:16 +00:00
Chris Lattner
36e629a3ea
Make sure any client of Dominators.h links in Dominators.cpp
...
llvm-svn: 16986
2004-10-14 15:46:59 +00:00
Chris Lattner
52a126cb3e
Do not use the same variable name for two different variables in the
...
same scope. This confused VC++ (and probably people too!). Patch by
Morten Ofstad!
llvm-svn: 16985
2004-10-14 14:59:16 +00:00
Chris Lattner
645d8c2863
Remove unneeded typedef, patch by Morten Ofstad
...
llvm-svn: 16984
2004-10-14 14:51:09 +00:00
Misha Brukman
1f596c3358
* Claim to support machine code emission - return false from
...
addPassesToEmitMachineCode()
* Add support for registers and constants in getMachineOpValue()
This enables running "int main() { ret 0 }" via the PowerPC JIT.
llvm-svn: 16983
2004-10-14 06:39:56 +00:00
Misha Brukman
789587f128
Enable the PowerPC JIT by compiling powerpc.o library into lli
...
llvm-svn: 16982
2004-10-14 06:35:11 +00:00
Misha Brukman
8b1bf4323f
* Include the real (generated) version of getBinaryCodeForInstr()
...
* Add implementation of getMachineOpValue() for generated code emitter
* Convert assert()s in unimplemented functions to abort()s so that non-debug
builds fail predictably
* Add file header comments
llvm-svn: 16981
2004-10-14 06:07:25 +00:00
Misha Brukman
c2d6aaeaa0
* Make a PPC32-specific code emitter because we have separate classes for 32-
...
and 64-bit code emitters that cannot share code unless we use virtual
functions
* Identify components being built by tablegen with more detail by assigning them
to PowerPC, PPC32, or PPC64 more specifically; also avoids seeing 'building
PowerPC XYZ' messages twice, where one is for PPC32 and one for PPC64
llvm-svn: 16980
2004-10-14 06:04:56 +00:00
Tanya Lattner
d38a7605d8
Checking in code that works on my simple test case. However, there is still a bug with branches that I need to fix.
...
llvm-svn: 16979
2004-10-14 06:04:28 +00:00
Misha Brukman
189f3dc8d2
There is only one field in an instruction, and that is `Inst', the final view of
...
the instruction binary format, all others are simply operands and should not
have the `field' label
llvm-svn: 16978
2004-10-14 05:55:37 +00:00
Misha Brukman
d6ac8f5e5a
PowerPC instruction definitions use LittleEndian-style encoding [0..31]
...
llvm-svn: 16977
2004-10-14 05:54:38 +00:00
Misha Brukman
dba1f62eb8
Add isLittleEndianEncoding to InstrInfo class, defaults to `off'
...
llvm-svn: 16976
2004-10-14 05:53:40 +00:00
Misha Brukman
8393c15b28
* Factor out (into new fn) a loop emitting operand shifts into the instruction
...
* Reverse instruction bit components for a LittleEndian-style encoding
* Fix some comments and spacing
llvm-svn: 16975
2004-10-14 05:53:01 +00:00
Misha Brukman
243ded5e1a
* Add option to read isLittleEndianEncoding for InstrInfo classes
...
* Doxygen-ify some function comments
llvm-svn: 16974
2004-10-14 05:50:43 +00:00
Chris Lattner
45c35b1d1f
When converting phi nodes into select instructions, we shouldn't promote PHI
...
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
llvm-svn: 16973
2004-10-14 05:13:36 +00:00
Chris Lattner
6299141c4e
When converting phi nodes into select instructions, we shouldn't promote PHI
...
nodes unless we KNOW that we are able to promote all of them. In this case
promoting the phi to a select is silly because we will always have to do the
call conditionally. As such, select promotion is actually a pessimization.
llvm-svn: 16972
2004-10-14 05:12:50 +00:00
Reid Spencer
69812714cd
Allow this file to compile on Darwin.
...
llvm-svn: 16971
2004-10-14 03:33:25 +00:00
Reid Spencer
37d4d6b2a2
Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
...
llvm-svn: 16970
2004-10-14 03:09:02 +00:00
Reid Spencer
2f5fd88036
Get proper BSD #includes for MappedFile implementation.
...
llvm-svn: 16969
2004-10-14 03:06:59 +00:00
Reid Spencer
9cb9354d17
Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
...
llvm-svn: 16968
2004-10-14 03:05:59 +00:00
Chris Lattner
9a0e2546a0
Today is not my day. Fix broken #
...
llvm-svn: 16967
2004-10-14 02:31:35 +00:00
Chris Lattner
bff972d453
unbreak previous checkin :(
...
llvm-svn: 16966
2004-10-14 02:06:48 +00:00
Chris Lattner
e8fe2c2418
Add back a missing paren
...
llvm-svn: 16965
2004-10-14 01:57:28 +00:00
Chris Lattner
315157df62
Fit to 80 cols
...
llvm-svn: 16964
2004-10-14 01:49:34 +00:00
Chris Lattner
3d98008553
Wrap to 80 cols, delete some seriously old debugging printouts
...
llvm-svn: 16963
2004-10-14 01:46:07 +00:00
Chris Lattner
da6a885076
Fit in 80 columns
...
llvm-svn: 16962
2004-10-14 01:39:18 +00:00
Chris Lattner
eddbc20e2e
Minor cleanups
...
llvm-svn: 16961
2004-10-14 01:35:17 +00:00
Chris Lattner
ac1a547a38
Patch to make VS happier, thanks to Morten Ofstad for pointing this out.
...
llvm-svn: 16956
2004-10-13 15:25:46 +00:00
Chris Lattner
6017d47064
Use explicit std:: qualification to avoid relying on Koenig lookup, which
...
VC++ does not do properly. Thanks to Morten Ofstad for the patch!
llvm-svn: 16955
2004-10-13 15:11:23 +00:00
Chris Lattner
36fca705b1
Get rid of template templates that were preventing VC from compiling the
...
set_intersect template. Thanks to Morten Ofstad and Jeff Cohen for the
patch!
llvm-svn: 16954
2004-10-13 15:09:21 +00:00
Reid Spencer
def9848a6c
Changes for automake.
...
llvm-svn: 16953
2004-10-13 11:56:07 +00:00
Reid Spencer
d385a67c44
Set up BUILD_MODE based on the configuration so the default build mode
...
is established from configuration. Also, don't make the ENABLE_ options
AM_CONDITIONALs.
llvm-svn: 16952
2004-10-13 11:53:12 +00:00
Reid Spencer
26bfe011f8
Updates for changes in Makefile rules.
...
llvm-svn: 16951
2004-10-13 11:48:50 +00:00
Reid Spencer
ace94df71f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
5b240ad1d9
Get rid of the horrendous FIND_PATH macro, have libs and progs linked into
...
a common directory for simplicity. Provide an easy way to relink some
objects
llvm-svn: 16949
2004-10-13 11:39:51 +00:00
Chris Lattner
b15f04623b
Update doco, make doxygen more, use standard dividers.
...
llvm-svn: 16948
2004-10-13 04:44:53 +00:00
Misha Brukman
ac00eb4eb6
Save Reid's notes from bugzilla on the proper procedure to upgrade libtool
...
llvm-svn: 16947
2004-10-13 01:07:55 +00:00
Reid Spencer
946085840c
Resolution to PR451.
...
llvm-svn: 16946
2004-10-13 01:01:03 +00:00
Reid Spencer
5fcd5c70ca
Changes for libtool 1.5.10
...
llvm-svn: 16945
2004-10-13 00:51:45 +00:00
Reid Spencer
2c1c1c46a9
Update for libtool 1.5.10
...
llvm-svn: 16944
2004-10-13 00:19:25 +00:00
Reid Spencer
d65d4d0b14
Harden the version requirements to the set that actually works after three
...
days of trying to figure it out. Despite some developer's penchant for
relaxing the tool versions, this just isn't possible. Only certain versions
work with certain other versions.
llvm-svn: 16943
2004-10-13 00:18:58 +00:00
Misha Brukman
89f77bce58
Fix file comment header
...
llvm-svn: 16942
2004-10-12 21:48:02 +00:00
Misha Brukman
bf24de0939
On second thought, OpaqueType is not really a good first-class type.
...
llvm-svn: 16941
2004-10-12 20:35:04 +00:00
Misha Brukman
dfd7ada4a2
No space allowed between \ and end-of-line
...
llvm-svn: 16940
2004-10-12 19:17:11 +00:00
Misha Brukman
25754a7703
Wrap lines at 80 cols
...
llvm-svn: 16939
2004-10-12 18:35:57 +00:00
Chris Lattner
92e37e092c
Add comment
...
llvm-svn: 16937
2004-10-12 17:08:44 +00:00
Misha Brukman
0338401147
Opaque types are considered to be first-class.
...
llvm-svn: 16936
2004-10-12 17:06:17 +00:00
Chris Lattner
76a9758cf1
Minor cleanups:
...
* fit in 80 lines
* Eliminate extra namespaces
* Drop llvm::
llvm-svn: 16935
2004-10-12 16:52:09 +00:00
Chris Lattner
5499551206
Don't emit the method into the llvm namespace, let the #includer decide where it goes
...
llvm-svn: 16934
2004-10-12 16:21:18 +00:00
Chris Lattner
cfa7268e20
Add std:: prefix for compilers without correct koenig lookup implemented.
...
Patch contributed by Paolo Invernizzi
llvm-svn: 16933
2004-10-12 16:10:39 +00:00
Chris Lattner
00648e1f86
Transform memmove -> memcpy when the source is obviously constant memory.
...
llvm-svn: 16932
2004-10-12 04:52:52 +00:00
Chris Lattner
c14504c92c
New testcase for memmove -> memcpy transform
...
llvm-svn: 16931
2004-10-12 04:51:55 +00:00
Chris Lattner
db6ddca8d2
Right, calls have Operand#0 == the called function, don't forget this.
...
llvm-svn: 16930
2004-10-12 04:45:20 +00:00
Chris Lattner
1ccab843e2
Minor tweaks
...
llvm-svn: 16929
2004-10-12 04:32:37 +00:00
Chris Lattner
2b33e70e7f
New header. Classes can be added as needed.
...
llvm-svn: 16928
2004-10-12 04:20:46 +00:00
Chris Lattner
89046ca244
Implement a new method
...
llvm-svn: 16927
2004-10-12 04:20:25 +00:00
Chris Lattner
ec901cc6cd
This nutty patch has been in my tree since before 1.3 went out, and it needs
...
to go in. This patch allows us to compute the trip count of loops controlled
by values loaded from constant arrays. The cannonnical example of this is
strlen when passed a constant argument:
for (int i = 0; "constantstring"[i]; ++i) ;
return i;
In this case, it will compute that the loop executes 14 times, which means
that the exit value of i is 14. Because of this, the loop gets DCE'd and
we are happy. This also applies to anything that does similar things, e.g.
loops like this:
const float Array[] = { 0.1, 2.1, 3.2, 23.21 };
for (int i = 0; Array[i] < 20; ++i)
and is actually fairly general.
The problem with this is that it almost never triggers. The reason is that
we run indvars and the loop optimizer only at compile time, which is before
things like strlen and strcpy have been inlined into the program from libc.
Because of this, it almost never is used (it triggers twice in specint2k).
I'm committing it because it DOES work, may be useful in the future, and
doesn't slow us down at all. If/when we start running the loop optimizer
at link-time (-O4?) this will be very nice indeed :)
llvm-svn: 16926
2004-10-12 01:49:27 +00:00
Chris Lattner
7cabf6f87a
Fix a REALLY obscure bug in my previous checkin, which was splicing the END
...
marker from one ilist into the middle of another basic block!
llvm-svn: 16925
2004-10-12 01:02:29 +00:00
Chris Lattner
9776f7259b
Handle a common case more carefully. In particular, instead of transforming
...
pointer recurrences into expressions from this:
%P_addr.0.i.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), %entry ], [ %inc.0.i, %no_exit.i ]
%inc.0.i = getelementptr sbyte* %P_addr.0.i.0, int 1 ; <sbyte*> [#uses=2]
into this:
%inc.0.i = getelementptr sbyte* getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), int %inc.0.i.rec
Actually create something nice, like this:
%inc.0.i = getelementptr [8 x sbyte]* %.str_1, int 0, int %inc.0.i.rec
llvm-svn: 16924
2004-10-11 23:06:50 +00:00
Chris Lattner
13128ab8fb
Allow creation of GEP constantexprs with a vector of value* operands as
...
well as a vector of constant*'s. It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.
llvm-svn: 16923
2004-10-11 22:52:25 +00:00
Chris Lattner
02a71e7748
Implement remove/eraseFromParent methods
...
llvm-svn: 16922
2004-10-11 22:21:39 +00:00
Chris Lattner
273207f32f
Add long overdue methods
...
llvm-svn: 16921
2004-10-11 22:21:13 +00:00
Chris Lattner
be29306939
Make this build
...
llvm-svn: 16919
2004-10-11 20:53:28 +00:00
Chris Lattner
a92af96c56
Reenable the transform, turning X/-10 < 1 into X > -10
...
llvm-svn: 16918
2004-10-11 19:40:04 +00:00
Chris Lattner
58043a1473
Fix a warning that is emitted on the suns
...
llvm-svn: 16917
2004-10-11 15:50:40 +00:00
Chris Lattner
004e250cd2
This patch implements two things (sorry).
...
First, it allows SRA of globals that have embedded arrays, implementing
GlobalOpt/globalsra-partial.llx. This comes up infrequently, but does allow,
for example, deleting several stores to dead parts of globals in dhrystone.
Second, this implements GlobalOpt/malloc-promote-*.llx, which is the
following nifty transformation:
Basically if a global pointer is initialized with malloc, and we can tell
that the program won't notice, we transform this:
struct foo *FooPtr;
...
FooPtr = malloc(sizeof(struct foo));
...
FooPtr->A FooPtr->B
Into:
struct foo FooPtrBody;
...
FooPtrBody.A FooPtrBody.B
This comes up occasionally, for example, the 'disp' global in 183.equake (where
the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%)
on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue'
globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)).
The nice thing about this xform is that it exposes the resulting global to
global variable optimization and makes alias analysis easier in addition to
eliminating a few loads.
llvm-svn: 16916
2004-10-11 05:54:41 +00:00
Chris Lattner
615bd303d1
This testcase ensures that we can SRA a global even if part of the global
...
cannot be SRA'd
llvm-svn: 16915
2004-10-11 05:00:30 +00:00
Chris Lattner
214956dd9d
These testcases check to see if we can promote malloc's to globals in some
...
cases.
llvm-svn: 16914
2004-10-11 05:00:12 +00:00
Chris Lattner
155cfd237b
Don't miss global optimizations because we run before the inliner
...
llvm-svn: 16913
2004-10-11 04:47:18 +00:00
Chris Lattner
6faf3949f6
Fix SingleSource/Benchmarks/McGill/chomp
...
llvm-svn: 16912
2004-10-11 04:07:27 +00:00
Chris Lattner
b2b7f90caf
If we are trying to create a ConstantExpr cast that is really a GEP to the
...
first element of an array, return a GEP instead of a cast. This allows us
to transparently fold this:
int* getelementptr (int* cast ([100 x int]* %Gbody to int*), int 40)
into this:
int* getelementptr ([100 x int]* %Gbody, int 0, int 40)
llvm-svn: 16911
2004-10-11 03:57:30 +00:00
Misha Brukman
8c8cbb8b71
Fix grammar
...
llvm-svn: 16910
2004-10-11 02:06:40 +00:00
Misha Brukman
8da107a68f
Remove exhuberant-style comments which remained from copying file from `sample'
...
llvm-svn: 16909
2004-10-11 00:56:41 +00:00
Misha Brukman
6e200dedd7
Fix file header comment; remove sample project (extra-verbose) comments
...
llvm-svn: 16908
2004-10-11 00:55:47 +00:00
Misha Brukman
e67286641e
Fix file header comment
...
llvm-svn: 16907
2004-10-11 00:54:59 +00:00
Misha Brukman
1df01504c6
ModuloScheduling has moved to lib/Target/SparcV9
...
llvm-svn: 16906
2004-10-10 23:37:40 +00:00
Misha Brukman
b4cb9fc7c9
Add ModuloScheduling to the recursive build tree
...
llvm-svn: 16905
2004-10-10 23:36:09 +00:00
Misha Brukman
9da1134bfb
Adjust header file inclusion due to move
...
llvm-svn: 16904
2004-10-10 23:34:50 +00:00
Misha Brukman
c70014bea3
Adjust comment header and paths to refect move
...
llvm-svn: 16903
2004-10-10 23:34:36 +00:00
Misha Brukman
4a4af7e20c
ModuloScheduling moved to lib/Target/SparcV9 as it is SparcV9-specific
...
llvm-svn: 16902
2004-10-10 23:33:20 +00:00
Chris Lattner
e42eb31f7d
Just because we cannot completely eliminate all uses of a global, we can
...
still optimize away all of the indirect calls and loads, etc from it.
This turns code like this:
if (G != 0)
G();
into
if (G != 0)
ActualCallee();
This triggers a couple of times in gcc and libstdc++.
llvm-svn: 16901
2004-10-10 23:14:11 +00:00
Chris Lattner
cd1e756469
Another testcase. We should be able to devirtualize the call even though
...
we cannot completely eliminate the global.
llvm-svn: 16900
2004-10-10 23:12:33 +00:00
Reid Spencer
98e600b587
Reorganize FINDLIBS to make most comment libs searched first.
...
llvm-svn: 16899
2004-10-10 22:54:46 +00:00
Reid Spencer
823f302ff9
Initial version of automake Makefile.am file.
...
llvm-svn: 16898
2004-10-10 22:52:14 +00:00
Reid Spencer
ef6ba8db70
Add the new InstrSched directory.
...
llvm-svn: 16897
2004-10-10 22:51:03 +00:00
Reid Spencer
681a192eb3
Fix named of a library.
...
llvm-svn: 16896
2004-10-10 22:50:31 +00:00
Tanya Lattner
dbac0cb21e
Added debug information. Fixed several bugs in the reconstruct loop function.
...
llvm-svn: 16895
2004-10-10 22:44:35 +00:00
Reid Spencer
f6d9ceebc6
Initial version of automake Makefile.am file.
...
llvm-svn: 16894
2004-10-10 22:36:40 +00:00
Reid Spencer
97327f05fc
Initial version of automake Makefile.am file.
...
llvm-svn: 16893
2004-10-10 22:20:40 +00:00
Reid Spencer
e2d1af8be0
Build both archive and relinked objects
...
llvm-svn: 16892
2004-10-10 22:17:39 +00:00
Reid Spencer
42ea4fcb35
Directory changes
...
llvm-svn: 16891
2004-10-10 22:17:02 +00:00
Reid Spencer
105b441d5a
A configure script to configure LLVM for compilation with automake
...
llvm-svn: 16890
2004-10-10 22:16:50 +00:00
Reid Spencer
2f13a83e77
Initial version of common automake Rules for LLVM
...
llvm-svn: 16889
2004-10-10 22:16:37 +00:00
Reid Spencer
f5dcbd7ba5
Initial version of automake Makefile.am file.
...
llvm-svn: 16888
2004-10-10 22:07:57 +00:00
Reid Spencer
f92cbf5bb8
Remove the InstrSched directory (moved to SparcV9)
...
llvm-svn: 16887
2004-10-10 21:19:41 +00:00
Reid Spencer
e975e4534c
Directory no long exists (moved to Targets/SparcV9).
...
llvm-svn: 16886
2004-10-10 21:18:31 +00:00
Reid Spencer
b84cbf2725
Initial version of automake Makefile.am file.
...
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Brian Gaeke
4a69c9d667
Fix assertion failure when calling or returning from a function which
...
returns 'bool' type.
llvm-svn: 16884
2004-10-10 20:34:17 +00:00
Brian Gaeke
7be91b34b8
Implement eliminateCallFramePseudoInstr().
...
Wrap a long comment line.
llvm-svn: 16883
2004-10-10 19:57:21 +00:00
Brian Gaeke
9770e416c5
Model calls as *both* using *and* killing O0..O5, because callees use the
...
argument values passed in (so they're not dead until *after* the call),
and callees are free to modify those registers.
llvm-svn: 16882
2004-10-10 19:57:20 +00:00
Brian Gaeke
8a4d5caa76
Fix whitespace and wrap some long lines.
...
Deal with allocating stack space for outgoing args and copying them into the
correct stack slots (at least, we can copy <=32-bit int args).
We now correctly generate ADJCALLSTACK* instructions.
llvm-svn: 16881
2004-10-10 19:57:18 +00:00
Reid Spencer
4f9650fc71
Top level makefile for building LLVM with automake.
...
llvm-svn: 16880
2004-10-10 19:13:03 +00:00
Reid Spencer
1d98d2c4b7
Ensure timestamp on saved contents of configure.ac is not changed.
...
Use correct options to automake.
llvm-svn: 16879
2004-10-10 19:09:33 +00:00
Chris Lattner
604ed7aae8
Fix 2004-10-10-CastStoreOnce.llx, by adjusting types back if we strip off a cast
...
llvm-svn: 16878
2004-10-10 17:07:12 +00:00
Chris Lattner
89e0b39fe5
New testcase that crashes -globalopt. I found this through inspection, not
...
actually in the wild :)
llvm-svn: 16877
2004-10-10 17:06:09 +00:00
Chris Lattner
a0e769cc81
Implement GlobalOpt/deadglobal-2.llx, deletion of globals that are only
...
stored to, but are stored at variable indexes. This occurs at least in
176.gcc, but probably others, and we should handle it for completeness.
llvm-svn: 16876
2004-10-10 16:47:33 +00:00
Chris Lattner
924ce79136
New testcase we were not handling before.
...
llvm-svn: 16875
2004-10-10 16:46:48 +00:00
Chris Lattner
cb9f152d8c
Avoid calling use_size() which could (in theory) be expensive if the global
...
has a large number of users. Instead, just keep track of whether we're
making changes as we do so.
This patch has no functionlity changes.
llvm-svn: 16874
2004-10-10 16:43:46 +00:00
Chris Lattner
3acdb7fa1b
bling bling!
...
llvm-svn: 16873
2004-10-10 16:26:13 +00:00
Chris Lattner
ed8d767883
A testcase that globalopt now handles
...
llvm-svn: 16872
2004-10-09 21:50:05 +00:00
Chris Lattner
09a527290d
Eliminate global pointers that are only stored a single value and null if
...
we know that all uses of the global will trap if the pointer contained is
null. In this case, we forward substitute the stored value to any uses.
This has the effect of devirtualizing trivial globals in trivial cases. For
example, 164.gzip contains this:
gzip.h:extern int (*read_buf) OF((char *buf, unsigned size));
bits.c: read_buf = file_read;
deflate.c: lookahead = read_buf((char*)window,
deflate.c: n = read_buf((char*)window+strstart+lookahead, more);
Since read_buf has to point to file_read at every use, we just replace
the calls through read_buf with a direct call to file_read.
This occurs in several benchmarks, including 176.gcc and 164.gzip. Direct
calls are good and stuff.
llvm-svn: 16871
2004-10-09 21:48:45 +00:00
Chris Lattner
f9ae6db749
Instead of silently breaking, print notification of why this doesn't work.
...
llvm-svn: 16870
2004-10-09 21:13:51 +00:00
Chris Lattner
b84e1c527f
Fix grammaro
...
llvm-svn: 16869
2004-10-09 19:37:02 +00:00
Chris Lattner
5c91c8f18b
Use DEBUG instead of DebugFlag directly, as DebugFlag does not respect
...
-debug-only!
llvm-svn: 16868
2004-10-09 19:30:36 +00:00
Chris Lattner
99e4111d33
It looks like we're not releasing 1.4 with llvm.org as the official domain
...
llvm-svn: 16867
2004-10-09 19:19:57 +00:00
Brian Gaeke
74584cd842
update according to tonight's info
...
llvm-svn: 16866
2004-10-09 05:58:27 +00:00
Brian Gaeke
9c0710781d
Implement getModuleMatchQuality and getJITMatchQuality so that v8 will be the
...
default 32/BE target on sparc hosts, and ppc will continue to be the default
on other hosts.
llvm-svn: 16865
2004-10-09 05:57:01 +00:00
Chris Lattner
f369b38d55
Fix infinite loop due to iteration
...
llvm-svn: 16864
2004-10-09 03:32:52 +00:00
Chris Lattner
4ad08352b4
Implement sub.ll:test17, -X/C -> X/-C
...
llvm-svn: 16863
2004-10-09 02:50:40 +00:00
Chris Lattner
cdc19d6a0e
New testcase
...
llvm-svn: 16862
2004-10-09 02:50:01 +00:00
Chris Lattner
1f4739cd08
Add a check to avoid an assertion on malformed input
...
llvm-svn: 16861
2004-10-09 02:18:58 +00:00
Chris Lattner
23c8d0b65a
The person who was planning to add SSE support isn't anymore, so disable
...
the -sse* options (to avoid misleading people).
Also, the stack alignment of the target doesn't depend on whether SSE is
eventually implemented, so remove a comment.
llvm-svn: 16860
2004-10-08 22:41:46 +00:00
Chris Lattner
97ea4206f7
Fix a major regression from the bugfix for 2004-10-08-SelectSetCCFold.llx,
...
which prevented setcc's from being folded into branches. It appears that
conditional branchinst's CC operand is actually operand(2), not operand(0)
as we might expect. :(
llvm-svn: 16859
2004-10-08 22:24:31 +00:00
Chris Lattner
1b8d2957d3
If we found a dead global, we should at least delete it...
...
llvm-svn: 16858
2004-10-08 22:05:31 +00:00
Chris Lattner
1c4bddc50d
* Pull out the meat of runOnModule into another function for clarity.
...
* Do not lead dangling dead constants prevent optimization
* Iterate global optimization while we're making progress.
These changes allow us to be more aggressive, handling cases like
GlobalOpt/iterate.llx without a problem (turning it into 'ret int 0').
llvm-svn: 16857
2004-10-08 20:59:28 +00:00
Chris Lattner
8f9a697431
New testcase
...
llvm-svn: 16856
2004-10-08 20:57:46 +00:00
Chris Lattner
73ad73e2d8
We might as well delete the known-dead global sooner rather than later since
...
we know it is dead.
llvm-svn: 16855
2004-10-08 20:25:55 +00:00
Misha Brukman
84e5ff7605
Hyphenate target-(in)dependent for more tasty grammar goodness (tm)
...
llvm-svn: 16854
2004-10-08 19:43:31 +00:00
Chris Lattner
0b41e861b6
Temporarily disable a buggy transformation until it can be fixed. This fixes
...
254.gap.
llvm-svn: 16853
2004-10-08 19:15:44 +00:00
Misha Brukman
e4e1360eab
Adjust paths due to moving InstrSched to lib/Target/SparcV9
...
llvm-svn: 16852
2004-10-08 18:30:22 +00:00
Misha Brukman
70da50f095
Use the SparcV9-marked instr scheduling library
...
llvm-svn: 16851
2004-10-08 18:14:56 +00:00
Misha Brukman
cb54d5dfae
InstrSched has been moved to lib/Target/SparcV9
...
llvm-svn: 16850
2004-10-08 18:12:53 +00:00
Misha Brukman
24eb38af7c
InstrSched is SparcV9-specific and so has been moved to lib/Target/SparcV9/
...
llvm-svn: 16849
2004-10-08 18:12:14 +00:00
Misha Brukman
5a9976ac29
Single-space instead of double-spacing in the Makefile
...
llvm-svn: 16848
2004-10-08 18:11:14 +00:00
Misha Brukman
e75c26687c
Build InstrSched as well, and all three subdirs can be built independently
...
llvm-svn: 16847
2004-10-08 18:10:48 +00:00
Misha Brukman
66cf7b641c
* Adjust for the move to lib/Target/SparcV9/InstrSched
...
* Rename library to mark it SparcV9-specific
llvm-svn: 16846
2004-10-08 18:10:01 +00:00
Misha Brukman
73dce3a6bf
Single-space instead of double-spacing in the Makefile
...
llvm-svn: 16845
2004-10-08 18:05:25 +00:00
Reid Spencer
d90857e144
Remove unused variable.
...
llvm-svn: 16844
2004-10-08 18:01:31 +00:00
Reid Spencer
6b9ba4a980
Make it so that positional parameters can have spaces in them.
...
llvm-svn: 16843
2004-10-08 17:59:29 +00:00
Chris Lattner
abab0719af
Implement SRA for global variables. This allows the other global variable
...
optimizations to trigger much more often. This allows the elimination of
several dozen more global variables in Programs/External. Note that we only
do this for non-constant globals: constant globals will already be optimized
out if the accesses to them permit it.
This implements Transforms/GlobalOpt/globalsra.llx
llvm-svn: 16842
2004-10-08 17:32:09 +00:00
Chris Lattner
6935f560a5
New testcase
...
llvm-svn: 16841
2004-10-08 17:29:47 +00:00
Chris Lattner
0be2f50401
Fix bug: 2004-10-08-SelectSetCCFold.llx. Normally this is hidden by the
...
instcombine xform, which is why we didn't notice it before.
llvm-svn: 16840
2004-10-08 16:34:13 +00:00
Chris Lattner
fc95027b7a
New testcase. The setcc is only used by a select, but not as a condition:
...
it cannot be folded in.
llvm-svn: 16839
2004-10-08 16:33:40 +00:00
Misha Brukman
41f9f29996
Properly `quote' names, and don't forget to add the ending quote!
...
llvm-svn: 16838
2004-10-08 14:59:05 +00:00
Reid Spencer
f9fdfa7aa5
Add the --with-automake option to AutoRegen.sh and provide the automake
...
version of the configure script. This is an early commit of the automake
support so that automake support can be tested on multiple platforms. Many
additional Makefile.am need to be added to LLVM before this is of any use.
Please wait until automake support is announced on llvmdev list before
using the --with-automake option.
llvm-svn: 16837
2004-10-08 05:33:35 +00:00
Chris Lattner
bff91d9a2e
Instcombine (X & FF00) + xx00 -> (X+xx00) & FF00, implementing and.ll:test27
...
This comes up when doing adds to bitfield elements.
llvm-svn: 16836
2004-10-08 05:07:56 +00:00
Chris Lattner
9467062bcf
New testcase
...
llvm-svn: 16835
2004-10-08 05:03:25 +00:00
Chris Lattner
44bd392cbf
Little patch to turn (shl (add X, 123), 4) -> (add (shl X, 4), 123 << 4)
...
This triggers in cases of bitfield additions, opening opportunities for
future improvements.
llvm-svn: 16834
2004-10-08 03:46:20 +00:00
Chris Lattner
7bfe4032fc
New testcase
...
llvm-svn: 16833
2004-10-08 03:41:59 +00:00
Nate Begeman
b58dd6799f
Implement logical and with an immediate that consists of a contiguous block
...
of one or more 1 bits (may wrap from least significant bit to most
significant bit) as the rlwinm rather than andi., andis., or some longer
instructons sequence.
int andn4(int z) { return z & -4; }
int clearhi(int z) { return z & 0x0000FFFF; }
int clearlo(int z) { return z & 0xFFFF0000; }
int clearmid(int z) { return z & 0x00FFFF00; }
int clearwrap(int z) { return z & 0xFF0000FF; }
_andn4:
rlwinm r3, r3, 0, 0, 29
blr
_clearhi:
rlwinm r3, r3, 0, 16, 31
blr
_clearlo:
rlwinm r3, r3, 0, 0, 15
blr
_clearmid:
rlwinm r3, r3, 0, 8, 23
blr
_clearwrap:
rlwinm r3, r3, 0, 24, 7
blr
llvm-svn: 16832
2004-10-08 02:49:24 +00:00
Misha Brukman
3e0a20ebb8
Fix usage description typo
...
llvm-svn: 16831
2004-10-08 01:11:15 +00:00
Misha Brukman
f5a92bda7b
Make comment header span the entire line
...
llvm-svn: 16830
2004-10-08 01:10:52 +00:00
Misha Brukman
ed3dc439e1
Describe how to configure tests to work with f2c
...
llvm-svn: 16829
2004-10-08 00:55:43 +00:00
Misha Brukman
8d08d36199
* Reformat to fit 80 cols
...
* Add missing <li> tags
llvm-svn: 16828
2004-10-08 00:41:27 +00:00
Nate Begeman
6e6514c47e
Several fixes and enhancements to the PPC32 backend.
...
1. Fix an illegal argument to getClassB when deciding whether or not to
sign extend a byte load.
2. Initial addition of isLoad and isStore flags to the instruction .td file
for eventual use in a scheduler.
3. Rewrite of how constants are handled in emitSimpleBinaryOperation so
that we can emit the PowerPC shifted immediate instructions far more
often. This allows us to emit the following code:
int foo(int x) { return x | 0x00F0000; }
_foo:
.LBB_foo_0: ; entry
; IMPLICIT_DEF
oris r3, r3, 15
blr
llvm-svn: 16826
2004-10-07 22:30:03 +00:00
Nate Begeman
c6b63cd2ed
Add ori reg, reg, 0 as a move instruction. This can be generated from
...
loading a 32bit constant into a register whose low halfword is all zeroes.
We now omit the ori after the lis for the following C code:
int bar(int y) { return y * 0x00F0000; }
_bar:
.LBB_bar_0: ; entry
; IMPLICIT_DEF
lis r2, 15
mullw r3, r3, r2
blr
llvm-svn: 16825
2004-10-07 22:26:12 +00:00
Nate Begeman
70a9d9c0b1
Remove unnecessary header include
...
llvm-svn: 16824
2004-10-07 22:24:32 +00:00
Chris Lattner
617f1a34f1
Improve comments, no functionality changes
...
llvm-svn: 16814
2004-10-07 21:30:30 +00:00
Chris Lattner
3ae7bb6b7c
Fix a nasty dangling pointer problem, due to a free'd pointer being left in
...
a map. This caused problems if a later object happened to be allocated at
the free'd object's address.
llvm-svn: 16813
2004-10-07 20:01:31 +00:00
Chris Lattner
b0b1cb2182
Get friendly with Type
...
llvm-svn: 16812
2004-10-07 19:21:43 +00:00
Chris Lattner
251093ca5d
Unfortunately the fix for the previous bug introduced the previous
...
exponential behavior (bork!). This patch processes stuff with an
explicit SCC finder, allowing the algorithm to be more clear,
efficient, and also (as a bonus) correct! This gets us back to taking
0.6s to disassemble my horrible .bc file that previously took something
> 30 mins.
llvm-svn: 16811
2004-10-07 19:20:48 +00:00
Chris Lattner
d299ffee01
Change signature of this method again
...
llvm-svn: 16810
2004-10-07 19:19:12 +00:00
Chris Lattner
31d9e6f922
These files now live in Transforms/GlobalOpt
...
llvm-svn: 16809
2004-10-07 19:16:43 +00:00
Chris Lattner
5860106954
Move these files from Transforms/GlobalConstifier
...
llvm-svn: 16808
2004-10-07 19:16:26 +00:00
Chris Lattner
cef3c06027
Fix a bug in my previous change. Unfortunately this reverts most of the
...
speedup, but has the advantage of not breaking a bunch of programs!
llvm-svn: 16806
2004-10-07 16:19:40 +00:00
Reid Spencer
50a425a56d
Make these scripts work on SunOS too.
...
llvm-svn: 16805
2004-10-07 16:03:21 +00:00
Chris Lattner
02b6c918b7
Fix a bug in the safety analysis routine
...
llvm-svn: 16804
2004-10-07 06:01:25 +00:00
Chris Lattner
f64799683e
Comment cleanups
...
llvm-svn: 16803
2004-10-07 06:00:24 +00:00
Chris Lattner
25db58032d
* Rename pass to globalopt, since we do more than just constify
...
* Instead of handling dead functions specially, just nuke them.
* Be more aggressive about cleaning up after constification, in
particular, handle getelementptr instructions and constantexprs.
* Be a little bit more structured about how we process globals.
*** Delete globals that are only stored to, and never read. These are
clearly not useful, so they should go. This implements deadglobal.llx
This last one triggers quite a few times. In particular, 2208 in the
external tests, 1865 of which are in 252.eon. This shrinks eon from
1995094 to 1732341 bytes of bytecode.
llvm-svn: 16802
2004-10-07 04:16:33 +00:00
Chris Lattner
fa3cfd3955
Rename pass
...
llvm-svn: 16801
2004-10-07 04:12:02 +00:00
Chris Lattner
b0c8aab038
This pass is not needed, as there is only ever one global: the stack
...
llvm-svn: 16800
2004-10-07 04:10:36 +00:00
Chris Lattner
381fbf1616
Add new testcase, rename pass
...
llvm-svn: 16799
2004-10-07 04:07:08 +00:00
Chris Lattner
fc303099c9
Don't add libz or libbz2 to the USEDLIBS lists, those are for LLVM libraries.
...
llvm-svn: 16798
2004-10-07 00:03:11 +00:00
Chris Lattner
76319a83bd
Don't call memset if malloc returns a null pointer
...
llvm-svn: 16797
2004-10-06 23:08:03 +00:00
Chris Lattner
1f849a08a3
Implement GlobalConstifier/trivialstore.llx, and also do some
...
simplifications of the resultant program to avoid making later passes
do it all.
This allows us to constify globals that just have the same constant that
they are initialized stored into them.
Suprisingly this comes up ALL of the freaking time, dozens of times in
SPEC, 30 times in vortex alone.
For example, on 256.bzip2, it allows us to constify these two globals:
%smallMode = internal global ubyte 0 ; <ubyte*> [#uses=8]
%verbosity = internal global int 0 ; <int*> [#uses=49]
Which (with later optimizations) results in the bytecode file shrinking
from 82286 to 69686 bytes! Lets hear it for IPO :)
For the record, it's nuking lots of "if (verbosity > 2) { do lots of stuff }"
code.
llvm-svn: 16793
2004-10-06 20:57:02 +00:00
Chris Lattner
645bcf6c5d
New testcase
...
llvm-svn: 16791
2004-10-06 20:42:51 +00:00
Chris Lattner
af88fcd4c9
Dont' let null nodes sneak past cast instructions
...
llvm-svn: 16779
2004-10-06 19:29:13 +00:00
Misha Brukman
fe643e314f
Undoxyfy internal method.
...
llvm-svn: 16774
2004-10-06 17:19:58 +00:00
Misha Brukman
74a1195bd6
Doxygen-ify comments
...
llvm-svn: 16773
2004-10-06 16:56:16 +00:00
Chris Lattner
43e03c9cdf
Change Type::isAbstract to have better comments, a more correct name
...
(PromoteAbstractToConcrete), and to use a set to avoid recomputation.
In particular, this set eliminates the potentially exponential cases
from this little recursive algorithm.
On a particularly nasty testcase, llvm-dis on the .bc file went from 34
minutes (which is when I killed it, it still hadn't finished) to 0.57s.
Remember kids, exponential algorithms are bad.
llvm-svn: 16772
2004-10-06 16:36:46 +00:00
Chris Lattner
f29560783a
Rename method, change comment, add argument
...
llvm-svn: 16771
2004-10-06 16:34:23 +00:00
Chris Lattner
f94f985bbd
Correct some typeos
...
llvm-svn: 16770
2004-10-06 16:28:24 +00:00
Chris Lattner
0aee4b7947
Instcombine: -(X sdiv C) -> (X sdiv -C), tested by sub.ll:test16
...
llvm-svn: 16769
2004-10-06 15:08:25 +00:00
Chris Lattner
52783ab1d8
New testcase
...
llvm-svn: 16768
2004-10-06 15:07:56 +00:00
Chris Lattner
93867e516a
Remove debugging code, fix encoding problem. This fixes the problems
...
the JIT had last night.
llvm-svn: 16766
2004-10-06 14:31:50 +00:00
Nate Begeman
9a1fbaf1e9
Turning on fsel code gen now that we can do so would be good.
...
llvm-svn: 16765
2004-10-06 11:03:30 +00:00
Nate Begeman
fac8529df8
Implement floating point select for lt, gt, le, ge using the powerpc fsel
...
instruction.
Now, rather than emitting the following loop out of bisect:
.LBB_main_19: ; no_exit.0.i
rlwinm r3, r2, 3, 0, 28
lfdx f1, r3, r27
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f2, lo16(.CPI_main_1-"L00000$pb")(r3)
fsub f2, f2, f1
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3)
fcmpu cr0, f1, f4
bge .LBB_main_64 ; no_exit.0.i
.LBB_main_63: ; no_exit.0.i
b .LBB_main_65 ; no_exit.0.i
.LBB_main_64: ; no_exit.0.i
fmr f2, f1
.LBB_main_65: ; no_exit.0.i
addi r3, r2, 1
rlwinm r3, r3, 3, 0, 28
lfdx f1, r3, r27
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3)
fsub f4, f4, f1
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f5, lo16(.CPI_main_1-"L00000$pb")(r3)
fcmpu cr0, f1, f5
bge .LBB_main_67 ; no_exit.0.i
.LBB_main_66: ; no_exit.0.i
b .LBB_main_68 ; no_exit.0.i
.LBB_main_67: ; no_exit.0.i
fmr f4, f1
.LBB_main_68: ; no_exit.0.i
fadd f1, f2, f4
addis r3, r30, ha16(.CPI_main_2-"L00000$pb")
lfd f2, lo16(.CPI_main_2-"L00000$pb")(r3)
fmul f1, f1, f2
rlwinm r3, r2, 3, 0, 28
lfdx f2, r3, r28
fadd f4, f2, f1
fcmpu cr0, f4, f0
bgt .LBB_main_70 ; no_exit.0.i
.LBB_main_69: ; no_exit.0.i
b .LBB_main_71 ; no_exit.0.i
.LBB_main_70: ; no_exit.0.i
fmr f0, f4
.LBB_main_71: ; no_exit.0.i
fsub f1, f2, f1
addi r2, r2, -1
fcmpu cr0, f1, f3
blt .LBB_main_73 ; no_exit.0.i
.LBB_main_72: ; no_exit.0.i
b .LBB_main_74 ; no_exit.0.i
.LBB_main_73: ; no_exit.0.i
fmr f3, f1
.LBB_main_74: ; no_exit.0.i
cmpwi cr0, r2, -1
fmr f16, f0
fmr f17, f3
bgt .LBB_main_19 ; no_exit.0.i
We emit this instead:
.LBB_main_19: ; no_exit.0.i
rlwinm r3, r2, 3, 0, 28
lfdx f1, r3, r27
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f2, lo16(.CPI_main_1-"L00000$pb")(r3)
fsub f2, f2, f1
fsel f1, f1, f1, f2
addi r3, r2, 1
rlwinm r3, r3, 3, 0, 28
lfdx f2, r3, r27
addis r3, r30, ha16(.CPI_main_1-"L00000$pb")
lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3)
fsub f4, f4, f2
fsel f2, f2, f2, f4
fadd f1, f1, f2
addis r3, r30, ha16(.CPI_main_2-"L00000$pb")
lfd f2, lo16(.CPI_main_2-"L00000$pb")(r3)
fmul f1, f1, f2
rlwinm r3, r2, 3, 0, 28
lfdx f2, r3, r28
fadd f4, f2, f1
fsub f5, f0, f4
fsel f0, f5, f0, f4
fsub f1, f2, f1
addi r2, r2, -1
fsub f2, f1, f3
fsel f3, f2, f3, f1
cmpwi cr0, r2, -1
fmr f16, f0
fmr f17, f3
bgt .LBB_main_19 ; no_exit.0.i
llvm-svn: 16764
2004-10-06 09:53:04 +00:00
Chris Lattner
6835dedb5b
Codegen signed mod by 2 or -2 more efficiently. Instead of generating:
...
t:
mov %EDX, DWORD PTR [%ESP + 4]
mov %ECX, 2
mov %EAX, %EDX
sar %EDX, 31
idiv %ECX
mov %EAX, %EDX
ret
Generate:
t:
mov %ECX, DWORD PTR [%ESP + 4]
*** mov %EAX, %ECX
cdq
and %ECX, 1
xor %ECX, %EDX
sub %ECX, %EDX
*** mov %EAX, %ECX
ret
Note that the two marked moves are redundant, and should be eliminated by the
register allocator, but aren't.
Compare this to GCC, which generates:
t:
mov %eax, DWORD PTR [%esp+4]
mov %edx, %eax
shr %edx, 31
lea %ecx, [%edx+%eax]
and %ecx, -2
sub %eax, %ecx
ret
or ICC 8.0, which generates:
t:
movl 4(%esp), %ecx #3.5
movl $-2147483647, %eax #3.25
imull %ecx #3.25
movl %ecx, %eax #3.25
sarl $31, %eax #3.25
addl %ecx, %edx #3.25
subl %edx, %eax #3.25
addl %eax, %eax #3.25
negl %eax #3.25
subl %eax, %ecx #3.25
movl %ecx, %eax #3.25
ret #3.25
We would be in great shape if not for the moves.
llvm-svn: 16763
2004-10-06 05:01:07 +00:00
Chris Lattner
e4c60eb704
Really fix FreeBSD, which apparently doesn't tolerate the extern.
...
Thanks to Jeff Cohen for pointing out my goof.
llvm-svn: 16762
2004-10-06 04:21:52 +00:00
Chris Lattner
7bd8f1332d
Fix a scary bug with signed division by a power of two. We used to generate:
...
s: ;; X / 4
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
sar %ECX, 1
shr %ECX, 30
mov %EDX, %EAX
add %EDX, %ECX
sar %EAX, 2
ret
When we really meant:
s:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
sar %ECX, 1
shr %ECX, 30
add %EAX, %ECX
sar %EAX, 2
ret
Hey, this also reduces register pressure too :)
llvm-svn: 16761
2004-10-06 04:19:43 +00:00
Chris Lattner
147edd2f7e
Codegen signed divides by 2 and -2 more efficiently. In particular
...
instead of:
s: ;; X / 2
movl 4(%esp), %eax
movl %eax, %ecx
shrl $31, %ecx
movl %eax, %edx
addl %ecx, %edx
sarl $1, %eax
ret
t: ;; X / -2
movl 4(%esp), %eax
movl %eax, %ecx
shrl $31, %ecx
movl %eax, %edx
addl %ecx, %edx
sarl $1, %eax
negl %eax
ret
Emit:
s:
movl 4(%esp), %eax
cmpl $-2147483648, %eax
sbbl $-1, %eax
sarl $1, %eax
ret
t:
movl 4(%esp), %eax
cmpl $-2147483648, %eax
sbbl $-1, %eax
sarl $1, %eax
negl %eax
ret
llvm-svn: 16760
2004-10-06 04:02:39 +00:00
Chris Lattner
e9bfa5a2a4
Add some new instructions. Fix the asm string for sbb32rr
...
llvm-svn: 16759
2004-10-06 04:01:02 +00:00
Chris Lattner
2ce32df8b0
Reduce code growth implied by the tail duplication pass by not duplicating
...
an instruction if it can be hoisted to a common dominator of the block.
This implements: test/Regression/Transforms/TailDup/MergeTest.ll
llvm-svn: 16758
2004-10-06 03:27:37 +00:00
Chris Lattner
7d83efbc0b
When tail duplicating these functions, the add instruction should not be
...
duplicated, even though the block it is in is duplicated.
llvm-svn: 16757
2004-10-06 03:26:38 +00:00
Chris Lattner
32ed828f46
FreeBSD uses GCC. Patch contributed by Jeff Cohen!
...
llvm-svn: 16756
2004-10-06 03:15:44 +00:00
Chris Lattner
18b88f71ad
Fix the path to the fixinc'd headers. Patch contributed by Jeff Cohen!
...
llvm-svn: 16755
2004-10-06 03:13:47 +00:00
Brian Gaeke
c5a630bd3c
Must include sys/stat.h before declaring a 'struct stat'
...
llvm-svn: 16728
2004-10-05 18:46:59 +00:00
Brian Gaeke
a3d1b776b9
Build BFtoLLVM example front-end by default
...
llvm-svn: 16719
2004-10-05 18:05:53 +00:00
Brian Gaeke
ca70a78b71
Add BFtoLLVM example front end
...
llvm-svn: 16714
2004-10-05 18:05:25 +00:00
Chris Lattner
9b38ead89a
Make sure the const bit gets inherited correctly when linking declarations
...
of disagreeing constness. This fixes
test/Regression/Linker/ConstantGlobals[123].ll
llvm-svn: 16692
2004-10-05 02:28:11 +00:00
Chris Lattner
07d1d7ede5
Another testcase for constness linkage
...
llvm-svn: 16691
2004-10-05 02:16:01 +00:00
Chris Lattner
e0d464bda2
Testcase to ensure that the 'constant' flag follows the definition when there
...
is a question.
llvm-svn: 16690
2004-10-05 02:12:20 +00:00
Reid Spencer
abb04cfc79
Adjust sys/stat.h inclusion so its only for SunOS.
...
llvm-svn: 16686
2004-10-05 00:56:46 +00:00
Tanya Lattner
c3ef3cc7e5
Added a couple of includes to get this to compile on Sparc.
...
llvm-svn: 16685
2004-10-05 00:51:26 +00:00
Chris Lattner
9895937618
Solaris doesn't have MAP_FILE.
...
llvm-svn: 16682
2004-10-05 00:46:21 +00:00
Chris Lattner
2426ff991c
Bug fixed
...
llvm-svn: 16671
2004-10-05 00:23:02 +00:00
Chris Lattner
db76a3db91
New testcase for PR450
...
llvm-svn: 16670
2004-10-05 00:18:21 +00:00
Reid Spencer
defd9699e6
Add checks for the ZLIB and BZIP2 header files, not just the libraries.
...
llvm-svn: 16669
2004-10-04 22:05:53 +00:00
Chris Lattner
69aa178674
Fix #include flavor
...
llvm-svn: 16658
2004-10-04 18:10:18 +00:00
Reid Spencer
38b846c8e1
Move the warning about no compression library down to the bottom, away
...
from the fray, so it gets noticed. This commit is made without the
corresponding configure script commit because it doesn't affect
functionality and we don't want to force everyone into another reconfigure
llvm-svn: 16657
2004-10-04 18:02:55 +00:00
Reid Spencer
266cd00360
Fix typo in makefile variable name that prevents zlib from being recognized
...
llvm-svn: 16656
2004-10-04 17:49:19 +00:00
Reid Spencer
1bd6da2293
Add HAVE_BZIP2 and HAVE_ZLIB
...
llvm-svn: 16655
2004-10-04 17:48:37 +00:00
Reid Spencer
04f1e90657
Excise the ill-advised RLCOMP compression algorithm and simply leave the
...
previously temporary NULLCOMP implementation that merely copies the data
verbatim without compression. Also, don't warn if there's no compression
library as that is taken care of during configuration time.
llvm-svn: 16654
2004-10-04 17:45:44 +00:00
Misha Brukman
c2fdea6d8f
Add example 'abstract' architectures for LLI: MIX, MMIX, and DLX
...
llvm-svn: 16653
2004-10-04 17:36:35 +00:00
Reid Spencer
2e3cc54e42
Add a context for the callback so different compression scenarios can be
...
distinguished. Tidy up documentation. Thanks, Chris.
llvm-svn: 16652
2004-10-04 17:29:25 +00:00
Reid Spencer
34637df55f
Minor corrections suggested by Chris' ever-watchful eye.
...
llvm-svn: 16651
2004-10-04 17:26:26 +00:00
Chris Lattner
b4abe320bf
Fix build if not HAVE_BZIP2
...
llvm-svn: 16650
2004-10-04 16:33:25 +00:00
Reid Spencer
161a459d42
First version of the MappedFile abstraction for operating system idependent
...
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.
llvm-svn: 16649
2004-10-04 11:08:32 +00:00
Reid Spencer
c89503753c
First version of a support utility to provide generalized compression in
...
LLVM that handles availability and unavailability of bzip2 and zlib.
llvm-svn: 16648
2004-10-04 10:49:41 +00:00
Chris Lattner
d1ab378be5
* Prune #includes
...
* Update comments
* Rearrange code a bit
* Finally ELIMINATE the GAS workaround emitter for Intel mode. woot!
llvm-svn: 16647
2004-10-04 07:31:08 +00:00
Chris Lattner
68ab0beb1b
Add support for emitting AT&T style .s files, and make it the default. Users
...
may now choose their output format with the -x86-asm-syntax={intel|att} flag.
llvm-svn: 16646
2004-10-04 07:24:48 +00:00
Chris Lattner
8bbde2fb33
Convert some missed patterns to support AT&T style
...
llvm-svn: 16645
2004-10-04 07:23:07 +00:00
Chris Lattner
2e99778aad
Apparently the GNU assembler has a HUGE hack to be compatible with really
...
old and broken AT&T syntax assemblers. The problem with this hack is that
*SOME* forms of the fdiv and fsub instructions have the 'r' bit inverted.
This was a real pain to figure out, but is trivially easy to support: thus
we are now bug compatible with gas and gcc.
llvm-svn: 16644
2004-10-04 07:08:46 +00:00
Reid Spencer
4e181e731a
Provide support for auto-detection and use of compression libraries.
...
llvm-svn: 16643
2004-10-04 07:05:07 +00:00
Chris Lattner
af69503332
Fix incorrect suffix
...
llvm-svn: 16642
2004-10-04 05:20:16 +00:00
Chris Lattner
e1a2826d51
Fix some more missed suffixes and swapped operands
...
llvm-svn: 16641
2004-10-04 01:38:10 +00:00
Chris Lattner
a488f04f3e
Add missing suffixes to FP instructions for AT&T mode
...
llvm-svn: 16640
2004-10-04 00:43:31 +00:00
Chris Lattner
5683260187
Add support for the -x86-asm-syntax flag, which can be used to choose between
...
Intel and AT&T style assembly language. The ultimate goal of this is to
eliminate the GasBugWorkaroundEmitter class, but for now AT&T style emission
is not fully operational.
llvm-svn: 16639
2004-10-03 20:36:57 +00:00
Chris Lattner
4e59a14909
Add support to the instruction patterns for AT&T style output, which will
...
hopefully lead to the death of the 'GasBugWorkaroundEmitter'. This also
includes changes to wrap the whole file to 80 columns! Woot! :)
Note that the AT&T style output has not been tested at all.
llvm-svn: 16638
2004-10-03 20:35:00 +00:00
Chris Lattner
72770f5877
Correctly parse variant notation
...
llvm-svn: 16637
2004-10-03 20:19:02 +00:00
Chris Lattner
91c538f2a1
Add initial support for variants. This just parses the new format, no
...
functionality is added
llvm-svn: 16636
2004-10-03 19:34:31 +00:00
Chris Lattner
42c43b2cb3
Add initial support for variants
...
llvm-svn: 16635
2004-10-03 19:34:18 +00:00
Reid Spencer
4874120154
Add checks for bzip2 and libz for use with the Compression concept for
...
lib/System and the compressing llvm archiver.
llvm-svn: 16634
2004-10-02 08:50:58 +00:00
Chris Lattner
00db230c7c
Do not repeat the map lookup
...
llvm-svn: 16633
2004-10-01 23:16:43 +00:00
Chris Lattner
1905ae69c1
When a virtual register is folded into an instruction, keep track of whether
...
it was a use, def, or both. This allows us to be less pessimistic in our
analysis of them. In practice, this doesn't make a big difference, but it
doesn't hurt either.
llvm-svn: 16632
2004-10-01 23:15:36 +00:00
Chris Lattner
79bb240345
Add project
...
llvm-svn: 16631
2004-10-01 22:25:28 +00:00
Chris Lattner
04f52079d7
Add a simple little improvement to the local spiller to keep track of stores
...
and delete them if they turn out to be dead. This is a useful little hack
that even speeds up some programs. For example, it speeds up Ptrdist/ks
from 17.53s to 15.59s, and 188.ammp from 149s to 146s.
This also speeds up llc :)
llvm-svn: 16630
2004-10-01 19:47:12 +00:00
Chris Lattner
d3b1f6c703
Substantially revamp the local spiller, causing it to actually improve the
...
generated code over the simple spiller. The new local spiller generates
substantially better code than the simple one in some cases, by reusing
values that are loaded out of stack slots and kept available in registers.
This primarily helps programs that are spilling a lot, and there is still
stuff that can be done to improve it. This patch makes the local spiller
the default, as it's only a tiny bit slower than the simple spiller (it
increases the runtime of llc by < 1%).
Here are some numbers with speedups.
Program #reuse old(s) new(s) Speedup
Povray: 3452, 16.87 -> 15.93 (5.5%)
177.mesa: 2176, 2.77 -> 2.76 (0%)
179.art: 35, 28.43 -> 28.01 (1.5%)
183.equake: 55, 61.44 -> 61.41 (0%)
188.ammp: 869, 174 -> 149 (15%)
164.gzip: 43, 40.73 -> 40.71 (0%)
175.vpr: 351, 18.54 -> 17.34 (6.5%)
176.gcc: 2471, 5.01 -> 4.92 (1.8%)
181.mcf 42, 79.30 -> 75.20 (5.2%)
186.crafty: 484, 29.73 -> 30.04 (-1%)
197.parser: 251, 10.47 -> 10.67 (-1%)
252.eon: 1501, 1.98 -> 1.75 (12%)
253.perlbm: 1183, 14.83 -> 14.42 (2.8%)
254.gap: 825, 7.46 -> 7.29 (2.3%)
255.vortex: 285, 10.51 -> 10.27 (2.3%)
256.bzip2: 63, 55.70 -> 55.20 (0.9%)
300.twolf: 830, 21.63 -> 22.00 (-1%)
PtrDist/ks 14, 32.75 -> 17.53 (46.5%)
Olden/tsp 46, 8.71 -> 8.24 (5.4%)
Free/distray 70, 1.09 -> 0.99 (9.2%)
llvm-svn: 16629
2004-10-01 19:04:51 +00:00
Chris Lattner
f06f4a7c68
Pretty print a bit nicer :)
...
llvm-svn: 16628
2004-10-01 19:01:39 +00:00
Misha Brukman
e0cce9945d
Add note about converting Skeleton to a useful backend and using it in the
...
Interpreter.
llvm-svn: 16627
2004-10-01 18:36:22 +00:00
Alkis Evlogimenos
cc37da1bcc
Document this class a bit :-)
...
llvm-svn: 16626
2004-10-01 00:35:07 +00:00
Alkis Evlogimenos
94d5a1ceda
Add const version of getLastBlock() member function.
...
llvm-svn: 16625
2004-09-30 21:42:02 +00:00
Alkis Evlogimenos
aba8cf29ce
Remove whitespace from the end of the line.
...
llvm-svn: 16624
2004-09-30 21:39:47 +00:00
Brian Gaeke
dd9bb500ad
Make EmitMappingInfo into an "external location" option, so that it can be set
...
or cleared externally.
llvm-svn: 16623
2004-09-30 20:20:01 +00:00
Brian Gaeke
33e834ebb0
Add accessor function.
...
llvm-svn: 16622
2004-09-30 20:14:29 +00:00
Brian Gaeke
5a89bde564
Correct type of accessor functions.
...
llvm-svn: 16621
2004-09-30 20:14:18 +00:00
Brian Gaeke
e80d4cd66b
Namespacify. Add accessor function.
...
llvm-svn: 16620
2004-09-30 20:14:07 +00:00
Brian Gaeke
d2f7bc029b
Add accessor function prototypes for reoptimizer support passes.
...
Make accessors return FunctionPass* as appropriate.
llvm-svn: 16619
2004-09-30 20:13:55 +00:00
Brian Gaeke
a1640d2427
I think this will handle double args.
...
llvm-svn: 16618
2004-09-30 19:44:32 +00:00
Misha Brukman
a468200286
That should actually be __MING, not __MINGW.
...
llvm-svn: 16617
2004-09-30 18:28:07 +00:00
Misha Brukman
46cee7da73
#include DataTypes.h to compile on MinGW, patch by Henrik Bach.
...
llvm-svn: 16616
2004-09-30 18:27:39 +00:00
Misha Brukman
ba94e672c3
Check for __MINGW define instead of __MINGW_H, patch by Henrik Bach.
...
llvm-svn: 16615
2004-09-30 18:24:58 +00:00
Chris Lattner
b5b4a2f76b
Use more efficient map operations. Fix a bug that would affect hypothetical
...
targets that supported multiple memory operands.
llvm-svn: 16614
2004-09-30 16:35:08 +00:00
Chris Lattner
55c1402f25
There is no need to call MachineInstr::print directly, just send the MI& to an ostream.
...
llvm-svn: 16613
2004-09-30 16:10:45 +00:00
Chris Lattner
b0b707fc75
* Wrap some comments to 80 cols
...
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
debugger.
llvm-svn: 16612
2004-09-30 15:59:17 +00:00
Brian Gaeke
7efd5fcb3a
Mark the instructions that have delay slots with the hasDelaySlot flag.
...
Add some comments.
llvm-svn: 16611
2004-09-30 04:04:48 +00:00
Brian Gaeke
1f48ef2a9a
Use TargetMachine::hasDelaySlot() instead of our old switch statement
...
to find instrs that have delay slots.
llvm-svn: 16610
2004-09-30 04:04:47 +00:00
Chris Lattner
c2812121cd
Simplify the logic in the simple spiller and capitalize some variables
...
llvm-svn: 16609
2004-09-30 02:59:33 +00:00
Chris Lattner
1c5942fee9
Switch from defaulting to the 'local' spiller to the 'simple' spiller. The
...
two spillers produce perfectly identical code (at least on povray and eon),
but the simple spiller is substantially faster than the local spiller. Once
the local spiller is improved, we can switch back.
Switching cuts 5.2% off of the llc time for povray (about 1.3s).
llvm-svn: 16608
2004-09-30 02:40:06 +00:00
Chris Lattner
28bc753cac
Don't use a densemap for keeping track of which vregs are already loaded, just
...
use a simple vector. This speeds up -spiller=simple from taking 22s to taking
.1s on povray (debug build). This change does not modify the generated code.
llvm-svn: 16607
2004-09-30 02:33:48 +00:00
Chris Lattner
39fef8df03
Use longer and more explicit names for instance vars (particularly important
...
data structures). Fix the print method to send to the right ostream, not
always cerr. Delete typedefs that are only used once.
llvm-svn: 16606
2004-09-30 02:15:18 +00:00
Chris Lattner
ddd5229f3b
Free the VirtRegMap at the end of MachineFunction processing instead of at
...
the beginning of processing the next one.
llvm-svn: 16605
2004-09-30 02:02:33 +00:00
Chris Lattner
e2b77d57c0
Reindent code, improve comments, move huge nested methods out of classes,
...
prune #includes, add print/dump methods, etc. No functionality changes.
llvm-svn: 16604
2004-09-30 01:54:45 +00:00
Chris Lattner
9af8efddd3
Disable the 'WARNING: Found global types that are not compatible' warning
...
that always prints when linking programs to libstdc++ :(
llvm-svn: 16603
2004-09-30 00:12:29 +00:00
Misha Brukman
4592f86ef1
Change the #ifdefs to allow compilation with a V8 compiler, but the JIT still
...
won't work if not compiled in V9 mode, currently by GCC only, because Sun's
system compiler does not tell us if it's a V8 or V9 system.
llvm-svn: 16602
2004-09-29 23:01:17 +00:00
Chris Lattner
abae776b18
Hrm, debugging printouts do not need to be in here
...
llvm-svn: 16598
2004-09-29 21:21:14 +00:00
Chris Lattner
cde15fb187
Make sure to check select instructions for generic instruction properties
...
llvm-svn: 16597
2004-09-29 21:19:28 +00:00
Brian Gaeke
fb1fd0cb5f
Update list of shootout programs that should be working.
...
llvm-svn: 16595
2004-09-29 20:45:06 +00:00
Brian Gaeke
ede068a8d3
Tell the target description that calls clobber registers O0...O5.
...
llvm-svn: 16594
2004-09-29 20:45:05 +00:00
Chris Lattner
c9e79d005b
Don't use DominatorSet::dominates for intra-block instruction dom checks.
...
This method is linear time in the size of the basic block, which is very
bad for large basic blocks. On the Assembler/2004-09-29-VerifierIsReallySlow.llx
testcase, the verifier changes from taking 50s to 0.23s with this patch.
llvm-svn: 16593
2004-09-29 20:07:45 +00:00
Chris Lattner
f27b48f187
The verifier takes 50s on this testcase, that is not good n stuff
...
llvm-svn: 16592
2004-09-29 20:07:25 +00:00
Brian Gaeke
3a340dd7cd
FITOD is spelled "fitod", not "fitos". Ouch.
...
llvm-svn: 16591
2004-09-29 19:59:07 +00:00
Brian Gaeke
47095da661
Don't use .quad to output double constants. The assembler must have a bug or
...
something, because the wrong bit patterns get output.
llvm-svn: 16590
2004-09-29 19:59:06 +00:00
Chris Lattner
6862fbd2cf
* Pull range optimization code out into new InsertRangeTest function.
...
* SubOne/AddOne functions always return ConstantInt, declare them as such
* Pull code for handling setcc X, cst, where cst is at the end of the range,
or cc is LE or GE up earlier in visitSetCondInst. This reduces #iterations
in some cases.
* Fold: (div X, C1) op C2 -> range check, implementing div.ll:test6 - test9.
llvm-svn: 16588
2004-09-29 17:40:11 +00:00
Chris Lattner
d9d8538995
New testcasses for divides that can be eliminated.
...
llvm-svn: 16587
2004-09-29 17:37:07 +00:00
Brian Gaeke
81f5e08573
Recognize FpMOVD as a move.
...
llvm-svn: 16586
2004-09-29 16:45:47 +00:00
Chris Lattner
879ce7894c
Do not insert trivially dead select instructions, which allows us to
...
potentially fold more in one pass.
llvm-svn: 16583
2004-09-29 05:43:32 +00:00
Chris Lattner
6a4adcda4c
Fold binary expressions and casts into PHI nodes that have all constant inputs.
...
This takes something like this:
%A = phi int [ 3, %cond_false.0 ], [ 2, %endif.0.i ], [ 2, %endif.1.i ]
%B = div int %tmp.243, 4
and turns it into:
%A = phi int [ 3/4, %cond_false.0 ], [ 2/4, %endif.0.i ], [ 2/4, %endif.1.i ]
which is later simplified (in this case) into %A = 0.
This triggers thousands of times in spec, for example, 269 times in 176.gcc.
This is tested by InstCombine/add.ll:test23 and set.ll:test18.
llvm-svn: 16582
2004-09-29 05:07:12 +00:00
Chris Lattner
5e0ab5c5d8
New testcases
...
llvm-svn: 16581
2004-09-29 05:06:12 +00:00
Nate Begeman
2f1d0ae95e
Generate better code by being far less clever when it comes to the select instruction. Don't create overlapping register lifetimes
...
llvm-svn: 16580
2004-09-29 05:00:31 +00:00
Brian Gaeke
c44da15813
add results
...
llvm-svn: 16579
2004-09-29 03:48:55 +00:00
Nate Begeman
7b6df6def2
improve Type::BoolTy codegen by eliminating unnecessary clears and sign extends
...
llvm-svn: 16578
2004-09-29 03:45:33 +00:00
Brian Gaeke
4023d4e191
Simplify copyConstantToRegister() for longs, using a pair of recursive calls.
...
Copy constant-pool entries' addresses into registers before loading out of them,
to avoid errors from the assembler.
Handle loading call args past the 6th one off the stack.
Add IMPLICIT_DEF pseudo-instrs for double and long arguments passed in register
pairs.
Use FpMOVD to copy doubles around instead of the horrible store-load thing we
were doing before.
Handle 'ret double' and 'ret long'.
Fix a bug in handling 'and/or/xor long'.
llvm-svn: 16577
2004-09-29 03:34:41 +00:00
Brian Gaeke
eae5b17dba
Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
...
moves, not all ORs.
llvm-svn: 16576
2004-09-29 03:28:15 +00:00
Brian Gaeke
069bb989e4
Use FpMOVD pseudo-instruction to move doubles around.
...
llvm-svn: 16575
2004-09-29 03:27:30 +00:00
Brian Gaeke
da371d9cf3
Add new FpMOVD pseudo-instruction, used to move doubles around.
...
llvm-svn: 16574
2004-09-29 03:27:29 +00:00
Brian Gaeke
7f11dd4825
Fix double and long alignment.
...
Call the FPMover pass after register allocation.
llvm-svn: 16573
2004-09-29 03:26:27 +00:00
Brian Gaeke
ead8e39832
Put quotes around argument to .section directive.
...
llvm-svn: 16572
2004-09-29 03:25:40 +00:00
Brian Gaeke
457180c597
Add createSparcV8FPMoverPass().
...
llvm-svn: 16571
2004-09-29 03:25:39 +00:00
Brian Gaeke
ce0ba4857b
Pass which converts FpMOVD (double move pseudoinstructions) to pairs
...
of FMOVS instrs.
llvm-svn: 16570
2004-09-29 03:24:34 +00:00
Chris Lattner
5933e997d8
More testcases for recent instcombine patches
...
llvm-svn: 16569
2004-09-29 03:18:20 +00:00
Chris Lattner
c949128b2f
Hrm, really, all tests passed without this, but it is scary to think how...
...
llvm-svn: 16568
2004-09-29 03:16:24 +00:00
Chris Lattner
be7a69ebd8
Remove debugging printout
...
Instcombine (setcc (truncate X), C1).
This occurs THOUSANDS of times in many benchmarks. Particularlly common
seem to be things like (seteq (cast bool X to int), int 0)
This turns it into (seteq bool %X, false), which then becomes (not %X).
llvm-svn: 16567
2004-09-29 03:09:18 +00:00
Nate Begeman
26566f0b68
To go along with sabre's improved InstCombining, improve recognition of
...
integers that we can use as immediate values in instructions.
Example from yacr2:
- lis r10, -1
- ori r10, r10, 65535
- add r28, r28, r10
+ addi r28, r28, -1
addi r7, r7, 1
addi r9, r9, 1
b .LBB_main_9 ; loopentry.1.i214
llvm-svn: 16566
2004-09-29 02:35:05 +00:00
Reid Spencer
7aed44892c
Improve validity checking of windows path names and fix file creation
...
problems.
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16565
2004-09-29 00:01:17 +00:00
Reid Spencer
70b6835853
Use llvm::sys::Path to destroy the file.
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16564
2004-09-28 23:58:03 +00:00
Reid Spencer
364cce404a
Win32 implementation of TimeValue::now().
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16563
2004-09-28 23:56:20 +00:00
Reid Spencer
5d98fe9ef8
FreeBSD implementation of the TimeValue::now() method.
...
Patch kindly contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16562
2004-09-28 23:54:12 +00:00
Chris Lattner
dcf756ec22
Fold (X setcc C1) | (X setcc C2)
...
This implements or.ll:test1[89]
llvm-svn: 16561
2004-09-28 22:33:08 +00:00
Chris Lattner
efc0614cd6
New testcase
...
llvm-svn: 16560
2004-09-28 22:31:49 +00:00
Chris Lattner
623826c888
Fold (and (setcc X, C1), (setcc X, C2))
...
This is important for several reasons:
1. Benchmarks have lots of code that looks like this (perlbmk in particular):
%tmp.2.i = setne int %tmp.0.i, 128 ; <bool> [#uses=1]
%tmp.6343 = seteq int %tmp.0.i, 1 ; <bool> [#uses=1]
%tmp.63 = and bool %tmp.2.i, %tmp.6343 ; <bool> [#uses=1]
we now fold away the setne, a clear improvement.
2. In the more important cases, such as (X >= 10) & (X < 20), we now produce
smaller code: (X-10) < 10.
3. Perhaps the nicest effect of this patch is that it really helps out the
code generators. In particular, for a 'range test' like the above,
instead of generating this on X86 (the difference on PPC is even more
pronounced):
cmp %EAX, 50
setge %CL
cmp %EAX, 100
setl %AL
and %CL, %AL
cmp %CL, 0
we now generate this:
add %EAX, -50
cmp %EAX, 50
Furthermore, this causes setcc's to be folded into branches more often.
These combinations trigger dozens of times in the spec benchmarks, particularly
in 176.gcc, 186.crafty, 253.perlbmk, 254.gap, & 099.go.
llvm-svn: 16559
2004-09-28 21:48:02 +00:00
Misha Brukman
e06653ff76
* Add `deplibs' keyword for specifying a list of dependent libraries
...
* Convert tabs to spaces
llvm-svn: 16558
2004-09-28 21:46:18 +00:00
Misha Brukman
04f0b5b7cd
Add `deplibs' keyword for specifying a list of dependent libraries
...
llvm-svn: 16557
2004-09-28 21:45:54 +00:00
Chris Lattner
3cbcd25596
New testcases
...
llvm-svn: 16556
2004-09-28 21:39:35 +00:00
Nate Begeman
c762ab723b
Add support for the isLoad and isStore flags, needed by the instruction scheduler
...
llvm-svn: 16555
2004-09-28 21:29:00 +00:00
Nate Begeman
996ddbc98e
Add support for the isLoad and isStore flags, needed by the instruction scheduler
...
llvm-svn: 16554
2004-09-28 21:01:45 +00:00
Chris Lattner
9b0dfa3c0d
Turn the hasDelaySlot flag into the M_DELAY_SLOT_FLAG
...
llvm-svn: 16553
2004-09-28 18:38:01 +00:00
Chris Lattner
547b4d4a29
Be consistent with our naming
...
llvm-svn: 16552
2004-09-28 18:37:00 +00:00
Chris Lattner
6652223bd6
Capture delay slot info
...
llvm-svn: 16551
2004-09-28 18:34:14 +00:00
Chris Lattner
f9fa7cad4b
Capture information about whether the target instructions have delay slots
...
llvm-svn: 16550
2004-09-28 18:33:50 +00:00
Chris Lattner
272d5ca9e0
Implement X / C1 / C2 folding
...
Implement (setcc (shl X, C1), C2) folding.
The second one occurs several dozen times in spec. The first was added
just in case. :)
These are tested by shift.ll:test2[12], and div.ll:test5
llvm-svn: 16549
2004-09-28 18:22:15 +00:00
Chris Lattner
cbd7a98cb8
New testcase
...
llvm-svn: 16548
2004-09-28 18:21:01 +00:00
Chris Lattner
3dd0ae64a9
New testcases
...
llvm-svn: 16547
2004-09-28 18:18:35 +00:00
Chris Lattner
6afc02f816
shl is always zero extending, so always use a zero extending shift right.
...
This latent bug was exposed by recent changes, and is tested as:
llvm/test/Regression/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.llx
llvm-svn: 16546
2004-09-28 17:54:07 +00:00
Chris Lattner
64ee11511f
New testcase for a latent bug in instcombine that I have been chasing for
...
1.5 days :(
llvm-svn: 16545
2004-09-28 17:50:05 +00:00
Misha Brukman
5753883dc0
* InstructionReader.cpp was absorbed into Reader.cpp
...
* Wrap at 80 cols
llvm-svn: 16543
2004-09-28 16:58:12 +00:00
Misha Brukman
349717934a
Fix doxygen comment
...
llvm-svn: 16542
2004-09-28 16:57:46 +00:00
Brian Gaeke
99d3deee1c
Touch output files before reading or writing them, so that they are
...
always guaranteed to exist. This fixes PR444. Thanks to Alkis
for reporting the bug and testing the patch.
AddRecord used to return a big list, but that return value was never
used. So now it doesn't return anything.
Create the WebDir if it does not exist.
Fix a typo in a comment.
llvm-svn: 16541
2004-09-28 16:04:00 +00:00
John Criswell
68146eb40a
Corrected spelling of Makefile variable, thereby re-enabling profile
...
builds for projects.
llvm-svn: 16540
2004-09-28 14:52:58 +00:00
Alkis Evlogimenos
20f1b0bafb
Add includes and use std:: for standard library calls to make code
...
compile on windows. This patch was contributed by Paolo Invernizzi.
llvm-svn: 16539
2004-09-28 14:42:44 +00:00
Chris Lattner
a2bb624e35
Bug fixed
...
llvm-svn: 16538
2004-09-28 03:45:22 +00:00
Chris Lattner
7b30f27695
Testcase for LLVM PR445
...
llvm-svn: 16537
2004-09-28 03:36:39 +00:00
Alkis Evlogimenos
6280a7b716
Since we use alloca now make sure we include the proper headers for it.
...
llvm-svn: 16536
2004-09-28 02:53:15 +00:00
Alkis Evlogimenos
edbb20cf7f
Use alloca instead of a C99 style array. This should fix the
...
compilation problem in windows.
llvm-svn: 16535
2004-09-28 02:47:38 +00:00
Alkis Evlogimenos
3ce42ec7ee
Pull assignment out of for loop conditional in order for this to
...
compile under windows. Patch contributed by Paolo Invernizzi!
llvm-svn: 16534
2004-09-28 02:40:37 +00:00
Alkis Evlogimenos
fc59e0e8a3
Fix includes. Patch contributed by Paolo Invernizzi!
...
llvm-svn: 16533
2004-09-28 02:38:58 +00:00
Chris Lattner
02060ae68e
New testcase that crashes the C++ FE, encountered while working on PR445
...
llvm-svn: 16532
2004-09-28 02:29:40 +00:00
Alkis Evlogimenos
b1da2050a5
Use class instead of struct for defining classes. This unbreaks the
...
build on windows. Patch contributed by Paolo Invernizzi!
llvm-svn: 16531
2004-09-28 01:59:17 +00:00
Chris Lattner
6a4a0492f8
Patch contributed by Patrick Meredith:
...
added notes on the fact that the current implementation uses
sbyte* for va_list. Updated all occurances of valist to va_list (it was
inconsistant and find/replace is so easy ;-) ). Added <...> around all
occurances of va_list in the intrinsic functions to match the vaarg and
vanext instructions and to further show that va_list is a variable type.
llvm-svn: 16530
2004-09-27 21:51:25 +00:00
Misha Brukman
23f7ad07dc
Fix grammar.
...
llvm-svn: 16529
2004-09-27 20:35:59 +00:00
Chris Lattner
bfff18a869
Fix two bugs: one where a condition was mistakenly swapped, and another
...
where we folded (X & 254) -> X < 1 instead of X < 2. These problems were
latent problems exposed by the latest patch.
llvm-svn: 16528
2004-09-27 19:29:18 +00:00
Chris Lattner
5f9319a789
New testcase
...
llvm-svn: 16527
2004-09-27 19:25:20 +00:00
Misha Brukman
d409d38151
SparcV8 int regs are not only 32-bits in width, but they are 32-bit aligned!
...
llvm-svn: 16526
2004-09-27 18:22:18 +00:00
Chris Lattner
d7dc1ecd42
The system ranlib on darwin occasionally adds two extra newlines to the
...
end of files, breaking the CFE build. As a gross hack around this,
ignore any trailing garbage on bytecode files. Thanks to Brian for digging
in and identifying the problem.
llvm-svn: 16525
2004-09-27 16:59:06 +00:00
Chris Lattner
dbf0a56597
Hrm, if there is an error loading a file, try printing a message so the
...
user knows that...
llvm-svn: 16524
2004-09-27 16:41:01 +00:00
Chris Lattner
fbfb4d43c4
Testcases for rev 250 of InstructionCombining.cpp
...
llvm-svn: 16522
2004-09-27 16:21:26 +00:00
Chris Lattner
1023b8726e
Fold: (setcc (shr X, ShAmt), CI), where 'cc' is eq or ne. This xform
...
triggers often, for example:
6x in povray, 1x in gzip, 279x in gcc, 1x in crafty, 8x in eon, 11x in perlbmk,
362x in gap, 4x in vortex, 14 in m88ksim, 211x in 126.gcc, 1x in compress,
11x in ijpeg, and 4x in 147.vortex.
llvm-svn: 16521
2004-09-27 16:18:50 +00:00
Alkis Evlogimenos
2622728248
Improve warning
...
llvm-svn: 16520
2004-09-27 07:35:19 +00:00
Nate Begeman
8656a156cf
Correct some BuildMI arguments for the upcoming simple scheduler
...
llvm-svn: 16519
2004-09-27 05:08:17 +00:00
Misha Brukman
a68d76ebfa
Fix the copy-pasto that Brian noticed: V8 int regs are 32-bits wide, not 64.
...
llvm-svn: 16518
2004-09-26 21:07:43 +00:00
Reid Spencer
58ab77db8e
Add some missing #includes
...
llvm-svn: 16517
2004-09-25 16:00:07 +00:00
Reid Spencer
6c0c9424f6
Qualify Path with sys:: namespace so this file compiles.
...
llvm-svn: 16516
2004-09-25 15:59:41 +00:00
Reid Spencer
f71143c3e5
Updated to reflect changes in the interface of TimeValue::now().
...
llvm-svn: 16515
2004-09-25 08:32:37 +00:00
Reid Spencer
004ef2847b
Clean up the interface of TimeValue:
...
- get rid of unneeded constructors
- get rid of duplicate methods/constructors/operators
- normalize to LLVM coding standards
- wrap to 80 columns.
Many thanks to Alkis Evlogimenos for his suggestions.
llvm-svn: 16514
2004-09-25 08:29:54 +00:00
Reid Spencer
1cc1994edf
Added stub implementations of TimeValue concept for remaining platforms.
...
llvm-svn: 16513
2004-09-25 05:03:54 +00:00
Reid Spencer
8b2f9a298d
Wrap to 80 cols.
...
llvm-svn: 16512
2004-09-25 05:03:22 +00:00
Reid Spencer
ca141a5b28
Initial implementation of the TimeValue abstraction.
...
llvm-svn: 16511
2004-09-24 23:25:19 +00:00
John Criswell
71c8d5eae9
Updated the last two header files so that they are configured with
...
AC_CONFIG_HEADERS. This should prevent LLVM from needlessly re-compiling
on a re-configure.
llvm-svn: 16510
2004-09-24 21:19:06 +00:00
John Criswell
08e722647a
Modified hash_map and hash_set configuration so that they are not
...
regenerated on every run of configure.
llvm-svn: 16509
2004-09-24 18:28:00 +00:00
Chris Lattner
7e794273f5
Implement shift-and combinations, implementing InstCombine/and.ll:test19-21
...
These combinations trigger 4 times in povray, 7x in gcc, 4x in gap, and 2x in bzip2.
llvm-svn: 16508
2004-09-24 15:21:34 +00:00
Chris Lattner
8c1c691755
Add some tests for shr-and folding
...
llvm-svn: 16507
2004-09-24 15:18:43 +00:00
John Criswell
3ed86d7540
Configure Datatypes.h.in with AC_CONFIG_HEADERS. This should prevent it
...
from being re-generated if the new version is identical to the old version.
Hence, it should save us some recompiling after re-configures.
llvm-svn: 16506
2004-09-24 13:28:51 +00:00
Chris Lattner
e1b4d2a470
Move LHSI->hasOneUse() into the arms of the conditional, reindenting code.
...
No functionality changes here.
llvm-svn: 16505
2004-09-23 21:52:49 +00:00
Chris Lattner
8fc5af4da9
Implement Transforms/InstCombine/and.ll:test18, a case that occurs 20 times
...
in perlbmk
llvm-svn: 16504
2004-09-23 21:46:38 +00:00
Chris Lattner
45a5ace32e
New testcase for a pattern that occurs 20 times in perlbmk
...
llvm-svn: 16503
2004-09-23 21:42:49 +00:00
Reid Spencer
bf6439fd27
Add a blurb about the use of class vs. struct keyword in class decls.
...
llvm-svn: 16500
2004-09-23 16:03:48 +00:00
Chris Lattner
bdcf41a8a2
Implement select.ll:test16: fold load (select C, X, null) -> load X
...
llvm-svn: 16499
2004-09-23 15:46:00 +00:00
Chris Lattner
fb4735980b
load null is undefined behavior, this should fold
...
llvm-svn: 16498
2004-09-23 15:45:20 +00:00
Reid Spencer
3e95e7c99c
Change Value from a "struct" to a "class" so that VC 7.1 doesn't generate
...
missing symbols when its referenced as a class.
llvm-svn: 16496
2004-09-23 14:49:45 +00:00
Reid Spencer
9904928ea3
Patch for MINGW. Patch provided by Henrik Bach.
...
llvm-svn: 16495
2004-09-23 14:47:10 +00:00
Reid Spencer
898eca3260
Missed one $*.a -> $@ conversion for the Release build.
...
llvm-svn: 16494
2004-09-23 06:07:24 +00:00
Nate Begeman
49cf74b26c
Fix the last of the major PPC GEP folding deficiencies. This will allow
...
the ISel to use indexed and non-zero immediate offsets for GEPs that have
more than one use. This is common for instruction sequences such as a load
followed by a modify and store to the same address.
llvm-svn: 16493
2004-09-23 05:31:33 +00:00
Alkis Evlogimenos
04da4252c0
Update email address
...
llvm-svn: 16492
2004-09-23 04:39:30 +00:00
Chris Lattner
29cf9a32e2
Grrr... I shouldn't have to do this one :)
...
llvm-svn: 16491
2004-09-23 04:36:01 +00:00
Chris Lattner
9544766cd3
Update credits
...
llvm-svn: 16490
2004-09-23 04:30:05 +00:00
Reid Spencer
ef18cc48db
Correct the rules for making shared libraries per libtool 1.5.10
...
llvm-svn: 16489
2004-09-23 00:58:06 +00:00
Misha Brukman
379a05b52a
Use the V8/V9 shared register file description
...
llvm-svn: 16485
2004-09-22 21:48:50 +00:00
Misha Brukman
3c08658d56
Combine the F2 and F3 instruction classes into one file for simplicity
...
llvm-svn: 16484
2004-09-22 21:38:42 +00:00
Misha Brukman
efce1ef9c3
Fix file header path
...
llvm-svn: 16483
2004-09-22 21:29:12 +00:00
Misha Brukman
009aaf9968
Prettify formatting of the file, adjust paths to making V8 a subdir of Sparc
...
llvm-svn: 16482
2004-09-22 20:09:29 +00:00
Misha Brukman
d55f854a5d
V8 is now a subdirectory of Sparc; adjust paths accordingly
...
llvm-svn: 16481
2004-09-22 20:08:52 +00:00
Reid Spencer
3c20f4b59f
Update to add the HAVE_UINT64_T test and the STACK_DIRECTION indicator.
...
llvm-svn: 16480
2004-09-22 15:32:08 +00:00
Reid Spencer
c4eb57c525
The alloca function, strangely enough, is found in the malloc.h header file
...
on MINGW platform. Provide an #elseif case to #include malloc.h for this
platform if malloc.h is found.
Patch provided by Henrik Bach. Thanks Henrik!
llvm-svn: 16479
2004-09-22 15:28:32 +00:00
Nate Begeman
033b816171
add optimized code sequences for setcc x, 0
...
llvm-svn: 16478
2004-09-22 04:40:25 +00:00
Chris Lattner
b121ae1cec
Do not fold (X + C1 != C2) if there are other users of the add. Doing
...
this transformation used to take a loop like this:
int Array[1000];
void test(int X) {
int i;
for (i = 0; i < 1000; ++i)
Array[i] += X;
}
Compiled to LLVM is:
no_exit: ; preds = %entry, %no_exit
%indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ] ; <uint> [#uses=2]
%tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar ; <int*> [#uses=2]
%tmp.7 = load int* %tmp.4 ; <int> [#uses=1]
%tmp.9 = add int %tmp.7, %X ; <int> [#uses=1]
store int %tmp.9, int* %tmp.4
*** %indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
*** %exitcond = seteq uint %indvar.next, 1000 ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
and turn it into a loop like this:
no_exit: ; preds = %entry, %no_exit
%indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ] ; <uint> [#uses=3]
%tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar ; <int*> [#uses=2]
%tmp.7 = load int* %tmp.4 ; <int> [#uses=1]
%tmp.9 = add int %tmp.7, %X ; <int> [#uses=1]
store int %tmp.9, int* %tmp.4
*** %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
*** %exitcond = seteq uint %indvar, 999 ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
Note that indvar.next and indvar can no longer be coallesced. In machine
code terms, this patch changes this code:
.LBBtest_1: # no_exit
mov %EDX, OFFSET Array
mov %ESI, %EAX
add %ESI, DWORD PTR [%EDX + 4*%ECX]
mov %EDX, OFFSET Array
mov DWORD PTR [%EDX + 4*%ECX], %ESI
mov %EDX, %ECX
inc %EDX
cmp %ECX, 999
mov %ECX, %EDX
jne .LBBtest_1 # no_exit
into this:
.LBBtest_1: # no_exit
mov %EDX, OFFSET Array
mov %ESI, %EAX
add %ESI, DWORD PTR [%EDX + 4*%ECX]
mov %EDX, OFFSET Array
mov DWORD PTR [%EDX + 4*%ECX], %ESI
inc %ECX
cmp %ECX, 1000
jne .LBBtest_1 # no_exit
We need better instruction selection to get this:
.LBBtest_1: # no_exit
add DWORD PTR [Array + 4*%ECX], EAX
inc %ECX
cmp %ECX, 1000
jne .LBBtest_1 # no_exit
... but at least there is less register juggling
llvm-svn: 16473
2004-09-21 21:35:23 +00:00
Alkis Evlogimenos
89dd63733a
The real x87 floating point registers should not be allocatable. They
...
are only used by the stackifier when transforming FPn register
allocations to the real stack file x87 registers.
llvm-svn: 16472
2004-09-21 21:22:11 +00:00
Misha Brukman
6b17bf7193
s/ISel/PPC64ISel/ to have unique class names for debugging via gdb because the
...
C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.
llvm-svn: 16471
2004-09-21 18:22:33 +00:00
Misha Brukman
87201ce8f9
s/ISel/PPC32ISel/ to have unique class names for debugging via gdb because the
...
C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.
llvm-svn: 16470
2004-09-21 18:22:19 +00:00
Misha Brukman
43bd39e04e
s/ISel/X86ISel/ to have unique class names for debugging via gdb because the C++
...
front-end in gcc does not mangle classes in anonymous namespaces correctly.
llvm-svn: 16469
2004-09-21 18:21:21 +00:00
Chris Lattner
0f28cce60c
Make sure to set the operand list
...
llvm-svn: 16466
2004-09-21 17:30:54 +00:00
Reid Spencer
5a6815d332
Fix a problem where the mmap_file test was generating an incorrect test
...
program that always failed (wouldn't compile).
llvm-svn: 16465
2004-09-21 17:14:44 +00:00
Reid Spencer
d057f2bc56
Change the warning text so that NO warnings are permitted. This is now the
...
case since the AC_CONFIG_SUBDIRS problem has been fixed.
llvm-svn: 16464
2004-09-21 17:13:23 +00:00
Reid Spencer
c6f9e0f512
Don't attempt to (illegally) configure a subdir if we don't recognize it.
...
Instead just create a warning message that says the directory cannot be
configured because it isn't recognized. This also gets rid of a bunch of
warning messages from the auto* tools.
llvm-svn: 16463
2004-09-21 17:12:35 +00:00
Reid Spencer
7c3d8c0af8
Fix the program passed to AC_LANG_PROGRAM to be only the BODY of the main
...
function, not the whole main function. This problem resulted during
conversion of scripts to the new autoconf standard. The effect was that
the mmap_file test would fail and if it does there is currently an
#ifdef'd #error that causes compilation to fail. Bad, bad, bad.
llvm-svn: 16462
2004-09-21 17:10:52 +00:00
Misha Brukman
62041800ed
Thanks to Brad Jones for packed type support!
...
llvm-svn: 16461
2004-09-21 16:54:37 +00:00
Misha Brukman
ca9062016e
Thanks to Brad for documentation on adding a DerivedType
...
llvm-svn: 16460
2004-09-21 16:53:29 +00:00
Chris Lattner
13d909c401
This is an empty directory
...
llvm-svn: 16459
2004-09-21 16:26:13 +00:00
Chris Lattner
6a229fcaca
This is a dead directory now
...
llvm-svn: 16458
2004-09-21 16:25:41 +00:00
Reid Spencer
efbe0ce909
Change the name of the "known" module for Java from llvm-java to Java.
...
llvm-svn: 16453
2004-09-20 22:14:56 +00:00
Alkis Evlogimenos
dc62cada7d
Use the right directory for the Java frontend
...
llvm-svn: 16448
2004-09-20 15:45:36 +00:00
Chris Lattner
42618551d5
Fix potential miscompilations: InstCombine/2004-09-20-BadLoadCombine*.llx
...
llvm-svn: 16447
2004-09-20 10:15:10 +00:00
Chris Lattner
803fb3c2c3
Two testcases for invalid transformations that instcombine is doing
...
llvm-svn: 16446
2004-09-20 10:14:27 +00:00
Reid Spencer
5ef171a5b1
Documentation upgrade.
...
llvm-svn: 16445
2004-09-20 08:09:36 +00:00
Reid Spencer
e380f931db
Finish the documentation.
...
llvm-svn: 16444
2004-09-20 08:04:13 +00:00
Reid Spencer
0889f95c02
Tighten up the specification of what counts as a code file. The previous
...
specification was too liberal in some areas and missing things in others.
This specification is based on the actual extensions found in the source
tree.
llvm-svn: 16443
2004-09-20 08:00:09 +00:00
Reid Spencer
08941821f3
Base the implementation on the llvmdo script so that we only have to
...
maintain the logic for "what counts as a source file" in one place.
llvm-svn: 16442
2004-09-20 07:22:23 +00:00
Reid Spencer
6707342ff6
Fixed to actually work correctly and be the basis for other tools by
...
allowing the set of directories searched to be specified either by the
LLVMDO_DIRS env var or by the -dirs "dirs..." command line option.
llvm-svn: 16441
2004-09-20 07:21:19 +00:00
Alkis Evlogimenos
d59cebf87a
Fix loop condition so that we don't decrement off the beginning of the
...
list.
llvm-svn: 16440
2004-09-20 06:42:58 +00:00
Chris Lattner
91006d8e2c
Don't count .lo files :)
...
llvm-svn: 16439
2004-09-20 05:01:04 +00:00
Chris Lattner
4f2cf030e8
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
79e523de04
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
Also, fix some undefined behavior, expecting | on booleans to evaluate
left-to-right.
llvm-svn: 16435
2004-09-20 04:47:19 +00:00
Chris Lattner
135419193e
Finegrainify namespacification
...
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16434
2004-09-20 04:44:31 +00:00
Chris Lattner
cd671065be
Prototype more accurately
...
llvm-svn: 16433
2004-09-20 04:43:57 +00:00
Chris Lattner
3e86084641
Prototype these functions more accurately
...
llvm-svn: 16432
2004-09-20 04:43:15 +00:00
Chris Lattner
1556b2722d
Do not prototype any of these passes as returning Pass*. Instead, be specific
...
llvm-svn: 16431
2004-09-20 04:41:39 +00:00
Chris Lattner
3c11c04d43
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16430
2004-09-20 04:36:29 +00:00
Chris Lattner
cd93da1939
Adjust to API changes
...
llvm-svn: 16429
2004-09-20 04:35:27 +00:00
Reid Spencer
45101043ef
Put in a #error in the event that we don't have an mmap that can map a file
...
into memor. This is just a reminder that the ReadFileIntoAddressSpace
function needs to be properly converted to lib/System and implemented via
read/write if there's no mmap of file support.
llvm-svn: 16428
2004-09-20 04:13:43 +00:00
Reid Spencer
ac16ea98de
Fix problems with AC_FUNC_MMAP_FILE and AC_LINK_USE_R that caused problems
...
with correctly recognizing mmap of files and the linker's support of -r.
llvm-svn: 16427
2004-09-20 04:09:56 +00:00
Reid Spencer
57f1c0e0a6
Correct the use AC_RUN_IFELSE to ensure it builds programs correctly by
...
using the AC_LANG_PROGRAM macro.
llvm-svn: 16426
2004-09-20 04:08:22 +00:00
Reid Spencer
ef538ef635
Allow the suffix for shared libraries to be obtained correctly so we can
...
build them again.
llvm-svn: 16425
2004-09-20 03:06:28 +00:00
Reid Spencer
a9317d68b6
The problem with depending on the internal implementation of third party
...
tools is that you break when they change. This is a case in point.
llvm-svn: 16424
2004-09-20 03:05:46 +00:00
Reid Spencer
3f2f555690
libtool's name is now back to mklib.
...
llvm-svn: 16423
2004-09-20 01:43:00 +00:00
Reid Spencer
7bf145cb95
Change to support creation of "mklib" instead of "libtool" in builddir.
...
llvm-svn: 16422
2004-09-20 01:42:32 +00:00
Reid Spencer
3ed4d9f7e9
Update the script to generate mklib instead of libtool.
...
llvm-svn: 16421
2004-09-20 01:41:24 +00:00
Reid Spencer
f184a86f05
Adjust the libtool macros so that libtool's name is "mklib". Also, tidy up
...
the use of obsolete macros, hopefully making us more compliant on more sys.
llvm-svn: 16420
2004-09-19 23:53:36 +00:00
Reid Spencer
2024d0ed5a
Various minor cleanups and replacement of obsoleted macro names.
...
llvm-svn: 16419
2004-09-19 23:43:52 +00:00
Reid Spencer
200dcd9e68
Numerous fixes to convert ~ into ; that (probably) occurred during data
...
transmission.
llvm-svn: 16418
2004-09-19 23:42:55 +00:00
Chris Lattner
85927a6730
The lexicon doc is more of a user guide than programming dox
...
llvm-svn: 16417
2004-09-19 23:15:47 +00:00
Reid Spencer
70eca35170
Bring the script out of the dark ages and into modern autoconfness.
...
llvm-svn: 16415
2004-09-19 22:31:49 +00:00
Reid Spencer
eb61eb2e32
Make the "Warning" notice a LOT more prominent.
...
llvm-svn: 16414
2004-09-19 22:30:53 +00:00
Reid Spencer
2aeccd0f1c
Add in version dependency checks on all the tools we depend on. This is
...
necessary to ensure that a consistent configuration is created on each
platform. Certain definitions we use (like m4/libtool.m4) require certain
versions of the tools and we can no longer be slack about this or we'll
have problems with mis-configured builds.
llvm-svn: 16412
2004-09-19 22:14:24 +00:00
Reid Spencer
dc6f5680f3
Add our own version of libtool.m4 instead of relying on the installed one.
...
This is a potential version mismatch problem because this file came from
libtool 1.5.10. If you're running a different version of libtool, the
checks in this file may not be quite right. Having our own version of this
file violates the spirit of libtool and is only provided to change the name
of "libtool" to "mklib". This is done so that the name "libtool" does not
conflict with the "lib" directory when doing tab completion and your
$objdir == $srcdir.
llvm-svn: 16411
2004-09-19 21:47:47 +00:00
Chris Lattner
2249dd1c41
better code
...
Move other things to the right sections
llvm-svn: 16410
2004-09-19 19:21:26 +00:00
Chris Lattner
e6f13093e6
Make isSafeToLoadUnconditionally a bit smarter, implementing PR362 and
...
Regression/Transforms/InstCombine/CPP_min_max.llx
llvm-svn: 16409
2004-09-19 19:18:10 +00:00
Chris Lattner
75cf9f08cc
New testcase for PR362: Icky code generated for std::min/std::max
...
llvm-svn: 16408
2004-09-19 19:17:10 +00:00
Chris Lattner
d6d99dfa3f
Fix a nasty iterator invalidation problem I introduced yesterday. This
...
unfortunately is the cause of a bunch of failures from tonight, and the
reason the tester is running so slow :(
llvm-svn: 16407
2004-09-19 19:01:06 +00:00
Chris Lattner
855a4ff4dd
Remove a whole bunch of horrible hacky code that was used to promote allocas
...
whose addresses where used by trivial phi nodes and select instructions. This
is now performed by the instcombine pass, which is more powerful, is much
simpler, and is faster. This allows the deletion of a bunch of code, two
FIXME's and two gotos.
llvm-svn: 16406
2004-09-19 18:51:51 +00:00
Chris Lattner
2f7bb1be42
Instcombine now helps out with these
...
llvm-svn: 16405
2004-09-19 18:45:45 +00:00
Chris Lattner
f62ea8ef4b
Make instruction combining a bit more aggressive in the face of volatile
...
loads, and implement two new transforms: InstCombine/load.ll:test[56].
llvm-svn: 16404
2004-09-19 18:43:46 +00:00
Chris Lattner
29dd824a10
Add two new testcases that instcombine should handle
...
llvm-svn: 16403
2004-09-19 18:43:01 +00:00
Reid Spencer
1bdd0f0a08
Minor correction to Signals implementation.
...
Patch submitted by Jeff Cohen. Thanks Jeff!
llvm-svn: 16401
2004-09-19 05:37:39 +00:00
Chris Lattner
9864df96ba
Add comment
...
llvm-svn: 16400
2004-09-19 01:05:16 +00:00
Chris Lattner
6455c51ab6
Fix the inliner to always delete any edges from the external call node to
...
a function being deleted. Due to optimizations done while inlining, there
can be edges from the external call node to a function node that were not
apparent any longer.
This fixes the compiler crash while compiling 175.vpr
llvm-svn: 16399
2004-09-18 21:37:03 +00:00
Chris Lattner
824a21868b
Add CallGraphNode::removeAnyCallEdgeTo method
...
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Reid Spencer
91e6f5e975
Use the /dev/zero device as the device on which the pages are mapped.
...
Patch contributed by Henrik Bach. Thanks Henrik!
llvm-svn: 16397
2004-09-18 19:34:09 +00:00
Reid Spencer
0e86336edc
Porting of Unix implementation to Win32.
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16396
2004-09-18 19:29:16 +00:00
Reid Spencer
36e3cbfd3b
Get rid of file descriptor leak in create_file.
...
llvm-svn: 16395
2004-09-18 19:25:11 +00:00
Chris Lattner
9fb88200c4
Misha implemented the ModuleProvider interface back in 9/18/2003.
...
llvm-svn: 16394
2004-09-18 16:16:28 +00:00
Chris Lattner
9e4be6faed
Provide initial docs for CallGraphSCCPass's, and fix several grammar-o's and
...
other problems.
llvm-svn: 16393
2004-09-18 06:39:35 +00:00
Chris Lattner
a94619ddef
Make this HTML 4.01 strict
...
Update to reflect changes to the 'Register' tblgen class.
llvm-svn: 16392
2004-09-18 06:28:07 +00:00
Chris Lattner
24ba604c98
Don't include libtool "object" files
...
llvm-svn: 16391
2004-09-18 04:40:46 +00:00
Chris Lattner
37b6c4f2d2
Convert this pass to be a CallGraphSCCPass instead of a Pass, which eliminates
...
the worklist and makes it more efficient. This does not change functionality
at all.
llvm-svn: 16390
2004-09-18 00:34:13 +00:00
Chris Lattner
475dc2c93d
Make sure to remove the Select instruction as well
...
llvm-svn: 16389
2004-09-18 00:32:40 +00:00
Chris Lattner
85d5ccc006
When changing a function, make sure to update the CallGraphNode for the
...
function, not just the CallGraph.
llvm-svn: 16388
2004-09-18 00:27:20 +00:00
Chris Lattner
d4f3238c12
Implement new changeFunction method, nuke a never implemented one.
...
Add comments and doxygenify others.
llvm-svn: 16387
2004-09-18 00:22:43 +00:00
Chris Lattner
e81c2aa42a
Implement new changeFunction method, nuke a never implemented one.
...
llvm-svn: 16386
2004-09-18 00:22:13 +00:00
John Criswell
db981ab5cc
Changed the distclean target to handle the new location of config.h.
...
llvm-svn: 16385
2004-09-17 15:08:25 +00:00
Chris Lattner
5065b240c8
Fix typo in comment
...
llvm-svn: 16384
2004-09-17 03:58:39 +00:00
Reid Spencer
90debc5e2e
Make sure critical sections are entered before trying to leave them.
...
Add some additional commentary about the workings of this module.
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16383
2004-09-17 03:02:27 +00:00
Reid Spencer
7cd7aeee9a
Adjust the license files based on the actual content of llvm and llvm-test
...
after llvm-test was split out of llvm.
llvm-svn: 16382
2004-09-16 16:41:31 +00:00
Reid Spencer
16b7bad55e
Allow "bc" as suffix for bytecode files.
...
llvm-svn: 16381
2004-09-16 16:36:10 +00:00
Reid Spencer
4aff78acbb
Implement the signals interface for Win32.
...
Patch provided by Jeff Cohen. Thanks Jeff!
llvm-svn: 16380
2004-09-16 15:53:16 +00:00
John Criswell
30a0c10269
Add dependencies so that project tools are recompiled if LLVM libraries
...
are updated.
llvm-svn: 16378
2004-09-16 14:11:25 +00:00
Chris Lattner
9face5eb1f
Add a newline
...
llvm-svn: 16369
2004-09-15 17:53:52 +00:00
Reid Spencer
6614946443
Convert code to compile with vc7.1.
...
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Chris Lattner
f38ee63423
Make sure to update the list end when an element is removed from it. This
...
fixes a crash in LICM when processing povray.
llvm-svn: 16367
2004-09-15 17:00:41 +00:00
Chris Lattner
6fa9665095
Add some assertions
...
llvm-svn: 16366
2004-09-15 16:59:47 +00:00
Reid Spencer
d684790778
Stacker compiler library doesn't need to be shared and it can cause
...
problems on some platforms (like Solaris).
llvm-svn: 16365
2004-09-15 06:22:54 +00:00
Reid Spencer
90a3303af7
Attempt to solve the libtool problem on Solaris.
...
llvm-svn: 16364
2004-09-15 06:19:53 +00:00
Reid Spencer
b88212ee1b
Patches to make this file actually compile under windows.
...
Patches submitted by Jeff Cohen. Thanks Jeff!
llvm-svn: 16362
2004-09-15 05:49:50 +00:00
Reid Spencer
7e2c236fcd
Initial version of the SysConfig abstraction for Win32.
...
llvm-svn: 16361
2004-09-15 05:48:49 +00:00
Reid Spencer
0f0c5cfb19
First version of a common header file for Win32 implementations.
...
llvm-svn: 16360
2004-09-15 05:48:11 +00:00
Reid Spencer
91886b791f
Initial implementation of the Process abstraction for Win32.
...
llvm-svn: 16359
2004-09-15 05:47:40 +00:00
Reid Spencer
0de7bc1c3d
Fix the interface to ReleaseRWX to take MemoryBlock& not Memory&
...
llvm-svn: 16356
2004-09-15 03:55:45 +00:00
Chris Lattner
f11216d24f
Fix a bug in the previous checkin that broke 255.vortex
...
llvm-svn: 16355
2004-09-15 02:34:40 +00:00
Alkis Evlogimenos
0507ffebb1
When creating constant arrays check that the initializer vector is the
...
same size as the one in the array type.
llvm-svn: 16354
2004-09-15 02:32:15 +00:00
Misha Brukman
4bf01357e1
Fit long lines into 80 cols via creative space elimination
...
llvm-svn: 16353
2004-09-15 01:40:18 +00:00
Misha Brukman
9511910e11
Wrap long line
...
llvm-svn: 16352
2004-09-15 01:34:42 +00:00
Misha Brukman
2d01db846b
Targets are independent of each other, so compile them in parallel
...
llvm-svn: 16351
2004-09-15 01:34:25 +00:00
Chris Lattner
59d448f15e
Bug fixed
...
llvm-svn: 16349
2004-09-15 01:09:25 +00:00
Chris Lattner
a346578d92
Make sure to update alias analysis information as we transform the function.
...
This fixes PR420 and Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx
llvm-svn: 16348
2004-09-15 01:04:07 +00:00
Chris Lattner
9b9932bd94
If given an AliasSetTracker object to update, update it.
...
llvm-svn: 16347
2004-09-15 01:02:54 +00:00
Chris Lattner
38be945b54
Add an optional argument to PromoteMemToReg
...
llvm-svn: 16346
2004-09-15 01:02:30 +00:00
Chris Lattner
b69831d8dd
New testcase for PR420
...
llvm-svn: 16345
2004-09-15 00:58:49 +00:00
Chris Lattner
ab64481f1d
Implement an AliasSetTracker::copyValue method
...
llvm-svn: 16344
2004-09-14 19:15:32 +00:00
Chris Lattner
8a40b8d8e0
Add an AliasSetTracker::copyValue method
...
llvm-svn: 16343
2004-09-14 19:15:12 +00:00
Misha Brukman
c1f7bb0238
The Sparc linking .so problem extends to the sample project as well
...
llvm-svn: 16342
2004-09-14 18:21:03 +00:00
Chris Lattner
09f3ac9297
Add notes about some buggy passes
...
llvm-svn: 16339
2004-09-14 16:43:13 +00:00
Chris Lattner
dd457079fa
Remove unused pass
...
llvm-svn: 16338
2004-09-14 16:34:08 +00:00
Chris Lattner
f41b80a05f
Remove a long-dead pass. Actually, this pass was never used at all.
...
llvm-svn: 16337
2004-09-14 16:33:01 +00:00
Reid Spencer
4bc165e9c1
Fix compilation warning.
...
llvm-svn: 16336
2004-09-14 15:46:13 +00:00
Reid Spencer
853d250b0a
Fix a compilation error.
...
llvm-svn: 16335
2004-09-14 15:42:11 +00:00
Reid Spencer
f27c4cde06
Okay, the list of link-time passes wasn't such a hot idea. Its prone to
...
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.
llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Chris Lattner
2cdd49de2a
Don't print newlines between passes in the pass list.
...
Note to self: sentences end with ".", not "...".
Note to reid: sentences end with ".", not "". :)
llvm-svn: 16332
2004-09-14 05:06:58 +00:00
Chris Lattner
730cfe431a
Don't print newlines between each library in the deplibs list.
...
llvm-svn: 16331
2004-09-14 04:51:44 +00:00
Chris Lattner
e8e81a2941
Revamp the Register class, and allow the use of the RegisterGroup class to
...
specify aliases directly in register definitions.
Patch contributed by Jason Eckhardt!
llvm-svn: 16330
2004-09-14 04:17:02 +00:00
Chris Lattner
db9a8be0b2
Adjust to #include movage
...
llvm-svn: 16329
2004-09-14 04:08:41 +00:00
Reid Spencer
b8dcf1cb7c
Update to reflect stkrc's new optimization capabilities.
...
llvm-svn: 16327
2004-09-14 02:00:24 +00:00
Reid Spencer
86343e43dc
Support substitution options for the W, M, and f options.
...
llvm-svn: 16326
2004-09-14 01:59:31 +00:00
Reid Spencer
4de872f623
Support the -WX, -f -M options as pass throughs
...
Change force option from -f to -F
Support the -strip option
Make changes to reflect different interface in sys::Program
llvm-svn: 16325
2004-09-14 01:58:45 +00:00
Reid Spencer
df05ec7e0d
Implement the GetLibraryPath function.
...
llvm-svn: 16323
2004-09-14 00:16:39 +00:00
Reid Spencer
41c5e9f2fc
Add the GetLibraryPath method.
...
llvm-svn: 16322
2004-09-13 23:46:23 +00:00
Reid Spencer
b9e0877223
Add support for the link-time pass list to Modules.
...
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Misha Brukman
77aedd18c7
Sparc cannot link shared objects (libtool issue) which affects Stacker.
...
llvm-svn: 16320
2004-09-13 22:42:54 +00:00
Reid Spencer
1f164a6e09
Simplify the sys::Memory interface per Chris' request.
...
llvm-svn: 16319
2004-09-13 22:38:12 +00:00
Reid Spencer
f7948483d2
Simplify the sys::Memory interface per Chris' request.
...
llvm-svn: 16318
2004-09-13 22:38:11 +00:00
Reid Spencer
07369430c4
Clean up the interface and implementation of sys::Program so that it is
...
cleanly dissociated from the sys::Path class.
llvm-svn: 16315
2004-09-13 21:48:44 +00:00
Chris Lattner
247c29e4b0
Changes to make this work with Jason's patch. I checked this by hand, but
...
would appreciate if others would also look at this to make sure I didn't
botch something obvious
llvm-svn: 16312
2004-09-13 21:32:03 +00:00
Reid Spencer
cdbb9d246c
Change banner name to reflect actual program this Makefile is for.
...
llvm-svn: 16311
2004-09-13 21:15:19 +00:00
Reid Spencer
eafdda000c
Get rid of compile warning by having llvmExecve return the result of its
...
call to executeProgram.
llvm-svn: 16306
2004-09-13 15:37:33 +00:00
Reid Spencer
56d4b17288
Initial implementation of llvm-ld: stolen from gccld.
...
llvm-svn: 16305
2004-09-13 01:27:53 +00:00
Misha Brukman
01592c2a53
Add LLEE into compilation, but not for Sparc
...
llvm-svn: 16304
2004-09-13 01:18:30 +00:00
Reid Spencer
b956fc1138
Excise the -L option since llvm-link should not do library searches. It
...
just links bytecode files together.
llvm-svn: 16303
2004-09-12 23:39:42 +00:00
Reid Spencer
1a8e15e356
Excise dependent library linking at Chris' request. llvm-link is intended
...
to provide only the simplest linking of LLVM modules without trying to be
complete. Dependent library linking will be added to gccld or its successor
llvm-svn: 16302
2004-09-12 23:08:29 +00:00
Misha Brukman
c3ba6e2f4b
Squelch compilation warnings on Sparc
...
llvm-svn: 16301
2004-09-12 23:01:24 +00:00
Misha Brukman
afab5f9091
* Fix grammar
...
* Convert tabs to spaces
llvm-svn: 16300
2004-09-12 22:40:40 +00:00
Misha Brukman
72be9ae024
Fix filename: Printer.cpp has become X86AsmPrinter.cpp
...
llvm-svn: 16299
2004-09-12 21:26:04 +00:00
Misha Brukman
14756e8e1c
Unbreak doxygen, according to Reid.
...
llvm-svn: 16298
2004-09-12 20:56:38 +00:00
Misha Brukman
dbcd4fda49
Fix code spacing/alignment
...
llvm-svn: 16297
2004-09-12 20:47:33 +00:00
Reid Spencer
746dbfebc8
Fix the replace method to assert if an item was erased from the set but not
...
found in the vector. Previously, it just ignored this condition.
llvm-svn: 16296
2004-09-11 20:38:25 +00:00
Reid Spencer
987319d3a7
Correct the file header to reflect the new "examples" home for the file.
...
llvm-svn: 16295
2004-09-11 20:30:11 +00:00
Reid Spencer
55a96ee8f5
Fix typo: sterror -> strerror
...
llvm-svn: 16294
2004-09-11 20:18:08 +00:00
Reid Spencer
fda2fe9f1e
Correct the dynamic lib suffix on Darwin.
...
llvm-svn: 16293
2004-09-11 07:35:01 +00:00
Reid Spencer
566ac28f35
Provide initial implementations of Memory and Process concepts for various
...
platforms.
Implement GetLLVMSuffix function for the Path concept.
llvm-svn: 16292
2004-09-11 04:59:30 +00:00
Reid Spencer
2896c95bca
Provide a generic Unix implementation of the Memory concept.
...
llvm-svn: 16291
2004-09-11 04:57:25 +00:00
Reid Spencer
33b9d77b89
Provide a generic unix implementation of the Process abstraction.
...
llvm-svn: 16290
2004-09-11 04:56:56 +00:00
Reid Spencer
ae9bbda50a
Implemented support for detecting file types by magic number, stripping
...
path and suffix to leave basename, and getting the DLL suffix.
llvm-svn: 16289
2004-09-11 04:55:08 +00:00
Reid Spencer
2d20d765d8
Implementation of Process concept for SUSv2 platforms.
...
llvm-svn: 16288
2004-09-11 04:54:06 +00:00
Reid Spencer
fe020a38bc
Implement dependent library processing and search paths for them.
...
llvm-svn: 16287
2004-09-11 04:32:42 +00:00
Reid Spencer
96019262ca
Convert the Emitter to use the lib/System "Memory" interface instead of the
...
old SystemUtils.h interface to allocate RWX blocks of memory.
llvm-svn: 16286
2004-09-11 04:31:03 +00:00
Reid Spencer
0bb062e55d
Add library LLVMsystem.a because the JIT now needs it.
...
llvm-svn: 16285
2004-09-11 04:29:44 +00:00
Reid Spencer
92475489e7
Correct the interface of a function to use the correct typedef for an
...
argument so that it will always compile.
llvm-svn: 16284
2004-09-11 04:29:13 +00:00
Reid Spencer
9cfa81662f
Implement the remove method for deleting entries from the SetVector.
...
llvm-svn: 16283
2004-09-11 04:25:58 +00:00
Reid Spencer
1b34fde1cc
Implement support for dependent libraries. The "source" module's dependent
...
libraries list is merged into the "destination" module's list. Also, if the
source module is one of the dependent libraries, it is removed from the
list.
llvm-svn: 16282
2004-09-11 04:25:17 +00:00
Reid Spencer
14072a3f54
Change interface to use correct typedef so it will always compile.
...
llvm-svn: 16281
2004-09-11 04:22:58 +00:00
Reid Spencer
a529d4eaa7
Make the dependent libraries list use a SetVector instead of a regular
...
vector so that duplicate libraries never occur within a module.
llvm-svn: 16280
2004-09-11 04:22:14 +00:00
Reid Spencer
886fc070d5
Initial commit of a file to declare the interface for platform independent
...
support for various memory allocation operations.
llvm-svn: 16279
2004-09-11 04:20:58 +00:00
Reid Spencer
e88d949c1e
Add methods for detecting file types by magic number, getting the file name
...
suffix for shared objects, and stripping a path down to its base name.
llvm-svn: 16278
2004-09-11 04:19:17 +00:00
Reid Spencer
cf40b4a423
Add methods for detecting different kinds of files by their magic number,
...
getting the suffix for shared objects, and extracting the basename from a
path.
llvm-svn: 16277
2004-09-11 04:18:05 +00:00
Reid Spencer
07e7a5ec18
Use llvm-link to link the .bc with testing.bc. This helps test the new
...
llvm-link dependent libraries feature.
llvm-svn: 16276
2004-09-11 04:15:09 +00:00
Reid Spencer
c90a765368
Print the dependent libraries when dumping bytecode.
...
llvm-svn: 16275
2004-09-11 04:14:07 +00:00
Brian Gaeke
c722311fb5
Update to latest versions of config.guess and config.sub from
...
http://savannah.gnu.org/projects/config
llvm-svn: 16268
2004-09-10 19:20:06 +00:00
Misha Brukman
04bbe6fa25
Renamed file to SparcV8ISelSimple.cpp
...
llvm-svn: 16267
2004-09-10 18:51:12 +00:00
Brian Gaeke
86584749b6
Roll back constant printing changes until the problems with larger
...
programs and C++ can be looked at in detail.
llvm-svn: 16266
2004-09-10 18:01:45 +00:00
Alkis Evlogimenos
cb031d9518
Add assertion descriptiosn on type mismatches when creating
...
ConstantArray and ConstantPacked objects.
llvm-svn: 16261
2004-09-10 04:16:59 +00:00
Misha Brukman
0bc8b12734
Fix broken internal links (one found by seventwentyfour.com spider)
...
llvm-svn: 16260
2004-09-09 20:34:13 +00:00
Alkis Evlogimenos
213e6db9ce
Grow the map on entry so that we don't crash if joinIntervals never
...
runs (if coalescing is disabled for example).
llvm-svn: 16259
2004-09-09 19:24:38 +00:00
Misha Brukman
4657235e36
If updating from CVS gives error "No rule to make target", it's faster to just
...
delete .d files than to rebuild from scratch.
llvm-svn: 16258
2004-09-09 16:36:47 +00:00
Misha Brukman
6e8f860fee
Fix broken link to the 2004 CGO paper.
...
llvm-svn: 16257
2004-09-09 16:18:40 +00:00
Chris Lattner
c8f1d71f1b
Add missing #include
...
llvm-svn: 16256
2004-09-09 02:37:56 +00:00
Brian Gaeke
ee83ff191f
Regenerated, to recognize mingw.
...
llvm-svn: 16255
2004-09-08 20:38:05 +00:00
Brian Gaeke
f8d86008c5
recognize MinGW
...
llvm-svn: 16254
2004-09-08 20:32:11 +00:00
Misha Brukman
17e894523a
Disable libprofile as it breaks the build on Sparc (autoconf issues).
...
llvm-svn: 16253
2004-09-08 20:30:26 +00:00
Misha Brukman
6ea13f679b
Make file comment span the entire line
...
llvm-svn: 16249
2004-09-08 19:48:15 +00:00
Alkis Evlogimenos
371403193c
Use a shorter form to express implicit use/defs in FpGETRESULT and
...
FpSETRESULT.
llvm-svn: 16247
2004-09-08 18:29:31 +00:00
Alkis Evlogimenos
8b700215ed
A call instruction should implicitely define ST0 since the return
...
value is returned in that register. The pseudo instructions
FpGETRESULT and FpSETRESULT shold also have an implicity use and def
of ST0 repsecitvely.
llvm-svn: 16246
2004-09-08 16:54:54 +00:00
Brian Gaeke
acafb39cc3
This file does not need <iostream>, I think.
...
llvm-svn: 16245
2004-09-08 04:10:52 +00:00
Alkis Evlogimenos
adb2ce2962
Use a DenseMap for mapping reg->reg. This improves the LiveInterval
...
analysis running time from 2.7869secs to 2.5226secs on 176.gcc.
llvm-svn: 16244
2004-09-08 03:01:50 +00:00
Brian Gaeke
52a4e667e8
Use libtool, not mklib (which somehow doesn't get generated anymore)
...
llvm-svn: 16243
2004-09-07 19:03:35 +00:00
Reid Spencer
1a2f0432d5
Remove PAPIDIR, per brg
...
llvm-svn: 16240
2004-09-07 18:04:45 +00:00
Reid Spencer
05b9b53b79
bug 352 fixed
...
bug 257 fixed
llvm-svn: 16238
2004-09-07 17:52:38 +00:00
Brian Gaeke
64a0630d72
PAPI check has been moved to projects/reopt.
...
llvm-svn: 16237
2004-09-07 17:35:16 +00:00
Brian Gaeke
6e07318a38
PAPI is not used here.
...
llvm-svn: 16236
2004-09-07 17:34:34 +00:00
Reid Spencer
edd0b5b653
Removed this file as its contents are now in the m4 directory.
...
llvm-svn: 16234
2004-09-07 16:50:22 +00:00
Reid Spencer
ee0a2bee10
Remove variables and tests that were specific to the now defunct
...
test/Programs. These have been moved to llvm-test/autoconf/configure.ac and
llvm-test/Makefile.config.in
llvm-svn: 16231
2004-09-07 16:35:45 +00:00
Reid Spencer
90de7fbb3e
- Handle AC_CONFIG_SUBDIRS properly for existing "well known" projects
...
while still retaining the ability to configure unknown ones.
- Excise crud left over from when test/Projects was still part of the main
LLVM module. These removed tests are now all in
llvm-test/autoconf/configure.ac
llvm-svn: 16230
2004-09-07 16:26:18 +00:00
Reid Spencer
d7eeb3ae28
- Perform all validity checks before doing anything.
...
- Use the -I parameter to aclocal to tell it where the autoconf/m4
directory is located so it can find needed autoconf functions
llvm-svn: 16225
2004-09-07 16:00:48 +00:00
Reid Spencer
8118dba3e6
move AC_FUNC_ISINF and AC_FUNC_ISNAN to their own files.
...
llvm-svn: 16224
2004-09-07 14:23:53 +00:00
Reid Spencer
b15e69a09b
Individual autoconf function broken out of acincludes.m4. This change
...
per the recommended style guide for autoconf and so that individual
autoconf functions can more easily be shared across projects.
llvm-svn: 16223
2004-09-07 06:56:14 +00:00
Misha Brukman
33427efbe6
This is the documentation style sheet, not the one for the website.
...
llvm-svn: 16222
2004-09-07 05:09:22 +00:00
Misha Brukman
125255b9f6
Remove extraneous blank lines.
...
llvm-svn: 16205
2004-09-06 23:00:30 +00:00
Misha Brukman
a0194211d7
Add link to new howto on writing backends.
...
llvm-svn: 16204
2004-09-06 23:00:01 +00:00
Misha Brukman
25e6361939
How to write an LLVM backend, first draft.
...
llvm-svn: 16203
2004-09-06 22:58:13 +00:00
Misha Brukman
d48f54417f
* Profile-guided needs a hyphen
...
* Dead store elimination has been implemented
llvm-svn: 16202
2004-09-06 22:35:43 +00:00
Misha Brukman
a196c6859e
Reword to not use a link text `click here'.
...
llvm-svn: 16201
2004-09-06 20:58:44 +00:00
Reid Spencer
ec0c48e0f9
Modify the lines of code counting mechanism to use the new "countloc.sh"
...
utility. This avoids some problems with long line lengths and counting the
wrong things.
llvm-svn: 16200
2004-09-06 19:32:55 +00:00
Reid Spencer
2a91e7f660
Added a tool to more accurately count the lines of code. The previous
...
utility, getsrcs.sh suffered from two problems: (1) it generated command
lines too long for some platforms and (2) it searched the projects diretory
which now contains the llvm-test module (in nightly tester) but we don't
want to include the test code in our LOC calculation. This script should
be maintained as LLVM adds new top level directories that contain source
code.
llvm-svn: 16199
2004-09-06 19:06:27 +00:00
Nate Begeman
54bcf2db01
Add 64 bit divide instructions, and use them
...
llvm-svn: 16198
2004-09-06 18:46:59 +00:00
Reid Spencer
d5de72cd6b
Remove double paren use in system() function so that the command line can
...
be correctly interpreted by non-bash shells.
llvm-svn: 16194
2004-09-05 20:57:22 +00:00
Reid Spencer
075de23a3d
HTML 4.01 STRICT compliance.
...
Added missing definitions
Noted the difference between llvm/test and llvm-test
llvm-svn: 16193
2004-09-05 20:50:22 +00:00
Reid Spencer
ae21b0b836
Make section separator comments 80 chars, not 70.
...
Revise descriptions to account for llvm/test/Programs being moved to
the new CVS module llvm-test.
Incoporate an example of how to run the NightlyTest.pl script from a
shell script.
llvm-svn: 16192
2004-09-05 20:07:26 +00:00
Alkis Evlogimenos
58350a7435
Indent to 2 spaces and cleanup excess whitespace.
...
llvm-svn: 16188
2004-09-05 18:41:35 +00:00
Alkis Evlogimenos
fcb3f5197e
Indent to 2 spaces.
...
llvm-svn: 16187
2004-09-05 18:39:20 +00:00
Reid Spencer
7433dcdc0f
Remove configuration of test/Programs/* Makefiles.
...
llvm-svn: 16186
2004-09-05 17:48:32 +00:00
Reid Spencer
20f712853f
Added the configuration of the test/Makefile.
...
llvm-svn: 16185
2004-09-05 16:42:30 +00:00
Reid Spencer
fe4c30ec5b
Add HAS_U_INT64_T
...
llvm-svn: 16184
2004-09-05 16:41:11 +00:00
Reid Spencer
7650c06a45
Add LLVMC as a supported tool.
...
llvm-svn: 16183
2004-09-05 16:39:01 +00:00
Reid Spencer
ebb2334fa5
Per Bug 257
...
The "Programs" directory no longer lives here. It have been moved to its
own cvs module. Check it out into llvm/projects and configure/build it
there.
llvm-svn: 16182
2004-09-05 08:18:23 +00:00
Reid Spencer
2263203a94
Make the NightlyTest run tests out of projects/llvm-test instead of
...
llvm/test/Programs
llvm-svn: 16181
2004-09-05 07:58:10 +00:00
Misha Brukman
0d68e4cde6
Put a space between Data' and Structure' of DSA.
...
llvm-svn: 16179
2004-09-05 03:57:23 +00:00
Misha Brukman
3541004158
Remove the bit about this document being my `notes', it has matured since then.
...
llvm-svn: 16178
2004-09-05 03:24:34 +00:00
Misha Brukman
68d6f7fa22
Fix object/library filenames that have changed, clarify descriptions.
...
llvm-svn: 16177
2004-09-05 03:20:18 +00:00
Misha Brukman
adfa8b8ab4
Add DSA.
...
llvm-svn: 16176
2004-09-05 03:00:20 +00:00
Misha Brukman
73b6e9679b
* CSS was created to reduce re-specifying design styles: specify table cell
...
color once at the top, and do not repeat it 82 times
* Replace bright blue table border with gray, which is easier on the eyes and
matches the gray LLVM documentation color scheme
llvm-svn: 16175
2004-09-05 02:56:39 +00:00
Misha Brukman
175fdd4678
* Change PPC32AsmPrinter => PowerPCAsmPrinter since it is now shared between
...
Darwin and AIX and is not 32- or 64-bit specific
* Bring back PowerPC.td as a result, to make it use the `PowerPC' class name
* Adjust Makefile accordingly
llvm-svn: 16174
2004-09-05 02:42:44 +00:00
Misha Brukman
4acadb3af7
Renamed PPC32AsmPrinter.cpp => PowerPCAsmPrinter.cpp as the Darwin and AIX asm
...
printers are now unified into one file.
llvm-svn: 16173
2004-09-05 02:27:37 +00:00
Reid Spencer
738122ce2c
Make sure llvm-test doesn't build automatically so the nightly test can
...
finish its build phase without building and running all the tests.
llvm-svn: 16172
2004-09-04 23:07:57 +00:00
Reid Spencer
ab4df83228
Take one item off the "to do" list: implemented -O1 .. -O5 options for
...
optimization in stkrc instead of depending on "opt"
llvm-svn: 16169
2004-09-04 20:30:01 +00:00
Reid Spencer
8ea6e94df9
Convert makefile to use standard LLVM macros for tool names
...
Utilize new stkrc -O4 option for optimization during translation.
llvm-svn: 16168
2004-09-04 20:13:54 +00:00
Reid Spencer
950d604ef9
Make Stacker into a complete project with its own configuration.
...
llvm-svn: 16167
2004-09-04 19:48:50 +00:00
Reid Spencer
fbd716d621
Make the StackerCompiler and optimizing translator by running specific
...
optimizations after construction of the Module. The OptLevel argument
to the compile function controls the level of optimization.
llvm-svn: 16166
2004-09-04 19:07:32 +00:00
Reid Spencer
4771383e47
Make the Stacker compiler handle -O1 .. -O5 options so it is compliant with
...
the compiler driver interface as an optimizing translator. Also clean up
error message handling.
llvm-svn: 16165
2004-09-04 19:05:53 +00:00
Nate Begeman
4d847047a0
Include MathExtras.h to fix build breakage, thanks to Vladimir
...
llvm-svn: 16164
2004-09-04 14:51:26 +00:00
Nate Begeman
4bfceb1ed5
All PPC instructions are now auto-printed
...
32 and 64 bit AsmWriters unified
Darwin and AIX specific features of AsmWriter split out
llvm-svn: 16163
2004-09-04 05:00:00 +00:00
Reid Spencer
b9c90a2b02
Get rid of an un-needed and un-used GCCism. ATTR_DEPRECATED is used nowhere
...
in the LLVM source base.
llvm-svn: 16162
2004-09-03 23:38:25 +00:00
Reid Spencer
0ded30aec4
Clean up some "clean:" targets so they use $(VERB) and don't print anything
...
by default, like every other "clean" target in LLVM.
llvm-svn: 16161
2004-09-03 23:19:53 +00:00
Reid Spencer
c8ec13388b
Make tblgen's exception handling a little more robust by printing the
...
program name and also catching ...
llvm-svn: 16160
2004-09-03 23:17:54 +00:00
Reid Spencer
f68090d67f
Don't re-instantiate the std::string in catch block.
...
llvm-svn: 16159
2004-09-03 22:59:32 +00:00
Reid Spencer
3f4bdc96fe
Uh, changing in build dir and committing in src dir doesn't lead to correct
...
commits. Fix it so it actually works.
llvm-svn: 16158
2004-09-03 22:28:24 +00:00
Reid Spencer
6d28a14133
Correct the specification of the DIRS variable to not include the source
...
directory prefix, just the name of the subdirectory. This prevents the
makefile from trying to find makefiles (like Makefile.common) in the wrong
place.
llvm-svn: 16157
2004-09-03 22:25:40 +00:00
Misha Brukman
1a45021535
I was actually wrong in my "simplification".
...
llvm-svn: 16156
2004-09-03 19:46:43 +00:00
Misha Brukman
247b22c56d
Simplify check for uint64_t and u_int64_t
...
llvm-svn: 16155
2004-09-03 19:44:28 +00:00
Reid Spencer
6f21308b16
Provide correct definition of uint64_t for platforms that have only
...
u_int64_t defined.
llvm-svn: 16154
2004-09-03 19:37:39 +00:00
Misha Brukman
14a2b4628d
Order #includes alphabetically, local .h files first.
...
llvm-svn: 16153
2004-09-03 18:25:53 +00:00
Alkis Evlogimenos
a5c04ee50f
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Misha Brukman
cb46e66983
Regenerated after Reid's change for uint64_t/u_int64_t (patch by Bill Wendling)
...
llvm-svn: 16151
2004-09-02 23:02:30 +00:00
Reid Spencer
109524cae3
Make the text of this file a little more useful.
...
llvm-svn: 16150
2004-09-02 22:49:27 +00:00
Reid Spencer
ab2228ad7e
Don't just assume that either uint64_t or u_int64_t is available. Instead,
...
give preference to uint64_t if it exists. If not, check for u_int64_t. If
that doesn't exist either, then error out.
llvm-svn: 16149
2004-09-02 21:38:24 +00:00
Alkis Evlogimenos
9f82237f4e
Change the way we choose a free register: instead of picking the first
...
free allocatable register, we prefer the a free one with the most uses
of inactive intervals.
llvm-svn: 16148
2004-09-02 21:24:33 +00:00
Alkis Evlogimenos
095c3a80f3
Change the way we choose a free register: instead of picking the first
...
free allocatable register, we prefer the a free one with the most uses
of inactive intervals. This causes less spills and performes a bit
better compared to gcc:
Program | GCC/LLC (Before)| GCC/LLC (After)
164.gzip/164.gzip | 0.59 | 0.60
175.vpr/175.vpr | 0.57 | 0.58
176.gcc/176.gcc | 0.59 | 0.61
181.mcf/181.mcf | 0.94 | 0.95
186.crafty/186.crafty | 0.62 | 0.62
197.parser/197.parser | 0.89 | 0.88
252.eon/252.eon | 0.61 | 0.66
253.perlbmk/253.perlbmk | 0.79 | 0.84
254.gap/254.gap | 0.81 | 0.81
255.vortex/255.vortex | 0.92 | 0.93
256.bzip2/256.bzip2 | 0.69 | 0.69
300.twolf/300.twolf | 0.91 | 0.90
llvm-svn: 16147
2004-09-02 21:23:32 +00:00
John Criswell
d672a3dbe3
Added a check for u_int64_t, which is used by Interix.
...
llvm-svn: 16145
2004-09-02 18:44:44 +00:00
John Criswell
4fcd5c30fa
Added u_int64_t because some systems use that instead of uint64_t.
...
llvm-svn: 16144
2004-09-02 18:41:30 +00:00
Alkis Evlogimenos
dcbf893095
We don't need to sort the added vector as unhandled intervals are
...
stored in a binary heap.
llvm-svn: 16143
2004-09-02 18:00:38 +00:00
Nate Begeman
6173878304
Convert remaining X-Form and Pseudo instructions over to asm writer
...
llvm-svn: 16142
2004-09-02 08:13:00 +00:00
Alkis Evlogimenos
7063868e2a
Pull in definition of std::unary_function.
...
llvm-svn: 16140
2004-09-02 03:24:45 +00:00
Brian Gaeke
45fb84d68d
Unbreak build
...
llvm-svn: 16139
2004-09-02 03:24:08 +00:00
Brian Gaeke
c6e81f0fde
Back to compiling land for v8
...
llvm-svn: 16138
2004-09-02 02:37:43 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Alkis Evlogimenos
fae8f6a4fb
Be a bit more efficient when processing the active and inactive
...
lists. Instead of scanning the vector backwards, scan it forward and
swap each element we want to erase. Then at the end erase all removed
intervals at once. This doesn't save much: 0.08s out of 4s when
compiling 176.gcc.
llvm-svn: 16136
2004-09-01 22:52:29 +00:00
Alkis Evlogimenos
6a099d439e
Give a better assertion if we see a use before a def.
...
llvm-svn: 16135
2004-09-01 22:34:52 +00:00
Reid Spencer
a50cb6c8b9
Make sure <cassert> is included for platforms that don't include it via
...
other header files.
llvm-svn: 16134
2004-09-01 20:36:15 +00:00
Reid Spencer
f4e546b7aa
mkdtemp doesn't exist on Cygwin. Use tempnam & mkdir instead.
...
llvm-svn: 16133
2004-09-01 20:29:35 +00:00
Reid Spencer
9501b9b82b
Make CommandLine prefix error output with the name of the program.
...
llvm-svn: 16129
2004-09-01 04:41:28 +00:00
Reid Spencer
67c06d7df0
Initial commit for platform independent system configuration support.
...
llvm-svn: 16128
2004-08-31 18:13:52 +00:00
Reid Spencer
8c73e0041a
Add support for FreeBSD
...
llvm-svn: 16127
2004-08-31 18:09:35 +00:00
Reid Spencer
f2531a1568
Add support for Interix and FreeBSD
...
llvm-svn: 16126
2004-08-31 18:03:23 +00:00
Reid Spencer
b14809c51d
Actually define PreventCoreFiles in the sys namespace.
...
llvm-svn: 16125
2004-08-31 17:53:41 +00:00
Reid Spencer
4f48470d84
Add a new abstraction, SysConfig for platform independent system
...
configuration calls. Right now this just contains PreventCoreFiles so that
bugpoint can by platform independent.
llvm-svn: 16124
2004-08-31 17:43:29 +00:00
Alkis Evlogimenos
b84f0be5b1
Minor code clarity changes.
...
llvm-svn: 16123
2004-08-31 17:39:15 +00:00
Reid Spencer
67be17afbe
Fix a "test" botch.
...
Alphabetize the platform list
Install some AC_MSG_CHECKING/AC_MSG_RESULT pairs.
llvm-svn: 16122
2004-08-31 14:20:36 +00:00
Nate Begeman
a113d74e4c
convert M and MD form instructions to generated asm writer
...
llvm-svn: 16121
2004-08-31 02:28:08 +00:00
Reid Spencer
1daffa57c1
Recognize Interix systems as if they were SunOS and make sure we don't
...
attempt to configure for "Unknown" system types.
llvm-svn: 16120
2004-08-31 01:34:10 +00:00
Reid Spencer
79d4c3d5db
Move the GetTemporaryDirectory function from "generic Unix" to platform
...
specific.
llvm-svn: 16119
2004-08-30 21:46:55 +00:00
Reid Spencer
f98fff36ef
Add inclusion of assert.h
...
llvm-svn: 16118
2004-08-30 16:03:54 +00:00
Reid Spencer
47fc279160
Initial commit of a configuration file for compiling C++ programs with
...
the file name pattern *.cpp
llvm-svn: 16117
2004-08-30 06:32:24 +00:00
Reid Spencer
a681845e69
Implement the "setIncludePaths" and "setSymbolDefines" interface methods.
...
Revise token substitution to be a little faster.
Clean up exception throwing, make sure its always a std::string.
llvm-svn: 16116
2004-08-30 06:29:06 +00:00
Reid Spencer
1b389f09b4
Pass lists of -I and -D options through to the Compiler Driver.
...
Handle -g and -Wxxx for GCC compatibility
llvm-svn: 16115
2004-08-30 06:27:32 +00:00
Reid Spencer
cf2bc3d767
Add a blurb about exploiting the use of external storage.
...
llvm-svn: 16114
2004-08-30 05:56:51 +00:00
Nate Begeman
143cf94f92
Move yet more instructions over to being printed by the generated asm writer
...
llvm-svn: 16112
2004-08-30 02:28:06 +00:00
Reid Spencer
b55c0cbaee
Abbreviate the long descriptions which are now in docs/SystemLibrary.html.
...
llvm-svn: 16111
2004-08-30 02:03:51 +00:00
Reid Spencer
8aca0b494d
Reduce the number of arguments in the instruction builder and make some
...
improvements on instruction selection that account for register and frame
index bases.
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16110
2004-08-30 00:13:26 +00:00
Reid Spencer
9f64b91e27
Need to throw std::string not const char* if we want error messages to be
...
caught.
llvm-svn: 16109
2004-08-30 00:06:52 +00:00
Reid Spencer
94596c2102
Synchronize documentation of configuration items and substitutions with
...
current reality of llvmc implementation.
llvm-svn: 16108
2004-08-29 23:20:42 +00:00
Nate Begeman
6cdbd22245
Convert A-Form instructions to auto-generated asm writer
...
llvm-svn: 16107
2004-08-29 22:45:13 +00:00
Nate Begeman
434234f6d1
Register sizes should be specified in bits
...
llvm-svn: 16106
2004-08-29 22:03:40 +00:00
Nate Begeman
8cb6bd5f3c
Improvements to int->float cast code for PPC-64
...
llvm-svn: 16105
2004-08-29 22:02:43 +00:00
Nate Begeman
50d140ee3d
Must link against new LLVMsystem library
...
llvm-svn: 16104
2004-08-29 22:01:44 +00:00
Nate Begeman
a094704ff9
RemoveFileOnSignal is now in sys:: namespace
...
llvm-svn: 16103
2004-08-29 22:01:17 +00:00
Nate Begeman
c9dec3ae70
Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits
...
llvm-svn: 16102
2004-08-29 22:00:24 +00:00
Nate Begeman
168be7e43f
Update doxygen comment now that getSpillSize is supposed to return value in bits
...
llvm-svn: 16101
2004-08-29 21:59:26 +00:00
Reid Spencer
023637eb38
Add a declaration of environ global for Darwin
...
llvm-svn: 16100
2004-08-29 20:10:07 +00:00
Reid Spencer
a62e5a837f
Add a missing header file
...
llvm-svn: 16099
2004-08-29 20:02:28 +00:00
Reid Spencer
3311669903
Add an assert to cature null Operands. It is better to catch it here than
...
to SIGSEGV in the bowels of isa<...> later.
llvm-svn: 16098
2004-08-29 19:37:59 +00:00
Reid Spencer
6fca37236d
Signals support has been moved to lib/System
...
llvm-svn: 16097
2004-08-29 19:36:34 +00:00
Reid Spencer
efc94f5e72
Updated to create a link needed for correct lib/System compilation.
...
llvm-svn: 16096
2004-08-29 19:35:28 +00:00
Reid Spencer
90f56ee8b4
Add lib/System ahead of lib/Support in case there are operating system
...
issues.
llvm-svn: 16095
2004-08-29 19:33:21 +00:00
Reid Spencer
811c3c0edb
Link with LLVMsystem.a for operating system independence.
...
llvm-svn: 16094
2004-08-29 19:31:19 +00:00
Reid Spencer
9b129bea2e
RemoveFileOnErrorSignal is now in the llvm::sys namespace. Adjust
...
accordingly.
llvm-svn: 16093
2004-08-29 19:30:41 +00:00
Reid Spencer
74c3dc6927
Add the LLVMsystem.a library as it is now used for operating system
...
independence of the tool.
llvm-svn: 16092
2004-08-29 19:29:38 +00:00
Reid Spencer
e3263ecaf0
The functions in Signal.h are now in the llvm::sys namespace - adjust
...
llvm-svn: 16091
2004-08-29 19:28:55 +00:00
Reid Spencer
5b43fc9b53
add llvmc
...
llvm-svn: 16090
2004-08-29 19:27:34 +00:00
Reid Spencer
1b5b24f9fb
Convert llvmc to use the lib/System interface instead of directly
...
using Unix operating system calls.
llvm-svn: 16089
2004-08-29 19:26:56 +00:00
Reid Spencer
b8c572df56
Move a warning comment to where it should have been in the first place.
...
llvm-svn: 16088
2004-08-29 19:25:54 +00:00
Reid Spencer
bb5301eebf
Correct the vim: specification
...
llvm-svn: 16087
2004-08-29 19:24:53 +00:00
Reid Spencer
2f209c4452
Include some additional header files.
...
Fix the banner length.
llvm-svn: 16086
2004-08-29 19:24:20 +00:00
Reid Spencer
3d7a614ec7
Initial platform independent implementation of operating system concept
...
of "Signals" (cleanup after fatal errors).
llvm-svn: 16085
2004-08-29 19:22:48 +00:00
Reid Spencer
76b83a1869
Initial commit of an platform-indepdendent implementation for the
...
"Program" operating system concept (find and execute programs).
llvm-svn: 16084
2004-08-29 19:20:41 +00:00
Reid Spencer
21087b0f7e
Put the lib/System interface functions in llvm::sys namespace.
...
llvm-svn: 16083
2004-08-29 19:19:07 +00:00
Reid Spencer
a872cbe3bd
Create a link from $BUILD_OBJ_ROOT/lib/System/platform to
...
$BUILD_SRC_ROOT/lib/System/$build which gives us the ability to
configure the lib/System for the current type of operating system.
Also cleaned up some indentation.
llvm-svn: 16082
2004-08-29 19:18:05 +00:00
Nate Begeman
4483df8b63
Implement the following missing functionality in the PPC backend:
...
cast fp->bool
cast ulong->fp
algebraic right shift long by non-constant value
These changes tested across most of the test suite. Fixes Regression/casts
llvm-svn: 16081
2004-08-29 08:19:32 +00:00
Reid Spencer
023ff63545
Initial commit of the platform agnostic interface to finding and executing
...
programs.
llvm-svn: 16080
2004-08-29 05:29:35 +00:00
Reid Spencer
319b136522
Add a function to remove whole directorys on fatal signal.
...
Doxygenify function comments.
llvm-svn: 16079
2004-08-29 05:27:15 +00:00
Reid Spencer
6df221d50a
Revise the design of the Path concept per peer review. Too many changes to
...
note individually but these essence of it is to not derive from
std::string, clarify the interface, and provide better documentation.
There is now also (untested) implementations for AIX, Darwin, and SunOS.
llvm-svn: 16078
2004-08-29 05:24:01 +00:00
Alkis Evlogimenos
c227d73e5f
Remove dead code.
...
llvm-svn: 16077
2004-08-28 22:43:31 +00:00
Alkis Evlogimenos
e2d962e0fd
Now that LiveIntervals::addIntervalsForSpills is fixed, do not require
...
LiveVariables.
llvm-svn: 16076
2004-08-27 19:00:29 +00:00
Alkis Evlogimenos
8c67a3003e
Only update LiveVariables if it is available. addIntervalsForSpills
...
runs after the initial run of the live interval analysis.
llvm-svn: 16075
2004-08-27 18:59:22 +00:00
Alkis Evlogimenos
efd40bce75
Back out this change as it broke the build last night. This should be
...
investicated further as the linearscan variants don't really need
LiveVariables...
llvm-svn: 16074
2004-08-27 18:01:21 +00:00
Nate Begeman
c561fc3731
Back out change to divide getSpillSize by 8 until I figure out why it breaks x86, which has register sizes in bits.
...
llvm-svn: 16073
2004-08-27 16:48:24 +00:00
Nate Begeman
0c1e6804a1
Fix a typo in the bytecode format documentation
...
llvm-svn: 16072
2004-08-27 07:59:37 +00:00
Alkis Evlogimenos
11f0fc8eda
The linear scan variants do not require the LiveVariables analysis.
...
llvm-svn: 16071
2004-08-27 04:51:13 +00:00
Nate Begeman
fa2bf42539
Register sizes are in bits, not bytes
...
llvm-svn: 16070
2004-08-27 04:28:10 +00:00
Alkis Evlogimenos
7ebfde2be6
Add getLastBlock member. This is useful when growing a densemap keyed
...
on MachineBasicBlocks.
llvm-svn: 16069
2004-08-27 04:02:35 +00:00
Alkis Evlogimenos
390c820a82
Add MachineBasicBlock2IndexFunctor. This is useful for densemaps from
...
MachineBasicBlocks to an arbitrary type.
llvm-svn: 16068
2004-08-27 04:00:26 +00:00
Alkis Evlogimenos
60f33d4d66
Add size member function.
...
llvm-svn: 16067
2004-08-27 03:58:31 +00:00
Reid Spencer
6e8ffc3831
Add more content.
...
This isn't in reviewable shape yet, unless you're curious.
llvm-svn: 16066
2004-08-27 02:08:04 +00:00
Reid Spencer
7d0a123c3e
Bug 430 Fixed.
...
llvm-svn: 16065
2004-08-27 00:48:26 +00:00
Reid Spencer
366c457e08
Correctly compute the number of compaction tables.
...
llvm-svn: 16064
2004-08-27 00:43:51 +00:00
Reid Spencer
248c06dcea
Prevent an empty compaction table from being written to the bytecode file.
...
llvm-svn: 16063
2004-08-27 00:38:44 +00:00
Reid Spencer
3b789ad2b8
Add the CompactionTableIsEmpty function so that we can determine if a
...
CompactionTable really needs to be emitted. This is not a straight forward
computation, hence the need for a member function here.
llvm-svn: 16062
2004-08-26 22:32:00 +00:00
Alkis Evlogimenos
2c69803b61
Use newly added API in MRegisterInfo and don't expose the allocatable
...
register set anymore. Its users now use the MRegisterInfo API.
llvm-svn: 16061
2004-08-26 22:23:32 +00:00
Alkis Evlogimenos
542ac1cba7
Use newly added API in MRegisterInfo.
...
llvm-svn: 16060
2004-08-26 22:22:38 +00:00
Alkis Evlogimenos
8b5b3fdb50
Add getAllocatableSet() function.
...
llvm-svn: 16059
2004-08-26 22:21:04 +00:00
Reid Spencer
cb84e4351d
Provide some meta tags for this document.
...
llvm-svn: 16058
2004-08-26 20:44:00 +00:00
Reid Spencer
1d9e29bdc0
Add the default table related styles
...
llvm-svn: 16057
2004-08-26 20:43:21 +00:00
Reid Spencer
c948f9d9e9
Document the rational for the #include hierarchy.
...
llvm-svn: 16056
2004-08-26 18:52:52 +00:00
Reid Spencer
30e25f33f7
Fix a typo.
...
llvm-svn: 16055
2004-08-26 07:43:33 +00:00
Reid Spencer
3f3d1666ff
First cut at a README for lib/System explaining the #inclusion rules and
...
design criteria.
llvm-svn: 16054
2004-08-26 07:41:41 +00:00
Reid Spencer
b3f342c877
Add a README explaining the intended content of this directory.
...
llvm-svn: 16053
2004-08-26 05:58:20 +00:00
Alkis Evlogimenos
127c2aa7b2
Add default index functor (an identity functor). You could use a
...
vector directly to get the same functionality but using a DenseMap
makes the code more readable IMO.
llvm-svn: 16052
2004-08-26 03:37:28 +00:00
Brian Gaeke
7f00753f70
Previous checkin broke printf(%a) support for fp constants-- re-fix it.
...
llvm-svn: 16051
2004-08-25 19:37:26 +00:00
Brian Gaeke
35eb7aeae3
New version of Bill Wendling's PR33 patch.
...
llvm-svn: 16050
2004-08-25 19:00:42 +00:00
Reid Spencer
ebb91dcfe7
Fix documentation.
...
Make the library name LLVMsystem instead of just system so as to not
to be confused with other "system" libraries.
llvm-svn: 16049
2004-08-25 06:23:45 +00:00
Reid Spencer
814ba578ba
Initial implementation of the Path operating system concept.
...
llvm-svn: 16048
2004-08-25 06:20:07 +00:00
Reid Spencer
13ebda70ea
License for this library.
...
llvm-svn: 16047
2004-08-25 00:48:02 +00:00
Reid Spencer
135006cab1
Update to include tools/llvmc and lib/System as having additional copyright
...
licenses.
llvm-svn: 16046
2004-08-25 00:45:35 +00:00
Reid Spencer
6275eee949
License file for llvmc.
...
llvm-svn: 16045
2004-08-25 00:41:06 +00:00
Reid Spencer
01b22282fc
Document definitions and computations provided by llvm-bcanalyzer.
...
llvm-svn: 16044
2004-08-25 00:35:20 +00:00
Reid Spencer
44bc15064c
Insert declarations for two new functions that support the dependent
...
libraries feature.
llvm-svn: 16043
2004-08-24 22:55:34 +00:00
Reid Spencer
7a0348b163
Run the compilation actions before we attempt linking work.
...
Correctly implement the dependent libraries feature so that linked bytecode
files automatically include any dependent libraries they specify.
llvm-svn: 16042
2004-08-24 22:54:32 +00:00
Reid Spencer
3aac4f7d88
Add the directory specified by LLVM_LIB_SEARCH_PATH to the list of
...
directories to be searched during linking.
llvm-svn: 16041
2004-08-24 22:53:13 +00:00
Reid Spencer
f20d76d71e
Add dependent library support for Stacker. It now inserts "stkr_runtime" as
...
a dependent library.
llvm-svn: 16040
2004-08-24 22:52:01 +00:00
Reid Spencer
db0bdd69f5
Add a function that gets just the dependent libraries from a bytecode file.
...
Doxygenify comments.
llvm-svn: 16039
2004-08-24 22:49:07 +00:00
Reid Spencer
ce9b84a6af
Provide a method for wholesale extraction of the dependent libraries.
...
llvm-svn: 16038
2004-08-24 22:47:39 +00:00
Reid Spencer
79725deeb0
Add a wrapper for extraction of the dependent libraries from a bytecode
...
file.
llvm-svn: 16037
2004-08-24 22:46:20 +00:00
Reid Spencer
f341d29514
Rearrange output a little to make it nicer.
...
llvm-svn: 16036
2004-08-24 22:45:32 +00:00
Chris Lattner
7bf499c040
Add some details
...
llvm-svn: 16035
2004-08-24 18:53:39 +00:00
Reid Spencer
7c8d658efc
Added BURS.
...
llvm-svn: 16034
2004-08-24 18:34:10 +00:00
Reid Spencer
8d86dd6453
Get rid of error messages from CommandLine because -time-passes was
...
defined twice. We make use of the new TimePassesIsEnabled global boolean
value from Pass.h to access the value.
llvm-svn: 16033
2004-08-24 17:54:26 +00:00
Reid Spencer
2e4bfff37c
Give the -time-passes tool option a global storage location so that its
...
value can be discovered by the various LLVM tools.
llvm-svn: 16032
2004-08-24 17:52:35 +00:00
Chris Lattner
d8b5be4726
Fix a bug in a previous checkin of mine, correcting
...
Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing.llx and the
code size problem.
This bug prevented us from doing most register coallesces.
llvm-svn: 16031
2004-08-24 17:48:29 +00:00
Reid Spencer
ad4c8e330f
Add the examples directory to these scripts.
...
llvm-svn: 16030
2004-08-24 17:42:33 +00:00
Chris Lattner
57a2c3bad9
Modify testcase to merit a warning, though no warning is still printed!
...
llvm-svn: 16029
2004-08-24 17:40:02 +00:00
Reid Spencer
b1a014f786
Include the "examples" directory as optional.
...
Update configure script to configure the examples/Makefile
llvm-svn: 16028
2004-08-24 16:32:21 +00:00
Reid Spencer
a407007e07
Ensure that the examples get built.
...
llvm-svn: 16027
2004-08-24 16:31:01 +00:00
Reid Spencer
b26202f10c
Adjustments for changes in the configuration language.
...
llvm-svn: 16026
2004-08-24 14:24:14 +00:00
Reid Spencer
a86672b929
- Unify format of output messages
...
- All errors throw std::string
- Default output file name to a.out (if we're linking)
llvm-svn: 16025
2004-08-24 14:05:30 +00:00
Reid Spencer
5b902eba71
Link with bcreader and vmcore.
...
llvm-svn: 16024
2004-08-24 14:04:07 +00:00
Reid Spencer
a1049043d7
- Implement the %args% substitution
...
- Implement parsing of the .output={bytecode|assembly} item.
- Drop parsing support for translator.optimizes, translator.groks_dash_O,
optimizer.groks_dash_O, translator.output_is_asm, optimizer.output_is_asm
- Add parsing support for translator.output and optimizer.output
- Add optimizer.required parsing support
- Add linker.libs and linker.libpaths parsing support
- Fix error messages to list correct set of tokens expected.
- Rename FileReadable -> FileIsReadable (changed in CompilerDriver.cpp)
llvm-svn: 16023
2004-08-24 14:03:23 +00:00
Reid Spencer
ed9b3c4c20
- Alphabetize the list of token enumerators.
...
- Drop old tokens, insert new tokens
llvm-svn: 16022
2004-08-24 13:59:35 +00:00
Reid Spencer
20db3234bc
- Rename and rearrange for clarity
...
- Drop name tokens not used any more (GROKS_DASH_O)
- Rename OUTPUT_IS_ASM as OUTPUT and allow "bytecode" and "assembly" as
values of it.
- Simplify handleContext (now handleNameContext) arguments and ensure that
it returns OPTION tokens exactly as scanned.
llvm-svn: 16021
2004-08-24 13:58:37 +00:00
Reid Spencer
f62f89b3eb
- Remove unused GetSuffix function
...
- Renamed FileReadable -> FileIsReadable
- Remove support for GROKS_DASH_O; deferr it to %opts% substitution
- Require a -o option except in case of linking where it defaults to a.out
- Fix problem processing *.o and *.bc files.
- Ignore optimization phase if -emit-raw-code
- Correct the assembly generation phase to support -emit-native-code
- Implement dependent library lookup
llvm-svn: 16020
2004-08-24 13:55:17 +00:00
Reid Spencer
6ad2030f7a
Remove unneeded flags.
...
llvm-svn: 16019
2004-08-24 13:49:57 +00:00
Chris Lattner
dfa9dbceaa
Add -sse[,2,3] arguments to LLC
...
llvm-svn: 16018
2004-08-24 08:18:44 +00:00
Chris Lattner
61e6dbc761
Nuke commented out stuff
...
llvm-svn: 16017
2004-08-24 08:18:27 +00:00
Brian Gaeke
730d8d6259
bug fixed
...
llvm-svn: 16016
2004-08-24 07:43:48 +00:00
Brian Gaeke
1bd0804f6d
note pr#
...
llvm-svn: 16015
2004-08-24 07:28:45 +00:00
Brian Gaeke
75dca84c7f
This code is dodgy, but the guaranteed assertion failure doesn't help anything.
...
llvm-svn: 16014
2004-08-24 06:41:40 +00:00
Brian Gaeke
98aa7797c3
Fix bug in PhyRegAlloc::setCallInterferences() handling call through a
...
null pointer.
llvm-svn: 16013
2004-08-24 06:41:39 +00:00
Brian Gaeke
d315f43587
Revise head-of-file comment.
...
Eliminate some excess whitespace.
Fix bug in CallArgsDescriptor::get() handling call through a null pointer.
llvm-svn: 16012
2004-08-24 06:41:38 +00:00
Reid Spencer
be36a8cd2a
Actually get the URL to my notes page correct.
...
llvm-svn: 16011
2004-08-24 05:40:25 +00:00
Reid Spencer
ea6ad243e9
Correct my home page. Shorten my entry. Reference home page in description.
...
llvm-svn: 16010
2004-08-24 05:21:49 +00:00
Misha Brukman
2ace8cbb17
Change LVN -> Load-VN since that's the name of the cmdline switch
...
llvm-svn: 16009
2004-08-24 04:13:17 +00:00
Misha Brukman
4c70105c4c
Fix some grammar.
...
llvm-svn: 16008
2004-08-24 02:23:58 +00:00
Misha Brukman
00b21aef7b
Added DSE, LICM, LVN, PRE, SCCP, and SSA
...
llvm-svn: 16007
2004-08-24 01:57:02 +00:00
Chris Lattner
a88d667487
Do not use .xword and friends to emit zeros on V9. Apparently there are issues
...
with emitting .xwords when not on an 8-byte boundary (.xword 0 is not the
same as 8 .byte 0's). Because we do not know when or when we are not aligned,
just emit bytes like the old V9 asmprinter did.
llvm-svn: 16006
2004-08-24 00:26:11 +00:00
Brian Gaeke
adc0b83eec
A PR60 test case
...
llvm-svn: 16005
2004-08-23 20:49:33 +00:00
Misha Brukman
62a2c1fd7a
Document 'gmake install' vs. 'install-bytecode' (used for bytecode libs)
...
llvm-svn: 16004
2004-08-23 20:25:33 +00:00
Reid Spencer
5b81eea7a5
Moved small examples from /projects/SmallExamples to /examples.
...
Made the "ModuleMaker" into an example since its just one source file.
llvm-svn: 16003
2004-08-23 19:29:54 +00:00
Reid Spencer
b987b7cede
Moved the "SmallExamples" out of the /projects directory and into a new
...
/examples directory. History was maintained. These programs do not need to
be configured but things in /projects must be.
llvm-svn: 16002
2004-08-23 19:28:39 +00:00
Reid Spencer
300396971c
Fix Title line
...
Make the "DIRS" option descend any directory with a Makefile.
llvm-svn: 16001
2004-08-23 18:06:31 +00:00
Misha Brukman
39efd01983
Note: do not use GNU binutils under AIX, they're not stable.
...
llvm-svn: 16000
2004-08-23 17:54:45 +00:00
Reid Spencer
06afee6ede
Change the makefile back so it descends any directory with a Makefile.
...
llvm-svn: 15999
2004-08-23 17:47:16 +00:00
Reid Spencer
a628856d1e
Many useful corrections resulting from Chris Lattner's review. Thanks Chris!
...
Misha: you're next. :)
llvm-svn: 15996
2004-08-22 18:06:59 +00:00
Reid Spencer
f222ee6546
Provide support for retaining the version number found in a config file.
...
llvm-svn: 15995
2004-08-22 18:03:25 +00:00
Reid Spencer
3820372162
Add the VERSION token.
...
llvm-svn: 15994
2004-08-22 18:02:41 +00:00
Reid Spencer
a318822db2
Add support for version numbers.
...
Allow CRLF as a line terminator (as well as plain LF)
llvm-svn: 15993
2004-08-22 18:02:13 +00:00
Reid Spencer
ed09afc536
Shorten lines so this file can be used as the documentation example
...
directly. Remove -pre (experimental pass).
llvm-svn: 15992
2004-08-22 18:01:19 +00:00
Nate Begeman
1c57b4fa32
Kill a majority of unnecessary sign extensions for byte loads
...
llvm-svn: 15991
2004-08-22 08:10:15 +00:00
Nate Begeman
64ef0262bd
Don't hard code the offset of the saved R31 in functions with frame pointers
...
llvm-svn: 15990
2004-08-22 08:09:17 +00:00
Misha Brukman
5d41391185
Bytecode libraries are installed with `make install-bytecode'
...
llvm-svn: 15989
2004-08-21 23:40:49 +00:00
Reid Spencer
5a2dfbae3d
First complete version. The details of configuration are now correctly
...
stated. PLEASE REVIEW THIS DOCUMENT NOW! :)
llvm-svn: 15988
2004-08-21 22:37:42 +00:00
Reid Spencer
f39f66e3ef
Initial checkin of a pass to lower packed operations to scalars operations.
...
This also registers the pass with opt with a -lower-packed command line
option.
Patch contributed by Brad Jones.
llvm-svn: 15987
2004-08-21 21:39:24 +00:00
Reid Spencer
d6dd465326
Correct to change interface of the analyzer.
...
llvm-svn: 15986
2004-08-21 21:00:24 +00:00
Reid Spencer
2807accdc5
Bytecode Analyzer Cleanup:
...
- Rearrange output order to make more sense
- Make only the function level output count as "detailed"
- Output dump output directly to stream, don't buffer it.
- Fix counting of block sizes
- Implement new handlers for number of types, dependent libs, target triple
- Compute the size of block headers.
llvm-svn: 15985
2004-08-21 20:58:19 +00:00
Reid Spencer
9874c63314
Get rid of an extraneous local variable.
...
llvm-svn: 15984
2004-08-21 20:53:56 +00:00
Reid Spencer
6639333f20
Two Changes:
...
- Pass the output stream to the analyzer so it can write its output there
directly instead of buffering it.
- Don't pass a boolean to ParseBytecode because its not needed any more.
llvm-svn: 15983
2004-08-21 20:52:03 +00:00
Reid Spencer
8631bc3aaa
Add boolean file format flags in preparation for version 5 bytecode.
...
Remove the "processFunctions" boolean from ParseBytecode as it is no
longer needed. This is part of avoiding double reading of functions
when analyzing bytecode.
llvm-svn: 15982
2004-08-21 20:50:49 +00:00
Reid Spencer
191aa30ac1
Bytecode Reader Cleanup:
...
- provide the correct conversion for ModuleBlockID in read_block (a potential
bug but not actually exploited because reading module block ids doesn't
use read_block).
- install support for handleTypeList handler
- install support for handleDependentLibrary handler
- install support for handleTargetTriple handler
- clean up comments, output strings,
- ensure that processing function arguments doesn't SIGSEGV if one of the
arguments is a null pointer (yeah, it happened .. weird)
- prepare for version 5 bytecode by documenting what will change.
llvm-svn: 15981
2004-08-21 20:49:23 +00:00
Reid Spencer
c039e6301a
Dump the DependentLibsBlockID, its not a block, its just a list inside the
...
globals info block. Add an enumerator for getting the number of enumerators
so we can range check in assertions.
llvm-svn: 15980
2004-08-21 20:42:28 +00:00
Nate Begeman
45b0b7cd7c
Back out branchless SetCC code. While it helped a lot in some cases, it
...
hurt a lot in others. Instead, improve branching version of SetCC and
Select instructions. The old code will be in CVS should we ever need to
dig it up again.
llvm-svn: 15979
2004-08-21 20:42:14 +00:00
Reid Spencer
f9ce66b75a
Add new methods:
...
- get the total number of types in the global type list
- handle dependent libraries
- handle target triple
llvm-svn: 15978
2004-08-21 20:41:12 +00:00
Reid Spencer
83c307de5d
Bytecode Analyzer cleanup:
...
- don't save the "dump" output, just emit it
- record the bc version number
- record info about the dependent libraries and target triple
- use the correct enumeration as the index on the block size map
llvm-svn: 15977
2004-08-21 20:40:08 +00:00
Chris Lattner
8eab62ee0d
Alignment is now in bits.
...
llvm-svn: 15976
2004-08-21 20:15:25 +00:00
Chris Lattner
70efc8f8e1
Switch from bytes to bits for alignment.
...
Also, change GPRC for PPC32 to align on 32-bit boundary instead of 64-bit
llvm-svn: 15975
2004-08-21 20:14:40 +00:00
Chris Lattner
5f6556da45
Switch from bytes to bits for alignment for consistency
...
llvm-svn: 15974
2004-08-21 20:14:13 +00:00
Chris Lattner
7c98308013
Reduce uses of getRegClass
...
llvm-svn: 15973
2004-08-21 20:13:52 +00:00
Chris Lattner
a440d5b081
Convert regclass alignment from bytes to bites
...
llvm-svn: 15972
2004-08-21 20:13:09 +00:00
Chris Lattner
b7ddc73b45
Convert bytes to bits in alignment
...
llvm-svn: 15971
2004-08-21 20:09:46 +00:00
Chris Lattner
36ba4bb042
Register info alignment is in bits, frame object alignment is (currently) in
...
bytes.
llvm-svn: 15970
2004-08-21 20:04:59 +00:00
Chris Lattner
beadefde19
Make alignment be in bits, just like size is
...
llvm-svn: 15969
2004-08-21 20:00:36 +00:00
Chris Lattner
c1ba9fb6e1
Reduce uses of getRegClass
...
llvm-svn: 15968
2004-08-21 19:51:17 +00:00
Chris Lattner
f76ccd43b8
Now that we have per-register spill size/alignment info, remove more uses
...
of getRegClass
llvm-svn: 15967
2004-08-21 19:45:10 +00:00
Chris Lattner
a6d34d9e19
Infer the spillsize/alignment of a register based on the register classes
...
it is embedded into.
llvm-svn: 15966
2004-08-21 19:42:03 +00:00
Chris Lattner
d3244d9cec
Support "Methods" in register classes in CodgeGenRegisterClass
...
llvm-svn: 15965
2004-08-21 19:21:21 +00:00
Chris Lattner
f7833ba375
Fix warning
...
llvm-svn: 15964
2004-08-21 19:11:03 +00:00
Reid Spencer
04f4d52d9e
Examine the type code in the setcc class of instructions and if it
...
is a PackedType, throw an error. Temporary solution.
Patch contributed by Brad Jones.
llvm-svn: 15963
2004-08-21 16:11:02 +00:00
Nate Begeman
3ad3ad4f3f
Move XForm instructions over to the auto-generated asm writer
...
llvm-svn: 15962
2004-08-21 05:56:39 +00:00
Chris Lattner
2a86fab933
Start parsing register classes into a more structured form
...
llvm-svn: 15961
2004-08-21 04:05:00 +00:00
Chris Lattner
e34ae99942
Read in declared reg sizes
...
llvm-svn: 15960
2004-08-21 02:24:57 +00:00
Chris Lattner
6a92fdef72
Add two values
...
llvm-svn: 15959
2004-08-21 02:17:39 +00:00
Chris Lattner
8439f382b6
Fix a nasty bug that Nate ran into. In particular, instead of emitting a 2+MB
...
error message, print out:
llvm-link: error linking in 'g.2.rbc': Global Variable Collision on
' %struct.D_Reduction* %d_reduction_10_gram' - External linkage globals have
different initializers
That's a bit more concise, huh?
llvm-svn: 15958
2004-08-21 00:50:59 +00:00
Reid Spencer
7f9971f349
Change @ -> % in config files. @name@ might be needed for config files to
...
themselves be configured via autoconf so its not a good substitition syntax
for llvmc. Furthermore % is more llvmish :)
llvm-svn: 15957
2004-08-20 22:53:11 +00:00
Nate Begeman
abf3c4d787
remove some things from the todo list.
...
llvm-svn: 15956
2004-08-20 18:46:54 +00:00
Chris Lattner
f1cd650251
Do not register ppc64 yet, as it breaks the SparcV9 backend
...
llvm-svn: 15955
2004-08-20 18:09:18 +00:00
Chris Lattner
d0713e7664
quish a warning
...
llvm-svn: 15954
2004-08-20 18:07:39 +00:00
Reid Spencer
e203d35be4
Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll
...
Packed types need to be allowed in type statements too.
Patch provided by Brad Jones.
llvm-svn: 15953
2004-08-20 15:37:30 +00:00
Nate Begeman
1b1a784afa
Implement code to convert SetCC into straight line code where appropriate. Add necessary instructions for this transformation to the .td file.
...
llvm-svn: 15952
2004-08-20 09:56:22 +00:00
Reid Spencer
6f7407880f
Remove even the slightest chance of a race condition occurring :)
...
llvm-svn: 15951
2004-08-20 09:32:32 +00:00
Reid Spencer
a17a413cc1
Implement the correct search for configuration files. llvmc will now try
...
the following in this order:
1. -config-dir=/path/to/configs
2. LLVM_CONFIG_DIR=/path/to/configs
3. ~/.llvm/etc
4. $prefix/etc
5. /etc/llvm
llvm-svn: 15950
2004-08-20 09:24:07 +00:00
Reid Spencer
6ad57b2491
Add CONFIG_FILES so the language specific config files can be installed.
...
llvm-svn: 15949
2004-08-20 09:21:51 +00:00
Reid Spencer
cc51e7b358
Added a set of rules for installing configuration files. You can now say
...
CONFIG_FILES=a b c
in a Makefile and when you "make install" the files a b and c will get
installed into the $prefix/etc directory.
llvm-svn: 15948
2004-08-20 09:20:05 +00:00
Reid Spencer
fab530daf2
Implement Assembly support.
...
Consolidate platform-specific code into "sys" namespace.
llvm-svn: 15947
2004-08-20 09:14:05 +00:00
Reid Spencer
288adf1a3f
Changes resulting from change in autoconf/configure.in (rename a #define)
...
llvm-svn: 15946
2004-08-20 09:10:31 +00:00
Reid Spencer
3b65b0a67a
Actually name the #define correctly.
...
llvm-svn: 15945
2004-08-20 09:08:57 +00:00
Reid Spencer
d677a43b4b
Added various LLVM_* strings that are configured to provide the user's
...
choice of installation directories. Programs can then automagically know
where the installation files are located.
llvm-svn: 15944
2004-08-20 09:05:15 +00:00
Reid Spencer
4d5c2a98d3
Update after change to autoconf/configure.ac
...
llvm-svn: 15943
2004-08-20 09:03:57 +00:00
Reid Spencer
cf05c1256b
Change version 1.3 -> 1.4
...
Add basic installation directories as AC_DEFINES and AC_SUBST so they can
be used by llvm programs with a simple #include <Config/config.h>
llvm-svn: 15942
2004-08-20 09:03:12 +00:00
Chris Lattner
befb7361c6
New testcase that the vector support does not work with yet.
...
This is also designed to make lowering a bitch :)
llvm-svn: 15941
2004-08-20 08:34:27 +00:00
Reid Spencer
f98e3c9358
Added various tests in support of Packed Types.
...
Tests kindly provided by Brad Jones.
llvm-svn: 15940
2004-08-20 06:06:43 +00:00
Reid Spencer
b6388f725e
Added a test case for packed types. Test case kindly provided by Brad Jones
...
llvm-svn: 15939
2004-08-20 06:02:24 +00:00
Brian Gaeke
0220904e7a
Packed types, brought to you by Brad Jones
...
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Reid Spencer
2b4b4a577a
Avoid building samples. Require explicit list of directory names to build.
...
llvm-svn: 15937
2004-08-20 01:49:59 +00:00
Chris Lattner
ab8d172df2
Make people explicitly add dirs to this. Remove ModuleMaker as it currently
...
does not build (it must be configured before it will work)
llvm-svn: 15936
2004-08-20 01:11:16 +00:00
Chris Lattner
40d0204067
Only build project dirs with a Makefile in them. This should fix the
...
problem where Depend or Debug directories prevent CVS from nuking an obsolete
project dir
llvm-svn: 15935
2004-08-20 01:07:54 +00:00
Chris Lattner
615ffb84fa
Bug fixed
...
llvm-svn: 15934
2004-08-20 00:36:23 +00:00
Chris Lattner
14c198d09a
If we are linking two global variables and they have the same size, do not
...
spew warnings, even if the types don't match.
llvm-svn: 15933
2004-08-20 00:30:39 +00:00
Misha Brukman
8f12956327
Fix opcodes being printed in caps (the more general fix may be `AsmWriter')
...
llvm-svn: 15932
2004-08-19 21:56:12 +00:00
Reid Spencer
9251cb2ecd
Actually let it compile after file name changes.
...
llvm-svn: 15931
2004-08-19 21:52:49 +00:00
Misha Brukman
170943a795
Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.
...
Thanks to Nate Begeman for pointing this out.
llvm-svn: 15930
2004-08-19 21:51:19 +00:00
Misha Brukman
f73c87b36c
LR needs to be saved at 16-byte offset on a 64-bit arch
...
llvm-svn: 15929
2004-08-19 21:36:14 +00:00
Misha Brukman
f35b35a926
On 64-bit PowerPC, pointers are 8 bytes, so parameter area offset is 48, not 24
...
llvm-svn: 15928
2004-08-19 21:34:05 +00:00
Reid Spencer
b32e350931
Moved ConfigData -> Configuration
...
llvm-svn: 15927
2004-08-19 21:17:53 +00:00
Misha Brukman
75e987d0b8
This PHI has 4 additional operands, not 2.
...
llvm-svn: 15926
2004-08-19 21:00:12 +00:00
Reid Spencer
90b057bf2a
Moved these files to "SmallExamples" directory.
...
llvm-svn: 15925
2004-08-19 20:16:42 +00:00
Reid Spencer
f30f28e05f
Add the fibonacci example provided by Valery Khamenya.
...
llvm-svn: 15924
2004-08-19 20:10:04 +00:00
Reid Spencer
7d12179af1
Make the SmallExamples programs compile in their new home.
...
llvm-svn: 15923
2004-08-19 20:09:14 +00:00
Misha Brukman
a26a61aa18
Use the appropriate 64-bit register description file.
...
llvm-svn: 15922
2004-08-19 19:36:57 +00:00
Reid Spencer
01ea7aed59
Fixed the test to actually run correctly.
...
llvm-svn: 15921
2004-08-19 19:23:28 +00:00
Reid Spencer
cdce60cae2
Add a test case test test 1.3 alignment removal and to test a regression
...
on disassembly speed (where SlotMachine was being recomputed on each
getSlot() call).
llvm-svn: 15920
2004-08-19 19:11:57 +00:00
Misha Brukman
a5543ac5fb
Fix more remaining 32-bit vestiges of PowerPC
...
llvm-svn: 15919
2004-08-19 18:49:58 +00:00
Misha Brukman
2ff719f74f
Fix another vestige of the 32-bit PowerPC backend.
...
llvm-svn: 15918
2004-08-19 16:50:30 +00:00
Misha Brukman
714d166c22
Correct character prepended to global symbols ('.'), use Mangler consistently
...
llvm-svn: 15917
2004-08-19 16:33:56 +00:00
Misha Brukman
0010ea3042
* Eliminate global base register, r2 is used for that on AIX/PowerPC
...
* Fix bug from 32-bit PowerPC days of 2-register long split
llvm-svn: 15916
2004-08-19 16:29:25 +00:00
Misha Brukman
6c4a085286
Wrap long lines.
...
llvm-svn: 15915
2004-08-19 16:28:30 +00:00
Nate Begeman
d5c6380015
Convert casts that will have no effect into move instructions.
...
llvm-svn: 15914
2004-08-19 08:07:50 +00:00
Nate Begeman
e4e6d92d1d
Clean up floating point instruction selection.
...
Change int->float cast code to put conversion constants in constant pool.
Shorten code sequence for constant pool fp loads.
Remove LOADLoDirect/LOADLoIndirect psuedo instructions and tweak asmwriter
llvm-svn: 15913
2004-08-19 05:20:54 +00:00
Reid Spencer
dc20389b5c
Implement many new features for llvmc. This is the first version that will
...
actually execute actions and it is been shown to optimize a Stacker program
llvm-svn: 15912
2004-08-19 04:49:47 +00:00
Misha Brukman
b3b5890213
Instead of int64_t, overload itostr with `long long' parameter.
...
This appeases both SparcV9 and 64-bit PowerPC.
llvm-svn: 15910
2004-08-18 22:56:12 +00:00
Reid Spencer
3cff8a04ef
Correct a link, add a TOC entry.
...
llvm-svn: 15909
2004-08-18 20:17:05 +00:00
Reid Spencer
375d78428c
Provided opcode definitions.
...
Clarified documentation of symbol tables.
Clarified definition of slot numbers.
Added the http-equiv meta tag for HTML 4.01 strict compliance.
Adjusted line lengths.
Differentiated between "type slot" and "value slot" everywhere.
ispelled it.
llvm-svn: 15908
2004-08-18 20:06:19 +00:00
Brian Gaeke
1936ce708d
M_DUMMY_PHI_FLAG is no longer used to distinguish V9::PHI. Get rid of it and
...
its TargetInstrInfo accessor.
llvm-svn: 15907
2004-08-18 20:04:28 +00:00
Brian Gaeke
7593525fcd
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
llvm-svn: 15906
2004-08-18 20:04:24 +00:00
Brian Gaeke
de44bc018a
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
Also, squash a use of TargetInstrInfo::isNop().
llvm-svn: 15905
2004-08-18 20:04:21 +00:00
Chris Lattner
1ea6d207ce
Convert to the new MachineFunctionInfo interface
...
llvm-svn: 15904
2004-08-18 18:13:37 +00:00
Chris Lattner
663bf7e765
All targets are now allowed to have their own MachineFunctionInfo objects,
...
also, make getInfo do some checking and cast to the appropriate concrete type.
llvm-svn: 15903
2004-08-18 18:13:16 +00:00
Brian Gaeke
dddd639059
M_PSEUDO_FLAG is no longer used. Get rid of it and its accessor.
...
llvm-svn: 15902
2004-08-18 17:44:17 +00:00
Brian Gaeke
b8183ff647
The SparcV9 target no longer uses any pseudoinstructions (SETSW, SETUW,
...
SETX) or M_PSEUDO_FLAG.
llvm-svn: 15901
2004-08-18 17:44:16 +00:00
Brian Gaeke
2fbe85b1f3
The Create*Const methods don't need to pass around a TargetMachine reference.
...
Other minor cleanups.
llvm-svn: 15900
2004-08-18 17:44:15 +00:00
Brian Gaeke
c03556f67e
Doxygenify some comments.
...
Clean up cpReg2MemMI and cpMem2RegMI, and doxygenify comments.
Get rid of their uses of SETSW, which is a pseudoinstruction. We can't
JIT-compile pseudoinstructions at the moment. This was blowing up 252.eon/jit,
which has some HUGE stack frames.
Reduce the uses of constantFitsInImmedField().
Consolidate some assertions.
llvm-svn: 15899
2004-08-18 17:44:14 +00:00
Chris Lattner
12754fe6b3
Switch V9 over to using the AsmPrinter base class to do its constant printing
...
Massive thanks to the brg miester for doing the testing. :)
llvm-svn: 15898
2004-08-18 05:29:08 +00:00
Chris Lattner
10262ab3f1
Rename var
...
llvm-svn: 15897
2004-08-18 02:22:55 +00:00
Chris Lattner
ddc7e4863d
Alkis pointed out that this is not a character (we actually support strings)
...
and as such, we should use self revealing names. Hey, makes sense to me!
llvm-svn: 15896
2004-08-18 02:22:34 +00:00
Chris Lattner
6a9f355b1b
new method
...
llvm-svn: 15895
2004-08-17 21:38:51 +00:00
Chris Lattner
ea75199996
Add support for targets without a .zero directive
...
llvm-svn: 15894
2004-08-17 21:38:40 +00:00
Misha Brukman
faa6e51d6e
This file is no longer used.
...
llvm-svn: 15893
2004-08-17 20:23:33 +00:00
Chris Lattner
2501f5852a
Start using alignment output routines from AsmPrinter.
...
Changes to make this more similar to the X86 asmprinter
Fix overalignment of globals.
llvm-svn: 15891
2004-08-17 19:26:03 +00:00
Chris Lattner
866b58d2ef
Start using alignment output routines from AsmPrinter.
...
Changes to make this more similar to the ppc asmprinter
llvm-svn: 15890
2004-08-17 19:25:42 +00:00
Chris Lattner
32ac814f29
Add an overload
...
llvm-svn: 15889
2004-08-17 19:17:10 +00:00
Chris Lattner
1d35c1673f
Add support for alignment
...
llvm-svn: 15888
2004-08-17 19:14:29 +00:00
Chris Lattner
0c2ab8a9d4
Add a new helper method to get log2(type alignment)
...
llvm-svn: 15887
2004-08-17 19:13:00 +00:00
Chris Lattner
65066a40ea
Add punctuation, add a new method
...
llvm-svn: 15886
2004-08-17 19:12:44 +00:00
Misha Brukman
a9ed31a50b
Add itostr(long) for our furry 64-bit friends.
...
llvm-svn: 15885
2004-08-17 18:08:52 +00:00
Misha Brukman
0f2e2f7e5b
Ultra-doxygenify some function header comments.
...
llvm-svn: 15884
2004-08-17 17:52:36 +00:00
Chris Lattner
caf3f3e970
Check constant expression validity more strictly
...
llvm-svn: 15883
2004-08-17 17:28:46 +00:00
Chris Lattner
fca2833838
Work around PR424 for old c/c++ frontends.
...
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Chris Lattner
cc21bfd809
Print comments with ;
...
llvm-svn: 15881
2004-08-17 16:27:26 +00:00
Chris Lattner
da6beac0ff
Use a designated comment character when printing comments.
...
llvm-svn: 15880
2004-08-17 16:27:05 +00:00
Chris Lattner
db00f45936
Allow targets to specify a comment character
...
llvm-svn: 15879
2004-08-17 16:26:36 +00:00
Reid Spencer
9f093edf1a
Added a *very* initial cut at a lexicon for LLVM. I don't plan to write
...
this whole thing. Just use the pattern in the file to add entries as you
think of them. This will be really helpful for newbies to advanced compiler
optimization techniques such as myself.
llvm-svn: 15878
2004-08-17 09:38:50 +00:00
Reid Spencer
be6a243b9f
Documented (Java properties file like) syntax of config file format
...
Added definitions for some of the configuration items.
Made the document HTML 4.01 Strict compliant.
Ran ispell on it.
llvm-svn: 15877
2004-08-17 09:18:37 +00:00
Reid Spencer
cde8a13a1c
Add a reference to the ComilerDriver documentation.
...
llvm-svn: 15876
2004-08-17 08:01:57 +00:00
Reid Spencer
c3e436427b
Bytecode File Format Changes:
...
- File format version number bumped to 4
- Writer will now align nothing
- Reader now only expects alignment for version 3 or earlier
llvm-svn: 15875
2004-08-17 07:45:14 +00:00
Reid Spencer
0b85d03b57
Documented the removal of alignment in version 4 bytecode files (version 3
...
was released with LLVM 1.3). Alignment of fields can add severe size to
certain kinds of functions (those with lots of long format instructions) so
we decided to do away with alignment altogether in this bc version.
llvm-svn: 15874
2004-08-17 07:43:43 +00:00
Nate Begeman
0818541631
Re-fix hiding the Frame Pointer from the register allocator in functions
...
that have a frame pointer. This change fixes Burg. In addition, make
the necessary changes to floating point code gen and constant loading after
Chris Lattner's fixes to the asm writer. These changes fix MallocBench/gs
llvm-svn: 15873
2004-08-17 07:17:44 +00:00
Chris Lattner
b3739ceb6e
Use the AsmPrinter emitGlobalConstant.
...
llvm-svn: 15872
2004-08-17 06:48:55 +00:00
Chris Lattner
404bc3dcaf
Add missing \t
...
llvm-svn: 15871
2004-08-17 06:48:34 +00:00
Chris Lattner
9fa0fc4d5e
Add support for targets that have .quad, drop extra tab inserted
...
llvm-svn: 15870
2004-08-17 06:48:16 +00:00
Chris Lattner
f97bce7214
Use the emitGlobalConstant defined in AsmPrinter
...
llvm-svn: 15869
2004-08-17 06:37:12 +00:00
Chris Lattner
8452a1f6df
Implement emitGlobalConstant
...
llvm-svn: 15868
2004-08-17 06:36:49 +00:00
Chris Lattner
81e514b8a6
Add some hooks
...
llvm-svn: 15867
2004-08-17 06:36:27 +00:00
Chris Lattner
ac253447d3
New, more general, interface.
...
llvm-svn: 15866
2004-08-17 06:07:43 +00:00
Chris Lattner
104bfb7576
Allow an arbitrary prefix
...
llvm-svn: 15865
2004-08-17 06:06:54 +00:00
Chris Lattner
c16a4a7b55
Allow an arbitrary prefix.
...
llvm-svn: 15864
2004-08-17 06:06:37 +00:00
Chris Lattner
6d42cbd71a
We now allow targets to use any prefix they want for global symbols. Lets
...
hear it for ".".
llvm-svn: 15863
2004-08-17 06:06:19 +00:00
Misha Brukman
9254441cdf
Rewrite targets/rules to generate files for just PowerPC or PPC{32,64}
...
llvm-svn: 15862
2004-08-17 05:11:54 +00:00
Misha Brukman
4eab7f3d5b
Register classes are target-dependent
...
llvm-svn: 15861
2004-08-17 05:10:31 +00:00
Misha Brukman
851a54656a
#include <map> is not necessary here
...
llvm-svn: 15860
2004-08-17 05:09:39 +00:00
Misha Brukman
fd2df5afab
`PowerPC' is no longer a real target
...
llvm-svn: 15859
2004-08-17 05:09:10 +00:00
Misha Brukman
38c61506a8
Move variables and methods which need PPC{32,64}* distinction to subclasses
...
llvm-svn: 15858
2004-08-17 05:08:44 +00:00
Misha Brukman
ba7fe16dbf
No need for an `is64bit' flag
...
llvm-svn: 15857
2004-08-17 05:06:47 +00:00
Misha Brukman
fe3e46a0b3
PowerPCInstrInfo and PowerPCRegisterInfo have gone away; they are replaced
...
by 32- and 64-bit customized files, named appropriately.
llvm-svn: 15856
2004-08-17 05:05:00 +00:00
Misha Brukman
de4fc10733
Consistently name passed with 32 or 64 in their name
...
llvm-svn: 15855
2004-08-17 05:02:58 +00:00
Misha Brukman
68ede7e9ba
PowerPCRegisterInfo no longer takes a bool to differentiate 32 vs 64 bits
...
llvm-svn: 15854
2004-08-17 05:02:18 +00:00
Misha Brukman
d61283f347
The PowerPCInstrInfo class has gone away.
...
llvm-svn: 15853
2004-08-17 05:00:46 +00:00
Misha Brukman
0674182457
PowerPCInstrInfo has gone away, PPC32 and PPC64 share opcodes.
...
llvm-svn: 15852
2004-08-17 04:58:50 +00:00
Misha Brukman
ac0ae7c215
PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC
...
llvm-svn: 15851
2004-08-17 04:57:37 +00:00
Misha Brukman
116f9277f6
PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*
...
llvm-svn: 15850
2004-08-17 04:55:41 +00:00
Chris Lattner
c9d99efdd3
Do not #include files into the llvm namespace
...
llvm-svn: 15849
2004-08-17 03:08:28 +00:00
Reid Spencer
f8a18099fb
Correct the comments in the symbol table writer to reflect reality.
...
llvm-svn: 15848
2004-08-17 02:59:02 +00:00
Chris Lattner
a8fbbc0ec3
Print float constants as 4 byte values.
...
Also, fix endianness problems when cross compiling from little-endian host.
llvm-svn: 15847
2004-08-17 02:48:44 +00:00
Chris Lattner
bc9372bf77
Make sure to put an _ prefix on all identifiers!
...
Also, add some (currently disabled) code to print float's as 32-bits.
llvm-svn: 15846
2004-08-17 02:29:00 +00:00
Chris Lattner
07e78f177a
Some asmwriters want an _ prefix
...
llvm-svn: 15845
2004-08-17 02:28:26 +00:00
Chris Lattner
278f1cb3d4
Some asmweriters want an _ prefix
...
llvm-svn: 15844
2004-08-17 02:28:12 +00:00
Reid Spencer
9a91081c51
Technical Corrections (thanks to Robert Mykland):
...
- Define the "opcode" data type and reference the Instruction.def file
- Clean up the definition of symtab by indicating that it is composed of
two llists.
- Fix some broken links.
llvm-svn: 15843
2004-08-17 00:49:03 +00:00
Chris Lattner
5491774934
More changes to make PPC32 and X86 more similar
...
llvm-svn: 15842
2004-08-16 23:38:36 +00:00
Chris Lattner
b4f1f71bf0
Minor changes to make the diff be nothing against the X86 version
...
llvm-svn: 15841
2004-08-16 23:30:16 +00:00
Chris Lattner
0ced90583d
Finegrainify namespacification
...
Start using the AsmPrinter base class to factor out a bunch of code
llvm-svn: 15840
2004-08-16 23:25:21 +00:00
Chris Lattner
9cf46456cb
Start using the AsmPrinter to emit our first class constants. This also
...
drops our half-assed support for cygwin, which noone uses and doesn't work
anyway.
llvm-svn: 15839
2004-08-16 23:16:06 +00:00
Chris Lattner
6a8e0f511b
Initial implementation of the asmprinter base class
...
llvm-svn: 15838
2004-08-16 23:15:22 +00:00
Chris Lattner
7e3f28fcdf
Moved this file out of lib/CodeGen
...
llvm-svn: 15837
2004-08-16 22:38:02 +00:00
Chris Lattner
2cb145ceb5
Hacks to make the MachineFunction class be able to delete the MFI object
...
without knowing anything about it.
llvm-svn: 15836
2004-08-16 22:37:18 +00:00
Chris Lattner
95de5ddbbd
Code moved out of lib/CodeGen/MachineFunction.cpp
...
llvm-svn: 15835
2004-08-16 22:36:54 +00:00
Chris Lattner
a1d7802e3c
Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
...
llvm-svn: 15834
2004-08-16 22:36:34 +00:00
Chris Lattner
bb9aa25a52
This file is moving to lib/Target/SparcV9
...
llvm-svn: 15833
2004-08-16 22:36:10 +00:00
Chris Lattner
5217efc496
Fit into 80 lines, add a gross hack for MachineFunctionInfo
...
llvm-svn: 15832
2004-08-16 22:35:26 +00:00
Chris Lattner
359c83fb5a
These files now live in lib/Target/SparcV9
...
llvm-svn: 15831
2004-08-16 21:56:15 +00:00
Chris Lattner
9fb30a4257
Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
...
llvm-svn: 15830
2004-08-16 21:55:02 +00:00
Chris Lattner
491a52cf22
Nuke this file
...
llvm-svn: 15829
2004-08-16 21:36:40 +00:00
Chris Lattner
d75c0438a1
Fold MachineInstrAnnot.cpp into this file
...
llvm-svn: 15828
2004-08-16 21:36:31 +00:00
Chris Lattner
a752fceb91
Spaces arg!
...
llvm-svn: 15827
2004-08-16 20:20:46 +00:00
Reid Spencer
f57b8b9e70
Correct the documentation for the module block header which uses the long
...
format instead of the short format used in other blocks.
Discrepancy noted by Robert Mykland. Thanks Robert!
llvm-svn: 15826
2004-08-16 19:24:36 +00:00
Misha Brukman
30cee49933
Move these files (which are dependent on VMCore) into VMCore
...
llvm-svn: 15825
2004-08-16 19:04:36 +00:00
Brian Gaeke
a7ae92436f
Update and consolidate comments. Remove some excess whitespace.
...
llvm-svn: 15824
2004-08-16 18:27:25 +00:00
Brian Gaeke
224704fc6f
Add a note that people shouldn't use MachineFunctionInfo.
...
llvm-svn: 15823
2004-08-16 18:27:24 +00:00
Reid Spencer
f03b47c7f1
Bug 422 fixed.
...
llvm-svn: 15822
2004-08-16 16:48:19 +00:00
John Criswell
23c656d050
Merged in RELEASE_13. This fixes the Command Guide link when browsing the
...
files from a local filesystem.
llvm-svn: 15821
2004-08-16 15:19:02 +00:00
John Criswell
07c0f37f5b
Updated for 1.3.
...
llvm-svn: 15820
2004-08-16 15:17:40 +00:00
John Criswell
1e87b97d38
Merged in release_13 branch.
...
llvm-svn: 15819
2004-08-16 14:51:33 +00:00
Reid Spencer
b0ac8c48a6
Fix PR422.
...
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.
llvm-svn: 15818
2004-08-16 07:46:33 +00:00
Reid Spencer
8fac94b882
Back out include/llvm/System changes until a satisfactory solution can
...
be determined.
llvm-svn: 15817
2004-08-16 07:10:09 +00:00
Reid Spencer
bd2642e7e8
Remove lib/System contents until a satisfactory solution can be
...
provided.
llvm-svn: 15816
2004-08-16 07:08:38 +00:00
Reid Spencer
263bbbd2df
Back out dependencies on lib/System/Path.h
...
llvm-svn: 15815
2004-08-16 07:06:38 +00:00
Reid Spencer
efd6e266fa
Fix definitions to match tool's actual capabilities.
...
llvm-svn: 15814
2004-08-16 07:06:13 +00:00
Chris Lattner
a10ed3b1ce
Bug fixed
...
llvm-svn: 15813
2004-08-16 05:46:57 +00:00
Chris Lattner
712de8407d
Believe it or not, this was broken in LLVM 1.3
...
llvm-svn: 15812
2004-08-16 05:39:19 +00:00
Chris Lattner
12324753f2
Fix a bug that caused the pass to go into infinite loops on trivial testcases.
...
This is fallout of the Bug 122 changes.
llvm-svn: 15811
2004-08-16 05:38:02 +00:00
Chris Lattner
f2e9ea2106
There is no need for a cast here
...
llvm-svn: 15810
2004-08-16 05:09:58 +00:00
Nate Begeman
ab6b08d937
Update the current state of the world
...
llvm-svn: 15809
2004-08-16 05:06:43 +00:00
Nate Begeman
a6808b8efc
Fix typo of the word 'implicit' I made resolving a CVS conflict. Whoops!
...
llvm-svn: 15808
2004-08-16 02:12:49 +00:00
Nate Begeman
dabf0a52c0
Fix frame pointer handling:
...
Reserve R0 in store/load from stack slot for building >32k offsets from SP
or FP. This also requires we use R11 rather than R0 for holding the LR
value we want to save or restore. Also, tell the register allocator not
to use R31 (our FP) in functions that have a frame pointer. These changes
fix Burg.
llvm-svn: 15807
2004-08-16 01:52:12 +00:00
Nate Begeman
8b44a07246
Fix mismatched adjust down/up of SP in functions that contain variable
...
sized allocas.
llvm-svn: 15806
2004-08-16 01:50:22 +00:00
Chris Lattner
8af61ddb96
Use CodeGenRegister class to make reading in of register information more
...
systematic.
llvm-svn: 15805
2004-08-16 01:10:21 +00:00
Chris Lattner
b7b70480e1
Add initial support for register and register class representation.
...
Obviously this is not done.
llvm-svn: 15804
2004-08-16 01:09:52 +00:00
Chris Lattner
a9e2ab44a1
Flags and TSFlags were (thankfully) never used, so remove them. But wait,
...
not so fast, add some fields for spill slot size and alignment
llvm-svn: 15803
2004-08-16 01:07:53 +00:00
Chris Lattner
3361c5da6f
Add a special case for argc,argv
...
llvm-svn: 15802
2004-08-16 01:07:04 +00:00
Chris Lattner
b1cad0b3bc
Don't pass too many arguments into runFunction
...
llvm-svn: 15801
2004-08-16 01:05:35 +00:00
Chris Lattner
163c326060
Scrub all LLVM 1.3 stuff, changing over to 1.4. Add info about PR419,
...
which is now fixed.
llvm-svn: 15800
2004-08-16 00:20:18 +00:00
Chris Lattner
3f9d4ed43d
Finally, add support for calling arbitrary non-varargs functions.
...
llvm-svn: 15799
2004-08-16 00:14:18 +00:00
Chris Lattner
58d0582548
Handle all nullary functions, of any valid return type.
...
llvm-svn: 15798
2004-08-15 23:53:06 +00:00
Chris Lattner
23f7c98016
Fine, go all of the way and check that the argument types are correct as well.
...
llvm-svn: 15797
2004-08-15 23:39:59 +00:00
Chris Lattner
8f8f72f21b
These only really work if returning int or void
...
llvm-svn: 15796
2004-08-15 23:34:48 +00:00
Chris Lattner
30411e0973
Switch to using the JIT now that it can directly call zeroarg functions
...
llvm-svn: 15795
2004-08-15 23:31:57 +00:00
Chris Lattner
47380e3ba0
Handle zero arg function case
...
llvm-svn: 15794
2004-08-15 23:31:43 +00:00
Chris Lattner
a349c03347
Simplify code a bit, print error message always instead of asserting.
...
llvm-svn: 15793
2004-08-15 23:29:50 +00:00
Chris Lattner
f56b692110
Simplify code, make it print the constructed module before it is run.
...
llvm-svn: 15792
2004-08-15 23:21:54 +00:00
Chris Lattner
26971f4bc2
V8 never used the instrselectorgenerator
...
llvm-svn: 15791
2004-08-15 23:07:40 +00:00
Chris Lattner
291de48b59
isdummyclass goes away
...
llvm-svn: 15790
2004-08-15 23:04:35 +00:00
Chris Lattner
0bbf7005f5
Remove awareness of isDummyClass
...
llvm-svn: 15789
2004-08-15 23:04:13 +00:00
Chris Lattner
aa6a8abc02
disable all of the pattern isel stuff
...
llvm-svn: 15788
2004-08-15 23:02:34 +00:00
Chris Lattner
1d088db15e
Disable the pattern isel
...
llvm-svn: 15787
2004-08-15 23:02:17 +00:00
Chris Lattner
9f714c8d35
Include .td and .txt files in the greps. This will allow me to find symbols in
...
them, and also count them in the LOC of LLVM for the nightly tester.
llvm-svn: 15786
2004-08-15 22:54:31 +00:00
Chris Lattner
26516544a1
Documentation like this doesn't belong here, and now we have the commandguide
...
llvm-svn: 15785
2004-08-15 22:53:20 +00:00
Chris Lattner
5943c5078c
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 15784
2004-08-15 22:23:09 +00:00
Chris Lattner
f26b1fd35d
Add new TargetRegisterClass::contains method
...
llvm-svn: 15783
2004-08-15 22:19:38 +00:00
Chris Lattner
48a3b942ae
Insertion methods now return void instead of #instrs inserted. Also, use
...
more powerful forms of BuildMI to concisify the code
llvm-svn: 15782
2004-08-15 22:15:56 +00:00
Chris Lattner
772f0d4106
Code insertion methods now return void instead of #instrs inserted
...
llvm-svn: 15781
2004-08-15 22:15:30 +00:00
Chris Lattner
a0b38d3cb1
Code insertion methods now return void instead of an int.
...
llvm-svn: 15780
2004-08-15 22:15:11 +00:00
Chris Lattner
6199899483
The insertion method returns void now
...
llvm-svn: 15779
2004-08-15 22:14:31 +00:00
Chris Lattner
a246668640
Implement a long overdue FIXME, by changing these methods to return void.
...
llvm-svn: 15778
2004-08-15 22:14:19 +00:00
Chris Lattner
afe8e34940
Nuke ifdef'd out code
...
llvm-svn: 15777
2004-08-15 22:03:57 +00:00
Chris Lattner
2b5d9a0270
Remove helper method
...
llvm-svn: 15776
2004-08-15 22:02:36 +00:00
Chris Lattner
c66f27fd29
Stop using CreateStackObject(RegClass*)
...
llvm-svn: 15775
2004-08-15 22:02:22 +00:00
Chris Lattner
98de1d7795
These methods no longer take a TargetRegisterClass* operand.
...
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Chris Lattner
3e0ea4593a
Eliminate the RegisterClass argument, since it can easily be derived from
...
the regno
llvm-svn: 15773
2004-08-15 21:55:29 +00:00
Alkis Evlogimenos
4922e2e8ef
Make this compile on gc 3.4.1 (static_cast to non-const type was not
...
allowed).
llvm-svn: 15766
2004-08-15 09:18:55 +00:00
Reid Spencer
f58e8d3d0c
More Functionality:
...
- cleaned up lexical scanner
- added support for "lang.optN" configuration items
- added temporary file support (ala lib/System)
- corrected logic for deciding which phases to run
- consolidated the Action and ActionPattern classes
llvm-svn: 15765
2004-08-15 08:19:46 +00:00
Reid Spencer
82737a1e8b
Initial configuration files (to be installed) for ll (LLVM Assembly) and
...
st (Stacker) source files. These versions for testing/review only.
llvm-svn: 15764
2004-08-15 08:16:12 +00:00
Reid Spencer
bc51b928d6
Initial implementations of the ErrorCode and Path concepts for Linux.
...
llvm-svn: 15763
2004-08-15 08:14:33 +00:00
Reid Spencer
b708529d80
First version of a class to represent the notion of an operating system
...
path to a file or directory and some rudimentary operations on them.
llvm-svn: 15762
2004-08-15 08:13:01 +00:00
Reid Spencer
87d050f59b
First version of a class to represent operating system and lib/System
...
error codes in a platform independent way.
llvm-svn: 15761
2004-08-15 08:12:14 +00:00
Nate Begeman
78862c3717
Add future optimization opportunity
...
llvm-svn: 15760
2004-08-15 06:43:10 +00:00
Nate Begeman
373744c6dc
Fix float to int codepath by always allocating 8 bytes for the target of a double store; optimize cmplwi generation.
...
llvm-svn: 15759
2004-08-15 06:42:28 +00:00
Chris Lattner
7dfaac4300
Zimm16 is now dead. Its entry is not removed from the enum, to avoid having
...
to renumber everything. Similar elimination should be applied to other
operand enum values that are only used to format printing in the .s file.
llvm-svn: 15755
2004-08-15 05:48:47 +00:00
Chris Lattner
da2e56fb0c
Convert all of the DForm_6* operations, which makes all of the Zimm16 users
...
dead.
llvm-svn: 15754
2004-08-15 05:46:14 +00:00
Chris Lattner
ae0c2c7583
Add i1imm
...
llvm-svn: 15753
2004-08-15 05:37:00 +00:00
Chris Lattner
94ab6273b6
Reenable the CCRC
...
llvm-svn: 15752
2004-08-15 05:31:15 +00:00
Chris Lattner
8a796858da
Convert the DForm_4 over to the asmprintergen
...
llvm-svn: 15751
2004-08-15 05:20:16 +00:00
Nate Begeman
abc8173b18
Remove dead code
...
llvm-svn: 15750
2004-08-15 00:31:02 +00:00
Chris Lattner
ec1cc1b861
Print mflr using the asmwriter generator
...
llvm-svn: 15749
2004-08-14 23:27:29 +00:00
Chris Lattner
b08d2a2a11
Update to no longer take MF as an argument
...
llvm-svn: 15748
2004-08-14 22:57:22 +00:00
Chris Lattner
6ffa501d9f
Make the AsmWriter a first-class tblgen object. Allow targets to specify
...
name of the generated asmwriter class, and the name of the format string.
llvm-svn: 15747
2004-08-14 22:50:53 +00:00
Nate Begeman
412602d7d9
Replace PowerPCPEI.cpp with target independant PrologEpilogInserter
...
llvm-svn: 15746
2004-08-14 22:16:36 +00:00
Nate Begeman
0c8c0346f8
Add support for frame pointers, and large offsets from stack and frame pointers. Adopt elimination of MachineFunction& arg from eliminateFrameIndex.
...
llvm-svn: 15745
2004-08-14 22:13:58 +00:00
Misha Brukman
9b5bdf9216
Use the `tools-only' target to avoid getting warnings about not having a CFE.
...
llvm-svn: 15744
2004-08-14 22:13:33 +00:00
Nate Begeman
9c7ddc3e21
Add indexed forms of load doubleword and load word algebraic for 64 bit targets
...
llvm-svn: 15743
2004-08-14 22:12:20 +00:00
Nate Begeman
caeb78e720
Fix handling of FP constants with single precision, and loading of internal linkage function addresses
...
llvm-svn: 15742
2004-08-14 22:11:38 +00:00
Nate Begeman
0ad7f813d8
Add initial support for using the generated asm writer. Also, fix FP constant printing to always print 8 byte intializers. Move printing of LinkOnce stubs.
...
llvm-svn: 15741
2004-08-14 22:09:10 +00:00
Nate Begeman
8536df7dbe
Add generation of asm writer from tablegen files to Makefile
...
llvm-svn: 15740
2004-08-14 22:06:38 +00:00
Nate Begeman
a4da0d6294
Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent
...
llvm-svn: 15739
2004-08-14 22:05:10 +00:00
Nate Begeman
1b0142d54e
Eliminate MachineFunction& argument from eliminateFrameIndex in SparcV9 target
...
llvm-svn: 15738
2004-08-14 22:03:29 +00:00
Nate Begeman
7f1f81511d
Eliminate MachineFunction& argument from eliminateFrameIndex in Skeleton target
...
llvm-svn: 15737
2004-08-14 22:01:38 +00:00
Nate Begeman
386d940f5c
Elminiate MachineFunction& argument from eliminateFrameIndex
...
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner
6139134715
Implement test/Regression/Transforms/GlobalConstifier/phi-select.llx
...
This allows more globals to be marked constant, particularly global arrays.
llvm-svn: 15735
2004-08-14 20:57:17 +00:00
Chris Lattner
22bef5979a
New testcase that the constifier should handle
...
llvm-svn: 15734
2004-08-14 20:47:56 +00:00
Chris Lattner
aad412256f
New basic testcase for the constifier
...
llvm-svn: 15733
2004-08-14 20:44:09 +00:00
Reid Spencer
9d68ff6ef0
Converted to use flex for tokenizing input so we can use an easier to
...
understand recursive descent parser, we can easily handle more syntax
variety, and we can more easily change the configuration items accepted.
llvm-svn: 15732
2004-08-14 09:37:15 +00:00
Reid Spencer
e37345e78f
Fix header commentary.
...
llvm-svn: 15729
2004-08-13 20:25:54 +00:00
Reid Spencer
cf7c2fe153
Additional functionality. This version handles option parsing and parameter
...
subsitution correctly for at least .ll and .st files. There's still a long
way to go (i.e. this isn't worth of review yet).
llvm-svn: 15728
2004-08-13 20:22:43 +00:00
Reid Spencer
fdda7ace31
First version of a utility internal to llvmc that handles the parsing and
...
construction of configuration data for compiler front ends.
llvm-svn: 15727
2004-08-13 20:21:22 +00:00
Reid Spencer
c0f1b21c7b
Added description of usage of the getPosition() option on cl::opt and
...
cl::list.
llvm-svn: 15726
2004-08-13 20:19:14 +00:00
Reid Spencer
2027a6ffdc
Allow any cl::opt to use the method getPosition() to retrieve the option's
...
absolute position on the command line. Similarly allow any cl::list to
use the method getPosition(n) to retrieve the absolute position of the nth
option in the list. This provides support for two things: (a) options like
-l that are actually positional and their order of occurrence matters when
they are intermixed with positional arguments like "a.o"; and (b) options
like -x LANG which affect only the positional arguments that come after
the option. In both cases, knowing the absolute position of a given option
helps.
llvm-svn: 15725
2004-08-13 19:47:30 +00:00
Nate Begeman
6e5010d935
Remove an unneeded header and forward declaration
...
llvm-svn: 15722
2004-08-13 09:33:17 +00:00
Nate Begeman
5bf9bfe398
Fix siod by switching BoolTy to byte rather than int until CFE changes for
...
Darwin. Also, change asm printer to output proper stubs for external
functions whose address is passed as an argument to aid in bugpointing.
llvm-svn: 15721
2004-08-13 09:32:01 +00:00
Nate Begeman
420213f3c5
Fix 177.mesa compilation, don't use floating point regs for base addresses!
...
llvm-svn: 15720
2004-08-13 04:45:14 +00:00
Nate Begeman
2f1d849271
Fix llc crasher compiling siod by giving BuildMI the correct number of arguments
...
llvm-svn: 15719
2004-08-13 03:56:49 +00:00
Chris Lattner
43a080e65b
Add another test
...
llvm-svn: 15718
2004-08-13 03:27:48 +00:00
Chris Lattner
56273827b1
If we are extracting a block that has multiple successors that are the same
...
block (common in a switch), make sure to remove extra edges in successor
blocks. This fixes CodeExtractor/2004-08-12-BlockExtractPHI.ll and should
be pulled into LLVM 1.3 (though the regression test need not be, as that
would require pulling in the LoopExtract.cpp changes).
llvm-svn: 15717
2004-08-13 03:27:07 +00:00
Chris Lattner
f06b043204
When we code extract some stuff, leave the codeRepl block in the place where
...
the extracted code was, instead of putting it at the end of the function
llvm-svn: 15716
2004-08-13 03:17:39 +00:00
Chris Lattner
664d88cbd0
New testcase, which causes the block extractor to barf
...
llvm-svn: 15715
2004-08-13 03:08:54 +00:00
Chris Lattner
7386e6333d
"extract" the block extractor pass from bugpoint (haha)
...
llvm-svn: 15714
2004-08-13 03:05:17 +00:00
Chris Lattner
df2ae522b1
Add a pass
...
llvm-svn: 15713
2004-08-13 03:03:44 +00:00
Chris Lattner
889d346e6e
Add value mapper support for select constant exprs. This should fix a bug
...
Nate ran into when bugpointing siod. This fix should go into LLVM 1.3
llvm-svn: 15712
2004-08-13 02:43:19 +00:00
Nate Begeman
2e8bfa2364
Longs are in one register on PowerPC 64; use appropriate instructions to operate on them.
...
llvm-svn: 15711
2004-08-13 02:20:47 +00:00
Nate Begeman
765cb5f844
Add some more 64 bit instructions we need for the PowerPC-64 ISel to the tablegen files
...
llvm-svn: 15710
2004-08-13 02:19:26 +00:00
Misha Brukman
20f9a62596
Wrap long lines and try to fill the 80 chars per line so that we don't have too
...
many short lines.
llvm-svn: 15706
2004-08-12 20:16:08 +00:00
Misha Brukman
810f89d11d
* Escape &, <, and >
...
* Wrap code in <tt> or for larger blocks, <div class="doc_text">
* Wrap lines at 80 cols
llvm-svn: 15705
2004-08-12 19:58:43 +00:00
Chris Lattner
c8cb695f83
Add description of packed type support.
...
Patch contributed by Brad Jones!
llvm-svn: 15704
2004-08-12 19:12:28 +00:00
Chris Lattner
012301c37e
Add information on adding a derived type to LLVM, patch contributed by
...
Brad Jones!
llvm-svn: 15703
2004-08-12 19:06:24 +00:00
Chris Lattner
d6dffa3f6c
Allow targets to specify particular stack slots that certain physregs must
...
be spilled into.
llvm-svn: 15702
2004-08-12 19:01:55 +00:00
Chris Lattner
8885c4e2a5
Split saveCallerSavedRegisters into two methods for clarity, and add comments.
...
Add support for targets that must spill certain physregs at certain locations.
Patch contributed by Nate Begeman, slightly hacked by me.
llvm-svn: 15701
2004-08-12 19:01:14 +00:00
Chris Lattner
f9db6ff94b
Remove dead methods
...
llvm-svn: 15698
2004-08-12 18:37:15 +00:00
Chris Lattner
907a360b11
Fix warning
...
llvm-svn: 15697
2004-08-12 18:36:28 +00:00
Chris Lattner
5ff05d724f
Instead of a virtual method call, lets try a direct constant reference
...
llvm-svn: 15696
2004-08-12 18:29:05 +00:00
Chris Lattner
6411ff3c83
Virtual method calls are overrated
...
llvm-svn: 15695
2004-08-12 18:20:55 +00:00
Chris Lattner
df86f30815
Virtual method calls are overrated.
...
llvm-svn: 15694
2004-08-12 18:20:41 +00:00
Chris Lattner
e64f008fe3
Forward substitute some constants into their users
...
llvm-svn: 15693
2004-08-12 18:10:18 +00:00
Chris Lattner
eb02313413
The only target that uses this code (v9) always has argsOnStackHaveFixedSize
...
set to true (obviously)
llvm-svn: 15692
2004-08-12 18:06:35 +00:00
Chris Lattner
b0ac422db5
Remove dead methods
...
llvm-svn: 15691
2004-08-12 17:58:27 +00:00
Chris Lattner
e843032834
When we want a constant, just use it, instead of calling through layers of
...
virtual methods and register name mapping functions
llvm-svn: 15690
2004-08-12 17:56:01 +00:00
Reid Spencer
4260a38ac3
Convert to unix line format.
...
llvm-svn: 15689
2004-08-12 17:52:47 +00:00
Misha Brukman
af77fe4097
Disable PPC64 backend by default because LLC cannot choose automatically between
...
SparcV9 and PowerPC64 without target triples, since they are both 64-bit
big-endian targets.
llvm-svn: 15688
2004-08-12 17:16:43 +00:00
Chris Lattner
cde351ee30
This patch makes the inliner refuse to inline functions that have alloca
...
instructions in the body of the function (not the entry block). This fixes
test/Programs/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c
and test/Programs/External/SPEC/CINT2000/176.gcc on zion.
This should obviously be pulled into 1.3.
llvm-svn: 15684
2004-08-12 05:45:09 +00:00
Misha Brukman
52a4abc299
* Correct 64-bit version: blr 1 (not 0)
...
* BuildMI() can build 0-param instructions (e.g., NOP)
llvm-svn: 15681
2004-08-12 03:30:03 +00:00
Misha Brukman
5d967b3c5e
* Print out full names for non-GPR or -FPR registers
...
* BuildMI() really *does* handle 0 params!
llvm-svn: 15680
2004-08-12 03:28:47 +00:00
Chris Lattner
7f1c7ede5b
Fix code extraction of unwind blocks. This fixed bugs that bugpoint can
...
run into. This should go into 1.3
llvm-svn: 15679
2004-08-12 03:17:02 +00:00
Misha Brukman
58040a63ee
* Pointers are 8 bytes, hence cLong type on 64-bit PPC
...
* Fix loading of GlobalValues
llvm-svn: 15678
2004-08-12 02:53:01 +00:00
Misha Brukman
6f2e67a726
Eliminate special-casing 14-bit immediate load/store opcodes
...
llvm-svn: 15677
2004-08-12 02:51:38 +00:00
Chris Lattner
a7ba90e672
Hrm, this pass didn't compile. This bugfix should go into 1.3!
...
llvm-svn: 15676
2004-08-12 02:44:23 +00:00
Chris Lattner
af32dfa0f4
If the block extractor fails, actually emit the bc file that failed to extract
...
llvm-svn: 15675
2004-08-12 02:36:50 +00:00
Misha Brukman
5098bd5499
Correctly print out ASCII literal strings on AIX
...
llvm-svn: 15674
2004-08-12 01:01:13 +00:00
Misha Brukman
345399b06e
Mark R2 as available for allocation on Darwin/PPC32, but not AIX/PPC64
...
llvm-svn: 15673
2004-08-12 00:10:01 +00:00
Misha Brukman
c94c0f75f4
* Move AIX into the llvm namespace to be accessed from RegisterInfo
...
* Mark InstrInfo with 32 vs. 64 bit flag
* Enable the 64-bit isel and asm printer
llvm-svn: 15672
2004-08-11 23:47:08 +00:00
Misha Brukman
aea37d65c8
Set the is64bit flag and propagate it to PowerPCRegisterInfo
...
llvm-svn: 15671
2004-08-11 23:45:43 +00:00
Misha Brukman
39f7533b40
* Set the is64bit boolean flag in PowerPCRegisterInfo
...
* Doubles are 8 bytes in 64-bit PowerPC, and use the general register class
* Use double-word loads and stores for restoring from/saving to stack
* Do not allocate R2 if compiling for AIX
llvm-svn: 15670
2004-08-11 23:44:55 +00:00
Misha Brukman
c2a043488a
64-bit instruction selector and AIX-specific 64-bit asm printer
...
llvm-svn: 15669
2004-08-11 23:42:15 +00:00
Misha Brukman
d7344dc9bd
Fix names of 64-bit CMP*D* opcodes, add LWA and STD* opcodes
...
llvm-svn: 15668
2004-08-11 23:33:34 +00:00
Misha Brukman
78c1dcfc3e
Add support for 64-bit CMPDI, CMPLDI, and CMPLD opcodes
...
llvm-svn: 15667
2004-08-11 20:56:14 +00:00
Misha Brukman
28beda9ba4
Add doubleword load/store (64-bit only).
...
llvm-svn: 15665
2004-08-11 15:54:36 +00:00
Misha Brukman
81f6ee8070
Simple hand-coded tests to aid in early development of backends, along with a
...
Makefile to run ad-hoc tests easily.
llvm-svn: 15664
2004-08-11 14:16:34 +00:00
Misha Brukman
7224ee1e4c
Hyphenate ##-bit and remove first-person from comments.
...
llvm-svn: 15663
2004-08-11 13:35:44 +00:00
Nate Begeman
f17ea0f7b7
Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm printer.
...
llvm-svn: 15662
2004-08-11 07:40:04 +00:00
Chris Lattner
6f0291792e
Fix a case where constantexprs could leak into the PPC isel.
...
llvm-svn: 15661
2004-08-11 07:34:50 +00:00
Chris Lattner
eb34c59930
Remove a bunch of ad-hoc target-specific flags that were only used by the
...
old asmprinter.
llvm-svn: 15660
2004-08-11 07:12:04 +00:00
Chris Lattner
085663c4ec
Remove a dead method
...
llvm-svn: 15659
2004-08-11 07:07:14 +00:00
Chris Lattner
d1bee6ee12
Finally, the entire instruction asmprinter is now generated from tblgen, woo!
...
llvm-svn: 15658
2004-08-11 07:02:04 +00:00
Chris Lattner
a0bafce127
Add asmprintergen support for the last X86 instruction that needs it: pcrelative calls.
...
llvm-svn: 15657
2004-08-11 06:59:12 +00:00
Chris Lattner
5edeb20bbb
This file is long dead
...
llvm-svn: 15656
2004-08-11 06:55:12 +00:00
Chris Lattner
5f4b65e57d
Scrunch memoperands, add a few more for floating point memops
...
Eliminate the FPI*m classes, converting them to use FPI instead.
llvm-svn: 15655
2004-08-11 06:50:10 +00:00
Chris Lattner
b975636f71
Move hacks up
...
llvm-svn: 15654
2004-08-11 06:09:55 +00:00
Chris Lattner
6dd0474edd
Make FPI take asm string and operand list
...
llvm-svn: 15653
2004-08-11 05:54:16 +00:00
Chris Lattner
c52899c3c7
Nuke the Im*i* patterns, by asmprintergenifying all users.
...
llvm-svn: 15652
2004-08-11 05:31:07 +00:00
Chris Lattner
f5c767038a
X86 instructions that read-modify-write memory are not LLVM two-address instructions.
...
llvm-svn: 15651
2004-08-11 05:07:25 +00:00
Chris Lattner
0d7bc2c5da
Get rid of the Im8, Im16, Im32 classes, converting more instructions over to
...
asmprintergeneration
llvm-svn: 15650
2004-08-11 04:31:00 +00:00
Chris Lattner
baa2ecb798
Fix minor bug in previous checkin
...
llvm-svn: 15649
2004-08-11 04:08:36 +00:00
Nate Begeman
7526da6ead
Fix 255.vortex by using getClassB instead of getClass
...
llvm-svn: 15648
2004-08-11 03:30:55 +00:00
Chris Lattner
4dfadc05e6
Remove dead method
...
llvm-svn: 15647
2004-08-11 02:26:39 +00:00
Chris Lattner
09ee05bcdf
Convert asmprinter to new style of instruction printer
...
Start asmprintergen'ifying machine instrs with memory operands.
llvm-svn: 15646
2004-08-11 02:25:00 +00:00
Chris Lattner
c1904dd38f
change how we invoke the printer. Instead of passing in the MO directly,
...
pass in the MI, operand number, and the type of the operand.
llvm-svn: 15645
2004-08-11 02:23:23 +00:00
Chris Lattner
3bc477a237
Start parsing more information from the Operand information
...
llvm-svn: 15644
2004-08-11 02:22:39 +00:00
Chris Lattner
101f3fea82
Remove special case hacks
...
llvm-svn: 15643
2004-08-11 01:53:58 +00:00
Chris Lattner
6bd2d26b56
Fill out immediate operand classes, add a new Operand class
...
llvm-svn: 15642
2004-08-11 01:53:34 +00:00
Chris Lattner
4456da6a4c
Fix InstCombine/2004-08-10-BoolSetCC.ll, a bug that is miscompiling
...
176.gcc. Note that this is apparently not the only bug miscompiling gcc
though. :(
llvm-svn: 15639
2004-08-11 00:50:51 +00:00
Chris Lattner
39884511ee
New testcase that instcombine is getting wrong
...
llvm-svn: 15637
2004-08-11 00:49:50 +00:00
Misha Brukman
e67a212267
Breaking up the PowerPC target into 32- and 64-bit subparts, Part III: the rest.
...
llvm-svn: 15636
2004-08-11 00:11:25 +00:00
Misha Brukman
284086aa4a
Breaking up the PowerPC target into 32- and 64-bit subparts: Part II: 64-bit.
...
llvm-svn: 15635
2004-08-11 00:10:41 +00:00
Misha Brukman
d022a5ac5a
Breaking up the PowerPC target into 32- and 64-bit subparts, Part I: 32-bit.
...
llvm-svn: 15634
2004-08-11 00:09:42 +00:00
Misha Brukman
3decf86fb7
Implement new constructor.
...
llvm-svn: 15633
2004-08-10 23:10:25 +00:00
Misha Brukman
8ca3b7568a
Add new constructor.
...
llvm-svn: 15632
2004-08-10 23:10:21 +00:00
Misha Brukman
dad438bfb9
Renamed PPC32 (namespace for regs, opcodes) to PPC to include 64-bit targets
...
llvm-svn: 15631
2004-08-10 22:47:03 +00:00
Misha Brukman
0b9444e536
* Fix file header to use tablegen emacs mode instead of c++
...
* Wrap long line to 80 cols
llvm-svn: 15630
2004-08-10 21:24:44 +00:00
Chris Lattner
ce5fb7db1c
This is purely a formatting patch that gets us closer to the mecca of fitting
...
X86InstrInfo.td into 80 columns
llvm-svn: 15629
2004-08-10 21:21:30 +00:00
Chris Lattner
116fc25d79
Drop the first argument of FPI, and asmprinterify fxch
...
llvm-svn: 15628
2004-08-10 21:02:13 +00:00
Misha Brukman
422d0fadf1
Deleted commented-out code as we now get namespace directly, add comments
...
llvm-svn: 15627
2004-08-10 20:54:58 +00:00
Nate Begeman
63be70d8f2
Fix casts of float to unsigned long
...
Replace STDX (store 64 bit int indexed) with STFDX (store double indexed)
Fix latent bug in indexed load generation
Generate indexed loads and stores in many more cases
llvm-svn: 15626
2004-08-10 20:42:36 +00:00
Misha Brukman
1401c28e35
Fix file header comment: update filename, set tablegen emacs mode.
...
llvm-svn: 15625
2004-08-10 20:28:13 +00:00
Chris Lattner
ead14c1a07
This purely mechanical patch gives the "I" tblgen class operand list and asm
...
string operands, and adjusts all users to pass them in instead of using II.
llvm-svn: 15624
2004-08-10 20:17:41 +00:00
Reid Spencer
e66c307d2a
Fix a copy & paste error .. correct the description of the program.
...
llvm-svn: 15623
2004-08-10 19:18:51 +00:00
Reid Spencer
b8773e31d8
Adding a simple example of how to use the JIT.
...
Contributed by Valery A. Khamenya. THANKS, Valery!
llvm-svn: 15622
2004-08-10 19:14:36 +00:00
Chris Lattner
c4eb5951d5
Convert Ii32 instructions over to use the asmprinter generator
...
llvm-svn: 15621
2004-08-10 19:06:36 +00:00
Misha Brukman
c6b114f258
DForm 5/6 extended mneumonics take 3 arguments.
...
llvm-svn: 15620
2004-08-10 19:03:31 +00:00
Misha Brukman
59978333a3
Use the target name instead of hard-coding SparcV9.
...
llvm-svn: 15616
2004-08-10 18:31:01 +00:00
Misha Brukman
dc541abcd0
* Instruction definitions moved to SparcV9InstrInfo.td for consistency
...
* Defined PHI instruction and SparcV9 subclass of Target
llvm-svn: 15615
2004-08-10 18:15:31 +00:00
Misha Brukman
591d47113f
Renamed SparcV9_Reg.td -> SparcV9RegisterInfo.td for consistency.
...
llvm-svn: 15614
2004-08-10 18:14:04 +00:00
Misha Brukman
09d87b4939
Fix DForm_4: format is `op r, r, i'
...
llvm-svn: 15613
2004-08-10 18:07:55 +00:00
Misha Brukman
17913b3f23
Fix comment header, specify type of file `tablegen'.
...
llvm-svn: 15612
2004-08-10 17:37:14 +00:00
Reid Spencer
424cf6c880
Finish HTMLizing the document. Configuration section is very crufty.
...
llvm-svn: 15611
2004-08-10 16:40:56 +00:00
Reid Spencer
a39bf3da7b
Fixed some spellos and grammaros.
...
llvm-svn: 15610
2004-08-10 16:38:18 +00:00
Reid Spencer
5532159340
Move CompilerDriver.h here.
...
llvm-svn: 15609
2004-08-10 16:29:18 +00:00
Reid Spencer
e70c43de89
Initial makefile for the LLVM Compiler Driver.
...
llvm-svn: 15608
2004-08-10 16:27:08 +00:00
Reid Spencer
89ff1de384
First "do nothing" version of the LLVM Compiler Driver. This version just
...
processes command line arguments and allows --help to be used.
llvm-svn: 15607
2004-08-10 16:26:01 +00:00
Chris Lattner
9f49a91b44
Convert the Ii16 instructions over
...
llvm-svn: 15606
2004-08-10 16:22:02 +00:00
Chris Lattner
4d66b78036
Convert all Ii8 instructions over to the autogenerated asmprinter.
...
llvm-svn: 15605
2004-08-10 16:09:54 +00:00
Misha Brukman
8fbdc9fc4f
Define the target name so we can use it via TableGen.
...
llvm-svn: 15604
2004-08-10 15:29:15 +00:00
Chris Lattner
79db057a3b
This was a good idea, but until this does not break the build of
...
lib/Target/Sparc, we should not use it.
llvm-svn: 15603
2004-08-10 15:05:18 +00:00
Chris Lattner
1d787355e7
Paper over CBackend/2004-08-09-va-end-null.ll
...
Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.
This patch SHOULD go into 1.3.
llvm-svn: 15602
2004-08-10 00:19:16 +00:00
Chris Lattner
cee3c6b1be
This testcase causes the CBE to generate code that is not legal C.
...
llvm-svn: 15601
2004-08-09 23:56:17 +00:00
Misha Brukman
189229151f
Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet).
...
llvm-svn: 15600
2004-08-09 23:03:59 +00:00
Misha Brukman
eca36a5aa0
CodePrinter -> AsmPrinter
...
llvm-svn: 15599
2004-08-09 22:27:45 +00:00
Chris Lattner
8e7260652b
Fix InstCombine/2004-08-09-RemInfLoop.llx
...
This should go into the 1.3 branch
llvm-svn: 15593
2004-08-09 21:05:48 +00:00
Chris Lattner
cf5dd04f8b
New testcase
...
llvm-svn: 15592
2004-08-09 21:03:35 +00:00
Misha Brukman
976381e554
Do not mention Chris in public Makefiles
...
llvm-svn: 15591
2004-08-09 20:23:44 +00:00
Misha Brukman
265fd5dbbd
Shorten comment header to 80 cols
...
llvm-svn: 15590
2004-08-09 20:13:14 +00:00
Misha Brukman
f1c538e16e
* Remove UIUC-specific comment
...
* Make header comment span 80 cols
llvm-svn: 15589
2004-08-09 20:07:44 +00:00
Misha Brukman
876d5f1bad
Add note about AIX/PowerPC with disk space requirements. Wrap long line.
...
llvm-svn: 15588
2004-08-09 19:57:01 +00:00
Misha Brukman
a71ab1cedd
Remove Chris-related bytecode-dir comment
...
llvm-svn: 15587
2004-08-09 19:51:49 +00:00
Misha Brukman
8f951e579b
Remove ClassPrefix variable as it's no longer used.
...
llvm-svn: 15586
2004-08-09 19:13:29 +00:00
Misha Brukman
920ae9524d
Use the current target name instead of a ClassPrefix.
...
llvm-svn: 15585
2004-08-09 19:10:43 +00:00
Misha Brukman
65c7925816
* CFE builds on AIX/PowerPC
...
* Wrap long code lines
llvm-svn: 15584
2004-08-09 18:37:04 +00:00
Misha Brukman
0eb9cee698
The (future) SparcV8 JIT would do well to have a class prefix.
...
llvm-svn: 15583
2004-08-09 18:13:09 +00:00
Misha Brukman
18d27dc342
* Use Classname and ClassPrefix instead of hard-coded V9 values
...
* Simplify code and shorten lines by not recomputing values
llvm-svn: 15582
2004-08-09 17:47:45 +00:00
Misha Brukman
11bbbb9cdd
Define the ClassPrefix for SparcV9.
...
llvm-svn: 15581
2004-08-09 17:46:49 +00:00
Misha Brukman
d210ed1855
Define a ClassPrefix for PowerPC.
...
llvm-svn: 15580
2004-08-09 17:46:26 +00:00
Misha Brukman
8f7272c249
Classes need to have a prefix name, so that they can be tacked on to the pieces
...
that TableGen creates for them, e.g. CodeEmitter, AsmPrinter, etc.
llvm-svn: 15579
2004-08-09 17:46:06 +00:00
Misha Brukman
b3401c4c50
Generate a code emitter for PowerPC as well, this will be used in the JIT.
...
llvm-svn: 15578
2004-08-09 17:24:32 +00:00
Misha Brukman
5295e1db10
Use instruction formats as defined in the PowerPC ISA manual
...
llvm-svn: 15577
2004-08-09 17:24:04 +00:00
Reid Spencer
4606127bf2
Move information on Configuration files to the ../CompilerDriver.html
...
file since it doesn't belong in the man page.
llvm-svn: 15575
2004-08-09 03:10:39 +00:00
Reid Spencer
d5c0ccbe2c
This is the initial draft of the Compiler Driver documentation. It is not
...
worthy of review at this point. There is much thought and content remaining
to be written.
llvm-svn: 15574
2004-08-09 03:08:29 +00:00
Reid Spencer
42817b7ea1
Fix stack size processing now that the return address isn't an implied
...
push onto the top of the stack like x86, which uses the local area
offset. This will allow the removal of PowerPCPEI.cpp soon.
llvm-svn: 15573
2004-08-09 01:24:32 +00:00
Chris Lattner
c0171089fb
This isn't a bug, it's a missing feature
...
llvm-svn: 15571
2004-08-08 03:33:07 +00:00
Chris Lattner
4956a32c9e
Fix another really nasty regression that Anshu pointed out. In cases where
...
dangling constant users were removed from a function, causing it to be dead,
we never removed the call graph edge from the external node to the function.
In most cases, this didn't cause a problem (by luck). This should definitely
go into 1.3
llvm-svn: 15570
2004-08-08 03:29:50 +00:00
Chris Lattner
6b54110281
Add standard print/dump methods to CallGraph classes.
...
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Chris Lattner
92b9906199
Two fixes:
...
1. Fix a REALLY nasty cyclic replacement issue that Anshu discovered, causing
nondeterminstic crashes and memory corruption.
2. For performance, don't go inserting constantexpr casts of GV pointers.
This should definitely go into 1.3
llvm-svn: 15568
2004-08-08 01:30:07 +00:00
Chris Lattner
6a93462144
This DEBUG is buggy. comment it out because it's not worth fixing. This
...
should go into 1.3
llvm-svn: 15567
2004-08-08 01:27:56 +00:00
Reid Spencer
6c70fdd7b8
Added information about the configuration file. This is a temporary home
...
for this information as it belongs in a larger document on the subject of
llvmc.
llvm-svn: 15566
2004-08-07 16:30:14 +00:00
Reid Spencer
2bce8006d5
Get rid of a warning when compiling optimized. Uninitialized variable has
...
been initialized.
llvm-svn: 15565
2004-08-07 15:19:31 +00:00
Chris Lattner
57cafee576
Ok get rid of the REST of the tabs
...
llvm-svn: 15564
2004-08-07 07:18:41 +00:00
Chris Lattner
0ee8279979
Death to tabs
...
llvm-svn: 15563
2004-08-07 07:07:57 +00:00
Reid Spencer
e132906258
Correct spelling mistakes. Wrap lines at 80 columns.
...
llvm-svn: 15562
2004-08-06 22:56:49 +00:00
Reid Spencer
fd5ea75c3e
Various updates suggested by Misha and Chris. Moved material that is
...
aimed more at the comiler writer than the llvmc user later in the document.
llvm-svn: 15561
2004-08-06 22:28:47 +00:00
Brian Gaeke
8d38dee7b4
dumpSavedState has outlived its usefulness.
...
llvm-svn: 15555
2004-08-06 19:11:43 +00:00
Chris Lattner
9ad9ab8952
New testcase for critical 1.3 feature
...
llvm-svn: 15553
2004-08-06 18:09:02 +00:00
Reid Spencer
9a908daf38
First version of a manual page for the llvmc compiler driver. This tool is
...
being documented before being written to foster discussion about what the
tool should do. Eventually, we'll achieve a decision point at which time
this document forms the requirements for the tool from which it will be
coded.
llvm-svn: 15552
2004-08-06 16:58:48 +00:00
Alkis Evlogimenos
079fbde482
Split assertion to two in order to give better assertion messages.
...
llvm-svn: 15543
2004-08-06 14:33:37 +00:00