Chris Lattner
8447baa002
Add dummy entries to document what members can be added
...
llvm-svn: 4141
2002-10-13 17:12:05 +00:00
Vikram S. Adve
7387d96d6a
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Misha Brukman
b4940744de
Added capability to get execution count of a loop if it is a predictable
...
number of iterations.
llvm-svn: 4113
2002-10-11 05:34:32 +00:00
Misha Brukman
d55cfa6b94
Added helper functions in LoopInfo: isLoopExit and numBackEdges.
...
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner
0df2058775
Expose API to graph library to allow iteration over all nodes, even unreachable ones
...
llvm-svn: 4111
2002-10-10 22:31:31 +00:00
Chris Lattner
cbfb5d1eca
Change reference
...
llvm-svn: 4110
2002-10-10 22:31:02 +00:00
Chris Lattner
dbf01f86a7
* Don't only print out reachable nodes in the graph.
...
* use new api to get all nodes in the graph
* Allow custom graph traits
llvm-svn: 4109
2002-10-10 22:29:51 +00:00
Chris Lattner
6be061bacc
Add new getGraphProperties that may be specialized by graphs
...
llvm-svn: 4108
2002-10-10 22:29:10 +00:00
Chris Lattner
2fd0924282
Rename DataStructureGraph.h to DSGraphTraits.h
...
llvm-svn: 4107
2002-10-10 20:36:37 +00:00
Chris Lattner
0acdba0025
- Add new Constant::replaceUsesOfWithOnConstant which has an end result
...
similar to User::replaceUsesOfWith but actually does the right thing for
constants.
llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner
7c1989dead
Make isExtern() be a virtual function inherited from GlobalValue
...
llvm-svn: 4101
2002-10-09 23:11:33 +00:00
Chris Lattner
f4a42d7fb9
- Detemplatize UseTy<> in Value.h, because it's only instantiated for one
...
type!
llvm-svn: 4093
2002-10-09 00:42:03 +00:00
Chris Lattner
bdb409390d
- Remove Value::use_push_back & Value::use_remove
...
llvm-svn: 4089
2002-10-09 00:25:01 +00:00
Chris Lattner
aa8b6d047c
By default PHINode::removeIncomingValue will delete the phi node if the last
...
incoming value is deleted!
llvm-svn: 4076
2002-10-08 21:31:56 +00:00
Chris Lattner
3cf20c3f14
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
...
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
b9f59f1533
Expose new "recalculate" method from dominatorset
...
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner
b7590d8595
Don't rotate paper.
...
llvm-svn: 4066
2002-10-07 22:37:03 +00:00
Chris Lattner
2378135686
- Allow printing generic LLVM graphs to 'dot' files, so they can be
...
visualized easily.
llvm-svn: 4061
2002-10-07 18:37:10 +00:00
Chris Lattner
a79cd8735c
Fix bug in last checkin
...
llvm-svn: 4058
2002-10-07 17:13:22 +00:00
Chris Lattner
a186714d74
Implement operator= for SuccIterators
...
llvm-svn: 4055
2002-10-07 16:53:22 +00:00
Chris Lattner
3deb0bdf6c
- Add new isExternal() method to GlobalVariable to mirror Function.
...
- doxygenize comments and add new comments
llvm-svn: 4046
2002-10-06 22:29:58 +00:00
Chris Lattner
267eb7dc67
The wall clock timer (implementing using the RTC or cycle counter on x86) is
...
so much more accurate than the per process timers that we get better results
(less noise) by sorting according to wall time than process time.
llvm-svn: 4034
2002-10-03 21:08:20 +00:00
Chris Lattner
bcb0197fe3
Remove commented out stuff
...
DataStructure.h doesn't include DSGraph.h now
llvm-svn: 4028
2002-10-02 22:14:17 +00:00
Chris Lattner
668457ea05
Move GlobalDSGraph class defn to the end of the file
...
llvm-svn: 4027
2002-10-02 21:55:52 +00:00
Chris Lattner
801fcdd060
This file doesn't need Pass.h
...
llvm-svn: 4026
2002-10-02 21:55:24 +00:00
Chris Lattner
858642be4c
* Implement fully general merging of array subscripts on demand! This
...
does not handle the initial pointer index case yet though.
llvm-svn: 4011
2002-10-02 06:24:29 +00:00
Chris Lattner
0851fb32b7
Checkin the "meat" of the Data structure graph itself. I forgot to check
...
this in before. :(
llvm-svn: 4009
2002-10-02 04:58:12 +00:00
Chris Lattner
5ee67379d9
- Remove the User::eraseOperand method which is never used, really
...
dangerous, and not something we want to expose.
llvm-svn: 4007
2002-10-01 23:41:17 +00:00
Chris Lattner
c2322d5fac
- Rework Statistics:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
llvm-svn: 3999
2002-10-01 22:35:45 +00:00
Chris Lattner
7f0db9917a
Check in DataStructure rewrite so far.
...
llvm-svn: 3998
2002-10-01 22:34:45 +00:00
Chris Lattner
9b38808792
Checkin generic interval timer support
...
llvm-svn: 3992
2002-10-01 19:36:54 +00:00
Vikram S. Adve
dddfcdc478
Added several more helper functions for construction MachineInstrs.
...
llvm-svn: 3983
2002-09-29 22:55:45 +00:00
Vikram S. Adve
0ab2587056
Minor change to interface for Create{Zero,Sign}ExtensionsInstructions.
...
llvm-svn: 3979
2002-09-29 21:53:31 +00:00
Chris Lattner
5c3fdd02af
Simplify code a bit, add an assertion
...
llvm-svn: 3974
2002-09-29 21:37:08 +00:00
Vikram S. Adve
7e39b876eb
Fixed method getReturnValue(): it should return NULL if the
...
callee does not return a value.
llvm-svn: 3968
2002-09-28 17:03:54 +00:00
Vikram S. Adve
1aed35b2e5
Simplified code that handles call args and rets, so it no longer
...
needs the RegClass list to be passed in.
llvm-svn: 3964
2002-09-28 16:56:59 +00:00
Chris Lattner
a9bc408104
First try at implementing the AliasSetTracker class. I'm sure it will need
...
revision as I start to use it though.
llvm-svn: 3954
2002-09-26 21:49:07 +00:00
Chris Lattner
9a954d1bc1
Checkin new loop-preheader insertion pass.
...
llvm-svn: 3943
2002-09-26 16:17:33 +00:00
Chris Lattner
51dd965704
- Fix bug in LoopInfo causing ParentLoop to be garbage
...
llvm-svn: 3940
2002-09-26 16:15:19 +00:00
Chris Lattner
dee21da2c0
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
llvm-svn: 3938
2002-09-26 16:14:37 +00:00
Chris Lattner
aebc47d30a
Add a new "DominatorSet::addDominator" method to allow updates
...
llvm-svn: 3937
2002-09-26 05:42:47 +00:00
Chris Lattner
4dddc16c8c
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
llvm-svn: 3935
2002-09-26 05:32:43 +00:00
Chris Lattner
06076d8d3e
- Add new ctor to BasicBlock to allow insertion before any BB, not just at
...
the end of the function.
llvm-svn: 3933
2002-09-26 05:03:17 +00:00
Chris Lattner
cbdfa73706
Converted SimpleStructMutation to take TargetData as a required pass.
...
llvm-svn: 3931
2002-09-26 00:17:18 +00:00
Chris Lattner
4b838cd6b5
Change LowerAllocations pass to 'require' TargetData instead of it being
...
passed in.
llvm-svn: 3930
2002-09-25 23:47:49 +00:00
Chris Lattner
8cbeb6c60a
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3928
2002-09-25 23:46:56 +00:00
Chris Lattner
941c5c9a70
ImmutablePass's don't need a runOnFunction, nor do they need to explicitly say
...
that they preserve all xforms
llvm-svn: 3925
2002-09-25 22:27:54 +00:00
Chris Lattner
8c104c3afa
Convert BasicAA to be an immutable pass instead of a FunctionPass
...
llvm-svn: 3922
2002-09-25 22:00:18 +00:00
Chris Lattner
e7d8ee84e7
Add support for ImmutablePasses, which are not run, and cannot be
...
invalidated.
llvm-svn: 3921
2002-09-25 21:59:11 +00:00
Chris Lattner
59bfff25cb
Checkin stub for Misha to implement
...
llvm-svn: 3919
2002-09-25 19:10:06 +00:00
Chris Lattner
442d220996
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3909
2002-09-24 15:51:54 +00:00
Chris Lattner
63940ae296
Expose passinfo from BreakCriticalEdges pass so that it may be "Required" by
...
other passes
llvm-svn: 3906
2002-09-24 15:42:27 +00:00
Chris Lattner
cd247490cd
Add new BreakCriticalEdges pass
...
llvm-svn: 3902
2002-09-24 00:08:37 +00:00
Chris Lattner
c424fd7af2
There are no implicit gep forms of load and store anymore
...
llvm-svn: 3901
2002-09-24 00:08:01 +00:00
Chris Lattner
fba5394cf3
Make users of FindUsedTypes not have problems with linkage. This fixes
...
cwriter.
llvm-svn: 3899
2002-09-24 00:07:17 +00:00
Chris Lattner
8e66cea1a7
Group #includes better
...
llvm-svn: 3887
2002-09-23 17:45:52 +00:00
Anand Shukla
508121e5d9
Initial version: it adds 2 empty slots at the top of stack
...
llvm-svn: 3872
2002-09-21 04:58:26 +00:00
Vikram S. Adve
43881f46b0
Peephole optimization pass on final machine code.
...
llvm-svn: 3863
2002-09-20 16:33:03 +00:00
Vikram S. Adve
248e623726
Add erase() method for a single element.
...
llvm-svn: 3849
2002-09-20 00:55:57 +00:00
Vikram S. Adve
ed466a713a
Added class MachineOptInfo as interface to target-specific
...
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().
llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve
8d0bcb9568
Interface to target-specific routines that support machine code optimization.
...
llvm-svn: 3844
2002-09-20 00:49:21 +00:00
Vikram S. Adve
47303cde2d
Add method MachineInstr::replace to rewrite a machine instruction in place.
...
llvm-svn: 3843
2002-09-20 00:47:49 +00:00
Chris Lattner
31516613bd
Workaround for bug in GCC 3.1.1 iostreams library on sparc. It apprarently
...
isn't flushing an ostream when it is deleted.
llvm-svn: 3834
2002-09-19 20:49:25 +00:00
Chris Lattner
af94e5bd3b
Fix ambiguity problem due to builtin log2(double) function
...
llvm-svn: 3800
2002-09-17 23:56:50 +00:00
Chris Lattner
2cef6041d2
Fix namespace correctness bug
...
llvm-svn: 3798
2002-09-17 23:48:02 +00:00
Chris Lattner
3bc4b5c35c
Add support for gcc 3.2
...
llvm-svn: 3795
2002-09-17 23:38:38 +00:00
Chris Lattner
ccf0fe57bc
Remove extra #include
...
llvm-svn: 3776
2002-09-17 17:18:12 +00:00
Vikram S. Adve
da78de96b2
Fix typo in comment.
...
llvm-svn: 3773
2002-09-17 11:09:59 +00:00
Chris Lattner
45298a4ef3
Fix compile problem on linux. Noone should ever #include <inttypes.h>
...
directly. Instead, include Support/DataTypes.h
llvm-svn: 3766
2002-09-16 20:44:19 +00:00
Vikram S. Adve
feebe5999b
New preselection pass that specializes LLVM code for a target machine,
...
while remaining in legal portable LLVM form and preserving type
information and type safety.
llvm-svn: 3759
2002-09-16 18:08:17 +00:00
Vikram S. Adve
c7947c2cdc
Add ilist_iterator constructor from a node reference.
...
llvm-svn: 3756
2002-09-16 16:46:17 +00:00
Vikram S. Adve
5a92d517b0
Allow transformation DecomposeArrayRef(GetElementPtrInst* GEP) to
...
be invoked on a single instruction at a time, for use in other passes.
llvm-svn: 3751
2002-09-16 16:07:19 +00:00
Vikram S. Adve
9226baa6bc
Add routines to update or erase operands (and to do so without external
...
assumptions about which operand number stores what operand).
llvm-svn: 3750
2002-09-16 16:06:12 +00:00
Vikram S. Adve
4045ba355d
*** empty log message ***
...
llvm-svn: 3749
2002-09-16 16:01:41 +00:00
Vikram S. Adve
359bfe3943
Add support for passes that use a TargetMachine object.
...
llvm-svn: 3748
2002-09-16 16:01:39 +00:00
Vikram S. Adve
37d1a733b1
Add method MachineOperand::hasAllocatedReg().
...
llvm-svn: 3747
2002-09-16 15:58:54 +00:00
Vikram S. Adve
ef1f7d3e42
Add a version of ChooseRegOrImmed to handle numerical constants
...
introduced by InstrSelection.
llvm-svn: 3746
2002-09-16 15:58:34 +00:00
Vikram S. Adve
4aad6090ae
Add method adjustAlignment so that stack slot alignments can be computed
...
in a target-dependent manner (because of the dang OFFSET in Sparc v9).
llvm-svn: 3745
2002-09-16 15:57:43 +00:00
Vikram S. Adve
59b3b6c07b
Add methods to query about the representation of LLVM quantities (e.g.,
...
constants). Useful for target-dependent LLVM transformations like
Preselection.
llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve
354fc692dc
*** empty log message ***
...
llvm-svn: 3741
2002-09-16 15:39:35 +00:00
Vikram S. Adve
8d2a9260ef
Remove unnecessary include.
...
llvm-svn: 3723
2002-09-14 23:04:52 +00:00
Vikram S. Adve
263de0387d
Break RA_DEBUG option into several levels to get better output.
...
llvm-svn: 3722
2002-09-14 22:18:37 +00:00
Chris Lattner
148529e5cd
Fix to work correctly under linux
...
llvm-svn: 3720
2002-09-14 19:52:49 +00:00
Vikram S. Adve
7cad54b354
Moving to lib/CodeGen/RegAlloc.
...
llvm-svn: 3718
2002-09-14 11:57:17 +00:00
Vikram S. Adve
3f24ec2530
Add support for MacOS and (hopefully) other BSD derivatives.
...
llvm-svn: 3717
2002-09-14 10:42:59 +00:00
Chris Lattner
547be87c13
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner
afdf20f4ad
Tighten up sanity checking
...
llvm-svn: 3706
2002-09-13 22:18:26 +00:00
Chris Lattner
d7ccee7961
Try to work well on multiple platforms.
...
llvm-svn: 3704
2002-09-13 21:51:25 +00:00
Chris Lattner
984b568588
Add better linux support by using the right macro. This still should be
...
autoconfiscated, but for now this is sufficient.
llvm-svn: 3701
2002-09-13 15:37:58 +00:00
Chris Lattner
3ddb1c6597
Checkin patch written by Casey Carter, enabling support for the redhat GCC 2.96
...
compiler.
llvm-svn: 3697
2002-09-13 14:33:39 +00:00
Chris Lattner
b270065c97
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
2d1e19f9e2
Convert index type for getelementptr instruction from uint to long
...
llvm-svn: 3678
2002-09-11 01:16:19 +00:00
Chris Lattner
67487b291c
Add convenience ctor to BranchInst
...
llvm-svn: 3675
2002-09-10 23:54:56 +00:00
Chris Lattner
7636598d94
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
9cf88346b6
Eliminate the GenericBinaryInst class
...
llvm-svn: 3649
2002-09-10 15:35:23 +00:00
Chris Lattner
01faec5813
* 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
303a74440f
Eliminate the GenericBinaryInst class.
...
llvm-svn: 3647
2002-09-10 15:27:31 +00:00
Chris Lattner
9146e3b8e4
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
2550723883
Move TmpInstruction ctor to InstrSelection.cpp file
...
llvm-svn: 3622
2002-09-08 21:07:51 +00:00
Chris Lattner
15ac530194
Checkin initial support for automatic memory leak detection routines
...
llvm-svn: 3617
2002-09-08 18:51:12 +00:00
Chris Lattner
85cf7de5b9
* 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
1de93e0830
* 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
1cf6da5815
Include stub for correlated expression elimination pass
...
llvm-svn: 3597
2002-09-06 18:39:29 +00:00
Chris Lattner
c8554b6352
- Rename BreakCriticalEdge to the slightly more standard SplitCriticalEdge
...
llvm-svn: 3587
2002-09-06 02:35:11 +00:00
Chris Lattner
66c5dd4050
* Doxygenize API
...
* Add new functions for identifying and breaking critical edges
llvm-svn: 3586
2002-09-06 02:19:25 +00:00
Chris Lattner
d8e9501bf5
- 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
205af87264
Make getAnalysisToUpdate<AnalysisType>() public so that transformation APIs
...
can update analysis information.
llvm-svn: 3584
2002-09-06 02:14:47 +00:00
Vikram S. Adve
055207a945
Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
...
llvm-svn: 3582
2002-09-05 18:36:41 +00:00
Chris Lattner
e4bba98678
- 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
9fc380645d
Implement operator== and != for ranges
...
llvm-svn: 3571
2002-09-03 01:05:31 +00:00
Chris Lattner
88a7f572fb
Remove duplicate #include
...
llvm-svn: 3567
2002-09-02 04:04:11 +00:00
Chris Lattner
b7f7350ba6
Add printing support to ConstantRange class
...
llvm-svn: 3566
2002-09-02 00:18:26 +00:00
Chris Lattner
0c4ea48b54
Initial implementation of ConstantRange support
...
llvm-svn: 3564
2002-09-01 23:53:39 +00:00
Chris Lattner
7c0515febe
- Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
...
- Doxygenized iOperators.h
llvm-svn: 3561
2002-09-01 19:46:36 +00:00
Chris Lattner
0a487fa68e
Convert cwriter to be a pass.
...
llvm-svn: 3557
2002-08-31 00:28:25 +00:00
Chris Lattner
838248b35a
- Eliminate the last traces of the 'analysis' namespace
...
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner
39d3e99afe
Update comments
...
llvm-svn: 3547
2002-08-30 22:51:21 +00:00
Chris Lattner
168cdaea1a
Fix comments.
...
llvm-svn: 3546
2002-08-30 22:51:08 +00:00
Chris Lattner
bfffa18d20
Merged into ValueNumbering.cpp
...
llvm-svn: 3545
2002-08-30 22:30:51 +00:00
Chris Lattner
47f9a4a06a
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
2b8ae06774
Initial version of LoadValueNumbering interface
...
llvm-svn: 3539
2002-08-30 20:27:48 +00:00
Chris Lattner
a9d7ed8985
Initial version of ValueNumbering interface
...
llvm-svn: 3538
2002-08-30 20:27:15 +00:00
Chris Lattner
4253b850c0
- 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
3baff38916
- 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
5545ec0631
Fix comments
...
llvm-svn: 3523
2002-08-29 20:08:39 +00:00
Chris Lattner
30a25af88c
Make the getAnalyss<> members const. Using them does NOT modify the Pass object.
...
llvm-svn: 3522
2002-08-29 20:07:59 +00:00
Chris Lattner
cc9d7e01c9
Add support for turning an array of characters into a string.
...
llvm-svn: 3509
2002-08-26 17:53:56 +00:00
Anand Shukla
1e105cdb7c
Changed so it gets linked properly
...
llvm-svn: 3508
2002-08-26 16:45:19 +00:00
Chris Lattner
69f833618d
Convert comments to Doxygen style
...
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Vikram S. Adve
f699596601
Added function GetMemInstArgs and made FoldGetElemChain private.
...
llvm-svn: 3503
2002-08-24 21:03:10 +00:00
Vikram S. Adve
6fe717b03b
Added support for type inquiry in subclasses of InstTreeNode.
...
llvm-svn: 3502
2002-08-24 21:02:42 +00:00
Chris Lattner
cb3870e441
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
Chris Lattner
9f18db8156
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
20b85d96e4
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
3fbdcb699a
Load & Store Inst now no longer derive from MemAccessInst
...
llvm-svn: 3486
2002-08-22 22:54:10 +00:00
Chris Lattner
d123fc1e41
Load and Store now no longer derive from MemAccessInst. Indexing a load or
...
store is not possible anymore.
llvm-svn: 3482
2002-08-22 22:47:47 +00:00
Chris Lattner
48278223df
doxygenize comments in header
...
llvm-svn: 3480
2002-08-22 22:46:20 +00:00
Chris Lattner
01ed913adb
Add doxygen comments to AliasAnalysis class
...
llvm-svn: 3475
2002-08-22 21:22:25 +00:00
Chris Lattner
5d3710be84
Fix bug: test/Regression/Assembler/2002-08-22-DominanceProblem.ll
...
llvm-svn: 3473
2002-08-22 20:39:27 +00:00
Chris Lattner
04c9a37306
Checkin new alias analysis infrastructure
...
llvm-svn: 3464
2002-08-22 18:25:20 +00:00
Chris Lattner
2522ebee1b
Remove unneccesary method
...
llvm-svn: 3452
2002-08-22 15:57:37 +00:00
Vikram S. Adve
3567460977
Just some extra comments.
...
llvm-svn: 3446
2002-08-22 03:03:10 +00:00
Vikram S. Adve
dba9c85e36
Add method copyOperands().
...
llvm-svn: 3445
2002-08-22 03:01:44 +00:00
Chris Lattner
78cb7cd03d
Add a class that is useful for hacking around linking problem due to
...
pass implementations not being linked in when they are used if the
implementation is in a .a file.
- Fighting with linking problem due to removing the ::ID elements. Now the
implementation .cpp files for analyses are not being included into gccas
and friends because it is linking to the .a file and there is no explicit
symbol reference to bring in the .o file. The new IncludeFile hack is the
result.
llvm-svn: 3434
2002-08-21 23:48:55 +00:00
Chris Lattner
c4bd846e84
- Split Dominators.h into Dominators.h & PostDominators.h
...
llvm-svn: 3432
2002-08-21 23:43:50 +00:00
Chris Lattner
c5c1d9ad89
- Implement the new AnalysisGroup feature, neccesary for Value#ing and pointer analysis
...
llvm-svn: 3425
2002-08-21 22:16:59 +00:00
Chris Lattner
bf3e8bf210
Add assertion checks to nail bugs early.
...
llvm-svn: 3424
2002-08-21 22:14:28 +00:00
Chris Lattner
48cb6df26f
- Make Pass::lookupPassInfo a public member
...
- Fix Pass::getAnalysis<AnalysisType>() to use dynamic_cast instead of a
static cast to handle the case where the cast from & two classes are not
related via inheritance.
llvm-svn: 3423
2002-08-21 22:13:33 +00:00
Chris Lattner
6c83ee57c1
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3417
2002-08-21 17:09:49 +00:00
Chris Lattner
b90f78e2b3
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3416
2002-08-21 17:09:45 +00:00
Chris Lattner
a63cce4e99
- Eliminate the need for analyses to expose an ::ID member.
...
llvm-svn: 3414
2002-08-21 17:08:37 +00:00
Chris Lattner
417aa6666c
Add missing forward decl
...
llvm-svn: 3413
2002-08-21 15:38:45 +00:00
Chris Lattner
edea38063b
Add new SetCondInst::getInverseCondition() method.
...
llvm-svn: 3404
2002-08-20 18:17:09 +00:00
Chris Lattner
8f4f2153e5
- ConstantPointerRefs are now automatically removed from the module table
...
when they are destroyed, which makes Constant::destroyConstant an actually
useful external interface. Expose these methods publicly.
- Implement destroyConstant on ConstPointerNull so that destroyConstant can
be used on any derived type constant safely.
llvm-svn: 3378
2002-08-18 00:39:59 +00:00
Chris Lattner
9f776d426f
Module's do not subclass from Value, so this code caused a segfault.
...
llvm-svn: 3376
2002-08-18 00:37:14 +00:00
Chris Lattner
30c534c3e1
Add Module::dump() method
...
llvm-svn: 3374
2002-08-17 23:32:42 +00:00
Chris Lattner
aac33658b1
Remove the last traces of the NOT instruction
...
llvm-svn: 3346
2002-08-15 16:14:49 +00:00
Vikram S. Adve
227bd369e5
Change opLabel numbers for Not and BNot.
...
Also, these tree nodes are now binary, not unary.
llvm-svn: 3344
2002-08-15 14:20:45 +00:00
Vikram S. Adve
c66b996e40
Added more helper functions for binary instructions emulating
...
unary Neg and Not: isNeg, isNot, getNegArgument, and getNotArgument.
llvm-svn: 3341
2002-08-15 14:15:48 +00:00
Chris Lattner
6a9d88347a
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
d909e03b2e
Remove support for unary operators.
...
llvm-svn: 3326
2002-08-14 18:19:46 +00:00
Chris Lattner
7a018a27b2
Remove reference to GenericUnaryInst class
...
llvm-svn: 3325
2002-08-14 18:18:50 +00:00
Chris Lattner
0e17a44326
Remove support for unary instructions
...
llvm-svn: 3324
2002-08-14 18:18:28 +00:00
Chris Lattner
9a0912fb14
Remove constant propogation support for NOT instruction
...
llvm-svn: 3321
2002-08-14 18:17:07 +00:00
Chris Lattner
1783814b9f
Expose two new static methods from BinaryOperator: createNeg, createNot
...
llvm-svn: 3314
2002-08-14 17:51:29 +00:00
Vikram S. Adve
afb9cae44d
Add method MachineInstr::substituteValue() which substitutes
...
one Value with another one in all operands and implicit references
of the machine instruction.
Also add method MachineOperand::getVRegValueOrNull().
llvm-svn: 3307
2002-08-14 16:54:11 +00:00
Chris Lattner
3e63ddad5b
- Rename ConstantGenericIntegral -> ConstantIntegral
...
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
getAllOnesValue
llvm-svn: 3298
2002-08-13 17:50:18 +00:00
Chris Lattner
050aa81931
Return const char * const instead of std::string from get register name method
...
llvm-svn: 3294
2002-08-12 21:24:55 +00:00
Chris Lattner
4fbca59155
- Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegral
...
- Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h
llvm-svn: 3293
2002-08-12 21:21:21 +00:00
Chris Lattner
3575b5733a
* IntervalPartition no longer derives from vector
...
llvm-svn: 3281
2002-08-09 22:52:06 +00:00
Chris Lattner
9bcfec701d
Do not add an extra vtable to EVERY machineinstr created.
...
llvm-svn: 3280
2002-08-09 21:49:21 +00:00
Chris Lattner
d2d8928f1b
UnaryOperator::create should take a name just like BinaryOperator::create
...
llvm-svn: 3279
2002-08-09 21:39:38 +00:00
Chris Lattner
8a4787495a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
4d9fadc44a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner
eeb7564269
Change machinecode for instruction to not inherit from vector.
...
llvm-svn: 3274
2002-08-09 20:04:28 +00:00
Chris Lattner
98c71e5666
The second parameter of hash_set is the default, remove it.
...
llvm-svn: 3273
2002-08-09 19:40:42 +00:00
Chris Lattner
a21e315db4
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner
50900b8381
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3263
2002-08-08 19:01:11 +00:00
Chris Lattner
ef1061e61d
Simplify interface to parsers.
...
llvm-svn: 3255
2002-08-07 18:36:27 +00:00
Vikram S. Adve
34c7fef2d6
Add function GetConstantValueAsUnsignedInt.
...
llvm-svn: 3249
2002-08-04 20:55:59 +00:00
Vikram S. Adve
8159deecc3
Add MemAccessInst::getNumIndices().
...
llvm-svn: 3234
2002-08-03 13:22:36 +00:00
Chris Lattner
fd41c5e71b
Changes to be GCC 3.1 friendly
...
llvm-svn: 3184
2002-07-31 19:31:59 +00:00
Chris Lattner
53d5b3111d
Remove obsolete, confusing, method
...
llvm-svn: 3175
2002-07-31 01:45:02 +00:00
Vikram S. Adve
8491cdb932
Add GlobalDSGraph -- a common graph that holds externally visible nodes.
...
llvm-svn: 3169
2002-07-30 22:02:04 +00:00
Chris Lattner
372599ed03
Add hooks to get information out of concrete pass manager implementations
...
llvm-svn: 3164
2002-07-30 19:49:39 +00:00
Chris Lattner
12b9a2a7e6
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner
c197551e58
* Implement stuff so that code can declare that they only depend on the CFG of
...
a function, not on anything else. This speeds up GCCAS a lot.
llvm-svn: 3156
2002-07-30 16:27:32 +00:00
Chris Lattner
a4fb4b46c2
Implement constant propogation of logical (and, or, xor) expressions.
...
Fixes testcase: test/Regression/Transforms/ConstProp/logicaltest.ll
llvm-svn: 3153
2002-07-30 16:24:25 +00:00
Chris Lattner
4b68cd0c61
Expose instruction selection as a pass instead of a global function
...
llvm-svn: 3145
2002-07-30 03:55:29 +00:00
Chris Lattner
77cd530591
Add rough support for LLC passes
...
llvm-svn: 3144
2002-07-30 03:55:01 +00:00
Chris Lattner
dedfc5ccb3
Implement a new RemoveSuccessor function
...
llvm-svn: 3130
2002-07-29 22:32:06 +00:00
Chris Lattner
ef6729c9ca
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3125
2002-07-29 21:03:38 +00:00
Chris Lattner
b202b77aab
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3124
2002-07-29 21:03:33 +00:00
Chris Lattner
27795f655b
* Fix comment descriptions
...
* Remove defaulted argument to ctor that is never used anyway
* Prevent copying and assignment
llvm-svn: 3122
2002-07-29 21:01:19 +00:00
Chris Lattner
ec2780457d
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3116
2002-07-27 01:12:17 +00:00
Chris Lattner
3f47f1065b
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3115
2002-07-27 01:12:15 +00:00
Chris Lattner
b934722f1b
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner
ea9fb2a20a
*** empty log message ***
...
llvm-svn: 3111
2002-07-26 21:11:42 +00:00
Chris Lattner
ac27223c6a
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3110
2002-07-26 21:11:38 +00:00
Chris Lattner
252b65fbdf
Factor PassNameParser out of opt.cpp so that analyze and eventually llc can use it.
...
llvm-svn: 3108
2002-07-26 21:09:10 +00:00
Chris Lattner
e056a17a88
*** empty log message ***
...
llvm-svn: 3107
2002-07-26 19:19:31 +00:00
Chris Lattner
64a9cec8a8
Analysis contructors now no longer take AnalysisID's as their argument,
...
because there is a one-one mapping between classes and analyses.
llvm-svn: 3106
2002-07-26 19:19:16 +00:00
Chris Lattner
27272ee812
Simplify analyses so that there is only one analysis per class
...
llvm-svn: 3104
2002-07-26 18:40:06 +00:00
Chris Lattner
5cc0bef9ed
Remove dead options
...
llvm-svn: 3096
2002-07-25 19:59:38 +00:00
Chris Lattner
fe990ba408
Fix previous checkin
...
llvm-svn: 3093
2002-07-25 17:58:58 +00:00
Chris Lattner
eb574d8777
Add typenames
...
llvm-svn: 3092
2002-07-25 17:55:37 +00:00
Chris Lattner
b57916c8de
*** empty log message ***
...
llvm-svn: 3082
2002-07-25 15:39:09 +00:00
Chris Lattner
236035cb2f
Avoid warning: control reaches end of non-void function
...
llvm-svn: 3081
2002-07-25 15:39:05 +00:00
Chris Lattner
a5f569b7f9
Add support for GCC 3.0.4
...
llvm-svn: 3080
2002-07-25 15:23:20 +00:00
Chris Lattner
0ccf5689e3
*** empty log message ***
...
llvm-svn: 3077
2002-07-25 15:00:45 +00:00
Chris Lattner
0deb85b243
GCC 3.1 changes
...
llvm-svn: 3076
2002-07-25 15:00:43 +00:00
Chris Lattner
85a79c0bf6
GCC 3.1 changes
...
llvm-svn: 3070
2002-07-24 22:34:01 +00:00
Chris Lattner
743688359d
*** empty log message ***
...
llvm-svn: 3067
2002-07-24 22:20:06 +00:00
Chris Lattner
728a8aef9b
GCC 3.1 fixes
...
llvm-svn: 3066
2002-07-24 22:20:00 +00:00
Chris Lattner
5f11498859
*** empty log message ***
...
llvm-svn: 3065
2002-07-24 22:08:53 +00:00
Chris Lattner
e51b20c24c
Changes to build with GCC 3.1
...
llvm-svn: 3064
2002-07-24 22:08:36 +00:00
Chris Lattner
cde92b0c9c
Use the Support/iterator file to abstract out compiler differences
...
llvm-svn: 3063
2002-07-24 22:07:57 +00:00
Chris Lattner
41256bc060
Use the new include/Support/iterator file
...
llvm-svn: 3062
2002-07-24 22:07:42 +00:00
Chris Lattner
ebe969a2cc
Add forward_iterator wrapper
...
llvm-svn: 3061
2002-07-24 22:07:13 +00:00
Chris Lattner
3e01f547cd
Add another GCC2.95->3.1 compatibility header
...
llvm-svn: 3060
2002-07-24 21:38:41 +00:00
Chris Lattner
6ac36eae08
Spiff up the header files
...
llvm-svn: 3059
2002-07-24 21:25:34 +00:00
Chris Lattner
5d262d3846
*** empty log message ***
...
llvm-svn: 3058
2002-07-24 21:21:33 +00:00
Chris Lattner
ad8fc4ba3e
Non-standard hash classes are not in the std:: namespace
...
llvm-svn: 3057
2002-07-24 21:21:33 +00:00
Chris Lattner
9860e64083
*** empty log message ***
...
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Chris Lattner
b863331102
Move hash_* extension headers from ext/ to Support/ so that we can support
...
GCC 2.95, GCC 3.0.4 and GCC 3.1 all concurrently, without having to delete
headers after a chackou.
llvm-svn: 3055
2002-07-24 21:16:42 +00:00
Chris Lattner
345a8ed1df
Move compatibility headers to Support
...
llvm-svn: 3054
2002-07-24 21:09:54 +00:00
Chris Lattner
1f7accb16b
*** empty log message ***
...
llvm-svn: 3053
2002-07-24 20:44:02 +00:00
Chris Lattner
7b242c7228
Changes to make it GCC 3.1 compatible
...
llvm-svn: 3052
2002-07-24 20:44:01 +00:00
Chris Lattner
74dc1f4d82
Add missing typename's that GCC3.1 is whining about.
...
llvm-svn: 3051
2002-07-24 20:22:09 +00:00
Chris Lattner
0d323f2cdf
Disable the operator= in Value
...
Disable the copy ctor and operator= in Annotation.h
llvm-svn: 3048
2002-07-24 20:01:57 +00:00
Chris Lattner
25fde60989
Remove assert hack now that I'm using the right GDB. :)
...
llvm-svn: 3045
2002-07-24 17:21:36 +00:00
Chris Lattner
722320121c
Move many files into IPO.h
...
llvm-svn: 3042
2002-07-24 17:10:58 +00:00
Chris Lattner
5467246af4
Move contents of these files into IPO.h
...
llvm-svn: 3041
2002-07-24 17:10:24 +00:00
Chris Lattner
6669be024a
* Rename to IPO.h
...
* Add ConstantMerge.h contents
llvm-svn: 3032
2002-07-23 19:56:27 +00:00
Chris Lattner
fe4886e32b
Add a version of the bytecode writer pass that has a default ctor
...
llvm-svn: 3031
2002-07-23 19:56:03 +00:00
Chris Lattner
4b7d671258
Incorporate into IPO.h
...
llvm-svn: 3030
2002-07-23 19:51:10 +00:00
Chris Lattner
60265052c8
Prepare the file to become IPO.h
...
llvm-svn: 3029
2002-07-23 19:48:52 +00:00
Chris Lattner
d8c37e2e73
Merge the contents of ChangeAllocations.h into Scalar.h
...
llvm-svn: 3028
2002-07-23 19:37:38 +00:00
Chris Lattner
1c0863624d
Break part of Pass.h out into PassAnalysisSupport.h
...
Add PassSupport.h which contains code for Pass registration
llvm-svn: 3010
2002-07-23 17:59:55 +00:00
Chris Lattner
aa06815b2b
Allow comparison against null
...
llvm-svn: 3009
2002-07-23 17:59:02 +00:00
Chris Lattner
0caa0614f8
*** empty log message ***
...
llvm-svn: 3008
2002-07-23 17:58:44 +00:00
Chris Lattner
5cf6161e20
Pass creator requires a TargetData member
...
llvm-svn: 3007
2002-07-23 17:58:42 +00:00
Chris Lattner
a9de1268be
Regularize the Print*Passes so they have default ctors.
...
llvm-svn: 3006
2002-07-23 17:58:09 +00:00
Chris Lattner
585a05d786
Initial checkin
...
llvm-svn: 3005
2002-07-23 17:56:53 +00:00
Chris Lattner
64ea4b3a11
Add support for removing an option from a genericparser
...
llvm-svn: 2998
2002-07-23 17:15:09 +00:00
Chris Lattner
5c25ebd6f2
Change to avoid bug in GCC 3.0.4
...
llvm-svn: 2997
2002-07-23 00:44:37 +00:00
Chris Lattner
12672f6b14
initial checkin
...
llvm-svn: 2996
2002-07-23 00:17:55 +00:00
Chris Lattner
fcf29d460d
*** empty log message ***
...
llvm-svn: 2995
2002-07-23 00:17:22 +00:00
Chris Lattner
c9ecbc0fd0
Initial checkin
...
llvm-svn: 2994
2002-07-23 00:17:14 +00:00
Mehwish Nagda
48d84fb234
Moved to Reoptimizer/Mapping directory
...
llvm-svn: 2991
2002-07-22 22:06:56 +00:00
Chris Lattner
435788e8c3
Checkin CommandLine 2.0
...
llvm-svn: 2982
2002-07-22 02:07:59 +00:00
Anand Shukla
206dd8cd4e
changed first arg of parseBytecodeBuffer to unsigned char
...
llvm-svn: 2978
2002-07-21 09:31:59 +00:00
Anand Shukla
830bb08488
changed first arg og parseBytecodeBuffer to uchar
...
llvm-svn: 2977
2002-07-21 09:26:32 +00:00
Chris Lattner
fa81a79403
*** empty log message ***
...
llvm-svn: 2976
2002-07-20 08:20:00 +00:00
Chris Lattner
8e6b64dbe1
Check in the boost type_traits library, because it is now used by the CommandLine library.
...
llvm-svn: 2975
2002-07-20 08:19:52 +00:00
Chris Lattner
251a101494
Rename removeDeadNodes to removeTriviallyDeadNodes
...
Add new removeDeadNodes method
llvm-svn: 2968
2002-07-18 18:18:40 +00:00
Chris Lattner
9d5d6a8f94
Simplify saveOrigFunctionCalls
...
llvm-svn: 2967
2002-07-18 16:23:02 +00:00
Vikram S. Adve
a6647796e3
Add support for a top-down propagation pass.
...
Each DSGraph now keeps a list of pending callers that have not
been inlined into the function represented by that graph.
It also keeps a copy of the original call nodes before the BU pass
eliminates some of them.
llvm-svn: 2965
2002-07-18 16:12:08 +00:00
Chris Lattner
cc73590b11
* s/method/function
...
* BIG CHANGE: The root of the call "graph" is considered to be the external
node, not the "Root". This means that users using graph iterators like
df_begin() will start from the external node.
llvm-svn: 2957
2002-07-18 04:42:35 +00:00
Chris Lattner
5eaf38b681
First cut at implementing bottom up analysis
...
llvm-svn: 2944
2002-07-18 00:11:28 +00:00
Chris Lattner
4ad0749487
Make getelementptr ConstExpr take a vector of constants not values
...
llvm-svn: 2943
2002-07-18 00:11:08 +00:00
Chris Lattner
3abd9700fb
Fix prototype to make function.
...
llvm-svn: 2939
2002-07-17 21:34:20 +00:00
Mehwish Nagda
c2f7ac0eec
*** empty log message ***
...
llvm-svn: 2912
2002-07-15 23:56:27 +00:00
Vikram S. Adve
9c2c68687e
Ensure ConstExpr constants are unique.
...
llvm-svn: 2910
2002-07-15 18:20:50 +00:00
Vikram S. Adve
b54f48c9a7
Create a static version of Instruction::getOpcodeName(opCode) that
...
can be invoked with only an opcode (i.e., without an instruction).
Move all opCode->opCodeName translations there.
llvm-svn: 2892
2002-07-14 22:48:20 +00:00
Vikram S. Adve
79b72a8298
Added subclass ConstantExpr to represent expressions consructed from
...
constants using operators such as cast, getelementptr, add, shl, etc.
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr. This is why isConstantExpr() is needed.
llvm-svn: 2891
2002-07-14 22:47:54 +00:00
Vikram S. Adve
db83123c94
Add a couple of virtual functions to support subclass ConstantExpr.
...
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr. This is why isConstantExpr() is needed.
llvm-svn: 2890
2002-07-14 22:46:32 +00:00
Anand Shukla
d2ebe872e1
initial version: for emitfuncs pass
...
llvm-svn: 2886
2002-07-12 20:28:22 +00:00
Chris Lattner
6fbdec3e5a
* Nodes now keep track of any global variables contained within them
...
llvm-svn: 2877
2002-07-11 20:30:18 +00:00
Anand Shukla
3d7a9691cc
added std:: to vector
...
llvm-svn: 2874
2002-07-11 00:16:28 +00:00
Chris Lattner
567a072523
New implementation of data structure analysis
...
This diff is completely meaningless because this is a replacement
implementation.
llvm-svn: 2872
2002-07-10 22:42:17 +00:00
Vikram S. Adve
8967349e85
Bug fix: cast (bool) has higher precedence than %... who knew!
...
llvm-svn: 2864
2002-07-10 21:51:46 +00:00
Vikram S. Adve
36b62ee33a
Add support for marking each operand as a %hh, %hm, %lm or %lo.
...
Represent previous bools and these ones with flags in a single byte
per operand.
llvm-svn: 2863
2002-07-10 21:50:57 +00:00
Vikram S. Adve
cd651d5577
Added a few more methods for creating instructions.
...
llvm-svn: 2862
2002-07-10 21:49:38 +00:00
Vikram S. Adve
47a8810964
Put caller-saving code *before* argument copying code!
...
(This file has a minor change required for this fix.)
llvm-svn: 2854
2002-07-10 21:30:17 +00:00
Vikram S. Adve
4543e3c252
Minor change in comments.
...
llvm-svn: 2853
2002-07-10 21:29:22 +00:00
Chris Lattner
23cfaec9ce
Allow specifying a module for context instead of a slot calculator directly
...
llvm-svn: 2851
2002-07-10 16:48:14 +00:00
Anand Shukla
b9a34f17ff
added std:: to hash_set
...
llvm-svn: 2846
2002-07-09 19:18:16 +00:00
Chris Lattner
bc68100d59
Include header in the compiler-neutral location
...
llvm-svn: 2843
2002-07-09 16:50:24 +00:00
Vikram S. Adve
bfd03d50ce
cpMem<->Reg functions now support CC registers (int and FP) correctly.
...
A scratch register has to be provided when needed to do the copy.
Also, cpMem<->Reg functions now return a vector of machine instructions.
Added several get{Class,Type} functions.
Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!
llvm-svn: 2824
2002-07-08 22:44:14 +00:00
Vikram S. Adve
bacbe6b240
Interface to class MachineCodeForBasicBlock.
...
Moved here from MachineInstr.h to make it an annotation on BasicBlock.
llvm-svn: 2823
2002-07-08 22:40:34 +00:00
Vikram S. Adve
a110ccca19
Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.{cpp,h}.
...
An (explicit or implicit) operand may now be both a def and a use.
Also add a set of regs used by each instruction.
dump() no longer takes an optional argument, which doesn't work in gdb.
llvm-svn: 2821
2002-07-08 22:38:45 +00:00
Vikram S. Adve
4d696efa99
Added two more helper functions for instruction creation.
...
llvm-svn: 2819
2002-07-08 22:33:45 +00:00
Vikram S. Adve
da5e272403
Moved MachineCodeForBB to be an annotation on BasicBlock.
...
llvm-svn: 2818
2002-07-08 22:31:11 +00:00
Anand Shukla
ffc5389151
Add new << to allow printing modules by reference.
...
llvm-svn: 2814
2002-07-03 16:52:15 +00:00
Chris Lattner
511bea239c
Fix comment
...
llvm-svn: 2803
2002-06-30 15:50:09 +00:00
Anand Shukla
5dbf11fc92
added include<iostream> for cerr
...
llvm-svn: 2800
2002-06-25 22:04:00 +00:00
Chris Lattner
e91a294e94
We must with with GCC 2.95 :(
...
llvm-svn: 2787
2002-06-25 20:33:28 +00:00
Anand Shukla
bddcd163a1
changes to make it compatible with 64bit gcc
...
llvm-svn: 2786
2002-06-25 20:22:25 +00:00
Anand Shukla
8132ad5667
Added setSuccessor() method to terminator instructions
...
llvm-svn: 2784
2002-06-25 20:17:40 +00:00
Chris Lattner
dfd421a7df
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
cee706572b
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
fcd8e95495
Allow const bb's to be checked for containment in a loop
...
llvm-svn: 2754
2002-06-03 22:10:48 +00:00
Chris Lattner
7ec0950f3a
Simplify the interface to local dce and constprop
...
llvm-svn: 2750
2002-05-26 20:18:35 +00:00
Chris Lattner
e61bc07952
Convert RegClass::IsColorUsedArr from a dynamically allocated array to
...
a vector. This makes asserting on array bounds easier.
llvm-svn: 2731
2002-05-23 15:50:03 +00:00
Chris Lattner
ddd0665112
Add a new setSuccessor method to terminator instructions
...
llvm-svn: 2730
2002-05-23 15:48:41 +00:00
Chris Lattner
8d9046d031
Implement DataTypes.h in terms of inttypes.h
...
llvm-svn: 2729
2002-05-23 15:48:12 +00:00
Chris Lattner
07732a38b7
Avoid #including CommandLine.h
...
llvm-svn: 2710
2002-05-22 17:06:56 +00:00
Chris Lattner
7f8f0b5863
Implement a new command line option, -debug, which is meant to unify all of
...
the random debugging macros scattered throughout llvm.
The new DEBUG(x) macro should be used instead of special purpose debug macros.
llvm-svn: 2709
2002-05-22 17:06:20 +00:00
Chris Lattner
555163a0ab
Add ability to update existing variables with values read from the command line
...
to certain classes. This is nice because it means that in header files we can
just declare a value, and still have that value be set based on a command-line
argument. The difference is now that the #include of CommandLine.h does not
need to go into the header file as well.
llvm-svn: 2708
2002-05-22 17:03:05 +00:00
Chris Lattner
4b29ff417d
Simplify interface to ConstantFoldTerminator
...
llvm-svn: 2697
2002-05-21 20:04:50 +00:00
Chris Lattner
ae889c277a
Expose CFG simplification pass
...
llvm-svn: 2696
2002-05-21 20:04:15 +00:00
Chris Lattner
e56e490790
Cleanups, rename IsPowerOf2 to isPowerOf2
...
llvm-svn: 2662
2002-05-19 21:19:55 +00:00
Vikram S. Adve
5a71686624
Added log2 for log-base-2 and also modified IsPower2 to use it.
...
llvm-svn: 2653
2002-05-19 15:46:52 +00:00
Vikram S. Adve
45eb62b709
Added parameter IntRegSize for standard general-purpose register size.
...
llvm-svn: 2652
2002-05-19 15:44:07 +00:00
Vikram S. Adve
ee3fd3dda9
New function CreateSignExtensionInstructions.
...
Methods now take MachineCodeForInstruction& as an argument and record
temporary values in it directly, instead of return the temps.
Really simplifies callers.
llvm-svn: 2651
2002-05-19 15:43:31 +00:00
Vikram S. Adve
8261256950
Many functions that returned a single MachineInstr now take a
...
vector of MachineInstr* to return multiple ones.
llvm-svn: 2650
2002-05-19 15:42:21 +00:00
Vikram S. Adve
2552231a8c
Better interface to generating machine instr for common cases
...
(many places still need to be updated to use this interface).
llvm-svn: 2648
2002-05-19 15:40:41 +00:00
Vikram S. Adve
0cc9f53701
MachineInstr now inherits from Annotable.
...
llvm-svn: 2647
2002-05-19 15:39:59 +00:00
Vikram S. Adve
1f8badf623
Annotation class for MachineInstr.
...
llvm-svn: 2643
2002-05-19 15:30:21 +00:00
Vikram S. Adve
a5968c518f
Add integer register size field.
...
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.
llvm-svn: 2641
2002-05-19 15:28:02 +00:00
Chris Lattner
9d013ca535
Invoke inst has side effects!
...
llvm-svn: 2619
2002-05-14 04:20:25 +00:00
Chris Lattner
2735171cf5
Add method to check to see if two _Instructions_ dominate each other
...
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner
5a85ea20e5
Add prototype for LICM pass
...
llvm-svn: 2612
2002-05-10 22:44:16 +00:00
Chris Lattner
708b869951
Make sure to call the derived visit versions from the ranged iterator.
...
llvm-svn: 2607
2002-05-10 22:21:05 +00:00
Chris Lattner
ff9f677248
Add explicit abort so optimized build knows that the function does not return
...
llvm-svn: 2605
2002-05-10 18:53:55 +00:00
Chris Lattner
625396c63a
Add an explicit abort so that the optimized build knows the function does
...
not return.
llvm-svn: 2604
2002-05-10 18:53:21 +00:00
Chris Lattner
a9e4b660ff
Initial checkin of Statistic class
...
llvm-svn: 2599
2002-05-10 15:36:56 +00:00
Chris Lattner
ca6c5955f4
remove deprecated getInstType() method
...
llvm-svn: 2595
2002-05-10 13:28:47 +00:00
Chris Lattner
93ba8ba0a9
Add prototype for the PiNodeInserter pass
...
llvm-svn: 2592
2002-05-10 05:40:37 +00:00
Chris Lattner
1212eabe1f
Add expr reassociation pass prototype
...
llvm-svn: 2558
2002-05-08 22:19:01 +00:00
Sumant Kowshik
64cf4b95c9
*** empty log message ***
...
llvm-svn: 2552
2002-05-08 18:09:58 +00:00
Chris Lattner
abf9a50ee5
Spell aggressive right
...
llvm-svn: 2549
2002-05-07 22:12:52 +00:00
Chris Lattner
2573cd6d56
Fix misspelling
...
llvm-svn: 2548
2002-05-07 22:12:36 +00:00
Chris Lattner
5b99f25879
These files are supersumed by include/llvm/Transforms/Scalar.h
...
llvm-svn: 2534
2002-05-07 19:38:42 +00:00
Chris Lattner
bb3896eed3
New header file to replace all of the Scalar/*.h files.
...
llvm-svn: 2533
2002-05-07 19:37:18 +00:00
Chris Lattner
d5b2b2afa5
Checkin headers for Utils library
...
llvm-svn: 2528
2002-05-07 18:52:48 +00:00
Chris Lattner
d365f9465f
Cleanup implementation a bit + comments
...
llvm-svn: 2527
2002-05-07 18:51:44 +00:00
Chris Lattner
186adba046
Update header after moving file
...
llvm-svn: 2522
2002-05-07 18:34:57 +00:00
Chris Lattner
51d7a923f5
Remove long dead file
...
llvm-svn: 2521
2002-05-07 18:20:10 +00:00
Chris Lattner
0b8c2d8b29
Factor code out to the Transform Utils library
...
llvm-svn: 2519
2002-05-07 18:18:00 +00:00
Chris Lattner
bd5095f570
Add support for passes to announce that they only depend on the CFG of a
...
function. This is crude but effective
llvm-svn: 2505
2002-05-06 19:31:16 +00:00
Chris Lattner
7d13e2f392
Move a bunch of code to a .cpp file, don't #include Instruction.h
...
llvm-svn: 2499
2002-05-06 17:54:50 +00:00
Chris Lattner
3bab8f6123
* Add getPrimitiveSize method
...
* Remove isPointerType, isMethodType, etc... methods. Use isa<> instead
* Added specialization of isa for pointer types so that DerivedTypes.h doesn't
have to be #included to use isa<PointerType>(..)
llvm-svn: 2483
2002-05-06 16:12:53 +00:00
Chris Lattner
07c6629280
Void and Label values cannot be acted on directly so they have zero size
...
llvm-svn: 2481
2002-05-06 15:10:15 +00:00
Chris Lattner
d12eac0b1b
Implement constant propogation of shift instructions
...
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
2d5135d9bd
Add a range remove method
...
llvm-svn: 2468
2002-05-06 02:59:52 +00:00
Chris Lattner
a0965456d0
Implement remainder
...
llvm-svn: 2463
2002-05-03 21:40:37 +00:00
Chris Lattner
2716e9868c
Make the range insert operation return an iterator, even though the STL
...
range insert doesn't
llvm-svn: 2413
2002-04-29 21:23:30 +00:00
Chris Lattner
5d17e49ad5
Remove unused files: This is the old induction varaible cannonicalization
...
pass built on top of interval analysis
llvm-svn: 2411
2002-04-29 20:18:00 +00:00
Chris Lattner
2a1f5e79c3
Change to allow iMemory.h to avoid including DerivedTypes.h
...
llvm-svn: 2403
2002-04-29 18:46:22 +00:00
Chris Lattner
294b5915d8
Remove analysis namespace
...
llvm-svn: 2399
2002-04-29 18:12:52 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
694285448c
Stub functions for timing support
...
llvm-svn: 2393
2002-04-29 04:02:50 +00:00
Chris Lattner
74ccd0f755
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFG
...
llvm-svn: 2385
2002-04-28 21:26:51 +00:00
Chris Lattner
c74c58800a
Move FunctionPass::doesNotModifyCFG to AnalysisUsage::preservesCFG()
...
llvm-svn: 2384
2002-04-28 21:25:41 +00:00
Chris Lattner
c64ef6740a
* Add a stub to FunctionPass so that subclasses can declare that they do not
...
modify the CFG. It currently does nothing, but will in the future.
* Changes to make the public PassManager.h be MUCH smaller, and devoid of
implementation details. Now PassManager is just a Pimpl class that wraps
PassManagerT<Module>, but lib/VMCore/Pass.cpp is now the only class that
has to #include PassManagerT.h
llvm-svn: 2383
2002-04-28 20:46:05 +00:00
Chris Lattner
884c3d4899
Use forward decl instead of #include
...
llvm-svn: 2380
2002-04-28 20:40:25 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00