Commit Graph

1044 Commits

Author SHA1 Message Date
Chris Lattner
37ae4056bb Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4267 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 01:11:51 +00:00
Chris Lattner
27a08935ca - Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
    bitvector.  Sped up LLC a little less than 10% in a debug build!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:16:21 +00:00
Chris Lattner
3ec9a0a5cf We need to know the call sites each function hosts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4258 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 15:58:23 +00:00
Chris Lattner
0e6949fe1c Allow modification of callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4257 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 15:57:58 +00:00
Chris Lattner
1a33e6eb74 Small space optimization: Make MachineOperands take 16 bytes instead of
20 on intel or 24 on sparc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4256 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 00:15:13 +00:00
Chris Lattner
cb2610ea03 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 20:00:28 +00:00
Chris Lattner
e4ae3041f9 Delete unused arguments to DSGraph::cloneInto method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:50:29 +00:00
Chris Lattner
198be22cec - Add "ResolvingCaller" to the CallSite record. This keeps track of which
function was finally able to resolve the function call.  Adding this allows
    the TD pass to actually work right!
  - Temporarily disable dead node pruning.  This will be reenabled soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:47:18 +00:00
Chris Lattner
eff0da9d33 Add another copy ctor form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:32:34 +00:00
Chris Lattner
99a22847ba As it turns out, we don't need a fully generic mapping copy ctor, we just need
something that maps through a std::map.  Since this simplified the client and
implementation code, do so now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:04:18 +00:00
Chris Lattner
2bf30fd65a Make sure to initialize isArray member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4247 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:38:07 +00:00
Chris Lattner
756a55000b Remove a 'using' directives from a header file. Using directives cause
global changes, so aren't good for headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4245 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:24:50 +00:00
Chris Lattner
c5819944a2 Add a missing std:: qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4244 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:23:42 +00:00
Chris Lattner
b0a37b70e8 Two callsites are equivalent even if they are from two completely different
call instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4241 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:09:03 +00:00
Chris Lattner
0969c50cb8 - Make DSCallSite not inherit from std::vector. Renamed methods slightly.
Make copy ctor have two versions to avoid dealing with conditional template
    argument.  DSCallSite ctor now takes all arguments instead of taking one
    and being populated later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:08:03 +00:00
Vikram S. Adve
26b98265b7 Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 21:41:02 +00:00
Chris Lattner
d9faa34339 Add isArray flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4230 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:28:35 +00:00
Vikram S. Adve
3c579faece Added a first-class representation for each call site that can be
used in the DS graphs in DSGraph.h.  With that, the special-purpose
class BUDataStructure::CallSite is no longer needed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4229 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:08:55 +00:00
Vikram S. Adve
726bafda65 Added a first-class representation for each call site that can be used
in the DS graphs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4227 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:04:43 +00:00
Chris Lattner
a3f8586d9d Convert typerec to be a structure instead of a pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-18 18:22:46 +00:00
Chris Lattner
137d399fae Don't emit braces around something without outgoing edges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4225 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-18 14:55:44 +00:00
Chris Lattner
b65dfff141 Add interface for mod/ref info to be captures by dsgraphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4222 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 21:03:49 +00:00
Chris Lattner
8d00c8210e * Add data structures to BU pass to keep track of call sites for functions
* Reenable the TD analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4212 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:23:05 +00:00
Chris Lattner
a2c5c2b23a * Remove a lot of obsolete #if 0'd code
* Add a simple getNodeForValue method to access the ValueMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4211 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:22:16 +00:00
Chris Lattner
375b8e5128 Use the forward declaration for GraphTraits instead of #including
the header


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4210 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:36:08 +00:00
Chris Lattner
8ebb1c4023 Be const correct. Handle both DSGraph* and const DSGraph*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4208 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:01:06 +00:00
Chris Lattner
dc05fffe2b Break up the GraphWriter into smaller chunks to be used in different ways
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4207 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 00:59:59 +00:00
Chris Lattner
a16adb7dd2 As wierd as it feels to type it, const void* is more generic than void*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4206 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 00:16:39 +00:00
Joel Stanley
61315bc367 Added partial specialization of GraphTraits for the DominatorTree class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4205 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 23:26:00 +00:00
Chris Lattner
7be17dd233 Allow simple nodes to have outgoing edges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4202 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:15:38 +00:00
Chris Lattner
96f5493100 * Factor printing code again, add emitSimpleNode method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4198 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 02:03:18 +00:00
Chris Lattner
834a9d12f3 * Add new DOTGraphTraits::addCustomGraphFeatures method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4197 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:44:59 +00:00
Chris Lattner
ff5feedf28 The second element of the iterator is really an offset, not a link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:43:11 +00:00
Chris Lattner
8c836ce4f8 * Significantly refactor GraphWriter into a class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4194 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:34:18 +00:00
Chris Lattner
63a32de776 - Generic graph printing infrastructure changes:
* Only print outgoing edges from a cell if the destination isn't null.
       This is important for DSGraphs, which have sources with no edges.
     * Allow Node attributes to override shape of the node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4192 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:18:14 +00:00
Chris Lattner
d6d8f41699 Allow direct access to mergemap for printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4191 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:17:16 +00:00
Chris Lattner
0dad6e9c95 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:26:29 +00:00
Chris Lattner
85131c8277 - Add an endianness field to the TargetData datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 22:41:13 +00:00
Vikram S. Adve
efc9433960 Removed misleading const keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:24 +00:00
Chris Lattner
34048e2ace - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4160 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:30:23 +00:00
Chris Lattner
0b16ae209a - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4147 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:39:16 +00:00
Chris Lattner
2576aef32b First crack at reimplementing graph traits for DSGraphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4145 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:31:34 +00:00
Chris Lattner
d063725c3c disable the unused "pointer" member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:30:44 +00:00
Chris Lattner
b38e4fd8b0 Add dummy entries to document what members can be added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4141 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 17:12:05 +00:00
Vikram S. Adve
5aefcad35b Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4136 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:37:46 +00:00
Misha Brukman
a27229013f Added capability to get execution count of a loop if it is a predictable
number of iterations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:34:32 +00:00
Misha Brukman
6b290a5440 Added helper functions in LoopInfo: isLoopExit and numBackEdges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:31:10 +00:00
Chris Lattner
f77b57097d Expose API to graph library to allow iteration over all nodes, even unreachable ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4111 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 22:31:31 +00:00
Chris Lattner
ab363148fb Change reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4110 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 22:31:02 +00:00
Chris Lattner
f6516da9b3 * Don't only print out reachable nodes in the graph.
* use new api to get all nodes in the graph
  * Allow custom graph traits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4109 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 22:29:51 +00:00