Brian Gaeke
1b3d701769
Rewrite outgoing arg handling to handle more weird corner cases.
...
llvm-svn: 17722
2004-11-14 03:22:07 +00:00
Brian Gaeke
294af88a7a
Support UndefValue emission.
...
llvm-svn: 17721
2004-11-14 03:22:05 +00:00
Tanya Lattner
c5e8993eef
setting path to prcontext.tcl script. Right now it searches for tclsh in your path, but this should be obtained from configure.
...
llvm-svn: 17720
2004-11-13 23:36:18 +00:00
Chris Lattner
9b2f0f93e3
Remove debugging code
...
llvm-svn: 17719
2004-11-13 23:32:53 +00:00
Chris Lattner
9749bf21f8
Argument promotion transforms functions to unconditionally load their
...
argument pointers. This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid. Make sure to do the required checks.
This fixed ArgumentPromotion/control-flow.ll and the Burg program.
llvm-svn: 17718
2004-11-13 23:31:34 +00:00
Chris Lattner
3932e83c0e
Add a testcase we should continue to argpromote
...
llvm-svn: 17717
2004-11-13 23:30:22 +00:00
Chris Lattner
d366a95a6c
Add a testcase for a function we cannot legally promote the argument of.
...
llvm-svn: 17716
2004-11-13 23:28:39 +00:00
Chris Lattner
bbd13a8e4e
Add useful method, minor cleanups
...
llvm-svn: 17715
2004-11-13 23:28:10 +00:00
Chris Lattner
09b7f968e0
Don't print unneeded labels
...
llvm-svn: 17714
2004-11-13 23:27:11 +00:00
Tanya Lattner
e8b778b39b
Run prcontext.tcl with tclsh and let it be found in the path. This should be found by configure.
...
llvm-svn: 17713
2004-11-13 23:16:17 +00:00
Tanya Lattner
97976107e3
Adding subdirectory dg.exp files in order to be able to use dejagnu to only run specific tests (located in some subdirectory of Regression)
...
llvm-svn: 17712
2004-11-13 23:00:45 +00:00
Tanya Lattner
bfc27caaaa
Changed to use tcl script.
...
llvm-svn: 17711
2004-11-13 22:55:51 +00:00
Chris Lattner
3684294c71
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
llvm-svn: 17710
2004-11-13 22:21:56 +00:00
Chris Lattner
0c7f345cc1
New testcase
...
llvm-svn: 17709
2004-11-13 22:21:15 +00:00
Tanya Lattner
3f146f7f6c
Rewrote prcontext.py in tcl.
...
llvm-svn: 17708
2004-11-13 21:03:22 +00:00
Chris Lattner
1cde11aa95
shld is a very high latency operation. Instead of emitting it for shifts of
...
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).
For example, instead of compiling this:
long long X2(long long Y) { return Y << 2; }
to:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $2, %eax, %edx
shll $2, %eax
ret
Compile it to:
X2:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $30, %edx
leal (%edx,%ecx,4), %edx
shll $2, %eax
ret
Likewise, for << 3, compile to:
X3:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $29, %edx
leal (%edx,%ecx,8), %edx
shll $3, %eax
ret
This matches icc, except that icc open codes the shifts as adds on the P4.
llvm-svn: 17707
2004-11-13 20:48:57 +00:00
Chris Lattner
c531e090db
Add missing check
...
llvm-svn: 17706
2004-11-13 20:04:38 +00:00
Chris Lattner
d1381380ae
Compile:
...
long long X3_2(long long Y) { return Y+Y; }
int X(int Y) { return Y+Y; }
into:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
addl %eax, %eax
adcl %edx, %edx
ret
X:
movl 4(%esp), %eax
addl %eax, %eax
ret
instead of:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $1, %eax, %edx
shll $1, %eax
ret
X:
movl 4(%esp), %eax
shll $1, %eax
ret
llvm-svn: 17705
2004-11-13 20:03:48 +00:00
Chris Lattner
70e351fb1c
Simplify handling of shifts to be the same as we do for adds. Add support
...
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:
Y+Y+Y+Y+Y+Y+Y+Y
into
%tmp.8 = shl long %Y, ubyte 3 ; <long> [#uses=1]
instead of
%tmp.4 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.12 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.8 = add long %tmp.4, %tmp.12 ; <long> [#uses=1]
This implements add.ll:test25
Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18
llvm-svn: 17704
2004-11-13 19:50:12 +00:00
Chris Lattner
868d91e84a
New testcase
...
llvm-svn: 17703
2004-11-13 19:49:39 +00:00
Chris Lattner
1d52a24587
Add support for shifts
...
llvm-svn: 17702
2004-11-13 19:32:45 +00:00
Chris Lattner
7a8d26a581
Fold:
...
(X + (X << C2)) --> X * ((1 << C2) + 1)
((X << C2) + X) --> X * ((1 << C2) + 1)
This means that we now canonicalize "Y+Y+Y" into:
%tmp.2 = mul long %Y, 3 ; <long> [#uses=1]
instead of:
%tmp.10 = shl long %Y, ubyte 1 ; <long> [#uses=1]
%tmp.6 = add long %Y, %tmp.10 ; <long> [#uses=1]
llvm-svn: 17701
2004-11-13 19:31:40 +00:00
Chris Lattner
d348f5b9fb
Lazily create the abort message, so only translation units that use unwind
...
will actually get it.
llvm-svn: 17700
2004-11-13 19:07:32 +00:00
Chris Lattner
ab917141d0
Fix: CodeExtractor/2004-11-12-InvokeExtract.ll
...
llvm-svn: 17699
2004-11-13 00:06:45 +00:00
Chris Lattner
3814fc9f08
New testcase
...
llvm-svn: 17698
2004-11-13 00:06:32 +00:00
Chris Lattner
c6b1d7a081
Fix a bug where the code extractor would get a bit confused handling invoke
...
instructions, setting DefBlock to a block it did not have dom info for.
llvm-svn: 17697
2004-11-12 23:50:44 +00:00
Chris Lattner
922a1b4601
Simplify handling of constant initializers
...
llvm-svn: 17696
2004-11-12 22:42:57 +00:00
Reid Spencer
f6caf3b1c2
Makefile for lib/Linker
...
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer
f755c169b3
This file originated in lib/VMCore/Linker.cpp but now lives in
...
lib/Linker/LinkModules.cpp
llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer
13a6af95ad
This file originated in tools/gccld/Linker.cpp but now lives in
...
lib/Linker/LinkArchives.cpp
llvm-svn: 17693
2004-11-12 20:34:32 +00:00
Reid Spencer
cf0573d51f
* Clean up all the shared library output on uninstall
...
* Provide the correct set of input directories to the TAGS target
* Provide a CTAGS target for building Vi style ctags files.
llvm-svn: 17688
2004-11-12 02:27:36 +00:00
Reid Spencer
17d9ee7e0c
Document the new llvm-ranlib command.
...
llvm-svn: 17687
2004-11-12 00:18:35 +00:00
Reid Spencer
e7f5f80b29
Correctly terminate a list.
...
llvm-svn: 17686
2004-11-12 00:16:51 +00:00
Reid Spencer
d6fe5930d3
Document the modifiers and the file format.
...
llvm-svn: 17685
2004-11-12 00:15:43 +00:00
Reid Spencer
75391bae75
Add llvm-ar to the index.
...
llvm-svn: 17682
2004-11-11 09:30:00 +00:00
Reid Spencer
cf241f12d2
First attempt at llvm-ar documentation. Modifiers need a little more
...
explanation.
llvm-svn: 17681
2004-11-11 09:21:18 +00:00
Chris Lattner
1a469385bd
Actually, leave the check in. This prevents us from counting dead arguments
...
as IPCP opportunities.
llvm-svn: 17680
2004-11-11 07:47:54 +00:00
Chris Lattner
dba9c2b0ef
Fix bug: IPConstantProp/deadarg.ll
...
llvm-svn: 17679
2004-11-11 07:46:29 +00:00
Chris Lattner
d8ad02ce57
new testcase
...
llvm-svn: 17678
2004-11-11 07:46:11 +00:00
Reid Spencer
0a53bc5807
Fix documentation for Makefile target name change. install-bytecode is now
...
just "install" in the runtime directory.
llvm-svn: 17677
2004-11-11 07:30:27 +00:00
Chris Lattner
d920b5b770
Make IP Constant prop more aggressive about handling self recursive calls.
...
This implements IPConstantProp/recursion.ll
llvm-svn: 17666
2004-11-10 19:43:59 +00:00
Chris Lattner
30d157de35
New testcase
...
llvm-svn: 17665
2004-11-10 19:43:31 +00:00
John Criswell
402e338f11
Correct the name of stosd for the AT&T syntax:
...
It's stosl (l for long == 32 bit).
llvm-svn: 17658
2004-11-10 04:48:15 +00:00
Chris Lattner
b214a04a16
Do not let dead constant expressions hanging off of functions prevent IPCP.
...
This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)
llvm-svn: 17657
2004-11-09 20:47:30 +00:00
Reid Spencer
97f373cf98
Provide conversion from posix time.
...
llvm-svn: 17656
2004-11-09 20:29:10 +00:00
Reid Spencer
d17e35893c
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
llvm-svn: 17655
2004-11-09 20:27:23 +00:00
Reid Spencer
28ceb24005
* Implement getStatusInfo for getting stat(2) like information
...
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.
llvm-svn: 17654
2004-11-09 20:26:31 +00:00
Reid Spencer
ec5e394536
Make sure llee can deal with compressed bytecode too.
...
llvm-svn: 17652
2004-11-09 20:21:25 +00:00
John Criswell
5be81b837b
Recognize compressed LLVM bytecode files.
...
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.
llvm-svn: 17648
2004-11-09 19:37:07 +00:00
Reid Spencer
d9387fee02
Tune compression:
...
bzip2: block size 9 -> 5, reduces memory by 400Kbytes, doesn't affect speed
or compression ratio on all but the largest bytecode files (>1MB)
zip: level 9 -> 6, this speeds up compression time by ~30% but only
degrades the compressed size by a few bytes per megabyte. Those few
bytes aren't worth the effort.
llvm-svn: 17647
2004-11-09 17:58:09 +00:00