Brian Gaeke
24b90c3647
Rewrite outgoing arg handling to handle more weird corner cases.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17722 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 03:22:07 +00:00
Brian Gaeke
54799c2a51
Support UndefValue emission.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17721 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 03:22:05 +00:00
Tanya Lattner
d85f0af7c2
setting path to prcontext.tcl script. Right now it searches for tclsh in your path, but this should be obtained from configure.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17720 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:36:18 +00:00
Chris Lattner
4c989b6bd7
Remove debugging code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:32:53 +00:00
Chris Lattner
11a3d7b7dd
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:31:34 +00:00
Chris Lattner
32e7a80cdb
Add a testcase we should continue to argpromote
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17717 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:30:22 +00:00
Chris Lattner
78d223e1fb
Add a testcase for a function we cannot legally promote the argument of.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17716 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:28:39 +00:00
Chris Lattner
e6c745261e
Add useful method, minor cleanups
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17715 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:28:10 +00:00
Chris Lattner
4b2c09fa22
Don't print unneeded labels
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17714 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:27:11 +00:00
Tanya Lattner
c7185ac36a
Run prcontext.tcl with tclsh and let it be found in the path. This should be found by configure.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17713 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:16:17 +00:00
Tanya Lattner
28b372f1d3
Adding subdirectory dg.exp files in order to be able to use dejagnu to only run specific tests (located in some subdirectory of Regression)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17712 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:00:45 +00:00
Tanya Lattner
de942dc12d
Changed to use tcl script.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17711 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 22:55:51 +00:00
Chris Lattner
4394d51467
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17710 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 22:21:56 +00:00
Chris Lattner
8408d0be90
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17709 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 22:21:15 +00:00
Tanya Lattner
4913cdcc37
Rewrote prcontext.py in tcl.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17708 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 21:03:22 +00:00
Chris Lattner
ce7cafa960
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17707 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 20:48:57 +00:00
Chris Lattner
62f5a9402c
Add missing check
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 20:04:38 +00:00
Chris Lattner
44205cadba
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17705 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 20:03:48 +00:00
Chris Lattner
50af16a97b
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17704 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:50:12 +00:00
Chris Lattner
706759e8c9
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17703 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:49:39 +00:00
Chris Lattner
f17ffcce18
Add support for shifts
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17702 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:32:45 +00:00
Chris Lattner
65aedc1a4e
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]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17701 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:31:40 +00:00
Chris Lattner
0c3b390a54
Lazily create the abort message, so only translation units that use unwind
...
will actually get it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17700 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:07:32 +00:00
Chris Lattner
9ecc046184
Fix: CodeExtractor/2004-11-12-InvokeExtract.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17699 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 00:06:45 +00:00
Chris Lattner
8de2da4105
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17698 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 00:06:32 +00:00
Chris Lattner
68c311aac6
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17697 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 23:50:44 +00:00
Chris Lattner
44c94b9671
Simplify handling of constant initializers
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17696 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 22:42:57 +00:00
Reid Spencer
5c911ab6f1
Makefile for lib/Linker
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17695 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 20:38:45 +00:00
Reid Spencer
7f49602e5a
This file originated in lib/VMCore/Linker.cpp but now lives in
...
lib/Linker/LinkModules.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17694 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 20:37:43 +00:00
Reid Spencer
c408c45900
This file originated in tools/gccld/Linker.cpp but now lives in
...
lib/Linker/LinkArchives.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17693 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 20:34:32 +00:00
Reid Spencer
12d7951d04
* 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17688 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 02:27:36 +00:00
Reid Spencer
37d813db7a
Document the new llvm-ranlib command.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 00:18:35 +00:00
Reid Spencer
2152cca341
Correctly terminate a list.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17686 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 00:16:51 +00:00
Reid Spencer
742ecbc90f
Document the modifiers and the file format.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17685 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 00:15:43 +00:00
Chris Lattner
04252fed78
Make this build in release mode
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 22:11:17 +00:00
Reid Spencer
0aa189949c
Add llvm-ar to the index.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17682 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 09:30:00 +00:00
Reid Spencer
e26ed7a56a
First attempt at llvm-ar documentation. Modifiers need a little more
...
explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17681 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 09:21:18 +00:00
Chris Lattner
d79c7b43f4
Actually, leave the check in. This prevents us from counting dead arguments
...
as IPCP opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17680 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 07:47:54 +00:00
Chris Lattner
3e062eacab
Fix bug: IPConstantProp/deadarg.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17679 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 07:46:29 +00:00
Chris Lattner
1f7893fe05
new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 07:46:11 +00:00
Reid Spencer
7863c404ee
Fix documentation for Makefile target name change. install-bytecode is now
...
just "install" in the runtime directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17677 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 07:30:27 +00:00
Chris Lattner
ff1529b6cf
Make IP Constant prop more aggressive about handling self recursive calls.
...
This implements IPConstantProp/recursion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17666 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-10 19:43:59 +00:00
Chris Lattner
6285016014
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-10 19:43:31 +00:00
John Criswell
546faca4ef
Correct the name of stosd for the AT&T syntax:
...
It's stosl (l for long == 32 bit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17658 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-10 04:48:15 +00:00
Chris Lattner
c890bfe1da
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!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17657 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:47:30 +00:00
Reid Spencer
8ee9da05ed
Provide conversion from posix time.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17656 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:29:10 +00:00
Reid Spencer
4b82681c65
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:27:23 +00:00
Reid Spencer
9195f37c5f
* Implement getStatusInfo for getting stat(2) like information
...
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:26:31 +00:00
Reid Spencer
31391b6792
Make sure llee can deal with compressed bytecode too.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17652 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:21:25 +00:00
John Criswell
b5810282ee
Recognize compressed LLVM bytecode files.
...
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17648 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 19:37:07 +00:00