Commit Graph

508 Commits

Author SHA1 Message Date
Chris Lattner 4b4dacd838 Make Module::getNamedFunction prefer non-external functions if there is more than
one function of the same name

llvm-svn: 7274
2003-07-23 20:21:30 +00:00
Chris Lattner f26a8ee580 Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner 6077c3195f Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman 7fdaab4f68 The word `separate' only has one `e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner d401f39872 Avoid printing out huge structures or arrays if they are just filled with zeros
llvm-svn: 6938
2003-06-28 20:08:24 +00:00
Chris Lattner 4ede64e304 Implement more aggressive folding of constant GEP instructions
llvm-svn: 6913
2003-06-26 05:22:45 +00:00
Chris Lattner 8bd8bc8399 Make assertion more descriptive
llvm-svn: 6889
2003-06-24 22:20:19 +00:00
Chris Lattner 4c9cd8262a Add support for GCC 3.3
llvm-svn: 6865
2003-06-23 19:16:20 +00:00
Chris Lattner 22ced56476 Fix bug: InstCombine/2003-06-22-ConstantExprCrash.ll
llvm-svn: 6857
2003-06-22 20:48:30 +00:00
Chris Lattner 0cfcaf0cc3 Remove usage of sys/unistd.h
llvm-svn: 6788
2003-06-19 18:42:09 +00:00
Chris Lattner 8826647168 Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Brian Gaeke 87b4f0765c lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.

lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.

llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner cc7d6ff656 Fix bug: Linker/2003-06-02-TypeResolveProblem2.ll
llvm-svn: 6699
2003-06-16 12:11:33 +00:00
Chris Lattner d295d99664 Fix (bogus) possibly uninitialized warning
llvm-svn: 6634
2003-06-05 21:01:26 +00:00
Chris Lattner 93c8f14906 * Make assertion message useful
* Kill dead conditional

llvm-svn: 6544
2003-06-02 17:42:47 +00:00
Chris Lattner 7fa6783a01 Fix bug: Linker/2003-06-02-TypeResolveProblem.ll
llvm-svn: 6542
2003-06-02 17:25:46 +00:00
Chris Lattner 39adbfca5b Don't print out unique identifier for opaque types
llvm-svn: 6511
2003-06-01 03:45:51 +00:00
Chris Lattner 8acf346e20 Fix constant folding to ALWAYS work.
llvm-svn: 6355
2003-05-27 19:16:07 +00:00
Chris Lattner 20ec7bc0db Fix problem with last checkin.
llvm-svn: 6328
2003-05-25 16:15:32 +00:00
Chris Lattner 98fa07b1d5 Fix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll
This was a problem with constants having their types resolved to some new type,
but there was already a constant of the new type created.  Before, these types
were never merged together, now they are.

llvm-svn: 6314
2003-05-23 20:03:32 +00:00
Chris Lattner f31a257bfb Remove using declarations and extraneous #includes
llvm-svn: 6303
2003-05-22 21:47:17 +00:00
Chris Lattner ef76b27a19 Fix static constructor ordering problem
llvm-svn: 6302
2003-05-22 21:31:52 +00:00
Chris Lattner 5eef9ffc27 Remove using declarations
llvm-svn: 6300
2003-05-22 21:21:43 +00:00
Chris Lattner 38a9bcde76 Add support for shift constant expressions
llvm-svn: 6260
2003-05-21 17:49:25 +00:00
Misha Brukman e5838c4d72 s/convertable/convertible/g
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner 192623ec93 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)

llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner cb4d26fb95 Fix bug: Assembler/2003-05-15-AssemblerProblem.llx
llvm-svn: 6234
2003-05-15 19:37:21 +00:00
Chris Lattner 55ed6561a1 Remove unnecessary casts
llvm-svn: 6201
2003-05-14 17:51:05 +00:00
Chris Lattner 15285abcbe Print opaque types
llvm-svn: 6200
2003-05-14 17:50:47 +00:00
Chris Lattner 69f6af1604 Fix bug
llvm-svn: 6184
2003-05-14 02:47:13 +00:00
Chris Lattner c2ceed1b38 Implement another getelementptr folding opportunity that arises when
linking stuff with appending linkage

llvm-svn: 6180
2003-05-13 21:50:52 +00:00
Chris Lattner 2b383d2ef2 Eliminate using declarations
llvm-svn: 6179
2003-05-13 21:37:02 +00:00
Chris Lattner 4dc3fcaff3 Fix bug: Dominators/2003-05-12-UnreachableCode.ll
llvm-svn: 6158
2003-05-12 22:35:13 +00:00
Chris Lattner 26891626fc Fix Bug: ConstProp/2003-05-12-DivideError.ll
llvm-svn: 6125
2003-05-12 15:26:25 +00:00
Chris Lattner bad4b4a52b llvm.va_start only takes on argument now
Verify that va_start doesn't occur in functions with no varargs

llvm-svn: 6038
2003-05-08 15:55:31 +00:00
Chris Lattner bb346d07b5 Add more support for intrinsic functions and for varargs stuff
llvm-svn: 6035
2003-05-08 03:47:33 +00:00
Chris Lattner f70da10697 Add support for the new va_arg instruction
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner ab7d1ab806 Remove using declarations
llvm-svn: 6022
2003-05-08 02:08:14 +00:00
Chris Lattner ef8c8332b1 Fix a bug that occurred when removing the last predecessor INTO an
infinite loop

llvm-svn: 5953
2003-04-25 23:14:19 +00:00
Chris Lattner e17c1c5ad8 ** CORRECTLY, conservatively handle constant expressions
llvm-svn: 5924
2003-04-25 02:52:06 +00:00
Chris Lattner 60430423c9 Fix a nasty bug where the ConstantMerge pass was invalidating the TargetData pass
even though it was immutable.  Immutable passes should never end up in CurrentAnalyses!

llvm-svn: 5906
2003-04-24 20:07:38 +00:00
Chris Lattner 889f620841 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner c840aa64e2 Emit information about target
llvm-svn: 5844
2003-04-22 19:07:19 +00:00
Chris Lattner c3f6e00011 Add support for tracking whether a module is 64/32 bit and big/little endian
Also add a moduleID field which can be used for diagnostics

llvm-svn: 5834
2003-04-22 18:02:04 +00:00
Chris Lattner 534952b0d5 Remove arbitrary limitation
llvm-svn: 5818
2003-04-19 00:50:37 +00:00
Chris Lattner acdbe7158d Don't build constantexprs that could be folded
llvm-svn: 5801
2003-04-17 19:24:48 +00:00
Chris Lattner 1f0049c79c Allow constant folding of GEP instructions, even if we don't do a whole lot yet.
Fold ConstExpr casts better
castToPointer shouldn't be forced to return a constantpointer

llvm-svn: 5800
2003-04-17 19:24:18 +00:00
Chris Lattner 46b3d30bf6 Change the interface to constant expressions to allow automatic folding
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner 3ac483bc89 Add code to verify correctly linkages
llvm-svn: 5788
2003-04-16 20:42:40 +00:00