1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 21:13:02 +02:00
Commit Graph

1348 Commits

Author SHA1 Message Date
Chris Lattner
30684f53a9 Add facility to compute peak memory usage
llvm-svn: 4752
2002-11-18 21:45:55 +00:00
Chris Lattner
b094535fdf Inline DSTypeRec stuff into DSNode
llvm-svn: 4751
2002-11-18 21:45:30 +00:00
Chris Lattner
e66e649733 Inline DSTypeRec into DSNode
llvm-svn: 4750
2002-11-18 21:45:07 +00:00
Chris Lattner
80445dfe2e Templatize graph traits and iterator to work with const and non-const clients
llvm-svn: 4746
2002-11-18 21:42:19 +00:00
Chris Lattner
6315957999 Add helper method
llvm-svn: 4744
2002-11-18 06:57:05 +00:00
Chris Lattner
3afc487fba Print is const!
llvm-svn: 4737
2002-11-17 23:22:13 +00:00
Chris Lattner
e138d4fbc8 Make sure that print gets a targetmachine
CVS: ----------------------------------------------------------------------

llvm-svn: 4735
2002-11-17 23:21:45 +00:00
Chris Lattner
18cdae7e54 Omit the indirect node when printing call graphs
llvm-svn: 4733
2002-11-17 23:10:27 +00:00
Chris Lattner
9971426ca0 Add machine independant printer interface
llvm-svn: 4729
2002-11-17 22:54:55 +00:00
Chris Lattner
b51a2857f2 Finish enumating code
llvm-svn: 4726
2002-11-17 22:33:54 +00:00
Chris Lattner
4bc444f503 Remove unused methods
llvm-svn: 4720
2002-11-17 22:14:22 +00:00
Chris Lattner
16b1ec97f0 Convert to use an enum to access def/use/use&def information. These make
reading code much easier than just seeing "true, false" especially when
default parameters default one but not both arguments.

