1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

998 Commits

Author SHA1 Message Date
Chris Lattner
0efef015fa Fix a bug that was preventing povray and namd from pool allocating correctly.
llvm-svn: 17632
2004-11-08 21:08:46 +00:00
Chris Lattner
dcee21898f Handle assert_fail special
llvm-svn: 17631
2004-11-08 21:08:28 +00:00
Chris Lattner
9f23af6d68 Remove dead var
llvm-svn: 17485
2004-11-05 04:52:08 +00:00
Chris Lattner
3b6d1045d3 Don't call Constant::getNullValue when the argument could be VoidTy
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
8572d582cf Fix comment
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Chris Lattner
d72b6b1e77 Improve comment
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Chris Lattner
14d85c9b09 Add more paranoid assertions :)
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Chris Lattner
29b6259de3 Fix some more problems where we called getOffset before getNode()
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
4b741eab69 Fix three bugs:
1. Calls to external global VARIABLES should not be treated as a call to an
    external function
 2. Efficiently deleting an element from a vector by using std::swap with
    the back, then pop_back is NOT a good way to keep the vector sorted.
 3. Our hope of having stuff get deleted by making them redundant just won't
    work.  In particular, if we have three calls in sequence that should be
    merged: A, B, C   first we unify B into A.  To be sure that they appeared
    identical (so B would be erased) we set B = A.  On the next step, we
    unified C into A and set C = A.  Unfortunately, this is no guarantee that
    C = B, so we would fail to delete the dead call.  Switch to a more
    explicit scheme.

llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
14dfc01ad5 Fix more undefined behavior
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
c17cd85776 * Add a method
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
  evaluation of arguments to function calls to ensure that getNode() was
  called before getOffset().  In practice, this was NOT happening.

llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Alkis Evlogimenos
1162280a0d Fix library name.
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
3a79669263 add support for UndefValue
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
1cef20bac1 Patch to support MSVC, contributed by Morten Ofstad
llvm-svn: 17214
2004-10-25 18:40:08 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
2fae8a1ef9 Add support for unreachable
llvm-svn: 17056
2004-10-16 18:21:33 +00:00
Chris Lattner
8d479b62ad Add support for undef
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Chris Lattner
cbdf19fed2 Add support
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Chris Lattner
b3a86dc93f Be more careful about looking for constants when we really want constantint's.
llvm-svn: 17029
2004-10-16 16:07:10 +00:00
Chris Lattner
3fc5e3778f Do not use the same variable name for two different variables in the
same scope.  This confused VC++ (and probably people too!).  Patch by
Morten Ofstad!

llvm-svn: 16985
2004-10-14 14:59:16 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +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
f8dab00902 Fix SingleSource/Benchmarks/McGill/chomp
llvm-svn: 16912
2004-10-11 04:07:27 +00:00
Reid Spencer
bc135b067a Build both archive and relinked objects
llvm-svn: 16892
2004-10-10 22:17:39 +00:00
Reid Spencer
7d9cba7a0f Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Chris Lattner
d15e144241 Fix a nasty dangling pointer problem, due to a free'd pointer being left in
a map.  This caused problems if a later object happened to be allocated at
the free'd object's address.

llvm-svn: 16813
2004-10-07 20:01:31 +00:00
Chris Lattner
e412d10cc0 Dont' let null nodes sneak past cast instructions
llvm-svn: 16779
2004-10-06 19:29:13 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
01bbefa96c Finegrainify namespacification
'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16434
2004-09-20 04:44:31 +00:00
Chris Lattner
e6755fe307 Fix a nasty iterator invalidation problem I introduced yesterday. This
unfortunately is the cause of a bunch of failures from tonight, and the
reason the tester is running so slow :(

llvm-svn: 16407
2004-09-19 19:01:06 +00:00
Chris Lattner
110bbafcf7 Add CallGraphNode::removeAnyCallEdgeTo method
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Chris Lattner
53dea1ce37 When changing a function, make sure to update the CallGraphNode for the
function, not just the CallGraph.

llvm-svn: 16388
2004-09-18 00:27:20 +00:00
Chris Lattner
a9b80a3258 Implement new changeFunction method, nuke a never implemented one.
llvm-svn: 16386
2004-09-18 00:22:13 +00:00
Reid Spencer
c6a8d70cff Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!

llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Chris Lattner
f1a0bf88c5 Add some assertions
llvm-svn: 16366
2004-09-15 16:59:47 +00:00
Chris Lattner
606caa617e Implement an AliasSetTracker::copyValue method
llvm-svn: 16344
2004-09-14 19:15:32 +00:00
Alkis Evlogimenos
0c50e0f211 Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!

llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
818ac2d5e2 Fix a bug that caused the pass to go into infinite loops on trivial testcases.
This is fallout of the Bug 122 changes.

llvm-svn: 15811
2004-08-16 05:38:02 +00:00
Chris Lattner
0b9b58e550 Add standard print/dump methods to CallGraph classes.
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Chris Lattner
13e1bc338d Hide this option
llvm-svn: 15415
2004-08-02 20:16:21 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Misha Brukman
2a80e53645 Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15328
2004-07-29 17:05:13 +00:00
Alkis Evlogimenos
fb27f702ca Merge i*.h headers into Instructions.h as part of bug403.
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
b2cf39d1a4 Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
This also fixes the miscompilation of MallocBench/gs with dead store
elimination enabled.

llvm-svn: 15324
2004-07-29 07:56:39 +00:00
Brian Gaeke
45adb41f46 Make the create...() functions for some of these passes return a FunctionPass *.
llvm-svn: 15276
2004-07-27 17:43:21 +00:00
Chris Lattner
81f96c5a79 nuke pointless -debug output
llvm-svn: 15267
2004-07-27 08:03:18 +00:00