Chris Lattner
9c07866ef8
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
2004-10-14 05:13:36 +00:00
Chris Lattner
1c7efba2bd
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
2004-10-14 05:12:50 +00:00
Reid Spencer
83d3aad50e
Allow this file to compile on Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16971 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:33:25 +00:00
Reid Spencer
8af3ed0354
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
2004-10-14 03:09:02 +00:00
Reid Spencer
7d5ec231ca
Get proper BSD #includes for MappedFile implementation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:06:59 +00:00
Reid Spencer
8545fc151e
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
2004-10-14 03:05:59 +00:00
Chris Lattner
f74acc7669
Today is not my day. Fix broken #
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 02:31:35 +00:00
Chris Lattner
823cacc276
unbreak previous checkin :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 02:06:48 +00:00
Chris Lattner
84d1ced4a9
Add back a missing paren
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16965 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:57:28 +00:00
Chris Lattner
1c765b0037
Fit to 80 cols
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16964 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:49:34 +00:00
Chris Lattner
f9d7178ba8
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
2004-10-14 01:46:07 +00:00
Chris Lattner
4a242b32f6
Fit in 80 columns
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:39:18 +00:00
Chris Lattner
b0bf6643b0
Minor cleanups
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:35:17 +00:00
Chris Lattner
4523709d8e
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
2004-10-13 15:25:46 +00:00
Chris Lattner
fbb719c7f0
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
2004-10-13 15:11:23 +00:00
Chris Lattner
c87b1db927
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
2004-10-13 15:09:21 +00:00
Reid Spencer
a44544d6e7
Changes for automake.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:56:07 +00:00
Reid Spencer
09252e970e
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
2004-10-13 11:53:12 +00:00
Reid Spencer
36a7d906c3
Updates for changes in Makefile rules.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16951 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:48:50 +00:00
Reid Spencer
d96cb6eaa0
Update to reflect changes in Makefile rules.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Reid Spencer
4f2458912c
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
2004-10-13 11:39:51 +00:00
Chris Lattner
86e100bd9b
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
2004-10-13 04:44:53 +00:00
Misha Brukman
b3a734a534
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
2004-10-13 01:07:55 +00:00
Reid Spencer
177dbe2b36
Resolution to PR451.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 01:01:03 +00:00
Reid Spencer
38bfee4ba1
Changes for libtool 1.5.10
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16945 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 00:51:45 +00:00
Reid Spencer
04c2144f90
Update for libtool 1.5.10
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16944 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 00:19:25 +00:00
Reid Spencer
6bc488beef
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
2004-10-13 00:18:58 +00:00
Misha Brukman
c2ab5a2a63
Fix file comment header
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 21:48:02 +00:00
Misha Brukman
481d56c5de
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
2004-10-12 20:35:04 +00:00
Misha Brukman
fc6723f659
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
2004-10-12 19:17:11 +00:00
Misha Brukman
2c9039eb1a
Wrap lines at 80 cols
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 18:35:57 +00:00
Chris Lattner
e004fd005d
Add comment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 17:08:44 +00:00
Misha Brukman
207f2d4056
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
2004-10-12 17:06:17 +00:00
Chris Lattner
15d879e139
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
2004-10-12 16:52:09 +00:00
Chris Lattner
9d990a01a9
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
2004-10-12 16:21:18 +00:00
Chris Lattner
5c3734e349
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
2004-10-12 16:10:39 +00:00
Chris Lattner
35b9e48cfd
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
2004-10-12 04:52:52 +00:00
Chris Lattner
b18dfebb3a
New testcase for memmove -> memcpy transform
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:51:55 +00:00
Chris Lattner
84e48b860d
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
2004-10-12 04:45:20 +00:00
Chris Lattner
a28809d1fd
Minor tweaks
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:32:37 +00:00
Chris Lattner
e80c8191c2
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
2004-10-12 04:20:46 +00:00
Chris Lattner
4ec82eb1de
Implement a new method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:20:25 +00:00
Chris Lattner
673e02b0c3
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
2004-10-12 01:49:27 +00:00
Chris Lattner
989cbd58fb
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
2004-10-12 01:02:29 +00:00
Chris Lattner
a4b9c7841f
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
2004-10-11 23:06:50 +00:00
Chris Lattner
7fa6e666ec
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
2004-10-11 22:52:25 +00:00
Chris Lattner
4b83380f33
Implement remove/eraseFromParent methods
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16922 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 22:21:39 +00:00
Chris Lattner
b92f50fe60
Add long overdue methods
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16921 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 22:21:13 +00:00
Chris Lattner
c9b938065a
Make this build
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 20:53:28 +00:00
Chris Lattner
6a9fdfaec8
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
2004-10-11 19:40:04 +00:00