llvm-svn: 4717
2002-11-17 21:56:10 +00:00
Chris Lattner
dcfed3413d Return const refefrences to enable default construction
llvm-svn: 4713
2002-11-17 21:02:42 +00:00
Chris Lattner
18d810d9af Fix warning
llvm-svn: 4708
2002-11-15 18:04:16 +00:00
Brian Gaeke
492e05ba01 include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
convenience method.  Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
 Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
 Take out LEAVE instructions.
 32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
 Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
 Add some simple code to Printer::runOnFunction to iterate over
  MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
 implicit defs "Void".  Add more sign/zero extending "move" insns
 (movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.

llvm-svn: 4707
2002-11-14 22:32:30 +00:00
Chris Lattner
57e3d39384 Remove dead method, add new method
llvm-svn: 4700
2002-11-12 15:57:28 +00:00
Chris Lattner
2ecb91e1c1 Almost complete rewrite of BU closure code
llvm-svn: 4693
2002-11-11 21:34:34 +00:00
Chris Lattner
47457c43f4 add method
llvm-svn: 4686
2002-11-10 23:47:02 +00:00
Chris Lattner
aaabf591d2 Add code to be able to merge two call sites
llvm-svn: 4685
2002-11-10 23:46:51 +00:00
Chris Lattner
f088bcac1c Add tarj_end() method
llvm-svn: 4684
2002-11-10 23:46:31 +00:00
Chris Lattner
db1822a429 Add hasGraph() methods to all of the passes for the printer
llvm-svn: 4676
2002-11-10 06:53:19 +00:00
Chris Lattner
7cb6ecd396 Implement swapping
llvm-svn: 4674
2002-11-10 06:48:24 +00:00
Chris Lattner
fbfba19b2f Implement support for swapping. Callsites now sort by callee
llvm-svn: 4673
2002-11-10 06:48:11 +00:00
Chris Lattner
667b09146f Add capability to set a preference of what call vector is printed to dot files
llvm-svn: 4672
2002-11-10 06:47:35 +00:00
Chris Lattner
58a8339c03 Fix a problem where bad graphs could be generated
llvm-svn: 4671
2002-11-10 06:47:03 +00:00
Chris Lattner
1fe76d2385 eliminate the ability to remove global nodes from deadNodeElminate... for now.
This slows stuff down a bit, but it should get much better before it gets any
worse.

llvm-svn: 4666
2002-11-09 22:07:02 +00:00
Chris Lattner
0752756a6a Add globals graphs to all three passes
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
c2eca7c7bc Move maskNodeTypes from cpp file
llvm-svn: 4662
2002-11-09 21:02:30 +00:00
Chris Lattner
e726eb5ea7 Clean up DSGraph::removeDeadNodes interface
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
f17ffc0cc5 Make removeTriviallyDeadNodes a private interface
llvm-svn: 4658
2002-11-09 20:55:04 +00:00
Chris Lattner
1c5c03d6f7 Add initial support for a globals graph
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
0db8dff751 Remove unneccesary #include
llvm-svn: 4653
2002-11-09 19:24:41 +00:00
Chris Lattner
a81c52f557 Remove GlobalDSGraph delcaration
llvm-svn: 4652
2002-11-09 19:21:56 +00:00
Chris Lattner
fa3cdfdcf7 Fix release build
llvm-svn: 4647
2002-11-09 00:48:52 +00:00
Chris Lattner
15e2b6ddb9 Add new methods
llvm-svn: 4646
2002-11-08 23:22:48 +00:00
Chris Lattner
a6520dea5c Add another option to cloneGraph
llvm-svn: 4641
2002-11-08 22:28:55 +00:00
Chris Lattner
5f0b273a70 - Add support for an "auxillary" call site list
- Original call sites are now never modified after construction by the local
  pass.
- DSGraph::cloneInto can now optionally not clone the call sites
- BUDataStructures no longer has a ton of book-keeping info for a broken
  implementation of the TD data structures

llvm-svn: 4631
2002-11-08 21:24:51 +00:00
Chris Lattner
2698f71007 Add a method "getMainFunction()" that efficiently locates 'main' in a module
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Vikram S. Adve
0d0e044514 Include HashExtras.h since it is almost always needed anyway.
llvm-svn: 4626
2002-11-08 14:07:33 +00:00
Chris Lattner
de23b0e031 Use DSNodeHandle for persistent maps
llvm-svn: 4623
2002-11-08 05:03:37 +00:00
Chris Lattner
9330d88b02 Add flag that may be used to determine if dead nodes are used. It's temporary
llvm-svn: 4620
2002-11-08 01:22:26 +00:00
Vikram S. Adve
8ad057e4ec Restore a #include because this header file needs the definitions
of DSCallSite::~DSCallSite and DSNodeHandle::~DSNodeHandle.

llvm-svn: 4616
2002-11-08 00:23:23 +00:00
Chris Lattner
adac673c17 Add interfaces for ResolveCallSiteModRefInfo
llvm-svn: 4601
2002-11-07 07:11:49 +00:00
Chris Lattner
450e1fbc76 Instead of using a bool that constant has to be explained, use a self
explanitory enum instead.

llvm-svn: 4600
2002-11-07 07:06:20 +00:00
Chris Lattner
aa7b1a3e3a Add new method
llvm-svn: 4598
2002-11-07 06:30:17 +00:00
Chris Lattner
48a0cb745d Expose isPointerType to clients of dsanalysis
llvm-svn: 4597
2002-11-07 05:21:15 +00:00
Chris Lattner
9bcd1e1b61 Add a comment
llvm-svn: 4586
2002-11-06 23:26:21 +00:00
Chris Lattner
9870fb032e Allow the ResolveCallSiteModRefInfo method to return a mapping of nodes,
implement the mod/ref bit masking

llvm-svn: 4578
2002-11-06 19:59:33 +00:00
Chris Lattner
f7e839f435 Add a stub to implement the context sensitive mod/ref info for call sites
llvm-svn: 4577
2002-11-06 19:38:43 +00:00
Chris Lattner
00de4338dc Give a back pointer to the IPModRef object to the FunctionModRefInfo object
llvm-svn: 4576
2002-11-06 19:07:13 +00:00
Chris Lattner
a90e3aa6b2 Remove a couple of #includes, move some code to .cpp file
llvm-svn: 4574
2002-11-06 18:38:10 +00:00
Chris Lattner
7295c1762b Make maxSize a private variable, add a size() accessor
llvm-svn: 4573
2002-11-06 18:34:40 +00:00
Chris Lattner
09a2cc9a4a Make PointerShift/Size be enums so they are constants instead of globals
llvm-svn: 4571
2002-11-06 18:02:26 +00:00
Vikram S. Adve
201d4e3639 Make query operations non-const to allow demand-driven analyses.
llvm-svn: 4569
2002-11-06 17:17:55 +00:00
Vikram S. Adve
d62f949d85 An implementation of the bit-vector representation of sets.
llvm-svn: 4568
2002-11-06 17:14:14 +00:00
Vikram S. Adve
2a1c1171e7 An interprocedural analysis pass that computes flow-insensitive
IP Mod and Ref information for every function and every call site.

llvm-svn: 4567
2002-11-06 17:02:03 +00:00
Vikram S. Adve
05cfe7d191 Add const version of function getNodeForValue:
const DSNodeHandle &getNodeForValue(Value *V) const.

llvm-svn: 4566
2002-11-06 17:00:41 +00:00
Chris Lattner
d0387e7e11 Dramatically simplify internal DSNode representation, get implementation
*FULLY OPERATIONAL* and safe.  We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf

llvm-svn: 4562
2002-11-06 06:20:27 +00:00
Chris Lattner
f1d0314c32 Remove stripscalars argument to cloneInto
llvm-svn: 4561
2002-11-06 06:18:56 +00:00
Chris Lattner
c9dc8840ff Add a bunch of assertions
llvm-svn: 4549
2002-11-04 23:59:41 +00:00
Chris Lattner
a19d2fe8c7 Allow memory sizes to be negative, eliminate TmpRSS
llvm-svn: 4539
2002-11-04 19:20:09 +00:00
Vikram S. Adve
51cb9b6e1b Generic graph iterator to enumerate the SCCs of a graph
in linear time using Tarjan's DFS algorithm.

llvm-svn: 4531
2002-11-04 14:15:57 +00:00
Chris Lattner
facce8e131 Implement methods needed to print out call graph
llvm-svn: 4522
2002-11-04 02:53:39 +00:00
Chris Lattner
aaf17e11b1 Allow the call graph to be called from analyze naturally with print implemented
llvm-svn: 4517
2002-11-04 00:21:19 +00:00
Chris Lattner
8d63aab886 Rename ValueMap to ScalarMap
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
0ee058644e Rename NewNode flag to HeapNode
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
eb49618531 Check in header file that was missing, thus broke the build
llvm-svn: 4513
2002-11-03 19:24:49 +00:00
Misha Brukman
4e272d8fd9 Fixed comment on top of DSNode.h, added note to DSSupport.h as to why
functions were split out from DSNode class.

llvm-svn: 4509
2002-11-02 21:18:53 +00:00
Chris Lattner
702ac95902 Implement the "unknown flag" which mainly consists of aligning printing code
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
f76aa218db * Eliminate Scalar node type (renumber other node types)
* Allow DSNodeHandle::mergeWith to work if a node handle isn't pointing to a node yet

llvm-svn: 4487
2002-11-02 00:11:12 +00:00
Chris Lattner
e0a3be0bb7 Eliminate some unneccesary #includes and forward decls
llvm-svn: 4475
2002-10-31 21:24:10 +00:00
Misha Brukman
cd6a3b2f2c Refactored DSGraph.h:
* DSGraph.h   contains DSGraph
* DSNode.h    contains DSNode (soon UDSNode and MDSNode)
* DSSupport.h contains DSCallsite, DSTypeRec, and DSNodeHandler

llvm-svn: 4466
2002-10-31 06:34:18 +00:00
Chris Lattner
317daff9bf This fixes all kinds of problems with array handling. There are still bugs to
be fixed, but we are getting much closer now.

    * Make DSNode::TypeRec a full fledged DSTypeRec type.
    * Add methods used to update and access the typerecords elements
    * Add methods to query if and to cause a node to be completely folded
    * DSGraph construction doesn't use the allocation type for anything at all,
      now nodes get their type information based on how they are used.
    * Fixed a bug with global value handling introduced in the last checkin
    * GEP support is now much better, arrays are handled correctly.  The array
      flag is now updated in type records.  There are still cases that are not
      handled yet (we do not detect pessimizations), but getting much closer.

llvm-svn: 4465
2002-10-31 05:45:02 +00:00
Chris Lattner
2ce9a55285 New isAssociative/isCommutative inspection methods, graciously contributed by
Casey Carter.

llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Chris Lattner
6568312694 Statistic class should return const reference to *this, not a reference to
the data type.

llvm-svn: 4458
2002-10-31 02:50:27 +00:00
Chris Lattner
2e98413a27 Add interface to update domfrontier info, thanks to Casey Carter for impl
llvm-svn: 4456
2002-10-31 02:39:48 +00:00
Vikram S. Adve
d44e2577de Bug fix: need to initialize new CallArgsDescriptor pointer.
llvm-svn: 4453
2002-10-30 20:38:49 +00:00
Vikram S. Adve
beba0cd579 Bug fix in setting an implicit ref.
llvm-svn: 4452
2002-10-30 20:38:16 +00:00
Chris Lattner
be221c6013 Allow BuildMI that helps automate construction of SSA information
llvm-svn: 4443
2002-10-30 01:48:41 +00:00
Chris Lattner
19f27845eb * Add new "Target Specific Flags" field to instruction descriptor
* Rename iclass to Flags

llvm-svn: 4439
2002-10-30 01:06:53 +00:00
Chris Lattner
c7854f4c8f Add new optional getRegisterInfo to TargetMachine
llvm-svn: 4436
2002-10-30 00:53:02 +00:00
Chris Lattner
55da33fe73 Add support for structured printing
llvm-svn: 4432
2002-10-30 00:46:48 +00:00
Chris Lattner
4430feb9b5 Improve comments, add methods for structured printing
llvm-svn: 4431
2002-10-30 00:46:31 +00:00
Chris Lattner
e78186b693 Add method
llvm-svn: 4428
2002-10-29 23:40:30 +00:00
Chris Lattner
82a3299cf1 Add capability to have machine instruction autoinsert when it is created
llvm-svn: 4424
2002-10-29 23:18:23 +00:00
Misha Brukman
453ccb15f5 Fixed spelling of `propagation'.
llvm-svn: 4422
2002-10-29 22:55:11 +00:00
Chris Lattner
87eb530014 Eliminate virtual methods that are sparc specific
llvm-svn: 4419
2002-10-29 22:01:26 +00:00
Chris Lattner
5d798b7887 * Privatize the TargetName
* Move optSizeForSubWordData to TargetData
* Remove unused fields

llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
eec571dce8 Allow TargetMachine to refuse static code gen
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
cc026ad4fc Rename Sparc.h to TargetMachineImpls.h. Add hook for X86 target
llvm-svn: 4412
2002-10-29 20:51:29 +00:00
Chris Lattner
8d372a1161 Add hook for JIT compiler
llvm-svn: 4411
2002-10-29 20:51:10 +00:00
Chris Lattner
16081ceef1 Move to TargetMachineImpls.h
llvm-svn: 4405
2002-10-29 20:44:18 +00:00
Chris Lattner
fc88414ffd Merge with sparc backend
llvm-svn: 4403
2002-10-29 20:10:58 +00:00
Chris Lattner
2859640d1c Merge to MachineInstrInfo.h
llvm-svn: 4402
2002-10-29 20:10:19 +00:00
Chris Lattner
fdbc0f40ce X86 merge complete, eliminate dead code
llvm-svn: 4401
2002-10-29 20:07:50 +00:00
Chris Lattner
0ac25d509c X86 merge is complete, eliminate unused code
llvm-svn: 4400
2002-10-29 20:07:16 +00:00
Vikram S. Adve
4acb69b4ea Remove separate vector of implicit refs from MachineInstr, and
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.

llvm-svn: 4399
2002-10-29 19:41:18 +00:00
Vikram S. Adve
1730a958ea Move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.

llvm-svn: 4398
2002-10-29 19:38:46 +00:00
Chris Lattner
b49e35e745 Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
MachineInstr.cpp

llvm-svn: 4392
2002-10-29 17:40:30 +00:00
Chris Lattner
4c00b1bb14 Rename opCodeString to Name, add new getName() method
llvm-svn: 4388
2002-10-29 17:35:09 +00:00
Chris Lattner
4cb6ebc9a1 Rename MachineInstrInfo::getDescriptor to MachineInstrInfo::get
llvm-svn: 4387
2002-10-29 17:26:26 +00:00
Chris Lattner
b4ee80190b Remove old entrypoint
llvm-svn: 4385
2002-10-29 17:15:01 +00:00
Chris Lattner
8feac53561 Remove unneeded #include
llvm-svn: 4384
2002-10-29 17:14:10 +00:00
Chris Lattner
0493b81eef De-inline methods
llvm-svn: 4379
2002-10-29 16:50:33 +00:00
Chris Lattner
4aba455989 Remove unneeded #include
llvm-svn: 4377
2002-10-29 16:50:06 +00:00
Chris Lattner
0cff6f7e16 Make assertIGNode be private to the InterferenceGraph.cpp file
llvm-svn: 4375
2002-10-29 16:42:34 +00:00
Chris Lattner
54eff4bcba Remove unneccesary #include
llvm-svn: 4374
2002-10-29 16:34:12 +00:00
Chris Lattner
0a2b3a9a7b Delete unused header file
llvm-svn: 4373
2002-10-29 16:32:08 +00:00
Chris Lattner
8869c9be36 MachineInstrInfo doesn't need a TargetMachine member
llvm-svn: 4371
2002-10-29 15:44:40 +00:00
Chris Lattner
d5faf681bb Minor cleanups, remove noncopyable so dot doesn't cluster unrelated stuff
llvm-svn: 4365
2002-10-28 23:54:23 +00:00
Chris Lattner
dce27e5927 Strip a bunch of #includes from the file, move some virtual functions to
.cpp file

llvm-svn: 4364
2002-10-28 23:53:56 +00:00
Chris Lattner
d5953f5c63 Inline some code from the cpp file
llvm-svn: 4363
2002-10-28 23:53:32 +00:00
Chris Lattner
be89ca4b5a Minor comment updates
llvm-svn: 4361
2002-10-28 21:43:42 +00:00
Chris Lattner
8727a8f2d1 Initial checkin of MachineInstrBuilder class
llvm-svn: 4360
2002-10-28 21:31:48 +00:00
Chris Lattner
566b2147f9 Remove all traces of the "Opcode Mask" field in the MachineInstr class
llvm-svn: 4359
2002-10-28 21:17:20 +00:00
Chris Lattner
11f52470a0 Remove more default arguments that are never used
llvm-svn: 4358
2002-10-28 21:02:40 +00:00
Chris Lattner
990e074c2e Remove default operands that are never used
llvm-svn: 4357
2002-10-28 20:59:49 +00:00
Chris Lattner
de6ac9b0ff * Make MachineOperand ctors private, so MachineOperand can only be created
by MachineInstr.
* Add a bunch of new methods to allow incremental addition of operands to the
  machine instr instance.

llvm-svn: 4356
2002-10-28 20:48:39 +00:00
Misha Brukman
0daac26c02 Iterator functions now line up together.
llvm-svn: 4350
2002-10-28 19:58:38 +00:00
Chris Lattner
74f9160190 Remove two arguments that are never specified
llvm-svn: 4348
2002-10-28 19:46:59 +00:00
Chris Lattner
f2cd0a8266 s/method/function
llvm-svn: 4338
2002-10-28 05:58:46 +00:00
Chris Lattner
7cdc2977f0 Change MachineBasicBlock's to not be Annotations, instead they are kept as
part of a linked list tracked by MachineFunction.  MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!

llvm-svn: 4337
2002-10-28 05:30:46 +00:00
Chris Lattner
c32337fb08 * s/unsigned int/unsigned
* Make MachineInstrDescriptor only keep a const char * instead of a string
  for the opcode name.

llvm-svn: 4335
2002-10-28 04:55:56 +00:00
Chris Lattner
ec393ff469 Make scheduling class variables be 'unsigned' instead of 'int'
llvm-svn: 4334
2002-10-28 04:53:18 +00:00
Chris Lattner
a215fe71ce Remove typedef that is unneccesary
llvm-svn: 4332
2002-10-28 04:50:01 +00:00
Chris Lattner
e309cdbc95 Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
llvm-svn: 4331
2002-10-28 04:45:29 +00:00
Chris Lattner
a7cfe8ccb5 Add new getOperandType(i) method to MachineInstr
llvm-svn: 4330
2002-10-28 04:30:20 +00:00
Chris Lattner
7000bbb63f Fairly major overhaul of MachineInstr & Operand classes
- Inline methods that are mostly a single line anyway
  - Eliminate several methods that were never called
  - Group methods a bit more consistently

llvm-svn: 4329
2002-10-28 04:24:49 +00:00
Chris Lattner
824d112715 Make MachineInstr.h not #include MachineInstrInfo.h
llvm-svn: 4328
2002-10-28 02:29:46 +00:00
Chris Lattner
10a01c1620 Remvoe a bunch of unneeded forward decls
llvm-svn: 4326
2002-10-28 02:27:07 +00:00
Chris Lattner
a7e9d3e90f Don't #include <Support/*>, #include "Support/*"
llvm-svn: 4325
2002-10-28 02:11:53 +00:00
Chris Lattner
daf162b45a Add BasicBlock list to MchineFunction that will eventually be the only
way to access MachineBasicBlocks.  For now, it is never filled.

llvm-svn: 4324
2002-10-28 02:08:43 +00:00
Chris Lattner
2b2fbdf33c MachineFunction.h now includes MachineBasicBlock.h in preparation for
list changes.

llvm-svn: 4321
2002-10-28 02:01:06 +00:00
Chris Lattner
85e7d46739 Remvoe dead fixme and typedef
llvm-svn: 4320
2002-10-28 01:55:26 +00:00
Chris Lattner
46509e42f8 MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
llvm-svn: 4319
2002-10-28 01:53:00 +00:00
Chris Lattner
cd476842d3 Rename file to MachineBasicBlock.h
llvm-svn: 4316
2002-10-28 01:39:21 +00:00
Chris Lattner
384e13e39c Add note about state that should be removed when time permits
llvm-svn: 4315
2002-10-28 01:27:51 +00:00
Chris Lattner
310d9124e3 Fixes to previous checkin
llvm-svn: 4314
2002-10-28 01:27:30 +00:00
Chris Lattner
4f2c612b21 Inline some methods from .cpp files into .h files, minor cleanups
llvm-svn: 4313
2002-10-28 01:21:55 +00:00
Chris Lattner
d711c00823 Add prototypes for creation/destruction passes
llvm-svn: 4309
2002-10-28 01:11:58 +00:00
Chris Lattner
8e5f672533 * Doxygenify comments
* Move addPassesToEmitAssembly back to Sparc.cpp because it really is
  sparc specific

llvm-svn: 4306
2002-10-28 01:02:24 +00:00
Chris Lattner
ecbd9d640d This header is renamed to MachineFunction.h
llvm-svn: 4304
2002-10-28 00:45:06 +00:00
Chris Lattner
778ffa3786 We don't need the forwarding typedef
llvm-svn: 4303
2002-10-28 00:44:09 +00:00
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
e9a1ab1e0a Add support or other operand types
llvm-svn: 4298
2002-10-27 21:17:45 +00:00
Chris Lattner
2bc0fd8115 Prune #includes
llvm-svn: 4295
2002-10-27 20:49:47 +00:00
Chris Lattner
f0e3a35094 Add neccesary #include
llvm-svn: 4294
2002-10-27 19:16:27 +00:00
Chris Lattner
e6c5f2019f Old GCC's don't have an <ostream>
llvm-svn: 4293
2002-10-27 19:12:37 +00:00
Chris Lattner
8f38efd9dd Add #include
llvm-svn: 4291
2002-10-27 19:08:03 +00:00
Chris Lattner
4eae2fc3ad Initial checkin of target support for X86 backend.
llvm-svn: 4287
2002-10-25 23:00:40 +00:00
Chris Lattner
65c82a0310 Initial checkin of Machine Code representation for X86 backend. This will
eventually be merged with the sparc backend.

llvm-svn: 4286
2002-10-25 23:00:13 +00:00
Chris Lattner
7a26bbcc83 Fix typo
llvm-svn: 4281
2002-10-25 22:53:56 +00:00
Chris Lattner
5ae74dd3ef * Remove unneccesary #includes
* Fix typeo in the (unused) MachineInstrInfo::isArith method

llvm-svn: 4275
2002-10-24 22:34:41 +00:00
Chris Lattner
e68a9a15dd Minor cleanups
llvm-svn: 4267
2002-10-23 01:11:51 +00:00
Chris Lattner
dfc8fbf16b - 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!

llvm-svn: 4261
2002-10-22 23:16:21 +00:00
Chris Lattner
58781838b7 We need to know the call sites each function hosts
llvm-svn: 4258
2002-10-22 15:58:23 +00:00
Chris Lattner
535d54ef22 Allow modification of callee
llvm-svn: 4257
2002-10-22 15:57:58 +00:00
Chris Lattner
1fb6129889 Small space optimization: Make MachineOperands take 16 bytes instead of
20 on intel or 24 on sparc

llvm-svn: 4256
2002-10-22 00:15:13 +00:00
Chris Lattner
b565d3ac5b - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.

llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
1157e5dafb Delete unused arguments to DSGraph::cloneInto method
llvm-svn: 4253
2002-10-21 19:50:29 +00:00
Chris Lattner
4410178282 - 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.

llvm-svn: 4252
2002-10-21 19:47:18 +00:00
Chris Lattner
7588e35aa8 Add another copy ctor form
llvm-svn: 4251
2002-10-21 15:32:34 +00:00
Chris Lattner
1276c50e7b 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.

llvm-svn: 4250
2002-10-21 15:04:18 +00:00
Chris Lattner
f8b59c1c75 Make sure to initialize isArray member
llvm-svn: 4247
2002-10-21 13:38:07 +00:00
Chris Lattner
eed53d4b81 Remove a 'using' directives from a header file. Using directives cause
global changes, so aren't good for headers.

llvm-svn: 4245
2002-10-21 13:24:50 +00:00
Chris Lattner
cd13b5e27f Add a missing std:: qualifier
llvm-svn: 4244
2002-10-21 13:23:42 +00:00
Chris Lattner
ca982e6b42 Two callsites are equivalent even if they are from two completely different
call instructions

llvm-svn: 4241
2002-10-21 02:09:03 +00:00
Chris Lattner
2914391ab6 - 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.

llvm-svn: 4240
2002-10-21 02:08:03 +00:00
Vikram S. Adve
85a358583f Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly.

llvm-svn: 4235
2002-10-20 21:41:02 +00:00
Chris Lattner
9c264543b5 Add isArray flag
llvm-svn: 4230
2002-10-20 20:28:35 +00:00
Vikram S. Adve
32689f8214 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.

llvm-svn: 4229
2002-10-20 18:08:55 +00:00
Vikram S. Adve
2a6ec82970 Added a first-class representation for each call site that can be used
in the DS graphs.

llvm-svn: 4227
2002-10-20 18:04:43 +00:00
Chris Lattner
efc251af3d Convert typerec to be a structure instead of a pair
llvm-svn: 4226
2002-10-18 18:22:46 +00:00
Chris Lattner
3e2fb69b49 Don't emit braces around something without outgoing edges
llvm-svn: 4225
2002-10-18 14:55:44 +00:00
Chris Lattner
d9b76794a0 Add interface for mod/ref info to be captures by dsgraphs
llvm-svn: 4222
2002-10-17 21:03:49 +00:00
Chris Lattner
68ac171c62 * Add data structures to BU pass to keep track of call sites for functions
* Reenable the TD analysis

llvm-svn: 4212
2002-10-17 04:23:05 +00:00
Chris Lattner
bb28060fb4 * Remove a lot of obsolete #if 0'd code
* Add a simple getNodeForValue method to access the ValueMap.

llvm-svn: 4211
2002-10-17 04:22:16 +00:00
Chris Lattner
80332e579c Use the forward declaration for GraphTraits instead of #including
the header

llvm-svn: 4210
2002-10-17 01:36:08 +00:00
Chris Lattner
df9733a0a1 Be const correct. Handle both DSGraph* and const DSGraph*'s
llvm-svn: 4208
2002-10-17 01:01:06 +00:00
Chris Lattner
7bada92698 Break up the GraphWriter into smaller chunks to be used in different ways
llvm-svn: 4207
2002-10-17 00:59:59 +00:00
Chris Lattner
e62bace6cb As wierd as it feels to type it, const void* is more generic than void*
llvm-svn: 4206
2002-10-17 00:16:39 +00:00
Joel Stanley
128e78631f Added partial specialization of GraphTraits for the DominatorTree class.
llvm-svn: 4205
2002-10-16 23:26:00 +00:00
Chris Lattner
2d213be550 Allow simple nodes to have outgoing edges
llvm-svn: 4202
2002-10-16 20:15:38 +00:00
Chris Lattner
d79ee46ac2 * Factor printing code again, add emitSimpleNode method
llvm-svn: 4198
2002-10-16 02:03:18 +00:00
Chris Lattner
102fb03846 * Add new DOTGraphTraits::addCustomGraphFeatures method
llvm-svn: 4197
2002-10-16 01:44:59 +00:00
Chris Lattner
3702063ff3 The second element of the iterator is really an offset, not a link
llvm-svn: 4196
2002-10-16 01:43:11 +00:00
Chris Lattner
c83c9a41fc * Significantly refactor GraphWriter into a class.
llvm-svn: 4194
2002-10-16 01:34:18 +00:00
Chris Lattner
8845b7da14 - 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

llvm-svn: 4192
2002-10-16 01:18:14 +00:00
Chris Lattner
d135a2b550 Allow direct access to mergemap for printing
llvm-svn: 4191
2002-10-16 01:17:16 +00:00
Chris Lattner
7be670ef4b - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.

llvm-svn: 4186
2002-10-15 21:26:29 +00:00
Chris Lattner
294eae6735 - Add an endianness field to the TargetData datastructure
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
3cb2d3379d Removed misleading const keyword.
llvm-svn: 4169
2002-10-14 16:32:24 +00:00
Chris Lattner
5b41b28fb6 - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)

llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner
fdf2ca9468 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
54905ed38c First crack at reimplementing graph traits for DSGraphs
llvm-svn: 4145
2002-10-13 19:31:34 +00:00
Chris Lattner
48417f0143 disable the unused "pointer" member
llvm-svn: 4144
2002-10-13 19:30:44 +00:00
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