Misha Brukman [Thu, 14 Oct 2004 05:50:43 +0000 (05:50 +0000)]
* Add option to read isLittleEndianEncoding for InstrInfo classes
* Doxygen-ify some function comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16974
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 05:13:36 +0000 (05:13 +0000)]
When converting phi nodes into select instructions, we shouldn't promote PHI
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16973
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 05:12:50 +0000 (05:12 +0000)]
When converting phi nodes into select instructions, we shouldn't promote PHI
nodes unless we KNOW that we are able to promote all of them. In this case
promoting the phi to a select is silly because we will always have to do the
call conditionally. As such, select promotion is actually a pessimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16972
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Oct 2004 03:33:25 +0000 (03:33 +0000)]
Allow this file to compile on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16971
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Oct 2004 03:09:02 +0000 (03:09 +0000)]
Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16970
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Oct 2004 03:06:59 +0000 (03:06 +0000)]
Get proper BSD #includes for MappedFile implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16969
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 14 Oct 2004 03:05:59 +0000 (03:05 +0000)]
Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16968
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 02:31:35 +0000 (02:31 +0000)]
Today is not my day. Fix broken #
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 02:06:48 +0000 (02:06 +0000)]
unbreak previous checkin :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16966
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 01:57:28 +0000 (01:57 +0000)]
Add back a missing paren
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16965
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 01:49:34 +0000 (01:49 +0000)]
Fit to 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16964
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 01:46:07 +0000 (01:46 +0000)]
Wrap to 80 cols, delete some seriously old debugging printouts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16963
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 01:39:18 +0000 (01:39 +0000)]
Fit in 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16962
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Oct 2004 01:35:17 +0000 (01:35 +0000)]
Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16961
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Oct 2004 15:25:46 +0000 (15:25 +0000)]
Patch to make VS happier, thanks to Morten Ofstad for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16956
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Oct 2004 15:11:23 +0000 (15:11 +0000)]
Use explicit std:: qualification to avoid relying on Koenig lookup, which
VC++ does not do properly. Thanks to Morten Ofstad for the patch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16955
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Oct 2004 15:09:21 +0000 (15:09 +0000)]
Get rid of template templates that were preventing VC from compiling the
set_intersect template. Thanks to Morten Ofstad and Jeff Cohen for the
patch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16954
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 11:56:07 +0000 (11:56 +0000)]
Changes for automake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16953
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 11:53:12 +0000 (11:53 +0000)]
Set up BUILD_MODE based on the configuration so the default build mode
is established from configuration. Also, don't make the ENABLE_ options
AM_CONDITIONALs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16952
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 11:48:50 +0000 (11:48 +0000)]
Updates for changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16951
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 11:46:52 +0000 (11:46 +0000)]
Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 11:39:51 +0000 (11:39 +0000)]
Get rid of the horrendous FIND_PATH macro, have libs and progs linked into
a common directory for simplicity. Provide an easy way to relink some
objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16949
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Oct 2004 04:44:53 +0000 (04:44 +0000)]
Update doco, make doxygen more, use standard dividers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16948
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 13 Oct 2004 01:07:55 +0000 (01:07 +0000)]
Save Reid's notes from bugzilla on the proper procedure to upgrade libtool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16947
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 01:01:03 +0000 (01:01 +0000)]
Resolution to PR451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16946
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 00:51:45 +0000 (00:51 +0000)]
Changes for libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16945
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 00:19:25 +0000 (00:19 +0000)]
Update for libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16944
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 13 Oct 2004 00:18:58 +0000 (00:18 +0000)]
Harden the version requirements to the set that actually works after three
days of trying to figure it out. Despite some developer's penchant for
relaxing the tool versions, this just isn't possible. Only certain versions
work with certain other versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16943
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 12 Oct 2004 21:48:02 +0000 (21:48 +0000)]
Fix file comment header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16942
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 12 Oct 2004 20:35:04 +0000 (20:35 +0000)]
On second thought, OpaqueType is not really a good first-class type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16941
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 12 Oct 2004 19:17:11 +0000 (19:17 +0000)]
No space allowed between \ and end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16940
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 12 Oct 2004 18:35:57 +0000 (18:35 +0000)]
Wrap lines at 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 17:08:44 +0000 (17:08 +0000)]
Add comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16937
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 12 Oct 2004 17:06:17 +0000 (17:06 +0000)]
Opaque types are considered to be first-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16936
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 16:52:09 +0000 (16:52 +0000)]
Minor cleanups:
* fit in 80 lines
* Eliminate extra namespaces
* Drop llvm::
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16935
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 16:21:18 +0000 (16:21 +0000)]
Don't emit the method into the llvm namespace, let the #includer decide where it goes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16934
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 16:10:39 +0000 (16:10 +0000)]
Add std:: prefix for compilers without correct koenig lookup implemented.
Patch contributed by Paolo Invernizzi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16933
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:52:52 +0000 (04:52 +0000)]
Transform memmove -> memcpy when the source is obviously constant memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16932
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:51:55 +0000 (04:51 +0000)]
New testcase for memmove -> memcpy transform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16931
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:45:20 +0000 (04:45 +0000)]
Right, calls have Operand#0 == the called function, don't forget this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16930
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:32:37 +0000 (04:32 +0000)]
Minor tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16929
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:20:46 +0000 (04:20 +0000)]
New header. Classes can be added as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16928
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 04:20:25 +0000 (04:20 +0000)]
Implement a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16927
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 01:49:27 +0000 (01:49 +0000)]
This nutty patch has been in my tree since before 1.3 went out, and it needs
to go in. This patch allows us to compute the trip count of loops controlled
by values loaded from constant arrays. The cannonnical example of this is
strlen when passed a constant argument:
for (int i = 0; "constantstring"[i]; ++i) ;
return i;
In this case, it will compute that the loop executes 14 times, which means
that the exit value of i is 14. Because of this, the loop gets DCE'd and
we are happy. This also applies to anything that does similar things, e.g.
loops like this:
const float Array[] = { 0.1, 2.1, 3.2, 23.21 };
for (int i = 0; Array[i] < 20; ++i)
and is actually fairly general.
The problem with this is that it almost never triggers. The reason is that
we run indvars and the loop optimizer only at compile time, which is before
things like strlen and strcpy have been inlined into the program from libc.
Because of this, it almost never is used (it triggers twice in specint2k).
I'm committing it because it DOES work, may be useful in the future, and
doesn't slow us down at all. If/when we start running the loop optimizer
at link-time (-O4?) this will be very nice indeed :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16926
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Oct 2004 01:02:29 +0000 (01:02 +0000)]
Fix a REALLY obscure bug in my previous checkin, which was splicing the END
marker from one ilist into the middle of another basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16925
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 23:06:50 +0000 (23:06 +0000)]
Handle a common case more carefully. In particular, instead of transforming
pointer recurrences into expressions from this:
%P_addr.0.i.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), %entry ], [ %inc.0.i, %no_exit.i ]
%inc.0.i = getelementptr sbyte* %P_addr.0.i.0, int 1 ; <sbyte*> [#uses=2]
into this:
%inc.0.i = getelementptr sbyte* getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), int %inc.0.i.rec
Actually create something nice, like this:
%inc.0.i = getelementptr [8 x sbyte]* %.str_1, int 0, int %inc.0.i.rec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16924
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 22:52:25 +0000 (22:52 +0000)]
Allow creation of GEP constantexprs with a vector of value* operands as
well as a vector of constant*'s. It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16923
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 22:21:39 +0000 (22:21 +0000)]
Implement remove/eraseFromParent methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 22:21:13 +0000 (22:21 +0000)]
Add long overdue methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16921
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 20:53:28 +0000 (20:53 +0000)]
Make this build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 19:40:04 +0000 (19:40 +0000)]
Reenable the transform, turning X/-10 < 1 into X > -10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16918
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 15:50:40 +0000 (15:50 +0000)]
Fix a warning that is emitted on the suns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16917
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 05:54:41 +0000 (05:54 +0000)]
This patch implements two things (sorry).
First, it allows SRA of globals that have embedded arrays, implementing
GlobalOpt/globalsra-partial.llx. This comes up infrequently, but does allow,
for example, deleting several stores to dead parts of globals in dhrystone.
Second, this implements GlobalOpt/malloc-promote-*.llx, which is the
following nifty transformation:
Basically if a global pointer is initialized with malloc, and we can tell
that the program won't notice, we transform this:
struct foo *FooPtr;
...
FooPtr = malloc(sizeof(struct foo));
...
FooPtr->A FooPtr->B
Into:
struct foo FooPtrBody;
...
FooPtrBody.A FooPtrBody.B
This comes up occasionally, for example, the 'disp' global in 183.equake (where
the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%)
on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue'
globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)).
The nice thing about this xform is that it exposes the resulting global to
global variable optimization and makes alias analysis easier in addition to
eliminating a few loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16916
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 05:00:30 +0000 (05:00 +0000)]
This testcase ensures that we can SRA a global even if part of the global
cannot be SRA'd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16915
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 05:00:12 +0000 (05:00 +0000)]
These testcases check to see if we can promote malloc's to globals in some
cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16914
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 04:47:18 +0000 (04:47 +0000)]
Don't miss global optimizations because we run before the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16913
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 04:07:27 +0000 (04:07 +0000)]
Fix SingleSource/Benchmarks/McGill/chomp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16912
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Oct 2004 03:57:30 +0000 (03:57 +0000)]
If we are trying to create a ConstantExpr cast that is really a GEP to the
first element of an array, return a GEP instead of a cast. This allows us
to transparently fold this:
int* getelementptr (int* cast ([100 x int]* %Gbody to int*), int 40)
into this:
int* getelementptr ([100 x int]* %Gbody, int 0, int 40)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16911
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 11 Oct 2004 02:06:40 +0000 (02:06 +0000)]
Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16910
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 11 Oct 2004 00:56:41 +0000 (00:56 +0000)]
Remove exhuberant-style comments which remained from copying file from `sample'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16909
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 11 Oct 2004 00:55:47 +0000 (00:55 +0000)]
Fix file header comment; remove sample project (extra-verbose) comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16908
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 11 Oct 2004 00:54:59 +0000 (00:54 +0000)]
Fix file header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16907
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 10 Oct 2004 23:37:40 +0000 (23:37 +0000)]
ModuloScheduling has moved to lib/Target/SparcV9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16906
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 10 Oct 2004 23:36:09 +0000 (23:36 +0000)]
Add ModuloScheduling to the recursive build tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16905
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 10 Oct 2004 23:34:50 +0000 (23:34 +0000)]
Adjust header file inclusion due to move
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16904
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 10 Oct 2004 23:34:36 +0000 (23:34 +0000)]
Adjust comment header and paths to refect move
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16903
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 10 Oct 2004 23:33:20 +0000 (23:33 +0000)]
ModuloScheduling moved to lib/Target/SparcV9 as it is SparcV9-specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16902
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 23:14:11 +0000 (23:14 +0000)]
Just because we cannot completely eliminate all uses of a global, we can
still optimize away all of the indirect calls and loads, etc from it.
This turns code like this:
if (G != 0)
G();
into
if (G != 0)
ActualCallee();
This triggers a couple of times in gcc and libstdc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16901
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 23:12:33 +0000 (23:12 +0000)]
Another testcase. We should be able to devirtualize the call even though
we cannot completely eliminate the global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16900
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:54:46 +0000 (22:54 +0000)]
Reorganize FINDLIBS to make most comment libs searched first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16899
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:52:14 +0000 (22:52 +0000)]
Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16898
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:51:03 +0000 (22:51 +0000)]
Add the new InstrSched directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16897
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:50:31 +0000 (22:50 +0000)]
Fix named of a library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16896
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Sun, 10 Oct 2004 22:44:35 +0000 (22:44 +0000)]
Added debug information. Fixed several bugs in the reconstruct loop function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16895
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:36:40 +0000 (22:36 +0000)]
Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16894
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:20:40 +0000 (22:20 +0000)]
Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16893
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:17:39 +0000 (22:17 +0000)]
Build both archive and relinked objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16892
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:17:02 +0000 (22:17 +0000)]
Directory changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16891
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:16:50 +0000 (22:16 +0000)]
A configure script to configure LLVM for compilation with automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16890
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:16:37 +0000 (22:16 +0000)]
Initial version of common automake Rules for LLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16889
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 22:07:57 +0000 (22:07 +0000)]
Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16888
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 21:19:41 +0000 (21:19 +0000)]
Remove the InstrSched directory (moved to SparcV9)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16887
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 21:18:31 +0000 (21:18 +0000)]
Directory no long exists (moved to Targets/SparcV9).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16886
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 20:43:57 +0000 (20:43 +0000)]
Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 10 Oct 2004 20:34:17 +0000 (20:34 +0000)]
Fix assertion failure when calling or returning from a function which
returns 'bool' type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16884
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 10 Oct 2004 19:57:21 +0000 (19:57 +0000)]
Implement eliminateCallFramePseudoInstr().
Wrap a long comment line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16883
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 10 Oct 2004 19:57:20 +0000 (19:57 +0000)]
Model calls as *both* using *and* killing O0..O5, because callees use the
argument values passed in (so they're not dead until *after* the call),
and callees are free to modify those registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16882
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Sun, 10 Oct 2004 19:57:18 +0000 (19:57 +0000)]
Fix whitespace and wrap some long lines.
Deal with allocating stack space for outgoing args and copying them into the
correct stack slots (at least, we can copy <=32-bit int args).
We now correctly generate ADJCALLSTACK* instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16881
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 19:13:03 +0000 (19:13 +0000)]
Top level makefile for building LLVM with automake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16880
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Oct 2004 19:09:33 +0000 (19:09 +0000)]
Ensure timestamp on saved contents of configure.ac is not changed.
Use correct options to automake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 17:07:12 +0000 (17:07 +0000)]
Fix 2004-10-10-CastStoreOnce.llx, by adjusting types back if we strip off a cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16878
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 17:06:09 +0000 (17:06 +0000)]
New testcase that crashes -globalopt. I found this through inspection, not
actually in the wild :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16877
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 16:47:33 +0000 (16:47 +0000)]
Implement GlobalOpt/deadglobal-2.llx, deletion of globals that are only
stored to, but are stored at variable indexes. This occurs at least in
176.gcc, but probably others, and we should handle it for completeness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16876
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 16:46:48 +0000 (16:46 +0000)]
New testcase we were not handling before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 16:43:46 +0000 (16:43 +0000)]
Avoid calling use_size() which could (in theory) be expensive if the global
has a large number of users. Instead, just keep track of whether we're
making changes as we do so.
This patch has no functionlity changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16874
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Oct 2004 16:26:13 +0000 (16:26 +0000)]
bling bling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16873
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Oct 2004 21:50:05 +0000 (21:50 +0000)]
A testcase that globalopt now handles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16872
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Oct 2004 21:48:45 +0000 (21:48 +0000)]
Eliminate global pointers that are only stored a single value and null if
we know that all uses of the global will trap if the pointer contained is
null. In this case, we forward substitute the stored value to any uses.
This has the effect of devirtualizing trivial globals in trivial cases. For
example, 164.gzip contains this:
gzip.h:extern int (*read_buf) OF((char *buf, unsigned size));
bits.c: read_buf = file_read;
deflate.c: lookahead = read_buf((char*)window,
deflate.c: n = read_buf((char*)window+strstart+lookahead, more);
Since read_buf has to point to file_read at every use, we just replace
the calls through read_buf with a direct call to file_read.
This occurs in several benchmarks, including 176.gcc and 164.gzip. Direct
calls are good and stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16871
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Oct 2004 21:13:51 +0000 (21:13 +0000)]
Instead of silently breaking, print notification of why this doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16870
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Oct 2004 19:37:02 +0000 (19:37 +0000)]
Fix grammaro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16869
91177308-0d34-0410-b5e6-
96231b3b80d8