Commit Graph

498 Commits

Author SHA1 Message Date
Chris Lattner
27accf7692 Remove #include
Extend getNullValue to work with struct and array types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5718 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-06 21:02:18 +00:00
Chris Lattner
05ddff9b98 Simplify some of the PHI node interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5700 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-05 21:15:12 +00:00
Chris Lattner
bf22c73c9c Allow ImmutablePass's to require other immutable passes and to be initialized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5630 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:10:57 +00:00
Chris Lattner
a3183be835 Fix a misunderstanding of the standard associative containers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 05:34:36 +00:00
Chris Lattner
0779388ff8 This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying "vortex"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-13 19:46:22 +00:00
Chris Lattner
36e50ff3e4 Simplify assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5455 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 03:33:22 +00:00
Joel Stanley
95e8b1c976 Added implementation of alternate CallInst constructors (one ctor is
for no actual parameters, and one ctor is for one actual parameter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 00:39:58 +00:00
Chris Lattner
2f6bb2bce1 * Fix linking of opaque types and their non-opaque versions
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5441 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 20:53:43 +00:00
Chris Lattner
5c2d335d86 Eliminate using decls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5439 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 19:53:34 +00:00
Chris Lattner
6d57086129 Fix bug Regression/Verifier/2002-11-05-GetelementptrPointers.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:19:44 +00:00
Chris Lattner
6a490cedb5 Make type resolution a bit more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 19:42:39 +00:00
Chris Lattner
197ff79a8c Fix bug: Assembler/2002-12-15-GlobalResolve.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5039 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 16:41:52 +00:00
Chris Lattner
8e637a9383 planes is not spelled with an O
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 16:20:23 +00:00
Chris Lattner
b91b657e02 Fix big bug introduced with symbol table changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4885 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 18:32:30 +00:00
Chris Lattner
627079d42a User defined operators are not supposed to live beyond the lifetime of the
pass.  Detect and flag them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4801 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 16:54:22 +00:00
Chris Lattner
6e6026b465 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:36:02 +00:00
Chris Lattner
2c08dcc276 Eliminate the concept of a deferred symbol table. The optimization really isn't,
and it causes obscure bugs to show up in passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:07:48 +00:00
Chris Lattner
9a641b4bce Add a new Module::getNamedFunction method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4758 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 18:41:44 +00:00
Chris Lattner
a9a93f3777 Add a method "getMainFunction()" that efficiently locates 'main' in a module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4629 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 20:34:02 +00:00
Chris Lattner
2fe6626ead Fix nasty bug in ::isNeg()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4470 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 17:09:06 +00:00
Chris Lattner
6b1c4fcfb5 Can simplify code now with the isCommutative() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4461 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:24:23 +00:00
Chris Lattner
f2da7241f5 New isAssociative/isCommutative inspection methods, graciously contributed by
Casey Carter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4459 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:14:01 +00:00
Misha Brukman
a3bbcb5b66 Fix spelling of `propagate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:06:16 +00:00
Chris Lattner
cb2610ea03 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 20:00:28 +00:00
Chris Lattner
0dad6e9c95 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:26:29 +00:00
Chris Lattner
34048e2ace - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4160 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:30:23 +00:00
Chris Lattner
479b54b6bb Minor cleanups, no changes to functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4157 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 00:48:57 +00:00
Chris Lattner
69da5cf261 - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4149 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 20:57:00 +00:00
Chris Lattner
0b16ae209a - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4147 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:39:16 +00:00
Chris Lattner
28eca8bb56 - Make Value::replaceAllUsesWith work with constants correctly. This fixes
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4103 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:59 +00:00
Chris Lattner
c251f9e0ae - Add new Constant::replaceUsesOfWithOnConstant which has an end result
similar to User::replaceUsesOfWith but actually does the right thing for
    constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4102 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:25 +00:00
Chris Lattner
61d295aa29 - Remove Value::use_remove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4090 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:25:05 +00:00
Chris Lattner
d1c657e2c7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4086 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:46:55 +00:00
Chris Lattner
d43c7d2077 Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
std::vector::reserve when possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4085 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:33:52 +00:00
Chris Lattner
dee430d26e Changes to support PHINode::removeIncoming changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:36:34 +00:00
Chris Lattner
8bcb768a9c - Change PHINode::removeIncomingValue to delete the phi node if the last
incoming value is removed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4078 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:34:58 +00:00
Chris Lattner
7ca266fe1f Expose new "recalculate" method from dominatorset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4074 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 19:12:08 +00:00
Chris Lattner
0c5e362118 Global variables are now external if they don't have initializers, not
"uninitialized"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:48:09 +00:00
Chris Lattner
61b91bc156 Check that we don't have external varaibles with internal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:47:32 +00:00
Chris Lattner
f6ffcb6b71 PHI nodes are not allowed to exist with zero incoming values, check that
there aren't any like this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:00:31 +00:00
Chris Lattner
4e4caeffbd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:45:48 +00:00
Chris Lattner
061269be97 - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 19:38:55 +00:00
Chris Lattner
57b062a8cc Make sure to use the TimerGroup that we created!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:12:06 +00:00
Chris Lattner
ccc7bef873 Make sure not to count the PassManager wrapers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:08:11 +00:00
Chris Lattner
f1da555028 Factor timer code out of PassManager implementation, into a generic interface
exposed by Support/Timer.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3993 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 19:54:07 +00:00
Chris Lattner
3f00ef9660 Fix a problem that was caused by stale analyses being in CurrentAnalyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3981 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:50:22 +00:00
Chris Lattner
4d7a75a9e3 Improve printing of dominator sets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3976 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:42:42 +00:00
Chris Lattner
d74472ed21 - Add methods to ImmediateDominators & DominatorTree to allow updates
- Make DominatorTree::Node not inherit from std::vector


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3939 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:14:41 +00:00
Chris Lattner
0a1a874d1f - Add new ctor to BasicBlock to allow insertion before any BB, not just at
the end of the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3934 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:03:22 +00:00
Chris Lattner
6ffa0a7f7c * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 22:26:52 +00:00