1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

526 Commits

Author SHA1 Message Date
Misha Brukman
2bf32bfea1 Initialize the SSARegMap.
llvm-svn: 4782
2002-11-20 18:55:27 +00:00
Chris Lattner
3afc487fba Print is const!
llvm-svn: 4737
2002-11-17 23:22:13 +00:00
Chris Lattner
8ac4eea84b Remove only uses of markDef/markDefAndUse methods
llvm-svn: 4719
2002-11-17 22:14:08 +00:00
Chris Lattner
0141841bc4 Fix warning
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
0478222ec2 Move function to cpp file from header
llvm-svn: 4510
2002-11-02 22:07:51 +00:00
Chris Lattner
4b8d170d55 New iostream definitions
llvm-svn: 4482
2002-11-01 16:46:05 +00:00
Vikram S. Adve
8ecd939ce9 Restore support for indirect function calls (which briefly wasn't working
after I removed annotations on MachineInstr for the CallDescriptor).

llvm-svn: 4469
2002-10-31 15:34:48 +00:00
Chris Lattner
8fa0840abd Remove fixme
llvm-svn: 4447
2002-10-30 02:02:37 +00:00
Chris Lattner
98e6bad1ee Add special code to make printing SSA form machine instructions nicer
llvm-svn: 4446
2002-10-30 01:55:38 +00:00
Chris Lattner
8dfb0ef7b0 Use MRegisterInfo, if available, to print symbolic register names
llvm-svn: 4438
2002-10-30 00:58:19 +00:00
Chris Lattner
2cfa08e4bf Implement structured machine code printing
llvm-svn: 4435
2002-10-30 00:48:05 +00:00
Chris Lattner
e89cb8ba64 Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die

llvm-svn: 4427
2002-10-29 23:40:03 +00:00
Chris Lattner
64fa3f3e97 Implement autoinserting ctor
llvm-svn: 4426
2002-10-29 23:19:00 +00:00
Chris Lattner
de3938a592 Rename annotation id
llvm-svn: 4425
2002-10-29 23:18:43 +00:00
Chris Lattner
fc88414ffd Merge with sparc backend
llvm-svn: 4403
2002-10-29 20:10:58 +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
fa303f1bb7 Use higher level methods, don't use TargetInstrDescriptors directly!
llvm-svn: 4389
2002-10-29 17:35:39 +00:00
Chris Lattner
c3e30fed7b Use higher level method
llvm-svn: 4386
2002-10-29 17:25:41 +00:00
Chris Lattner
80c0746b11 Remove #include, misleading comment, and a typedef used only once
llvm-svn: 4383
2002-10-29 17:08:05 +00:00
Chris Lattner
8ae0be7897 Inline typedef, eliminate unused method
llvm-svn: 4382
2002-10-29 17:03:19 +00:00
Chris Lattner
8ab1906b5f Remove long dead #if 0
llvm-svn: 4381
2002-10-29 17:00:19 +00:00
Chris Lattner
9739fc7ff1 Add #includes that were eliminated from headers
llvm-svn: 4380
2002-10-29 16:51:05 +00:00
Chris Lattner
0493b81eef De-inline methods
llvm-svn: 4379
2002-10-29 16:50:33 +00:00
Chris Lattner
6c092a9ea7 Remove #include
llvm-svn: 4378
2002-10-29 16:50:20 +00:00
Chris Lattner
4aba455989 Remove unneeded #include
llvm-svn: 4377
2002-10-29 16:50:06 +00:00
Chris Lattner
f658cf4988 Remove forward decl
llvm-svn: 4376
2002-10-29 16:49:44 +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
7d6709e213 MachineInstrInfo no longer #includes this header, so we must
llvm-svn: 4366
2002-10-28 23:54:47 +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
f9d06cfc80 Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
llvm-svn: 4351
2002-10-28 20:00:31 +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
4b652d5505 Rename some regalloc fields
llvm-svn: 4346
2002-10-28 19:43:23 +00:00
Chris Lattner
bd1add2005 Eliminate usage of MachineBasicBlock::get
llvm-svn: 4344
2002-10-28 19:22:04 +00:00
Chris Lattner
fdca057f8d Remove usage of MachineBasicBlock::get
llvm-svn: 4342
2002-10-28 19:01:16 +00:00
Chris Lattner
a7ca1bd65c Remove usage of MachineBasicBlock::get
llvm-svn: 4341
2002-10-28 18:50:08 +00:00
Chris Lattner
2263f89d3b Eliminate unneccesary use of MachineBasicBlock::get
llvm-svn: 4339
2002-10-28 06:01:57 +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
89a424167f Make Scheduling Class variables be 'unsigned' instead of 'int'
llvm-svn: 4333
2002-10-28 04:53:02 +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
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
dd22b9e8b6 Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
llvm-svn: 4327
2002-10-28 02:28:39 +00:00
Chris Lattner
a7e9d3e90f Don't #include <Support/*>, #include "Support/*"
llvm-svn: 4325
2002-10-28 02:11:53 +00:00
Chris Lattner
df1d87f5f3 *** empty log message ***
llvm-svn: 4323
2002-10-28 02:01:37 +00:00
Chris Lattner
6b66fadf2c MachineFunction now includes MachineBasicBlock so there is no need to
reinclude it

