Commit Graph

3584 Commits

Author SHA1 Message Date
Joel Stanley
9b96c44ad8 Added subsections to 'Basic Inspection and Traversal Routines':
* Iterating over the BasicBlocks in a Function
* Iterating over the Instructions in a BasicBlock
* Turning an iterator into a class pointer
* Finding call sites: a more complex example


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3606 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 21:55:13 +00:00
Chris Lattner
bded132d00 Move code out of header files into .cpp files to make future changes easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3605 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 21:33:15 +00:00
Chris Lattner
fab8c796f6 * Clean up some comments
* Move code out of header file to .cpp files, to make future changes easier
* Add arguments to classes so that they can be automatically inserted into their
  parent structure upon creation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3604 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 21:31:57 +00:00
Chris Lattner
82f2f954fd Fix script due to new www/ top level directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3603 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 21:04:36 +00:00
Chris Lattner
b0d7e626a9 Remove obsolete script
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3602 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 21:04:22 +00:00
Chris Lattner
a42414bcf6 * Clean up indentation a bit
* Fix broken comments (copy and pasto)
* Remove irrelevant comment
* Add extra argument to function that causes it to get inserted into a module
  automatically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3601 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 20:47:31 +00:00
Chris Lattner
482701563a * Remove extraneous #includes
* Add extra argument to Function ctor to allow automatic insertion into module


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3600 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 20:46:32 +00:00
Chris Lattner
b0dbd7fc5a Initial checkin of Correlated Expression Elimination Pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3599 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 18:41:55 +00:00
Chris Lattner
4dd7d3e34d * No longer need to run die after instcombine
* Run new correlated expressions pass
* Simplify the CFG (removing dead blocks, merging blocks, eliminating branches
  on constant booleans, etc) after correlated exprs pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3598 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 18:41:33 +00:00
Chris Lattner
513d3e8fc5 Include stub for correlated expression elimination pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3597 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 18:39:29 +00:00
Chris Lattner
ae7f759825 Add skeleton to the section contents so that Joel knows what to fill in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3596 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 18:31:18 +00:00
Chris Lattner
b99344f791 Add new section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3595 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 16:40:10 +00:00
Chris Lattner
a30ed38e1f Trivial change to test CVS checkout scripts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3594 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 16:33:54 +00:00
Chris Lattner
1db872dd10 Commit Vikram's changes for 426 class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3593 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 16:26:13 +00:00
Chris Lattner
0377de4d97 Add information about the GlobalVariable and Module classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3592 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 14:50:55 +00:00
Chris Lattner
f4d4a49311 Fix file header to be accurate, instead of something I just copied and pasted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3591 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 03:59:56 +00:00
Chris Lattner
a9d2bffeeb Fix bug with critical edge splitting code where it wouldn't update PHI nodes
in the old destination block to indicate that the value flows from the new
edge splitting block, not from the original multi-successor block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3590 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 03:51:45 +00:00
Chris Lattner
9355b479c3 Initial checkin of the first part of the Programmer's Manual
There is still much to be done, but it's a good start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3589 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:50:58 +00:00
Chris Lattner
4af3ccbbea Check in the implementation of critical edge detection and splitting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3588 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:35:34 +00:00
Chris Lattner
ca8474e7f2 - Rename BreakCriticalEdge to the slightly more standard SplitCriticalEdge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3587 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:35:11 +00:00
Chris Lattner
3e57cb98bd * Doxygenize API
* Add new functions for identifying and breaking critical edges


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3586 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:19:25 +00:00
Chris Lattner
0c5d27e4a1 - Doxygenize comments
- Add new method to dominatorset: properlyDominates
- Add synonmys for operator[] to classes so that pointers to dominator
  information can be used more easily.
- Add API's to update dominator information


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3585 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:16:27 +00:00
Chris Lattner
f9bbe214fd Make getAnalysisToUpdate<AnalysisType>() public so that transformation APIs
can update analysis information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3584 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:14:47 +00:00
Chris Lattner
480e2efb2e * Remove notes at the top of the file
* Add information about how to debug a dynamically loaded pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3583 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:02:58 +00:00
Vikram S. Adve
68f716190b Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3582 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:36:41 +00:00
Vikram S. Adve
f36f06bb60 Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3581 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:34:31 +00:00
Vikram S. Adve
84c0fcbde4 Bug fixes in casting between floats and ints smaller than 64 bits.
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3580 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:33:59 +00:00
Vikram S. Adve
babc0fab19 -- Use size of pointer element type instead of pointer type in array offsets!
-- A few bug fixes in casting between floats and ints.
-- Use SRL reg, 0 instead of AND reg, 0xffffffff to clear high 32 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3579 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:32:13 +00:00
Vikram S. Adve
537a877998 -- Bug fix: use byte offsets not typed offsets in output assembly!
-- Add support for ConstantExpr constants (only cast and add operators so far)
-- Avoid generating label Bbss.bss, which sometimes came out twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3578 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:28:10 +00:00
Chris Lattner
20d4129fef Minor bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3577 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 23:12:40 +00:00
Chris Lattner
252030e86b Implement setcc for booleans. Fixes bug:
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3576 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 20:09:49 +00:00
Chris Lattner
8617b3579b Make sure that setcc is implemented for bools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3575 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 20:09:23 +00:00
Chris Lattner
0c4e886dbf - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3574 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:08:28 +00:00
Chris Lattner
65ad37205e - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3573 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:07:35 +00:00
Chris Lattner
ce8a14915d - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.
SCVS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3572 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:05:48 +00:00
Chris Lattner
625ea21205 Implement operator== and != for ranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3571 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:05:31 +00:00
Chris Lattner
eaee9e1317 Add distinction between integer and integral types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3570 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 00:52:52 +00:00
Chris Lattner
d122f4b648 Fix bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3569 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 20:49:27 +00:00
Chris Lattner
62b14df410 Add constant prop & DIE to InstCombine, so it cleans up after itself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3568 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 04:59:56 +00:00
Chris Lattner
b041eb5dd4 Remove duplicate #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3567 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 04:04:11 +00:00
Chris Lattner
7382e73f86 Add printing support to ConstantRange class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3566 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 00:18:26 +00:00
Chris Lattner
96f9d7232c Add printing support to ConstantRange class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 00:18:22 +00:00
Chris Lattner
f6814d1dc7 Initial implementation of ConstantRange support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3564 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-01 23:53:39 +00:00
Chris Lattner
645e00d149 Initial implementation of ConstantRange support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3563 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-01 23:53:36 +00:00
Chris Lattner
ea8b7b8bb5 - Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3562 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-01 19:46:40 +00:00
Chris Lattner
3d92ac255e - Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
- Doxygenized iOperators.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3561 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-01 19:46:36 +00:00
Chris Lattner
0179450064 - Converted CWriter to be an LLVM pass.
- Convert dis to use a PassManager to do it's work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3560 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:30:15 +00:00
Chris Lattner
e8a7d74b0a Get FindUsedTypes pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3559 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:29:36 +00:00
Chris Lattner
0e9f93ea37 - Fix bug: test/Regression/CBackend/2002-08-20-RecursiveTypes.ll
- Converted CWriter to be an LLVM pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3558 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:29:16 +00:00
Chris Lattner
8ac883939b Convert cwriter to be a pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3557 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:28:25 +00:00