Commit Graph

4588 Commits

Author SHA1 Message Date
Chris Lattner 325869ac29 * Add #includes that were yanked out of header files
* Convert over to valueset interface that uses insert & erase insead of add and remove
* the -> operator really isn't that hard to use!

llvm-svn: 1687
2002-02-04 16:35:12 +00:00
Chris Lattner 7ad6519f90 Cut down include pollution and number of frivolous consts.
llvm-svn: 1683
2002-02-04 16:31:03 +00:00
Chris Lattner bd3ad751f0 Eliminate ModuleAnalyzer. It's old code that is not going to be used in the near future
llvm-svn: 1679
2002-02-04 06:47:17 +00:00
Chris Lattner 73645f3b94 Minor cleanups
llvm-svn: 1671
2002-02-04 05:48:24 +00:00
Chris Lattner 6f27b7d41c Lots of nonfunctional code cleanups
llvm-svn: 1642
2002-02-03 07:25:25 +00:00
Chris Lattner a5e103a2ae Provide the right AnalysisID for postdominators
llvm-svn: 1616
2002-01-31 18:29:24 +00:00
Chris Lattner ccf571a408 Convert analyses to new pass structure
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner 979d11db14 Implement loop depth calculation in terms of dominators instead of intervals
No problems with irreducibility now

llvm-svn: 1602
2002-01-31 00:42:06 +00:00
Chris Lattner ee965abc36 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.

llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner 0686e435d1 Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and
charactaristics.

Convert code to use it.

llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka 1a98b28bde added a section on how to modify live variable code to use LLVM instructions
instead of machine instructions.

llvm-svn: 1451
2001-12-13 21:25:46 +00:00
Chris Lattner cdbcb1fd17 Some programs are using BB's as values, until we resolve this. Disable the assert
llvm-svn: 1448
2001-12-13 00:45:06 +00:00
Ruchira Sasanka 4552ee447a Added more comments. Added code to destructor in MethodLiveVarInfo to delete
LiveVarSet caches.

llvm-svn: 1435
2001-12-08 21:05:27 +00:00
Ruchira Sasanka 565a5c423d Added comments are more documentation info
llvm-svn: 1434
2001-12-08 21:04:22 +00:00
Chris Lattner be68833765 "fix" problems processing floating point expressions
llvm-svn: 1421
2001-12-05 19:38:29 +00:00
Chris Lattner 1bedac9af0 Fix a bug that clobbered the step value on some inputs
llvm-svn: 1416
2001-12-05 06:32:30 +00:00
Chris Lattner 54794fe11f Fix a pessimization due to sucky LI testing
llvm-svn: 1412
2001-12-04 08:12:47 +00:00
Chris Lattner 2413b160ec Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner 3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner fb5ae02e1a Split the PHINode class out from the iOther.h file into the iPHINode.h file
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner 66d9ceaaba Induction variables must be phi nodes
llvm-svn: 1402
2001-12-03 17:27:42 +00:00
Chris Lattner 5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner 34dfe56c1a Implement writer support for Loops, Induction Variables, and CallGraphs
llvm-svn: 1372
2001-11-26 18:53:29 +00:00
Chris Lattner b4a7eb10fa Make Mul work right
Make sub work right

llvm-svn: 1371
2001-11-26 18:53:07 +00:00
Chris Lattner a88403bf31 Fix a bad assertion to be correct . The root basic block can be used by PHI nodes.
llvm-svn: 1370
2001-11-26 18:52:02 +00:00
Chris Lattner 03946cd9b6 Implement a new entry node that has edges to all external methods in the module
llvm-svn: 1369
2001-11-26 18:51:25 +00:00
Chris Lattner 6de9942b92 * Implement dominator based loop identification
* Implement cleaner induction variable identification

