1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

14879 Commits

Author SHA1 Message Date
Chris Lattner
8dd656b17b Patch to make VS happier, thanks to Morten Ofstad for pointing this out.
llvm-svn: 16956
2004-10-13 15:25:46 +00:00
Chris Lattner
ae45589b0f Use explicit std:: qualification to avoid relying on Koenig lookup, which
VC++ does not do properly.  Thanks to Morten Ofstad for the patch!

llvm-svn: 16955
2004-10-13 15:11:23 +00:00
Chris Lattner
a4756fd6be Get rid of template templates that were preventing VC from compiling the
set_intersect template.  Thanks to Morten Ofstad and Jeff Cohen for the
patch!

llvm-svn: 16954
2004-10-13 15:09:21 +00:00
Reid Spencer
79843fb7d9 Changes for automake.
llvm-svn: 16953
2004-10-13 11:56:07 +00:00
Reid Spencer
19b5e82e02 Set up BUILD_MODE based on the configuration so the default build mode
is established from configuration. Also, don't make the ENABLE_ options
AM_CONDITIONALs.

llvm-svn: 16952
2004-10-13 11:53:12 +00:00
Reid Spencer
1b27f66b76 Updates for changes in Makefile rules.
llvm-svn: 16951
2004-10-13 11:48:50 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
cf32e1a16f Get rid of the horrendous FIND_PATH macro, have libs and progs linked into
a common directory for simplicity. Provide an easy way to relink some
objects

llvm-svn: 16949
2004-10-13 11:39:51 +00:00
Chris Lattner
aa3facb3fe Update doco, make doxygen more, use standard dividers.
llvm-svn: 16948
2004-10-13 04:44:53 +00:00
Misha Brukman
f13025746b Save Reid's notes from bugzilla on the proper procedure to upgrade libtool
llvm-svn: 16947
2004-10-13 01:07:55 +00:00
Reid Spencer
350c4299cf Resolution to PR451.
llvm-svn: 16946
2004-10-13 01:01:03 +00:00
Reid Spencer
b6d4bc2422 Changes for libtool 1.5.10
llvm-svn: 16945
2004-10-13 00:51:45 +00:00
Reid Spencer
1693551fe2 Update for libtool 1.5.10
llvm-svn: 16944
2004-10-13 00:19:25 +00:00
Reid Spencer
73cb699541 Harden the version requirements to the set that actually works after three
days of trying to figure it out. Despite some developer's penchant for
relaxing the tool versions, this just isn't possible. Only certain versions
work with certain other versions.

llvm-svn: 16943
2004-10-13 00:18:58 +00:00
Misha Brukman
4a81cf32a5 Fix file comment header
llvm-svn: 16942
2004-10-12 21:48:02 +00:00
Misha Brukman
35c31cb4a2 On second thought, OpaqueType is not really a good first-class type.
llvm-svn: 16941
2004-10-12 20:35:04 +00:00
Misha Brukman
8d390f980a No space allowed between \ and end-of-line
llvm-svn: 16940
2004-10-12 19:17:11 +00:00
Misha Brukman
f0a12b512f Wrap lines at 80 cols
llvm-svn: 16939
2004-10-12 18:35:57 +00:00
Chris Lattner
b00e680146 Add comment
llvm-svn: 16937
2004-10-12 17:08:44 +00:00
Misha Brukman
08a8f7261e Opaque types are considered to be first-class.
llvm-svn: 16936
2004-10-12 17:06:17 +00:00
Chris Lattner
dc7da6c655 Don't emit the method into the llvm namespace, let the #includer decide where it goes
llvm-svn: 16934
2004-10-12 16:21:18 +00:00
Chris Lattner
4436e1c174 Add std:: prefix for compilers without correct koenig lookup implemented.
Patch contributed by Paolo Invernizzi

llvm-svn: 16933
2004-10-12 16:10:39 +00:00
Chris Lattner
63f15158f4 Transform memmove -> memcpy when the source is obviously constant memory.
llvm-svn: 16932
2004-10-12 04:52:52 +00:00
Chris Lattner
c5ae8c364c New testcase for memmove -> memcpy transform
llvm-svn: 16931
2004-10-12 04:51:55 +00:00
Chris Lattner
18dea852e9 Right, calls have Operand#0 == the called function, don't forget this.
llvm-svn: 16930
2004-10-12 04:45:20 +00:00
Chris Lattner
58435df175 Minor tweaks
llvm-svn: 16929
2004-10-12 04:32:37 +00:00
Chris Lattner
0a12c99e3a New header. Classes can be added as needed.
llvm-svn: 16928
2004-10-12 04:20:46 +00:00
Chris Lattner
8428411c46 Implement a new method
llvm-svn: 16927
2004-10-12 04:20:25 +00:00
Chris Lattner
6b6e5a5815 This nutty patch has been in my tree since before 1.3 went out, and it needs
to go in.  This patch allows us to compute the trip count of loops controlled
by values loaded from constant arrays.  The cannonnical example of this is
strlen when passed a constant argument:

for (int i = 0; "constantstring"[i]; ++i) ;
return i;

In this case, it will compute that the loop executes 14 times, which means
that the exit value of i is 14.  Because of this, the loop gets DCE'd and
we are happy.  This also applies to anything that does similar things, e.g.
loops like this:

  const float Array[] = { 0.1, 2.1, 3.2, 23.21 };
  for (int i = 0; Array[i] < 20; ++i)

and is actually fairly general.

