Commit Graph

3671 Commits

Author SHA1 Message Date
Chris Lattner 5fb1fee605 Fix a bug I introduced into the code generator. :(
llvm-svn: 3694
2002-09-12 20:27:10 +00:00
Chris Lattner e3cbedbd3e Add a </ul> that was missing and caused the document to get a little whacky
llvm-svn: 3693
2002-09-12 19:08:16 +00:00
Chris Lattner 4a2876b07e Incorporate information about deleting instructions from a basic block,
contributed by Tanya.

llvm-svn: 3692
2002-09-12 19:06:51 +00:00
Chris Lattner 674c9ff585 Fix bug I introduced with one of my previous changes.
Thanks fly out to Nick for noticing it!  :)

llvm-svn: 3691
2002-09-12 19:00:43 +00:00
Chris Lattner b5ac195828 Add some information about the Instruction class and Instruction.def
llvm-svn: 3690
2002-09-12 17:18:46 +00:00
Chris Lattner 5e08e70f6c Add a new BasicBlockPass::doInitialization/Finalization(Function &) pair of
methods that may be useful for BasicBlockPasses.

llvm-svn: 3689
2002-09-12 17:06:43 +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 500f06490d Make sure to print a message when linking a tool
llvm-svn: 3687
2002-09-12 17:02:40 +00:00
Misha Brukman 1326a7c7db Compiling with "gmake" should produce less output. The compilation/linking
flags are always the same anyway, who wants to see so much text on the
screen? Compiling with "gmake VERBOSE=1" should produce all the output
you're used to.

Basically it checks for VERBOSE being defined, and if it is, sets VERB
appropriately. VERB is then prepended in a bunch of key places such that
when VERB is "@", the command is not echoed, when VERB is not set to
anything, it's as before.

One thing I could not get rid of is "gmake[1]: Entering directory <blah>",
but running "gmake -s" suppresses it all, and shows just the interesting
stuff.

Now output (when running "gmake -s" will look something like):

<snip>
======= Linking target debug library =======
Compiling Writer.cpp
Compiling getLLVMinfo.cpp
Compiling as.cpp
Compiling dis.cpp
Compiling opt.cpp
Compiling gccas.cpp
<snip>

llvm-svn: 3686
2002-09-12 16:05:39 +00:00
Joel Stanley 3ce479c13c - Added content to use-def/def-use section
- Added content to subsection "Creating and inserting new Instructions"

llvm-svn: 3685
2002-09-11 22:32:24 +00:00
Joel Stanley 85ca8b36da *** empty log message ***
llvm-svn: 3684
2002-09-11 20:50:04 +00:00
Chris Lattner e314bf5264 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3683
2002-09-11 01:21:35 +00:00
Chris Lattner 136dab7d86 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Chris Lattner b9d9e0ff8d - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3681
2002-09-11 01:21:29 +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 bb4fe2c3c4 Recently changed getelementptr to use 'long' indexes for sequential types
instead of uints.  This adds a translation scheme to be backwards compatible
with old .ll files.