llvm-svn: 4322
2002-10-28 02:01:35 +00:00
Chris Lattner
b8c6acfbc0 Rename MachineCodeForBasicBlock to MachineBasicBlock
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
ef1475aa32 *** empty log message ***
llvm-svn: 4317
2002-10-28 01:41:27 +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
61e42343e5 Minor cleanups
llvm-svn: 4312
2002-10-28 01:16:38 +00:00
Chris Lattner
33b00d8186 Move machine code generation/destruction passes out of Sparc.cpp because
they are generic

llvm-svn: 4310
2002-10-28 01:12:41 +00:00
Chris Lattner
ce3ede5938 Prune #includes
llvm-svn: 4307
2002-10-28 01:02:51 +00:00
Chris Lattner
ffa0482331 Updates to match misha's changes
llvm-svn: 4302
2002-10-28 00:37:53 +00:00
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
a952881e00 Initial checkin of codegen infrastructure for LLVM-JIT
llvm-svn: 4282
2002-10-25 22:54:41 +00:00
Chris Lattner
47508d5c0f Tell PassManager that this pass does not invalidate the CFG so that dominator
information and Loop info will not have to be recomputed after this runs.

llvm-svn: 4269
2002-10-23 03:30:47 +00:00
Chris Lattner
b8ffbe6966 Ensure definate initialization
llvm-svn: 4263
2002-10-22 23:34:11 +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
Vikram S. Adve
3a54b695ce Significant improvement: GEP used by a load or store no longer generates
a separate ADD; instead just use the indexed load/store instruction!
Also, a bug fix: folding a GEP with a leading non-zero index with
its predecessor was incorrect: now it only happens if the predecessor
is pointing to an indexable type (aka SequentialType).

llvm-svn: 4168
2002-10-14 16:30:55 +00:00
Vikram S. Adve
e18a54c249 Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!
Also, add option to disable scheduling.

llvm-svn: 4138
2002-10-13 00:40:37 +00:00
Vikram S. Adve
211f972d28 Major bug fix: was not adding CD edges for RETURNs!
llvm-svn: 4137
2002-10-13 00:39:22 +00:00
Vikram S. Adve
be4905b56a Major bug fix: spill code for an instruction in a delay slot was
merrily being inserted before/after the instruction!

llvm-svn: 4116
2002-10-11 16:12:40 +00:00
Vikram S. Adve
f19f08c3ab Don't pad variables in stack slots for performance!
llvm-svn: 4115
2002-10-11 16:10:53 +00:00
Vikram S. Adve
01e64b5eef Bug fix in folding getElementPtr instructions: don't fold one into
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.

llvm-svn: 3982
2002-09-29 22:55:05 +00:00
Vikram S. Adve
69d19cf9a9 Convert DIRS to PARALLEL_DIRS. They can be built independently.
llvm-svn: 3972
2002-09-29 11:52:14 +00:00
Vikram S. Adve
59778ef96d Added a couple of helper methods for live range construction.
llvm-svn: 3970
2002-09-28 17:05:43 +00:00
Vikram S. Adve
2710051771 Live ranges for Return value and return address of a Call are now
created here, simply by handling all implicit operands (which should
have been done anyway).