llvm-svn: 1359
2001-11-26 18:41:20 +00:00
Chris Lattner 0ae45bd3f4 * Implement more powerful expr analysis of cast instructions
llvm-svn: 1335
2001-11-26 16:53:50 +00:00
Chris Lattner 7082e110f7 New pass to find types in use by a program
llvm-svn: 1232
2001-11-09 05:27:21 +00:00
Chris Lattner cf66422978 Print the method that makes an instruction invalid
llvm-svn: 1213
2001-11-08 19:29:51 +00:00
Chris Lattner 83f1528061 Initial checkin of pointer safety checker
llvm-svn: 1181
2001-11-07 21:16:12 +00:00
Vikram S. Adve 5dab57de99 Added function IsLeafMethod to identify leaf methods.
This will use the CallGraph only if one is provided.

llvm-svn: 950
2001-10-22 13:55:46 +00:00
Ruchira Sasanka cc91b21fe1 No major change - added some comments
llvm-svn: 848
2001-10-16 01:25:05 +00:00
Chris Lattner 24872c8838 Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
llvm-svn: 841
2001-10-15 18:30:06 +00:00
Ruchira Sasanka 82605b239c --added support for implicit operands
llvm-svn: 832
2001-10-15 16:58:50 +00:00
Chris Lattner f7d66a73ce Fix code to make GCC 2.96 happy
llvm-svn: 753
2001-10-13 06:34:47 +00:00
Chris Lattner 8cbbbef674 * Add support for Invoke instructions
* Add support for indirect calls

llvm-svn: 752
2001-10-13 06:33:19 +00:00
Ruchira Sasanka 04009efe48 added support for implict operands in machine instruction
llvm-svn: 728
2001-10-12 17:47:23 +00:00
Ruchira Sasanka 85cc5744ba --added support for implicit operands in machine instructions
llvm-svn: 727
2001-10-12 17:46:27 +00:00
Chris Lattner 7fac070215 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion

llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner da55810666 Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner 3856934386 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner 8f19112923 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner 4b717c0edc Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner ba1c1f2fb6 Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.

llvm-svn: 691
2001-10-01 13:19:53 +00:00
Ruchira Sasanka c8b4d12a8f *** empty log message ***
llvm-svn: 675
2001-09-30 23:28:04 +00:00
Chris Lattner bb09a10929 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner bbf3ae8414 Initial support for construction of a call graph
llvm-svn: 660
2001-09-28 00:08:15 +00:00
Chris Lattner 06028541ab Move the sparc target to a new lib/Target directory
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner ff0c8a7511 This checkin represents some cleanup of the backend, implementing the following things:
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory.  The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.


NOTE! The BBLiveVar.cpp file dependant on the Sparc backend, and is therefore not generic/portale to other backends.  This needs to be fixed.

llvm-svn: 558
2001-09-14 03:37:22 +00:00
Chris Lattner 3ce5ac2107 Handle subtract in expression classifier
llvm-svn: 548
2001-09-11 04:27:34 +00:00
Chris Lattner 706946b40a Add support for global variables
llvm-svn: 535
2001-09-10 20:07:57 +00:00
Chris Lattner ce4cd006c1 Module analyzer no longer has to iterate over constant pool
llvm-svn: 441
2001-09-07 16:31:23 +00:00
Chris Lattner c6b06c4f9b Simplify code by eliminating need to hang onto constant pool references
llvm-svn: 440
2001-09-07 16:31:04 +00:00
Vikram S. Adve 8ae325420f Added directory LiveVar/
llvm-svn: 410
2001-08-28 23:29:31 +00:00
Vikram S. Adve 1143eff628 analyze() now checks to see that we don't analyze the same method twice.
Needs a mechnanism to override this check (e.g., after a transformation).