llvm-svn: 3679
2002-09-11 01:17:27 +00:00
Chris Lattner 813d4aa6c0 Convert index type for getelementptr instruction from uint to long
llvm-svn: 3678
2002-09-11 01:16:19 +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 4ecbe74c27 Add convenience ctor to BranchInst
llvm-svn: 3675
2002-09-10 23:54:56 +00:00
Chris Lattner cbc532603a Fix the last of the silly bugs I just introduced. :(
llvm-svn: 3674
2002-09-10 23:46:10 +00:00
Chris Lattner 3d7720ae7d Fix bugs in previous checkins
llvm-svn: 3673
2002-09-10 23:31:28 +00:00
Chris Lattner 9674b869e5 Fix bug in previous checkin
llvm-svn: 3672
2002-09-10 23:31:12 +00:00
Chris Lattner 55f3d94b40 Add cannonicalization of shl X, 1 -> add X, X
llvm-svn: 3671
2002-09-10 23:04:09 +00:00
Chris Lattner 025e58dfa5 Check for cannonicalization of shl X, 1 -> add X, X
llvm-svn: 3670
2002-09-10 23:03:10 +00:00
Chris Lattner e8c927f71a Fix minor problems in previous checkin
llvm-svn: 3669
2002-09-10 22:52:51 +00:00
Chris Lattner db3f9bc948 Fix minor problems in previous checkin
llvm-svn: 3668
2002-09-10 22:52:49 +00:00
Chris Lattner e167ee56c7 Fix config file due to directories changing
llvm-svn: 3667
2002-09-10 22:39:04 +00:00
Chris Lattner f80f7b02b7 Clean up code due to auto-insert constructors
llvm-svn: 3666
2002-09-10 22:38:49 +00:00
Chris Lattner a239e6879d Clean up code due to auto-insert constructors
llvm-svn: 3665
2002-09-10 22:38:47 +00:00
Chris Lattner 97ff99cdf9 Clean up code
llvm-svn: 3664
2002-09-10 22:38:06 +00:00
Chris Lattner a6834c1331 Use explicit ctor
llvm-svn: 3663
2002-09-10 22:37:46 +00:00
Chris Lattner 46e5a5f523 Clean up pointer using testcases
llvm-svn: 3662
2002-09-10 20:04:19 +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 c0686feca2 Tighten up error checking in parser, disallowing instructions that f.e.,
add pointers together.

llvm-svn: 3660
2002-09-10 19:57:26 +00:00
Chris Lattner 0f18d5042d Remove a testcase that is irrelevant now, fix a pointer adding testcase
llvm-svn: 3659
2002-09-10 19:55:40 +00:00
Chris Lattner 61c83bf12f Fix bug: test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll
llvm-svn: 3658
2002-09-10 19:42:53 +00:00
Chris Lattner f8013f3ca7 New testcase for poitner problem
llvm-svn: 3657
2002-09-10 19:41:57 +00:00
Chris Lattner 28a8d2468a Simplify code (somtimes dramatically), by using the new "auto-insert" feature
of instruction constructors.

llvm-svn: 3656
2002-09-10 17:04:02 +00:00
Chris Lattner 5c447863d5 Simplify code (somtimes dramatically), by using the new "auto-insert" feature
of instruction constructors.

llvm-svn: 3655
2002-09-10 17:03:06 +00:00
Chris Lattner 7d734801d1 Add support for printing constpointerrefs more nicely
llvm-svn: 3654
2002-09-10 15:53:49 +00:00
Chris Lattner 3c787446c7 Add capability to insert an instruction into a basic block immediately after
it is created, as part of the ctor call.

Eliminate the GenericBinaryInst class

llvm-svn: 3653
2002-09-10 15:45:53 +00:00
Chris Lattner da7daf76a4 Remove extra #include
llvm-svn: 3652
2002-09-10 15:43:30 +00:00
Chris Lattner 5bf620748f Implement support for inserting an instruction into a basic block right when it
is created.

llvm-svn: 3651
2002-09-10 15:36:11 +00:00
Chris Lattner e1751db3ca Clean up indvar printing
llvm-svn: 3650
2002-09-10 15:35:39 +00:00
Chris Lattner 9ae0fd2d6c Eliminate the GenericBinaryInst class
llvm-svn: 3649
2002-09-10 15:35:23 +00:00
Chris Lattner 7d02d3102a * Eliminate GenericBinaryInst class
* Allow specifying where to insert a newly created SetCondInst

llvm-svn: 3648
2002-09-10 15:34:41 +00:00
Chris Lattner 9c11ca3b17 Eliminate the GenericBinaryInst class.
llvm-svn: 3647
2002-09-10 15:27:31 +00:00
Chris Lattner 45719ee85d Eliminate setType method
Now the only way to set the type of a value is in the ctor for an object

llvm-svn: 3646
2002-09-10 15:26:27 +00:00
Chris Lattner fe500386d3 Finish up the isa/cast/dyn_cast section
llvm-svn: 3645
2002-09-10 15:20:46 +00:00
Chris Lattner 4184bcc701 * Clean up code a little bit
* Fix bug: test/Regression/Transforms/IndVarsSimplify/2002-09-09-PointerIndVar.ll

llvm-svn: 3644
2002-09-10 05:24:05 +00:00
Chris Lattner a6a5335197 Run indvars tests
llvm-svn: 3643
2002-09-10 04:55:36 +00:00
Chris Lattner df422ba2b9 Add new testcase for broken indvars case
llvm-svn: 3642
2002-09-10 04:54:44 +00:00
Chris Lattner 80a2568f9b Fix typeo in assertion message
llvm-svn: 3641
2002-09-10 04:52:59 +00:00
Chris Lattner e103d178c5 Hack unneccesary now that shifts of pointers are no longer legal!
llvm-svn: 3640
2002-09-10 03:50:54 +00:00
Chris Lattner 4e7f7c0f30 Write most of the isa, cast, dyn_cast section. It's not done yet though.
llvm-svn: 3639
2002-09-10 00:39:05 +00:00
Chris Lattner 1f41925300 Do not allow adds of pointer types, or many other operations on pointer types.
llvm-svn: 3638
2002-09-09 20:26:04 +00:00
Chris Lattner ff16f07017 Disallow creation of pointer typed shift instructions
llvm-svn: 3637
2002-09-09 20:25:21 +00:00
Chris Lattner 7e03b6ee33 * Write the prose for the Basic Inspection and Traversal Routines section
* Fix some minor problems with &lt; and &amp;
* Add links to later parts of the document for classes

llvm-svn: 3636
2002-09-09 19:58:18 +00:00
Joel Stanley 5d79df728a *** empty log message ***
llvm-svn: 3635
2002-09-09 16:29:58 +00:00
Joel Stanley 0b2b897cdc - Made distinction between object->iterator and iterator->object
conversion more clear.

- Added content to "Iterating over Instructions in a Function"
section.

llvm-svn: 3634
2002-09-09 15:50:33 +00:00
Vikram S. Adve d50fb11d18 Silly bug fix: Machine code vector could be empty for a no-op cast instruction,
e.g., cast double to double.

llvm-svn: 3633
2002-09-09 14:54:21 +00:00
Chris Lattner e40840b26b Clean up the isa section stub. It should not be listed twice
llvm-svn: 3632
2002-09-09 05:53:21 +00:00
Chris Lattner 6755aa133d Stub out another couple sections that it looks like 426's MP1 will really
need.

llvm-svn: 3631
2002-09-09 05:49:39 +00:00
Chris Lattner a818d92195 Fix minor typo
llvm-svn: 3630
2002-09-09 03:48:46 +00:00
Chris Lattner acb1825937 Testcase no longer applicable since shifts of pointers are no longer allowed
llvm-svn: 3629
2002-09-09 03:43:09 +00:00
Chris Lattner 23ecec4320 Eliminate multiply of pointer type
llvm-svn: 3628
2002-09-09 03:42:14 +00:00
Chris Lattner 5f00d66cc3 Factor silly code duplication out
llvm-svn: 3627
2002-09-08 21:47:54 +00:00
Chris Lattner b8bba6f765 Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll
llvm-svn: 3626
2002-09-08 21:39:07 +00:00
Chris Lattner aae5959902 New testcase for a bug identified by Vikram
llvm-svn: 3625
2002-09-08 21:37:49 +00:00
Chris Lattner 74946507fc Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks

llvm-svn: 3624
2002-09-08 21:19:29 +00:00
Chris Lattner 16d4c60600 Inform the memory leak detector that TmpInstruction objects should not be
subject to memory leak checking.

llvm-svn: 3623
2002-09-08 21:08:43 +00:00
Chris Lattner d85566e59a Move TmpInstruction ctor to InstrSelection.cpp file
llvm-svn: 3622
2002-09-08 21:07:51 +00:00
Chris Lattner ed6504b1eb Enable "garbage detection" of LLVM objects. Check for leaks after running
every pass.

llvm-svn: 3621
2002-09-08 19:00:07 +00:00
Chris Lattner 184b298edc Enable "garbage detection" of LLVM objects. Now users should be obnoxious
warnings.  If they accidentally leak LLVM Value's.

llvm-svn: 3620
2002-09-08 18:59:35 +00:00
Chris Lattner bdb147c373 Minor simplification
llvm-svn: 3619
2002-09-08 18:55:04 +00:00
Chris Lattner 4f986cebfd Checkin initial support for automatic memory leak detection routines
llvm-svn: 3618
2002-09-08 18:51:16 +00:00
Chris Lattner 57c6a2123d Checkin initial support for automatic memory leak detection routines
llvm-svn: 3617
2002-09-08 18:51:12 +00:00
Chris Lattner 30214c23aa * Add capability to recognize alias properties of the following common cases:
- A[c1] cannot alias A[c2] where constants c1 != c2
  - A[i] cannot alias B[j] if A & B are provably different arrays

This should help out array based codes.  For example, from bzip2 from spec,
3 additional loads can be GCSE'd, and _21_ additional loads can be LICMd due
to this change.

In a test example from the Spec GAP benchmark (vecffe.c), this change allows
_52_ additional loads to be GCSE'd and _224_ additional LICM'd loads.

Not bad for such a simple change.  Other testcases show no change at all
because they just don't use arrays.  Not too suprising there.

llvm-svn: 3616
2002-09-08 18:45:18 +00:00
Chris Lattner 3ea7da13bb New testcase that tests for array pointer analysis type stuff
llvm-svn: 3615
2002-09-08 18:08:36 +00:00
Chris Lattner 1567ab4059 Fix bug in testcase now that load-vn is not built into gcse
llvm-svn: 3614
2002-09-07 22:50:41 +00:00
Chris Lattner 439f5d5ef7 Fix broken test
llvm-svn: 3613
2002-09-07 22:48:30 +00:00
Chris Lattner 340182e523 Test commit
llvm-svn: 3612
2002-09-07 05:33:45 +00:00
Joel Stanley ad37a452ce *** empty log message ***
llvm-svn: 3611
2002-09-06 23:42:40 +00:00
Joel Stanley ed8bfd97f5 Fixed typos and added &lt/&gt/&amp tags where appropriate
llvm-svn: 3610
2002-09-06 23:05:12 +00:00
Chris Lattner f9d779ae66 * Fix a couple more <>&'s
* Correct an extremely minor technical point about a deprecated interface.

llvm-svn: 3609
2002-09-06 22:51:10 +00:00
Chris Lattner 7bf5b1d17a Minor fixes html type fixes: & -> &amp; > -> &gt; etc.
Hopefully permission thing works this time.

llvm-svn: 3608
2002-09-06 22:12:58 +00:00
Chris Lattner 32b15d908d Minor fix, test that web autoupdate works for people non-chris
llvm-svn: 3607
2002-09-06 22:09:21 +00:00
Joel Stanley 64cfdbb8a0 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

llvm-svn: 3606
2002-09-06 21:55:13 +00:00
Chris Lattner 9ed7aef651 Move code out of header files into .cpp files to make future changes easier
llvm-svn: 3605
2002-09-06 21:33:15 +00:00
Chris Lattner 809375647d * 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.

llvm-svn: 3604
2002-09-06 21:31:57 +00:00
Chris Lattner 88cb597cbc Fix script due to new www/ top level directory
llvm-svn: 3603
2002-09-06 21:04:36 +00:00
Chris Lattner b6aae148d2 Remove obsolete script
llvm-svn: 3602
2002-09-06 21:04:22 +00:00
Chris Lattner 43a240e346 * 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.

llvm-svn: 3601
2002-09-06 20:47:31 +00:00
Chris Lattner 6213ae0028 * Remove extraneous #includes
* Add extra argument to Function ctor to allow automatic insertion into module

llvm-svn: 3600
2002-09-06 20:46:32 +00:00
Chris Lattner 1871472e14 Initial checkin of Correlated Expression Elimination Pass
llvm-svn: 3599
2002-09-06 18:41:55 +00:00
Chris Lattner c70222dc15 * 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.

llvm-svn: 3598
2002-09-06 18:41:33 +00:00
Chris Lattner 1ff9162127 Include stub for correlated expression elimination pass
llvm-svn: 3597
2002-09-06 18:39:29 +00:00
Chris Lattner cb29fd5695 Add skeleton to the section contents so that Joel knows what to fill in
llvm-svn: 3596
2002-09-06 18:31:18 +00:00
Chris Lattner 5caa28123b Add new section
llvm-svn: 3595
2002-09-06 16:40:10 +00:00
Chris Lattner 58f6d727ce Trivial change to test CVS checkout scripts
llvm-svn: 3594
2002-09-06 16:33:54 +00:00
Chris Lattner dd9dab3fd7 Commit Vikram's changes for 426 class
llvm-svn: 3593
2002-09-06 16:26:13 +00:00
Chris Lattner 2127213cf1 Add information about the GlobalVariable and Module classes
llvm-svn: 3592
2002-09-06 14:50:55 +00:00
Chris Lattner 6a5364e46f Fix file header to be accurate, instead of something I just copied and pasted.
llvm-svn: 3591
2002-09-06 03:59:56 +00:00
Chris Lattner 50dd6724a2 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.

llvm-svn: 3590
2002-09-06 03:51:45 +00:00
Chris Lattner bcf337b0a6 Initial checkin of the first part of the Programmer's Manual
There is still much to be done, but it's a good start.

llvm-svn: 3589
2002-09-06 02:50:58 +00:00
Chris Lattner c2cd504569 Check in the implementation of critical edge detection and splitting
llvm-svn: 3588
2002-09-06 02:35:34 +00:00
Chris Lattner 00b95cc534 - Rename BreakCriticalEdge to the slightly more standard SplitCriticalEdge
llvm-svn: 3587
2002-09-06 02:35:11 +00:00
Chris Lattner 579bb9b527 * Doxygenize API
* Add new functions for identifying and breaking critical edges

llvm-svn: 3586
2002-09-06 02:19:25 +00:00
Chris Lattner 3684289913 - 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

llvm-svn: 3585
2002-09-06 02:16:27 +00:00
Chris Lattner c0396b8b9e Make getAnalysisToUpdate<AnalysisType>() public so that transformation APIs
can update analysis information.

llvm-svn: 3584
2002-09-06 02:14:47 +00:00
Chris Lattner 8a97c8ab10 * Remove notes at the top of the file
* Add information about how to debug a dynamically loaded pass.

llvm-svn: 3583
2002-09-06 02:02:58 +00:00
Vikram S. Adve e6834a1ce5 Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3582
2002-09-05 18:36:41 +00:00
Vikram S. Adve f5d585d185 Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3581
2002-09-05 18:34:31 +00:00
Vikram S. Adve 549489aa77 Bug fixes in casting between floats and ints smaller than 64 bits.
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.

llvm-svn: 3580
2002-09-05 18:33:59 +00:00
Vikram S. Adve 7bc45123d3 -- 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.

llvm-svn: 3579
2002-09-05 18:32:13 +00:00
Vikram S. Adve 93407286ed -- 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.

llvm-svn: 3578
2002-09-05 18:28:10 +00:00
Chris Lattner d4645902e6 Minor bug fix.
llvm-svn: 3577
2002-09-03 23:12:40 +00:00
Chris Lattner 07507a4ccb Implement setcc for booleans. Fixes bug:
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll

llvm-svn: 3576
2002-09-03 20:09:49 +00:00
Chris Lattner 80c0964fc9 Make sure that setcc is implemented for bools.
llvm-svn: 3575
2002-09-03 20:09:23 +00:00
Chris Lattner b0b412e66e - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.

llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Chris Lattner bc6bdc2992 - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.

llvm-svn: 3573
2002-09-03 01:07:35 +00:00
Chris Lattner 2d42bbf5d0 - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.
SCVS: ----------------------------------------------------------------------

llvm-svn: 3572
2002-09-03 01:05:48 +00:00
Chris Lattner 7a558ad672 Implement operator== and != for ranges
llvm-svn: 3571
2002-09-03 01:05:31 +00:00
Chris Lattner d490909a1c Add distinction between integer and integral types.
llvm-svn: 3570
2002-09-03 00:52:52 +00:00
Chris Lattner 5d2bce8555 Fix bugs
llvm-svn: 3569
2002-09-02 20:49:27 +00:00
Chris Lattner 99f48c614d Add constant prop & DIE to InstCombine, so it cleans up after itself
llvm-svn: 3568
2002-09-02 04:59:56 +00:00
Chris Lattner b986628323 Remove duplicate #include
llvm-svn: 3567
2002-09-02 04:04:11 +00:00
Chris Lattner 4293908573 Add printing support to ConstantRange class
llvm-svn: 3566
2002-09-02 00:18:26 +00:00
Chris Lattner e0bb9ebc6d Add printing support to ConstantRange class
llvm-svn: 3565
2002-09-02 00:18:22 +00:00
Chris Lattner a17c18ce28 Initial implementation of ConstantRange support
llvm-svn: 3564
2002-09-01 23:53:39 +00:00
Chris Lattner 113f2aec70 Initial implementation of ConstantRange support
llvm-svn: 3563
2002-09-01 23:53:36 +00:00
Chris Lattner b33e4630ff - Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
llvm-svn: 3562
2002-09-01 19:46:40 +00:00
Chris Lattner a48992faaa - Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
- Doxygenized iOperators.h

llvm-svn: 3561
2002-09-01 19:46:36 +00:00
Chris Lattner 874a9e4078 - Converted CWriter to be an LLVM pass.
- Convert dis to use a PassManager to do it's work.

llvm-svn: 3560
2002-08-31 00:30:15 +00:00
Chris Lattner 1ae0dec9b9 Get FindUsedTypes pass
llvm-svn: 3559
2002-08-31 00:29:36 +00:00
Chris Lattner c61f6b0589 - Fix bug: test/Regression/CBackend/2002-08-20-RecursiveTypes.ll
- Converted CWriter to be an LLVM pass.

llvm-svn: 3558
2002-08-31 00:29:16 +00:00
Chris Lattner bc56c86ca4 Convert cwriter to be a pass.
llvm-svn: 3557
2002-08-31 00:28:25 +00:00
Chris Lattner 2bb359e421 New testcase
llvm-svn: 3556
2002-08-31 00:24:54 +00:00
Chris Lattner dd6522e7a0 - Implement SCCP of getelementptr instructions
- Implement SCCP of globals into ConstantExprs hopefully opening new
   opportunities for more SCCP.

llvm-svn: 3555
2002-08-30 23:39:00 +00:00
Chris Lattner 7495a9b13a New testcase
llvm-svn: 3554
2002-08-30 23:22:15 +00:00
Chris Lattner 3f5b42697c - Reformat comments
- 'gccas' puts verifier in logical place in pass procession to avoid
    recomputing dominator information unneccesarily.

llvm-svn: 3553
2002-08-30 22:55:32 +00:00
Chris Lattner 4a84ad57a9 - 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.
llvm-svn: 3552
2002-08-30 22:54:41 +00:00
Chris Lattner 2292e551ed - 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.
llvm-svn: 3551
2002-08-30 22:54:37 +00:00
Chris Lattner ed39ccae8d - Eliminate the last traces of the 'analysis' namespace
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner 1b09a9ab68 Really minor cleanups
llvm-svn: 3549
2002-08-30 22:53:30 +00:00
Chris Lattner e083fe9e34 AsmParser now depends on clients to verify that input is well formed
llvm-svn: 3548
2002-08-30 22:52:23 +00:00
Chris Lattner 91f9b9de9e Update comments
llvm-svn: 3547
2002-08-30 22:51:21 +00:00
Chris Lattner f7e2daf5a4 Fix comments.
llvm-svn: 3546
2002-08-30 22:51:08 +00:00
Chris Lattner ba6fda3e69 Merged into ValueNumbering.cpp
llvm-svn: 3545
2002-08-30 22:30:51 +00:00
Chris Lattner f2eb70fc0b Minor cleanups so I can remove BasicValueNumbering.h
llvm-svn: 3544
2002-08-30 22:30:36 +00:00
Chris Lattner eb5d8331e8 Add "written by" note
llvm-svn: 3543
2002-08-30 21:50:21 +00:00
Chris Lattner a70e697e29 Initial implementation of basic value numbering
This file will probably go away at some point

llvm-svn: 3542
2002-08-30 20:30:03 +00:00
Chris Lattner c05581fb31 initial implementation of ValueNumbering interface.
llvm-svn: 3541
2002-08-30 20:29:02 +00:00
Chris Lattner 2dd49e525c Initial implementation of value numbering for load instructions
llvm-svn: 3540
2002-08-30 20:28:10 +00:00
Chris Lattner 3e4e6974f2 Initial version of LoadValueNumbering interface
llvm-svn: 3539
2002-08-30 20:27:48 +00:00
Chris Lattner 0653f10c2f Initial version of ValueNumbering interface
llvm-svn: 3538
2002-08-30 20:27:15 +00:00
Chris Lattner 447dd14bac Link to analysis.o not analysis.a
llvm-svn: 3537
2002-08-30 20:25:41 +00:00
Chris Lattner edd6704458 - GCCAS now uses load value #ing for GCSE
llvm-svn: 3536
2002-08-30 20:25:25 +00:00
Chris Lattner 216edd4ea0 - Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber
- -debug-pass=Details now prints implementation class names for analysis
    groups
  - Rework how AnalysisGroups are resolved to be simpler and better.

llvm-svn: 3535
2002-08-30 20:25:01 +00:00
Chris Lattner b3708e267e - PassManager prints analysis sets nicer
- Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber

llvm-svn: 3534
2002-08-30 20:23:45 +00:00
Chris Lattner b2a31090b1 - GCSE now no longer counts instructions not removed (due to no common
dominator as being removed)
  - GCSE now uses new Value #'ing interface, instead of dealing with AA itself
  - GCSE worklist implementation much simpler, class cleaned up.

llvm-svn: 3533
2002-08-30 20:22:29 +00:00
Chris Lattner 91046f158e - PassInfo class keeps track of AnalysisGroups implemented by the Pass.
- Doxygenize comments

llvm-svn: 3532
2002-08-30 20:20:39 +00:00
Chris Lattner aefad603ad - Pass now has AnalysisImpls class to implement getAnalysis() so that it is
correct even when called back by another passes run method.

llvm-svn: 3531
2002-08-30 20:19:49 +00:00
Chris Lattner 06724b8d8a Make sure to run these tests with load value #'ing
llvm-svn: 3530
2002-08-30 20:18:09 +00:00
Vikram S. Adve 12e350e5ed Eliminate hardcoded paths using LLVMGCCDIR variable.
llvm-svn: 3529
2002-08-30 03:27:36 +00:00
Vikram S. Adve a0e2fd3c2f Add LLVMGCCDIR variable to eliminate hardcoded paths from test/Makefile.tests.
llvm-svn: 3528
2002-08-30 03:27:09 +00:00
Vikram S. Adve 728de92db4 Simplified significantly by pulling out local configuration options
into Makefile.config.

llvm-svn: 3527
2002-08-29 23:28:46 +00:00
Vikram S. Adve 1899c5626c Local configuration options for a particular installation of LLVM.
llvm-svn: 3526
2002-08-29 23:27:38 +00:00
Chris Lattner 6d33f2f338 New datastructure analysis correctly uses TargetData
llvm-svn: 3525
2002-08-29 20:10:29 +00:00
Chris Lattner abb16604fd Remove unneeded #include
llvm-svn: 3524
2002-08-29 20:08:55 +00:00
Chris Lattner bcc8a72b52 Fix comments
llvm-svn: 3523
2002-08-29 20:08:39 +00:00
Chris Lattner b3b49799b8 Make the getAnalyss<> members const. Using them does NOT modify the Pass object.
llvm-svn: 3522
2002-08-29 20:07:59 +00:00
Vikram S. Adve 0bfb4cc5d1 Factor out /shared/... path to simplify changing it.
llvm-svn: 3521
2002-08-29 18:40:51 +00:00
Chris Lattner 429b522d79 Comment out broken link
llvm-svn: 3520
2002-08-29 18:33:48 +00:00
Anand Shukla bcba516097 moved this file from lib/Reoptimizer/Mapping
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla 2762328f9e Makefile for new sub directory
llvm-svn: 3518
2002-08-27 22:46:38 +00:00
Anand Shukla fe9eda7fb1 Added Mapping subdir
llvm-svn: 3517
2002-08-27 22:45:49 +00:00
Chris Lattner c837dbc39f Implement ConstantPointerRef support, & ConstantExpr support for Cast, GEP & Add.
llvm-svn: 3516
2002-08-27 22:33:45 +00:00
Anand Shukla a1cd3fedb5 added Reoptimizer in Makefile DIRS
llvm-svn: 3515
2002-08-27 22:05:53 +00:00
Anand Shukla cbf89056d3 Added mapping lib in llc makefile
llvm-svn: 3514
2002-08-27 16:46:11 +00:00
Anand Shukla f246131208 Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
llvm-svn: 3513
2002-08-27 16:45:17 +00:00
Chris Lattner 91680b53f4 Fix bug: test/Regression/CBackend/2002-08-26-IndirectCallTest.ll
llvm-svn: 3511
2002-08-26 20:50:09 +00:00
Chris Lattner 5ce35beed5 New testcase
llvm-svn: 3510
2002-08-26 20:49:42 +00:00
Chris Lattner 81fabb05e5 Add support for turning an array of characters into a string.
llvm-svn: 3509
2002-08-26 17:53:56 +00:00
Anand Shukla e87291ef83 Changed so it gets linked properly
llvm-svn: 3508
2002-08-26 16:45:19 +00:00
Chris Lattner b3a296fc6a Convert comments to Doxygen style
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Vikram S. Adve 8a5c9b15ae Fix the way parens are printed around "*ptrName" so that
no parens are printed around  *, **, ... alone, except if
it is a pointer type for which no name should be printed,
as in the result of a cast.

llvm-svn: 3506
2002-08-25 20:00:08 +00:00
Vikram S. Adve 802e7716d8 Added function GetMemInstArgs and made FoldGetElemChain private.
llvm-svn: 3503
2002-08-24 21:03:10 +00:00
Vikram S. Adve 6f3268d39d Added support for type inquiry in subclasses of InstTreeNode.
llvm-svn: 3502
2002-08-24 21:02:42 +00:00
Vikram S. Adve 872c7f9a9e Use newly-added type inspection support in InstTreeNode subclasses.
llvm-svn: 3501
2002-08-24 21:02:09 +00:00
Vikram S. Adve 8c1e3f7310 Moved code here to extract memory instruction indices and to check
whether FoldGetElemNodes should be called.  This is machine-independent
but was in the Sparc directory.  This is in a new function: GetMemInstArgs.

llvm-svn: 3500
2002-08-24 21:00:08 +00:00
Vikram S. Adve bee7297f26 LoadIdx non-terminal no longer needed.
llvm-svn: 3499
2002-08-24 20:58:04 +00:00
Vikram S. Adve 541862fbf3 Sign-extend values used to index arrays (and Simplify
SetOperandsForMemInstr significantly).  Load and Store
no longer have any indices.  Eliminate spurious sign-extension
on a cast to float/double.

llvm-svn: 3498
2002-08-24 20:56:53 +00:00
Vikram S. Adve 9068efdce6 Fix sign-extension: it needs to happen *after* multiplying by type size.
llvm-svn: 3497
2002-08-24 14:44:58 +00:00
Vikram S. Adve bc27523001 Sign-extend array index expressions to work correctly on non-32 bit machines.
llvm-svn: 3496
2002-08-24 14:44:23 +00:00
Chris Lattner 65217ff294 - instcombine demorgan's law: and (not A), (not B) == not (or A, B)
llvm-svn: 3495
2002-08-23 18:32:43 +00:00
Chris Lattner ad1e0535e2 Test that demorgan's law is instcombined successfully
llvm-svn: 3494
2002-08-23 18:31:18 +00:00
Chris Lattner 499ebd8763 Implement classof for SetCondInst so that instcombine doesn't break on dyn_cast<SetCondInst>
llvm-svn: 3493
2002-08-23 18:30:58 +00:00
Anand Shukla 83a3654838 Changed default value of 3rd parameter in function definition
llvm-svn: 3492
2002-08-23 10:55:49 +00:00