llvm-svn: 3969
2002-09-28 17:05:22 +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
7c0175962a Fixed incorrect assertion: spill code for function ptr should be
handled like normal operands, not like other call arguments.

llvm-svn: 3967
2002-09-28 17:02:40 +00:00
Vikram S. Adve
c795b90eac Sign-extend integer constants from original type size to 64 bits!
llvm-svn: 3958
2002-09-27 14:26:20 +00:00
Vikram S. Adve
07a33b5553 Add method IGNode::getCombinedDegree to count the sum of the degrees
of two nodes, excluding duplicates.

llvm-svn: 3848
2002-09-20 00:55:04 +00:00
Vikram S. Adve
1d139cf8de Add PostOpts/ and rename PreSelection/ to PreOpts/.
llvm-svn: 3847
2002-09-20 00:53:53 +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
Vikram S. Adve
ccb33335a3 Allow copy coalescing in more cases: if sum of node degrees is more than
than #available regs, compute the sum excluding duplicates and if that
is less than #regs, go ahead and coalesce.
Add method IGNode::getCombinedDegree to count excluding duplicates.

llvm-svn: 3842
2002-09-20 00:45:47 +00:00
Vikram S. Adve
82b15d7253 Peephole optimization pass on final machine code.
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve
8dc14ec198 Files moved to CodeGen/PreOpts.
llvm-svn: 3839
2002-09-20 00:30:46 +00:00
Vikram S. Adve
6f0ad9998b Moving these files from Code/PreSelection to here.
Original logs for PreSelection.cpp:

  revision 1.2
  date: 2002/09/17 23:50:32;  author: lattner;  state: Exp;  lines: +1 -3
  Don't put default parameter values into .cpp files, it breaks 3.x compilers

  revision 1.1
  date: 2002/09/16 15:31:13;  author: vadve;  state: Exp;
  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: 3838
2002-09-20 00:29:28 +00:00
Chris Lattner
86e6e0f6e3 Don't put default parameter values into .cpp files, it breaks 3.x compilers
llvm-svn: 3799
2002-09-17 23:50:32 +00:00
Chris Lattner
7c1b7e5889 Add support for GCC 2.96
llvm-svn: 3777
2002-09-17 17:23:09 +00:00
Vikram S. Adve
04cace44d8 Add subdirectory PreSelection.
llvm-svn: 3739
2002-09-16 15:32:07 +00:00
Vikram S. Adve
a5b251ed67 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: 3738
2002-09-16 15:31:13 +00:00
Vikram S. Adve
3d9c3e8751 Dump routine now writes out allocated register numbers if available.
llvm-svn: 3737
2002-09-16 15:18:53 +00:00
Vikram S. Adve
df1e95af82 Improve and fix error in allocating stack slots: adjust alignment after adding
base address of the relevant region (instead of assuming that each region
is maximally aligned).

llvm-svn: 3736
2002-09-16 15:18:16 +00:00
Vikram S. Adve
533c888d4a Add a version of ChooseRegOrImmed to handle numerical constants
introduced by InstrSelection.

llvm-svn: 3735
2002-09-16 15:15:57 +00:00
Vikram S. Adve
74823d9145 Add an assertion.
llvm-svn: 3734
2002-09-16 15:13:59 +00:00
Vikram S. Adve
69cf056052 Fix typos in previous checkin.
llvm-svn: 3726
2002-09-15 15:33:48 +00:00
Chris Lattner
db2c0b75ab RegAllocCommon no longer includes CommandLine.h so we have to include it
here.

llvm-svn: 3725
2002-09-15 07:07:55 +00:00
Vikram S. Adve
2ebafaf8ff Break RA_DEBUG option into several levels to get better control over
debug output.

llvm-svn: 3724
2002-09-14 23:05:33 +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
Vikram S. Adve
7cad54b354 Moving to lib/CodeGen/RegAlloc.
llvm-svn: 3718
2002-09-14 11:57:17 +00:00
Chris Lattner
23bd92aeeb Fix a bug I introduced into the code generator. :(
llvm-svn: 3694
2002-09-12 20:27:10 +00:00
Chris Lattner
18e3c4ff50 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3681
2002-09-11 01:21:29 +00:00
Chris Lattner
22bcab6bd5 Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks

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

llvm-svn: 3623
2002-09-08 21:08:43 +00:00