Commit Graph

66 Commits

Author SHA1 Message Date
Chris Lattner
206ad80ef9 The proper prototype for malloc returns a pointer, not an unsized array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1463 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:32:20 +00:00
Chris Lattner
7a17675206 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 00:03:30 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
7061dc50b2 Split the PHINode class out from the iOther.h file into the iPHINode.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1405 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 18:02:31 +00:00
Chris Lattner
430aa9ec1c -cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1312 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 04:34:46 +00:00
Chris Lattner
fd79ab5088 Fix minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1273 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 20:13:04 +00:00
Chris Lattner
277b4e4a9b Don't print spurious linking warnings about methods that are never used.
Cleanup ExprTypeConvert a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1141 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 19:43:10 +00:00
Chris Lattner
59cd9f1e9f Refactor code to share stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1127 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 23:24:06 +00:00
Chris Lattner
ab9f21f4c4 Fix cast instructions that end up in bad places in GCC output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1117 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 07:40:51 +00:00
Chris Lattner
5b497ee7c2 Add new cleanup pass:
//  1. PHI nodes with multiple entries for the same predecessor.  GCC sometimes
//     generates code that looks like this:
//
//  bb7:  br bool %cond1004, label %bb8, label %bb8
//  bb8: %reg119 = phi uint [ 0, %bb7 ], [ 1, %bb7 ]
//
//     which is completely illegal LLVM code.  To compensate for this, we insert
//     an extra basic block, and convert the code to look like this:
//
//  bb7: br bool %cond1004, label %bbX, label %bb8
//  bbX: br label bb8
//  bb8: %reg119 = phi uint [ 0, %bbX ], [ 1, %bb7 ]
//


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1114 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 21:08:59 +00:00
Chris Lattner
b20807f23e * Export method to merge identically named methods
* Add code to fix PHI nodes that are missing arguments.  These PHI nodes can
  be generated by GCC if there is an uninitialized variable flowing into a merge
  point.  For example:

int foo(int y) {
  int X;
  if (y) X = 1;
  return X;
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1110 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 19:51:56 +00:00
Chris Lattner
055c963f58 Changes to compile the TSP benchmark successfully. Favor warning instead of assertion failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1103 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 10:04:22 +00:00
Chris Lattner
b6b26921e3 Add code to link method together with the same name if one is vararg and the other isn't.
This resolves definitions like this:
   %list * "foo"(...)
   %list * "foo"(int)

together which can often occur because C programmers don't put prototypes in like they should.  GRR


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1102 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 09:19:00 +00:00
Chris Lattner
591bda986e Propogate name to the malloc itself instead of to the cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1071 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-01 02:40:36 +00:00
Chris Lattner
bfe11108ad Implement code to convert %malloc and %free FUNCTION CALLS into the instruction equivalent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1065 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 06:35:59 +00:00
Chris Lattner
e51e03b3c6 Initial version of GCC cleanup pass: just removes extraneous global symbol table entries for types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1062 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-31 04:33:19 +00:00