Commit Graph

12512 Commits

Author SHA1 Message Date
Misha Brukman 5cb198a9c6 Use the common `NoFPElim' setting instead of our own.
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Misha Brukman 069ca067e1 Implement `NoFPElim' in a target-agnostic fashion so it can be shared.
llvm-svn: 14297
2004-06-21 21:08:45 +00:00
Misha Brukman ebfd11ffb7 Make a single `NoFPElim' switch available to all targets.
llvm-svn: 14296
2004-06-21 21:07:51 +00:00
Misha Brukman 5e323e10df * Make indentation consistent at 2 chars
* Doxygenify function comments
* Wrap code at 80 cols

llvm-svn: 14295
2004-06-21 20:22:03 +00:00
Misha Brukman a97f29237e This file is no longer applicable.
llvm-svn: 14294
2004-06-21 20:17:41 +00:00
Misha Brukman cba6532e05 Let's be consistent: listing format `os/arch'.
llvm-svn: 14293
2004-06-21 18:43:23 +00:00
Misha Brukman 302df232b5 llvm/IntrinsicLowering.h => llvm/CodeGen/IntrinsicLowering.h
llvm-svn: 14292
2004-06-21 18:30:31 +00:00
Misha Brukman 6752fb58b6 Handle shifts >= 32 bits.
llvm-svn: 14291
2004-06-21 18:01:47 +00:00
Misha Brukman 11f74d7072 Intrinsic::isnan has gone away, support for it commented out.
Intrinsic::isunordered has arrived, and we just use the standard lowering
pass for it.

llvm-svn: 14290
2004-06-21 17:58:36 +00:00
Misha Brukman c3a0b330c9 Convert tabs to spaces.
llvm-svn: 14289
2004-06-21 17:41:12 +00:00
Misha Brukman 254d2cf452 Type::getPrimitiveID() -> getTypeID()
llvm-svn: 14288
2004-06-21 17:25:55 +00:00
Misha Brukman 6292a056a8 Type::getPrimitiveID() -> getTypeID()
llvm-svn: 14287
2004-06-21 17:19:08 +00:00
Misha Brukman e05203fb40 Initial revision
llvm-svn: 14283
2004-06-21 16:55:25 +00:00
Misha Brukman e54cbdd478 Mention the requirement of dlcompat for MacOS X.
llvm-svn: 14282
2004-06-21 14:00:44 +00:00
Chris Lattner 4fbff990b0 Rename Interval class to LiveInterval to avoid conflicting with the already
existing llvm::Interval class.

Patch contributed by Vladimir Prus!
http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html

llvm-svn: 14281
2004-06-21 13:10:56 +00:00
Chris Lattner 265eb6469a Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client
code.  Patch contributed by Vladimir Prus.

llvm-svn: 14280
2004-06-21 12:12:12 +00:00
Reid Spencer afd6bfe736 Nullify this test as it causes infinite loop in optimized nightly test.
llvm-svn: 14279
2004-06-21 08:11:32 +00:00
Chris Lattner f12c4a3d37 *FINALLY* Fix a really nasty nondeterministic bug that has been haunting us
since May 1st.  In this code, the pred iterator was being invalidated sometimes
causing the wrong entries to be added to PHI nodes.

The fix for this is to defererence and safe the *PI value before we hack on
branch instructions, which changes use/def chains, which SOMETIMES invalidates
the iterator.

llvm-svn: 14278
2004-06-21 07:19:01 +00:00
Chris Lattner 46f60890a3 Comment out the isnan stuff until we get a proper autoconf test for it
breaking the build on sparc is not acceptable.

llvm-svn: 14277
2004-06-21 06:17:21 +00:00
Chris Lattner 1c676f76b6 Make order of argument addition deterministic. In particular, the layout
of ConstantInt objects in memory used to determine which order arguments
were added in in some cases.

llvm-svn: 14276
2004-06-21 00:07:58 +00:00
Chris Lattner baaed7ee90 REALLY fix PR378: crash in scalar evolution analysis
llvm-svn: 14275
2004-06-20 20:32:16 +00:00
Reid Spencer ca578611cc Added a note about requiring QMTest 2.0.3 instead of any other version.
llvm-svn: 14274
2004-06-20 19:21:11 +00:00
Chris Lattner b7a6a33ca9 Bug fixed
llvm-svn: 14273
2004-06-20 19:08:50 +00:00
Chris Lattner 6bfca8f5f1 Fix a bug in my change last night that caused a few test failures.
llvm-svn: 14270
2004-06-20 17:01:44 +00:00
Chris Lattner 5004e09ad2 IntrinsicLowering.cpp now lives in lib/CodeGen/
llvm-svn: 14269
2004-06-20 07:59:27 +00:00
Chris Lattner 58559b370a Update path
llvm-svn: 14268
2004-06-20 07:53:22 +00:00
Chris Lattner 243561d74b Header moved into the CodeGen directory
llvm-svn: 14267
2004-06-20 07:50:32 +00:00
Chris Lattner bcdadf3765 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
llvm-svn: 14266
2004-06-20 07:49:54 +00:00
Chris Lattner 4c96b0883f Move the IntrinsicLowering header into the CodeGen directory
llvm-svn: 14265
2004-06-20 07:46:18 +00:00
Chris Lattner 5f142cfc4d Start moving IntrinsicLowering out of VMCore into libcodegen, as per PR346
llvm-svn: 14264
2004-06-20 07:40:46 +00:00
Chris Lattner eb3e84078d Do not sort SCEV objects by address: instead sort by complexity and group
by address.  This prevents the resultant SCEV objects from depending on
where in memory other scev objects happen to live.

