Commit Graph

443 Commits

Author SHA1 Message Date
Chris Lattner 76bff3438b Fix bug: Assembler/2002-12-15-GlobalResolve.ll
llvm-svn: 5039
2002-12-15 16:41:52 +00:00
Chris Lattner d53daec3e1 planes is not spelled with an O
llvm-svn: 5037
2002-12-15 16:20:23 +00:00
Chris Lattner 903a25d225 User defined operators are not supposed to live beyond the lifetime of the
pass.  Detect and flag them.

llvm-svn: 4801
2002-11-21 16:54:22 +00:00
Chris Lattner 98cf1f5d64 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner b251c3d727 Eliminate the concept of a deferred symbol table. The optimization really isn't,
and it causes obscure bugs to show up in passes.

llvm-svn: 4777
2002-11-20 18:07:48 +00:00
Chris Lattner b2e46c0714 Add a new Module::getNamedFunction method
llvm-svn: 4758
2002-11-19 18:41:44 +00:00
Chris Lattner 1f985e0d3c Add a method "getMainFunction()" that efficiently locates 'main' in a module
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Chris Lattner 4d2997f25d Fix nasty bug in ::isNeg()
llvm-svn: 4470
2002-10-31 17:09:06 +00:00
Chris Lattner f6cfaedcff Can simplify code now with the isCommutative() method.
llvm-svn: 4461
2002-10-31 04:24:23 +00:00
Chris Lattner cab6c33811 New isAssociative/isCommutative inspection methods, graciously contributed by
Casey Carter.

llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Misha Brukman 632df28deb Fix spelling of `propagate'.
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner 820d971233 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.

llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner 33100eddd2 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.

llvm-svn: 4186
2002-10-15 21:26:29 +00:00
Chris Lattner 163b890dfb - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)

llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner 251a7e6231 Minor cleanups, no changes to functionality
llvm-svn: 4157
2002-10-14 00:48:57 +00:00
Chris Lattner 149376dee5 - Change Function's so that their argument list is populated when they are
constructed.  Before, external functions would have an empty argument list,
    now a Function ALWAYS has a populated argument list.

llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner 69ce8674b5 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner 2c6abeac43 - Make Value::replaceAllUsesWith work with constants correctly. This fixes
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.

llvm-svn: 4103
2002-10-09 23:12:59 +00:00
Chris Lattner b1dd9bbc68 - Add new Constant::replaceUsesOfWithOnConstant which has an end result
similar to User::replaceUsesOfWith but actually does the right thing for
    constants.

llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner 6023f638a1 - Remove Value::use_remove
llvm-svn: 4090
2002-10-09 00:25:05 +00:00
Chris Lattner 3ea0c188b7 Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever to
assemble.  Now we scan the use-list from the back when removing users instead
of from the front.

llvm-svn: 4086
2002-10-08 23:46:55 +00:00
Chris Lattner 0d779712e7 Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
std::vector::reserve when possible

llvm-svn: 4085
2002-10-08 23:33:52 +00:00
Chris Lattner caf5b504a3 Changes to support PHINode::removeIncoming changes
llvm-svn: 4080
2002-10-08 21:36:34 +00:00
Chris Lattner fae98a2d28 - Change PHINode::removeIncomingValue to delete the phi node if the last
incoming value is removed!

llvm-svn: 4078
2002-10-08 21:34:58 +00:00
Chris Lattner acb038e5c7 Expose new "recalculate" method from dominatorset
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner d131986b0f Global variables are now external if they don't have initializers, not
"uninitialized"

llvm-svn: 4052
2002-10-06 22:48:09 +00:00
Chris Lattner 78bc0fa29f Check that we don't have external varaibles with internal linkage
llvm-svn: 4051
2002-10-06 22:47:32 +00:00
Chris Lattner 4cd9df88a7 PHI nodes are not allowed to exist with zero incoming values, check that
there aren't any like this.

llvm-svn: 4044
2002-10-06 21:00:31 +00:00
Chris Lattner 2cedf1ce82 Fix a nasty problem with dominance calculation for unreachable blocks.
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable".  This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.

llvm-svn: 4037
2002-10-04 14:45:48 +00:00
Chris Lattner 58185f2df9 - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter

llvm-svn: 4019
2002-10-02 19:38:55 +00:00
Chris Lattner 52db271374 Make sure to use the TimerGroup that we created!
llvm-svn: 3995
2002-10-01 20:12:06 +00:00
Chris Lattner d5fc9023a8 Make sure not to count the PassManager wrapers
llvm-svn: 3994
2002-10-01 20:08:11 +00:00
Chris Lattner af751b8e72 Factor timer code out of PassManager implementation, into a generic interface
exposed by Support/Timer.h.

llvm-svn: 3993
2002-10-01 19:54:07 +00:00
Chris Lattner 6b6f540959 Fix a problem that was caused by stale analyses being in CurrentAnalyses
llvm-svn: 3981
2002-09-29 22:50:22 +00:00
Chris Lattner ae3ac7e1c9 Improve printing of dominator sets
llvm-svn: 3976
2002-09-29 21:42:42 +00:00
Chris Lattner 98ae0f1897 - Add methods to ImmediateDominators & DominatorTree to allow updates
- Make DominatorTree::Node not inherit from std::vector

llvm-svn: 3939
2002-09-26 16:14:41 +00:00
Chris Lattner 4dfede8070 - Add new ctor to BasicBlock to allow insertion before any BB, not just at
the end of the function.

llvm-svn: 3934
2002-09-26 05:03:22 +00:00
Chris Lattner 480b37d479 * Fix ugly bug in previous checkin where I reused the name 'i' one too many times
* Print out immutable passes in the -debug-pass=Structure report.

llvm-svn: 3923
2002-09-25 22:26:52 +00:00
Chris Lattner ee0788d42d Add support for ImmutablePasses, which are not run, and cannot be
invalidated.

llvm-svn: 3921
2002-09-25 21:59:11 +00:00
Chris Lattner a450397247 Make sure that we abort if an error happens as early as neccesary. Before
it was possible for the passmanager to continue running passes after the
verifier even if the module was not well formed.

llvm-svn: 3820
2002-09-19 16:12:19 +00:00
Vikram S. Adve 0267d0c62e Remove specification of argument default from cpp file.
llvm-svn: 3772
2002-09-17 01:17:57 +00:00
Chris Lattner fc91ee91e8 Change the MallocInst & AllocaInst ctors to take the allocated type, not the
pointer type returned.

llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner 426752738b include/llvm/DataTypes.h includes this #define so we don't need it anymore
llvm-svn: 3708
2002-09-13 22:24:57 +00:00
Chris Lattner 548002f3d5 Another portability fix provided via Casey Carter:
ISSUE: getTimeRecord in lib/VMCore/Pass.cpp uses timeval and
gettimeofday() without including sys/time.h.

ACTION: Include sys/time.h.
llvm-svn: 3699
2002-09-13 14:47:12 +00:00
Chris Lattner bae3c67050 Add a new BasicBlockPass::doInitialization/Finalization(Function &) pair of
methods that may be useful for BasicBlockPasses.

llvm-svn: 3688
2002-09-12 17:06:40 +00:00
Chris Lattner 236c129844 Give better assertion message for error conditions
llvm-svn: 3680
2002-09-11 01:21:04 +00:00
Chris Lattner 8678d4e5e8 Allocation insts always have one operand
llvm-svn: 3677
2002-09-11 00:22:39 +00:00
Chris Lattner 5f45ca443e Add convenience ctor to BranchInst
llvm-svn: 3676
2002-09-10 23:54:58 +00:00
Chris Lattner 66d3a46afc Tighten up assertion checking for binary operators, not allowing invalid
instructions to _even be created_.

llvm-svn: 3661
2002-09-10 19:57:53 +00:00
Chris Lattner 7d734801d1 Add support for printing constpointerrefs more nicely
llvm-svn: 3654
2002-09-10 15:53:49 +00:00