Commit Graph

654 Commits

Author SHA1 Message Date
Chris Lattner fb8e19b7ca Fix bug: CBackend/2003-10-23-UnusedType.ll and hopefully 252.eon
llvm-svn: 9441
2003-10-23 19:30:30 +00:00
Chris Lattner 5987ab8677 This is a disgusting hack that improves code substantially, by making
callgraphSCC passes more effective.

llvm-svn: 9384
2003-10-22 18:53:31 +00:00
Chris Lattner ac4238f7bc Do not add unreachable code to a natural loop!
llvm-svn: 9377
2003-10-22 16:41:21 +00:00
Chris Lattner aa81dce20c Make sure to print labels on nodes without names
llvm-svn: 9376
2003-10-22 16:30:58 +00:00
Chris Lattner 9d63afdea5 If the basic block has no name, make sure to print the % number of it
llvm-svn: 9375
2003-10-22 16:22:42 +00:00
Chris Lattner a93d11bc1d Implement the Function::viewCFG* methods, for use in a debugger. Also, the
-print-cfg pass now lives here.

llvm-svn: 9374
2003-10-22 16:03:49 +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
Chris Lattner dcd1466a80 Convert this code from using annotations to using a local map
llvm-svn: 9310
2003-10-20 20:52:23 +00:00
Chris Lattner 93fa46476b Remove using declaration
llvm-svn: 9307
2003-10-20 20:38:17 +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 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 f5d946eced Make use of "external" depth-first iterators to avoid revisiting nodes
multiple times.  This reduces the time to construct post-dominance sets a LOT.
For example, optimizing perlbmk goes from taking 12.9894s to 1.4074s.

llvm-svn: 9091
2003-10-13 16:36:06 +00:00
Chris Lattner 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner e43629bad6 Make getNumBackEdges more efficient
llvm-svn: 9063
2003-10-12 22:14:27 +00:00
Alkis Evlogimenos 6e739d0a3c Use std::string::size_type for for ColonPos to stop gcc from giving a warning
llvm-svn: 8811
2003-10-01 22:49:22 +00:00
Chris Lattner 66a473371f DOn't crash if program calls the null pointer
llvm-svn: 8708
2003-09-24 23:42:58 +00:00
Chris Lattner fd46711e1a Remove explicit use of BasicBlock::succ_iterator
llvm-svn: 8706
2003-09-24 22:18:35 +00:00
Chris Lattner 3c095c79fa Functions reachable from the arguments of unresolvable call nodes should
not have their arguments marked complete

llvm-svn: 8639
2003-09-20 23:58:33 +00:00
Chris Lattner 413b7bde7c The Globals graph must become complete at the end of the BU phase!
llvm-svn: 8638
2003-09-20 23:27:05 +00:00
Chris Lattner 880b9aa10a Do not mark incoming arguments to functions complete if the function is pointed to by a global in the globals graph
llvm-svn: 8637
2003-09-20 22:24:04 +00:00
Chris Lattner 8c1a835806 Make sure to add global variable initializers to the Globals graph!
llvm-svn: 8636
2003-09-20 21:48:16 +00:00
Chris Lattner 71f747ea3d Don't consider incomplete nodes to be typesafe!
llvm-svn: 8635
2003-09-20 21:48:01 +00:00
Chris Lattner cc81b798e4 Remove trivially dead nodes was not removing nodes that were dead due to forwarding!
llvm-svn: 8634
2003-09-20 21:34:07 +00:00
Chris Lattner 689b681558 Add special case handling for calloc and realloc
llvm-svn: 8630
2003-09-20 16:50:46 +00:00
Chris Lattner 04d9cb6770 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner 36b877ae7f Make this work better for constants that aren't necessarily in ANY graph, such as null pointers
llvm-svn: 8628
2003-09-20 16:12:57 +00:00
Chris Lattner 092af3f36e Fix bug: BasicAA/2003-09-19-LocalArgument.ll
llvm-svn: 8615
2003-09-20 03:08:47 +00:00
Chris Lattner b1fcb2b644 Keep track of the number of typed/untyped memory accesses theyre are in the program
VS: ----------------------------------------------------------------------

llvm-svn: 8611
2003-09-20 01:20:46 +00:00
Chris Lattner 233f2a0816 These two conditions are not exclusive!!
llvm-svn: 8518
2003-09-15 04:35:16 +00:00
Chris Lattner 5d0d3a2667 Make the print output more useful
llvm-svn: 8517
2003-09-15 04:29:37 +00:00
Misha Brukman 329983228f Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +00:00
Chris Lattner bb9d03b9c0 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Misha Brukman 250f976eb3 Spell `definitely' correctly.
llvm-svn: 8466
2003-09-11 15:31:17 +00:00
Chris Lattner 8157505fae Rework post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8460
2003-09-10 20:37:08 +00:00
Chris Lattner 74d86a9c93 Remove using declarations
llvm-svn: 8442
2003-09-10 16:08:03 +00:00
Chris Lattner 66645df54c another trivial cleanup
llvm-svn: 8435
2003-09-10 14:55:05 +00:00
Chris Lattner 960a857dac Simplification of trip counting machinery.
- make sure to check the indvar type before anything else (efficiency)
  - Make sure to insert the 'add' into the program, even though it'll be
    dead
  - Wrap code at 80 columns
  - Other minor cleanups to reduce indentation level

llvm-svn: 8434
2003-09-10 14:51:49 +00:00
Chris Lattner 7ff9fe1231 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner 19b34d12c3 clean up file header comment
llvm-svn: 8427
2003-09-10 05:08:19 +00:00
Chris Lattner 42e7abceb5 Simplify some code
llvm-svn: 8426
2003-09-10 04:49:10 +00:00
Chris Lattner c4e76944d7 Fix bug: RLE-Preserve-Volatile.ll
Volatile loads and stores must not be value numbered

llvm-svn: 8398
2003-09-08 18:13:58 +00:00
Chris Lattner 641ac3ad3b This file is hopelessly out of date
llvm-svn: 8298
2003-09-01 20:14:00 +00:00
Chris Lattner 6f5e18d696 Replace M with F when refering to functions
llvm-svn: 8274
2003-08-31 20:36:52 +00:00
Chris Lattner 78a5c1aa3c Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!

llvm-svn: 8273
2003-08-31 20:01:57 +00:00
Chris Lattner bb6fe251ea Don't explicitly use the SCC class
llvm-svn: 8271
2003-08-31 19:55:06 +00:00
Chris Lattner 6b9d3efb64 Remove dead var
llvm-svn: 8270
2003-08-31 19:54:57 +00:00
Chris Lattner 4336db8d1d The SCC::HasLoop method is now in the main iterator
llvm-svn: 8269
2003-08-31 19:51:38 +00:00
Chris Lattner a687f44559 Remove explicit passing of SCC's around as objects.
llvm-svn: 8267
2003-08-31 19:46:48 +00:00
Chris Lattner 028f248ba8 Move the getAnalysisUsage method from the header file
llvm-svn: 8264
2003-08-31 19:40:57 +00:00