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