Commit Graph

1029 Commits

Author SHA1 Message Date
Chris Lattner f516c698ff Check in initial version of ipcp
llvm-svn: 9423
2003-10-23 16:52:27 +00:00
Chris Lattner 0658cc20bd Make this pass substantially stronger by having it delete dead return values
as well as arguments.  Now it can delete arguments and return values which are
only passed into other arguments or are returned, if they are dead.  This causes
it to delete several hundred extra args/retvals from the C++ hello world program,
shrinking it by about 2K.

llvm-svn: 9398
2003-10-23 03:48:17 +00:00
Chris Lattner 9e8fe49c37 This important patch fixes two warnings in the linker which can occur from linking
valid pieces of code

llvm-svn: 9390
2003-10-22 23:03:38 +00:00
Chris Lattner 6d3425e87a Update the 'used' flag correctly
llvm-svn: 9366
2003-10-22 04:43:18 +00:00
Chris Lattner 12b3593dea Loop over the module, not the symbol table. This makes the code handle
unused external functions again

llvm-svn: 9365
2003-10-22 04:42:20 +00:00
Chris Lattner 4cd99ffa57 Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll
llvm-svn: 9363
2003-10-22 03:35:34 +00:00
Chris Lattner af2c00bf14 Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll
llvm-svn: 9359
2003-10-21 23:17:56 +00:00
Chris Lattner 4f2581f828 Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
llvm-svn: 9357
2003-10-21 22:46:38 +00:00
Chris Lattner 9bc22b7439 Fix message to make more sense and confuse Chris less
llvm-svn: 9354
2003-10-21 21:52:20 +00:00
John Criswell 29265fe981 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell 4436c49787 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner 2d9c117e21 Reorder for minor efficiency gain
llvm-svn: 9285
2003-10-20 05:54:26 +00:00
Chris Lattner b94550e537 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner b32f5748b7 Fix PR#50
llvm-svn: 9227
2003-10-18 06:14:59 +00:00
Chris Lattner f0fc9be634 ADd support for the new varargs instructions
llvm-svn: 9225
2003-10-18 05:56:52 +00:00
Chris Lattner 1facf89eaf Do not crash on empty structures
llvm-svn: 9195
2003-10-17 18:03:54 +00:00
Chris Lattner 068ad84038 Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner 50b6858e2e This code does not require random access use_lists
llvm-svn: 9156
2003-10-16 16:49:12 +00:00
Chris Lattner 5dbb244edb Eliminate using declaration
Rewrite code to work with use_lists what are either random access or bidirectional

llvm-svn: 9155
2003-10-16 16:48:53 +00:00
Chris Lattner f95d9b99b3 Decrease usage of use_size()
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner f77a856f3b Cleanup
llvm-svn: 9133
2003-10-15 16:42:21 +00:00
Chris Lattner b4778c73c9 Do not move variable sized allocations to the top of the caller, which might
break dominance relationships, and is otherwise bad.  This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll.  This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)

llvm-svn: 9109
2003-10-14 01:11:07 +00:00
Chris Lattner 612cafef0a Whoops, we inserted into the wrong set. What's up with the dead set anyway?
llvm-svn: 9094
2003-10-13 16:49:21 +00:00
Chris Lattner 951e7329e8 Use external df iterators to avoid revisiting blocks in functions with
multiple setjmp calls.

llvm-svn: 9093
2003-10-13 16:44:50 +00:00
Chris Lattner 178957028b Wrap code at 80 columns
llvm-svn: 9073
2003-10-13 05:04:27 +00:00
Chris Lattner 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner 7cce14bfbf Regularize header file comment, eliminate using's
llvm-svn: 9069
2003-10-13 03:30:47 +00:00
Chris Lattner f7a60cd9fa Minor cleanups
llvm-svn: 9067
2003-10-13 01:02:33 +00:00
Chris Lattner 56b8526083 Checkin an improvement contributed by Bill:
Only transform call sites in a setjmp'ing function which are reachable from
the setjmp.  If the call dominates the setjmp (for example), the called
function cannot longjmp to the setjmp.

This dramatically reduces the number of invoke instructions created in some
large testcases.

llvm-svn: 9066
2003-10-13 00:57:16 +00:00
Chris Lattner c4622a6955 Add support to the loop canonicalization pass to make it transform loops to
have a SINGLE backedge.  This is useful to, for example, the -indvars pass.

This implements testcase LoopSimplify/single-backedge.ll and closes PR#34

llvm-svn: 9065
2003-10-13 00:37:13 +00:00
Chris Lattner 72272a70b8 Rename loop preheaders pass to loop simplify
llvm-svn: 9061
2003-10-12 21:52:28 +00:00
Chris Lattner 55d4788397 File is renamed to LoopSimplify.cpp
llvm-svn: 9059
2003-10-12 21:44:18 +00:00
Chris Lattner 154e4d5dea First step in renaming the preheaders pass to loopsimplify
llvm-svn: 9058
2003-10-12 21:43:28 +00:00
Chris Lattner 9703c02ce4 The preheader insertion pass only depends on the CFG. Mark it as such, which
allows GCCAS to only run it once.

llvm-svn: 9056
2003-10-12 19:33:10 +00:00
Brian Gaeke b8a4ed6543 Include <cstdio> instead of <stdio.h>.
llvm-svn: 9032
2003-10-10 18:46:52 +00:00
Brian Gaeke cc31fddf13 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman 8b2bd4ed47 Fix spelling.
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Misha Brukman b3acb4027e Fixing the spelling of this filename.
llvm-svn: 9009
2003-10-10 16:57:31 +00:00
Chris Lattner 35e56e7372 Update comment
llvm-svn: 8965
2003-10-08 16:56:11 +00:00
Chris Lattner 0bbbe5d4c8 Use a set to keep track of which edges have been noticed as executable already
to avoid reprocessing PHI nodes needlessly.  This speeds up the big bad PHI
testcase 43%: from 104.9826 to 73.5157s

llvm-svn: 8964
2003-10-08 16:55:34 +00:00
Chris Lattner 7324f7cd03 Minor fixes here and there
llvm-svn: 8963
2003-10-08 16:21:03 +00:00
Chris Lattner 71ac22ffb5 Avoid building data structures we don't really need. This improves the runtime
of a test that Bill Wendling sent me from 228.5s to 105s.  Obviously there is
more improvement to be had, but this is a nice speedup which should be "felt"
by many programs.

llvm-svn: 8962
2003-10-08 15:47:41 +00:00
Chris Lattner 950fc785ae whoops, don't accidentally lose variable names
llvm-svn: 8955
2003-10-07 22:58:41 +00:00
Chris Lattner 75b4d1deec Fix bug: InstCombine/cast.ll:test11 / PR#7
llvm-svn: 8954
2003-10-07 22:54:13 +00:00
Chris Lattner aec3d948cf Refactor code a bit
llvm-svn: 8952
2003-10-07 22:32:43 +00:00
Chris Lattner f8492537eb Fix bugzilla bug #5
llvm-svn: 8930
2003-10-07 19:33:31 +00:00
Chris Lattner ed922162e1 Bill contributed this major rewrite of the -lowerswitch pass to make it generate
logarithmic conditional branch sequences instead of linear sequences.  Thanks Bill!

llvm-svn: 8928
2003-10-07 18:46:23 +00:00
Chris Lattner 800aaaf207 Fix bug in previous checkin
llvm-svn: 8922
2003-10-07 15:17:02 +00:00
Chris Lattner e8ed4ef039 Minor speedups for the instcombine pass
llvm-svn: 8894
2003-10-06 17:11:01 +00:00