llvm-svn: 14263
2004-06-20 06:23:15 +00:00
Chris Lattner c9e06336ab Make use of BinaryOperator::create* methods to shrinkify code.
llvm-svn: 14262
2004-06-20 05:04:01 +00:00
Chris Lattner e6115e471c Add methods like BinaryOperator::createAdd that take an instruction to insert
before.

llvm-svn: 14261
2004-06-20 05:02:56 +00:00
Chris Lattner 7d30a6c145 Fix the inliner to be deterministic, not letting its output depend on the
relative location of Function objects in memory.

llvm-svn: 14260
2004-06-20 04:11:48 +00:00
Chris Lattner d537eb1264 Make fpcmp handle running off of the beginning or end of the file correctly.
llvm-svn: 14259
2004-06-20 03:12:18 +00:00
Chris Lattner 9734fd0980 Add some DEBUG output to the simplifycfg routines
Fix another non-deterministic behavior, this one should actually speed up the
code though as it was doing silly things.

llvm-svn: 14258
2004-06-20 01:13:18 +00:00
Reid Spencer 0277fd7b44 A utility to search the LLVM source tree for a grep pattern. This is a
replacement for getsrcs.sh which now generates too much text to put on a
Linux command line. The approach taken with llvmgrep is to execute a find
command and execute a grep on each file that matches the name pattern. The
arguments to this script are the same as those of egrep. Note that the -H
and -n options to egrep will always be passed so that you always get the
file and line number of matches.

llvm-svn: 14255
2004-06-19 20:32:55 +00:00
Chris Lattner 42ad646104 Now that dominator tree children are built in determinstic order, this horrible code
can go away

llvm-svn: 14254
2004-06-19 20:23:35 +00:00
Chris Lattner 39396e2df9 compute dominator tree children in a deterministic order that does not depend
on the address of BasicBlock objects in memory.  This eliminates stuff like this:

 Inorder Dominator Tree:
   [1]  %entry
     [2]  %loopentry
-      [3]  %loopexit
       [3]  %no_exit
-        [4]  %endif
         [4]  %then
+        [4]  %endif
+      [3]  %loopexit
       [3]  %return

llvm-svn: 14253
2004-06-19 20:13:48 +00:00
Chris Lattner 89f803bb32 Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects

llvm-svn: 14252
2004-06-19 20:04:47 +00:00
Chris Lattner 940b7ba5ad This will hopefully fix a heisenbug that Vladimir Merzliakov is running
into valiantly trying to compile stuff on freebsd.

llvm-svn: 14251
2004-06-19 19:01:26 +00:00
Reid Spencer 006b386e6f Add a note about GCC 3.3.2 optimization bug that causes llc to spin.
llvm-svn: 14250
2004-06-19 18:24:05 +00:00
Chris Lattner 4027500e1c Fix a nasty bug, noticed by Reid
llvm-svn: 14249
2004-06-19 18:15:50 +00:00
Chris Lattner ec2d34cc19 Fix one source of nondeterminism in the -licm pass: the hoist pass
was processing blocks in whatever order they happened to end up in the
dominator tree data structure.  Force an ordering.

llvm-svn: 14248
2004-06-19 08:56:43 +00:00
Chris Lattner 4db0f8260a Change to use the StableBasicBlockNumbering class
llvm-svn: 14247
2004-06-19 08:42:40 +00:00
Chris Lattner d31410d824 Initial checkin of the StableBasicBlockNumbering, a little helper class for computing
(strangely enough) a stable (determinstic) numbering for basic blocks.

llvm-svn: 14246
2004-06-19 08:41:59 +00:00
Chris Lattner feda9d0583 Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
This is a regression from 1.2, though noone uses -no-aa anyway

llvm-svn: 14245
2004-06-19 08:05:58 +00:00
Chris Lattner a52ab6f57f Do not let the numbering of PHI nodes placed in the function depend on
non-deterministic things like the ordering of blocks in the dominance
frontier of a BB.  Unfortunately, I don't know of a better way to solve
this problem than to explicitly sort the BB's in function-order before
processing them.  This is guaranteed to slow the pass down a bit, but
is absolutely necessary to get usable diffs between two different tools
executing the mem2reg or scalarrepl pass.

Before this, bazillions of spurious diff failures occurred all over the
place due to the different order of processing PHIs:

-       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.0, uint 0, uint 0
+       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.1, uint 0, uint 0

Now, the diffs match.

llvm-svn: 14244
2004-06-19 07:40:14 +00:00
Chris Lattner b2b151d297 Do not sort by the address of LLVM ConstantInt* objects. This produces
nondeterministic results that depend on where these objects land in memory.
Instead, sort by the value of the constant, which is stable.

Before this patch, the -simplifycfg pass run from two different compilers
could cause different code to be generated, though it was semantically the
same:

@@ -12258,8 +12258,8 @@
        %s_addr.1 = phi sbyte* [ %s, %entry ], [ %inc.0, %no_exit ]             ; <sbyte*> [#uses=5]
        %tmp.1 = load sbyte* %s_addr.1          ; <sbyte> [#uses=1]
        switch sbyte %tmp.1, label %no_exit [
-                sbyte 0, label %loopexit
                 sbyte 46, label %loopexit
+                sbyte 0, label %loopexit
        ]

We need to stomp all of this stuff out.

llvm-svn: 14243
2004-06-19 07:02:14 +00:00
Chris Lattner b5f8eb8315 Do not loop over uses as we delete them. This causes iterators to be
invalidated out from under us.  This bug goes back to revision 1.1: scary.

llvm-svn: 14242
2004-06-19 02:02:22 +00:00