llvm-svn: 391
2001-08-28 22:36:35 +00:00
Chris Lattner 439465583a Make sure noone branches to the entry node of the method
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner a0484c8eeb Handle case where there is no exit node from a flowgraph
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Ruchira Sasanka 11e97b08f0 LV code on machine instructions
llvm-svn: 360
2001-08-20 21:12:49 +00:00
Ruchira Sasanka ec1a5411d7 LV info on machine instructions
llvm-svn: 359
2001-08-20 21:11:01 +00:00
Chris Lattner c4d6aca02e Fix a bug when compiling 'shl ubyte * %var, ubyte 2'
llvm-svn: 295
2001-07-25 22:47:32 +00:00
Ruchira Sasanka 6988791c1e Changed printValue() to print constant value if the value is a constant.
llvm-svn: 292
2001-07-24 18:21:21 +00:00
Ruchira Sasanka 9f18119edb *** empty log message ***
llvm-svn: 291
2001-07-24 17:14:13 +00:00
Chris Lattner e2472bbf6c Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner 2c6f274188 More functionality, renamed API
llvm-svn: 241
2001-07-21 19:07:19 +00:00
Chris Lattner 85090922f4 Start of expression analysis support
llvm-svn: 219
2001-07-20 19:17:55 +00:00
Chris Lattner 197390e985 Fix nasty typo
llvm-svn: 204
2001-07-20 04:39:07 +00:00
Chris Lattner 5446f8a542 * The parent of a constant pool is a SymTabValue, not a value.
llvm-svn: 178
2001-07-14 06:08:51 +00:00
Chris Lattner 1547114cbf Fixed post dominator frontiers! Yaay!
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner c385bebc89 Implement support for postdominators, except in dom frontiers
llvm-svn: 142
2001-07-06 16:58:22 +00:00
Chris Lattner 81f3ace753 IntervalPartition was changed to inherit from vector<Interval*> instead of
contain it so that it would have full iterator access without much work.

Writer includes code to print out IntervalPartition's now.

llvm-svn: 133
2001-07-03 15:28:35 +00:00
Chris Lattner fa3ac26d22 Code got moved from the lib/Assembly/Writer/IntervalWriter.cpp file to
here.  Updates to correct description n stuff.

llvm-svn: 129
2001-07-03 05:36:34 +00:00
Chris Lattner a7f22e53c0 Add printing code for dominator info
llvm-svn: 125
2001-07-02 05:46:47 +00:00
Chris Lattner 081aabc330 Checkin of new dominator calculation routines. These will be improved in
the future to do post dominators and stuff

llvm-svn: 124
2001-07-02 05:46:38 +00:00
Chris Lattner 0c94a300eb Moved deleter to include/llvm/Tools/STLExtras.h
llvm-svn: 120
2001-07-02 01:08:08 +00:00
Chris Lattner 4cee8d8ffb Miscellaneous cleanups:
* Convert post to pre-increment for for loops
  * Use generic programming more
  * Use new Value::cast* instructions
  * Use new Module, Method, & BasicBlock forwarding methods
  * Use new facilities in STLExtras.h
  * Use new Instruction::isPHINode() method

llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner ed59025460 IntervalPartition: recode to use IntervalIterator to do all the work
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.

llvm-svn: 71
2001-06-25 03:55:04 +00:00
Chris Lattner 601012721c New file due to the Intervals.h splitup
llvm-svn: 66
2001-06-24 04:07:44 +00:00
Chris Lattner f64a8936e5 #include a different header due to Intervals.h splitting up
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner dec727e346 IntervalPartition & IntervalIterator classes have been split out into
their own .h files & .cpp file

llvm-svn: 62
2001-06-24 04:05:21 +00:00
Chris Lattner 4c16155c36 Prepare for split between Interval, IntervalIterator, and IntervalIPartition
llvm-svn: 60
2001-06-24 03:25:01 +00:00
Chris Lattner 34b62a04b6 Interval::HeaderNode is now accessed thorugh an accessor function
llvm-svn: 56
2001-06-22 02:23:39 +00:00
Chris Lattner b20a15d334 Moved printing code to the Assembly/Writer library.
Code now detects looping intervals

llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner d79faa35af Implement the new Interval::isLoop method
Implement destructor to free memory

llvm-svn: 51
2001-06-21 05:26:15 +00:00
Chris Lattner 5035efaeda Add capability to build a derived interval graph
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner 28ae5cbcb5 Initial Checking of Interval handling code
llvm-svn: 39
2001-06-20 20:09:55 +00:00
Chris Lattner 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00