The problem with this is that it almost never triggers.  The reason is that
we run indvars and the loop optimizer only at compile time, which is before
things like strlen and strcpy have been inlined into the program from libc.
Because of this, it almost never is used (it triggers twice in specint2k).

I'm committing it because it DOES work, may be useful in the future, and
doesn't slow us down at all.  If/when we start running the loop optimizer
at link-time (-O4?) this will be very nice indeed :)

llvm-svn: 16926
2004-10-12 01:49:27 +00:00
Chris Lattner
b605c860fc Fix a REALLY obscure bug in my previous checkin, which was splicing the END
marker from one ilist into the middle of another basic block!

llvm-svn: 16925
2004-10-12 01:02:29 +00:00
Chris Lattner
a6d0e41b72 Handle a common case more carefully. In particular, instead of transforming
pointer recurrences into expressions from this:

  %P_addr.0.i.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), %entry ], [ %inc.0.i, %no_exit.i ]
  %inc.0.i = getelementptr sbyte* %P_addr.0.i.0, int 1            ; <sbyte*> [#uses=2]

into this:

  %inc.0.i = getelementptr sbyte* getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), int %inc.0.i.rec

Actually create something nice, like this:

  %inc.0.i = getelementptr [8 x sbyte]* %.str_1, int 0, int %inc.0.i.rec

llvm-svn: 16924
2004-10-11 23:06:50 +00:00
Chris Lattner
63ba63bb56 Allow creation of GEP constantexprs with a vector of value* operands as
well as a vector of constant*'s.  It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.

llvm-svn: 16923
2004-10-11 22:52:25 +00:00
Chris Lattner
6496308d18 Implement remove/eraseFromParent methods
llvm-svn: 16922
2004-10-11 22:21:39 +00:00
Chris Lattner
70197d8f29 Add long overdue methods
llvm-svn: 16921
2004-10-11 22:21:13 +00:00
Chris Lattner
f9e79568c2 Reenable the transform, turning X/-10 < 1 into X > -10
llvm-svn: 16918
2004-10-11 19:40:04 +00:00
Chris Lattner
2bc979427d Fix a warning that is emitted on the suns
llvm-svn: 16917
2004-10-11 15:50:40 +00:00
Chris Lattner
9d662982e0 This patch implements two things (sorry).
First, it allows SRA of globals that have embedded arrays, implementing
GlobalOpt/globalsra-partial.llx.  This comes up infrequently, but does allow,
for example, deleting several stores to dead parts of globals in dhrystone.

Second, this implements GlobalOpt/malloc-promote-*.llx, which is the
following nifty transformation:

Basically if a global pointer is initialized with malloc, and we can tell
that the program won't notice, we transform this:

struct foo *FooPtr;
...
  FooPtr = malloc(sizeof(struct foo));
...
  FooPtr->A   FooPtr->B

Into:

struct foo FooPtrBody;
...
   FooPtrBody.A  FooPtrBody.B

This comes up occasionally, for example, the 'disp' global in 183.equake (where
the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%)
on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue'
globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)).

The nice thing about this xform is that it exposes the resulting global to
global variable optimization and makes alias analysis easier in addition to
eliminating a few loads.

llvm-svn: 16916
2004-10-11 05:54:41 +00:00
Chris Lattner
a306f07a3b This testcase ensures that we can SRA a global even if part of the global
cannot be SRA'd

llvm-svn: 16915
2004-10-11 05:00:30 +00:00
Chris Lattner
41e8491989 These testcases check to see if we can promote malloc's to globals in some
cases.

llvm-svn: 16914
2004-10-11 05:00:12 +00:00
Chris Lattner
6a42a4c820 Don't miss global optimizations because we run before the inliner
llvm-svn: 16913
2004-10-11 04:47:18 +00:00
Chris Lattner
f8dab00902 Fix SingleSource/Benchmarks/McGill/chomp
llvm-svn: 16912
2004-10-11 04:07:27 +00:00
Chris Lattner
f8380b953a If we are trying to create a ConstantExpr cast that is really a GEP to the
first element of an array, return a GEP instead of a cast.  This allows us
to transparently fold this:

int* getelementptr (int* cast ([100 x int]* %Gbody to int*), int 40)

into this:

int* getelementptr ([100 x int]* %Gbody, int 0, int 40)

llvm-svn: 16911
2004-10-11 03:57:30 +00:00
Misha Brukman
6d1c8c1826 Fix grammar
llvm-svn: 16910
2004-10-11 02:06:40 +00:00
Misha Brukman
c5c8db210f Remove exhuberant-style comments which remained from copying file from `sample'
llvm-svn: 16909
2004-10-11 00:56:41 +00:00
Misha Brukman
bf065681d5 Fix file header comment; remove sample project (extra-verbose) comments
llvm-svn: 16908
2004-10-11 00:55:47 +00:00
Misha Brukman
9d6c77d071 Fix file header comment
llvm-svn: 16907
2004-10-11 00:54:59 +00:00
Misha Brukman
5e9e7cada2 ModuloScheduling has moved to lib/Target/SparcV9
llvm-svn: 16906
2004-10-10 23:37:40 +00:00
Misha Brukman
995af8d2b1 Add ModuloScheduling to the recursive build tree
llvm-svn: 16905
2004-10-10 23:36:09 +00:00
Misha Brukman
95cbabd1b5 Adjust header file inclusion due to move
llvm-svn: 16904
2004-10-10 23:34:50 +00:00
Misha Brukman
0f102f7fc9 Adjust comment header and paths to refect move
llvm-svn: 16903
2004-10-10 23:34:36 +00:00