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
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Anand Shukla
9a0d43e242
moved this file from lib/Reoptimizer/Mapping
...
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla
687dea3dcf
Makefile for new sub directory
...
llvm-svn: 3518
2002-08-27 22:46:38 +00:00
Anand Shukla
5bb28c7358
Added Mapping subdir
...
llvm-svn: 3517
2002-08-27 22:45:49 +00:00
Vikram S. Adve
b8a0f00662
Use newly-added type inspection support in InstTreeNode subclasses.
...
llvm-svn: 3501
2002-08-24 21:02:09 +00:00
Vikram S. Adve
3190395e10
Moved code here to extract memory instruction indices and to check
...
whether FoldGetElemNodes should be called. This is machine-independent
but was in the Sparc directory. This is in a new function: GetMemInstArgs.
llvm-svn: 3500
2002-08-24 21:00:08 +00:00
Anand Shukla
656de9732b
Added #include <alloca.h>
...
llvm-svn: 3491
2002-08-23 10:54:26 +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
Vikram S. Adve
0672c43566
dumpNode() does not need to print MachineInstrs.
...
llvm-svn: 3444
2002-08-22 02:59:46 +00:00
Vikram S. Adve
21b0deb4ab
Unary Not (boolean and bitwise) is no longer a separate LLVM instruction
...
but is instead implemented with XOR. Note that the InstrForest opLabels
for Not and BNot remain the same, i.e., the XOR is recognized and
represented as a (boolean or bitwise) Not when building the instruction
trees. But these tree nodes are now binary, not unary.
llvm-svn: 3343
2002-08-15 14:19:22 +00:00
Vikram S. Adve
87928f2098
Add method MachineInstr::substituteValue() which substitutes
...
one Value with another one in all operands and implicit references
of the machine instruction.
llvm-svn: 3306
2002-08-14 16:52:58 +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
c95ce32146
We are using std::vector, so remove extraneous namespace prefixes
...
llvm-svn: 3275
2002-08-09 20:05:34 +00:00
Chris Lattner
12af061d07
Very minor cleanups
...
llvm-svn: 3271
2002-08-09 18:55:18 +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
91d4742562
- 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: 3264
2002-08-08 19:01:28 +00:00
Vikram S. Adve
3489677a7e
Add function GetConstantValueAsUnsignedInt.
...
Fix 2 bugs in FoldGetElemChain so index vector is not modified
when no GEPs are folded in, and so a hasLeadingZero is computed
only for the last folded GEP, not the one after that if any.
llvm-svn: 3244
2002-08-04 20:49:49 +00:00
Chris Lattner
44a988ebf2
* Move InstructionSelection Pass here instead of living in Sparc.cpp. It
...
is platform independant afterall.
* Object orientize the functions, cleanup code a bit. Instead of static
global functions, the helpers for instruction selection are now part of
the InstructionSelection Pass class.
llvm-svn: 3147
2002-07-30 03:57:36 +00:00
Chris Lattner
17bb18af72
Remove unused vector
...
llvm-svn: 3143
2002-07-30 02:52:40 +00:00
Chris Lattner
9da0755dd0
Refix stuff for GCC 2.95, 3.0.4 & 3.1
...
llvm-svn: 3094
2002-07-25 18:04:48 +00:00
Mehwish Nagda
4968d78ef0
now removes deleted nops from MachineCodeForInstruction
...
llvm-svn: 3090
2002-07-25 17:31:05 +00:00
Chris Lattner
05fe67c0d2
*** empty log message ***
...
llvm-svn: 3075
2002-07-25 06:17:51 +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
Mehwish Nagda
7311aa4f84
moving to the Reoptimizer/Mapping dir
...
llvm-svn: 2993
2002-07-22 22:10:55 +00:00
Chris Lattner
99ad379582
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Mehwish Nagda
78d892eb4f
changed size computation
...
llvm-svn: 2974
2002-07-19 22:54:08 +00:00
Mehwish Nagda
219eac01f4
added check for Function with 0 BB
...
llvm-svn: 2942
2002-07-17 23:40:33 +00:00
Mehwish Nagda
01b0cf5ea1
Now will profile all Basic Blocks
...
llvm-svn: 2922
2002-07-16 17:48:27 +00:00
Mehwish Nagda
b73d836e54
Initial checking : Writes LLVM - MI mappiing to the .s file
...
llvm-svn: 2911
2002-07-15 23:08:49 +00:00
Anand Shukla
d70cde528d
added std:: to endl
...
llvm-svn: 2875
2002-07-11 00:17:17 +00:00
Vikram S. Adve
cd544ed252
Fix print of BB name in dump().
...
llvm-svn: 2861
2002-07-10 21:45:30 +00:00
Vikram S. Adve
62f569e4ea
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: 2860
2002-07-10 21:45:04 +00:00
Anand Shukla
33b491bba2
changed mem_fun to std::mem_fun
...
llvm-svn: 2847
2002-07-09 19:18:56 +00:00
Vikram S. Adve
0b32273208
Significant changes to correctly spill CC registers and to correctly
...
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
since regs used to save values *across* an instruction are not obvious
either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
This is needed for conditional move operations.
So an operand may need spill code both before and after the instruction.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2833
2002-07-08 23:15:32 +00:00
Vikram S. Adve
a8c7633d5b
MachineInstr* in vector are not const (and never really were)
...
because operands may be modified directly to set register.
Also, class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2832
2002-07-08 23:07:26 +00:00
Vikram S. Adve
3e8b72f0e3
Rename static struct Initializer to avoid name conflict with BB.
...
llvm-svn: 2831
2002-07-08 23:04:31 +00:00
Vikram S. Adve
25d81936d2
Fix printing of BB in dump.
...
llvm-svn: 2830
2002-07-08 23:03:54 +00:00
Vikram S. Adve
f6d73e9711
Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.h.
...
This class is now an annotation on BasicBlock.
llvm-svn: 2829
2002-07-08 23:03:10 +00:00
Vikram S. Adve
5b4c4a9326
MachineInstr::dump() now takes no arguments.
...
llvm-svn: 2828
2002-07-08 23:01:46 +00:00
Vikram S. Adve
a2381d3998
Implementation of class MachineCodeForBasicBlock.
...
Moved here from MachineInstr.cpp to make it an annotation on BasicBlock.
llvm-svn: 2827
2002-07-08 23:01:11 +00:00
Vikram S. Adve
4efbb9c931
A single MachineInstr operand may now be both a def and a use,
...
so additional dep. edges have to be added.
This was needed to correctly handle conditional move instructions!
MachineCodeForBasicBlock is now an annotation on BasicBlock.
Renamed "earliestForNode" to "earliestReadyTimeForNode".
llvm-svn: 2826
2002-07-08 22:59:23 +00:00
Vikram S. Adve
58b597078f
getUsableUniRegAtMI interface simplified slightly.
...
llvm-svn: 2822
2002-07-08 22:39:36 +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
d82933c6c8
MachineInstr* in vector are not const (and never really were)
...
because operands may be modified directly to set register.
llvm-svn: 2820
2002-07-08 22:34:40 +00:00
Chris Lattner
5339840831
Remove tag that just clutters diffs
...
llvm-svn: 2807
2002-06-30 16:08:25 +00:00
Anand Shukla
ee7ed50bb4
changes to make it compatible with 64bit gcc
...
llvm-svn: 2791
2002-06-25 20:55:50 +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
d7cbd7d5d2
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2778
2002-06-25 16:13:21 +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
7d0544f0cc
Move debug options out of header files so that the header does not have
...
to #include CommandLine.h.
llvm-svn: 2712
2002-05-22 17:08:27 +00:00
Chris Lattner
07732a38b7
Avoid #including CommandLine.h
...
llvm-svn: 2710
2002-05-22 17:06:56 +00:00
Chris Lattner
1752fa9899
Hide debugging options
...
llvm-svn: 2676
2002-05-20 21:39:10 +00:00
Chris Lattner
0cfea31aee
Don't lose namespace qualifications on previous patch.
...
llvm-svn: 2664
2002-05-20 17:38:26 +00:00
Vikram S. Adve
21ed1be093
InstrnsBefore and InstrnsAfter are now vectors instead of deques.
...
May be slightly less efficient but significantly reduces special
cases interfaces in code generation.
llvm-svn: 2649
2002-05-19 15:41:33 +00:00
Vikram S. Adve
3d968bccd8
Better folding getelementptr operations with mixed
...
array and struct indexes.
Update operand values in CallArgsDescriptor (a new class)
when replacing constant values with immediates.
llvm-svn: 2645
2002-05-19 15:34:29 +00:00
Vikram S. Adve
883c425f15
cpValue2Value now needs a vector of MachineInstr to store return values.
...
llvm-svn: 2644
2002-05-19 15:31:08 +00:00
Vikram S. Adve
1f8badf623
Annotation class for MachineInstr.
...
llvm-svn: 2643
2002-05-19 15:30:21 +00:00
Vikram S. Adve
6133689517
Numerous bug fixes:
...
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect coloring for CC registers (both int and FP): interferences
were being completely ignored for int CC and were considered but no
spills were marked for fp CC!
Also some code improvements:
-- better interface to generating machine instr for common cases
(many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
one codegen phase to another (now used to pass information about
CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint
llvm-svn: 2642
2002-05-19 15:29:31 +00:00
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
ba813cb36f
Add neccesary #include
...
llvm-svn: 2406
2002-04-29 18:48:55 +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
e7143ad386
Include appropriate file
...
llvm-svn: 2379
2002-04-28 20:40:16 +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
Chris Lattner
07fe96ca98
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
f043c4baac
Remove all contents of the cfg namespace to the global namespace
...
llvm-svn: 2369
2002-04-28 16:19:42 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Vikram S. Adve
95b080aca1
Don't record instructions for copying method arguments in the
...
AddedInstrns sets for the first machine instruction. It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken. Instead, use a separate set for the function entry.
llvm-svn: 2318
2002-04-25 04:46:28 +00:00
Vikram S. Adve
f69db4f795
Don't record instructions for copying method arguments in the
...
AddedInstrns sets for the first machine instruction. It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken. Instead, use a separate set for the function entry.
llvm-svn: 2312
2002-04-25 04:34:15 +00:00
Vikram S. Adve
ad382a01be
Improve printing during dumps.
...
llvm-svn: 2311
2002-04-25 04:31:18 +00:00
Vikram S. Adve
9f9392ec24
Optional args are no longer allocated as they are discovered.
...
(This can be improved to avoid making the initial pass over the method.)
Also, ensure automatic vars and reg. spills areas are not extended
if their sizes are used for computing some other offset.
llvm-svn: 2310
2002-04-25 04:30:43 +00:00
Chris Lattner
572d298aa6
Only emit message if DEBUG_RA is on
...
llvm-svn: 2252
2002-04-15 20:36:15 +00:00
Chris Lattner
5e12c7caf5
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
97ce718b8d
No need to reserve space, erasing does not change the size of the container.
...
llvm-svn: 2201
2002-04-09 18:01:21 +00:00
Chris Lattner
119c675af7
* Add a file header with some information
...
* Delete the DelaySlotInfo objects created by the SchedulingManager class.
These leaked objects were accounting for 3/4 of the memory leaked by the
backend, so this is a relatively major win.
* Reorganize SchedulingManager::getDelaySlotInfoForInstr so that it has
better code locality (making it easier to read).
llvm-svn: 2197
2002-04-09 05:45:58 +00:00
Chris Lattner
cd23d94446
Clean up the ownership model a bit so that nodes actually get deleted more
...
frequently. This still leaks edges quite a bit, but it leaks no nodes
(I think).
llvm-svn: 2190
2002-04-09 05:15:33 +00:00
Chris Lattner
ee0fa0eb15
Convert AddedInstrMapType to contain AddedInstrns by value instead of by
...
pointer so that they do not all get leaked!
llvm-svn: 2188
2002-04-09 05:13:04 +00:00
Chris Lattner
7bc600203b
GCC3.0 is reported to die without an alloca definition.
...
llvm-svn: 2186
2002-04-09 03:37:11 +00:00
Chris Lattner
e7a2ce6e4e
Don't leak memory like a seive
...
llvm-svn: 2185
2002-04-08 23:09:07 +00:00
Chris Lattner
56229b8690
Value cannot be directly instantiated. I think that this code was TRYING to
...
make a PHI node, although it was badly broken. This keeps tests passing, so
we'll go with it.
llvm-svn: 2184
2002-04-08 22:05:54 +00:00
Chris Lattner
c8166cec07
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
cd3575a5cf
s/method/function
...
llvm-svn: 2177
2002-04-08 22:01:15 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Vikram S. Adve
44ee4184e4
Add method clearCallInterference().
...
llvm-svn: 2071
2002-03-31 18:58:14 +00:00
Vikram S. Adve
c2c33ba3fd
Include temp. values when computing max. size of stack frame!
...
llvm-svn: 2070
2002-03-31 18:57:49 +00:00
Vikram S. Adve
1e6ab6f476
Fix a bug in previous bug fix.
...
llvm-svn: 2069
2002-03-31 18:56:51 +00:00
Vikram S. Adve
fbdd533059
Bug fix: address used by indirect call instruction should also
...
be marked as having a Call Interference, even though it may not
be live after the call.
llvm-svn: 2068
2002-03-31 18:54:37 +00:00
Chris Lattner
849c762b02
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Vikram S. Adve
3dfd5b888b
Destroy MethodLiveVarInfo after register allocation.
...
llvm-svn: 1976
2002-03-24 03:54:03 +00:00
Vikram S. Adve
fa2ed7e6b1
Use deterministic iterator for SchedGraphs. This is actually not
...
useful right now when we only do local scheduling.
llvm-svn: 1975
2002-03-24 03:53:03 +00:00
Vikram S. Adve
058ec11ea3
Bug fix: nextToTry was not being initialized in one case.
...
llvm-svn: 1974
2002-03-24 03:46:15 +00:00
Vikram S. Adve
37d44e7de9
Add option to disable scheduling.
...
llvm-svn: 1973
2002-03-24 03:45:35 +00:00
Vikram S. Adve
0cdcf40121
Add option to disable scheduling.
...
Destroy live-variable information after scheduling so it is
recomputed before later phases (e.g., reg. allocation).
Use deterministic iterator to enumerate sched graphs.
llvm-svn: 1972
2002-03-24 03:44:55 +00:00
Vikram S. Adve
d18a1cc9fb
Minor changes.
...
llvm-svn: 1971
2002-03-24 03:40:59 +00:00
Vikram S. Adve
e06cac463f
Re-fix bug: Put back MachineCodeForInstruction::dropAllReferences.
...
llvm-svn: 1970
2002-03-24 03:40:11 +00:00
Vikram S. Adve
b347d2796c
Fix padding for variables allocated on stack.
...
llvm-svn: 1969
2002-03-24 03:39:26 +00:00
Vikram S. Adve
34306e0e1c
Major overhaul to FoldGetElemPtr to handle mixed array and struct refs.
...
llvm-svn: 1968
2002-03-24 03:37:53 +00:00
Vikram S. Adve
8493ae74b2
Use deterministic iterator for treeRoots.
...
llvm-svn: 1967
2002-03-24 03:36:52 +00:00
Vikram S. Adve
a141a7190b
Change treeRoots data structure to make enumeration deterministic.
...
llvm-svn: 1962
2002-03-24 03:24:00 +00:00
Chris Lattner
c481e92886
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
8553fc5d21
Big bug fix: getUsableUniRegAtMI needed to return values in arguments
...
but did not pass the arguments by reference!
llvm-svn: 1906
2002-03-18 03:37:19 +00:00
Vikram S. Adve
855ed3d941
Added function computeOffsetforLocalVar to check how big the
...
offset-from-FP will be before allocating space for a local variable.
llvm-svn: 1905
2002-03-18 03:36:30 +00:00
Vikram S. Adve
edc1adae11
Bug fix in setting CC register.
...
Also use distinct names for the three types of SetMachineOperand
to avoid painful overloading problems and errors.
llvm-svn: 1904
2002-03-18 03:35:24 +00:00
Vikram S. Adve
b26ed73c33
Constants are now added to the constant pool only when a load
...
instruction is actually generated for them.
Rename the different versions of SetMachineOperand.
llvm-svn: 1903
2002-03-18 03:33:43 +00:00
Vikram S. Adve
3fe5a9e913
Use vector for machine instructions returned by GetInstructionsByRule.
...
Fix constants in instructions generated for Phi elimination.
llvm-svn: 1902
2002-03-18 03:31:54 +00:00
Vikram S. Adve
125cd33f99
Big bug fix: getUsableUniRegAtMI needed to return values in arguments
...
but did not pass the arguments by reference!
Also added a function to get a register class by ID.
llvm-svn: 1901
2002-03-18 03:26:48 +00:00
Anand Shukla
32c3ca3f0c
Change to make it build with GCC 2.95.3
...
llvm-svn: 1802
2002-02-26 18:57:15 +00:00
Chris Lattner
c1de0d6e83
* Make it compile with GCC 3.0.4
...
llvm-svn: 1788
2002-02-24 23:01:56 +00:00
Chris Lattner
3cffcc10bc
* Silence signed/unsigned warnings
...
* Make it compile with GCC 3.0.4
llvm-svn: 1787
2002-02-24 23:01:50 +00:00
Chris Lattner
8e9be000a7
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
b0a2c5546b
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
e282c0b592
Convert operand iterator over to work like an STL iterator
...
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
5337fbec40
Minor change: Methods that return ValueSet's that are guaranteed to be valid
...
return references instead of pointers.
llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
862fab4da7
* Code Cleanups
...
* Removal dependencies on Type.h & remove uses of getTypeID()
llvm-svn: 1718
2002-02-05 03:52:29 +00:00
Chris Lattner
73812e2833
* Code Cleanups of IGNode.h
...
* Removal of getTypeID() methods, and dependence on llvm/Type.h, from IGNode & LiveRange
llvm-svn: 1717
2002-02-05 03:51:37 +00:00
Chris Lattner
164a9ea118
Must include SetOperations to do set_*
...
llvm-svn: 1716
2002-02-05 03:35:53 +00:00
Chris Lattner
f3d0ae9fdb
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
* Eliminate some irrelevant const's
llvm-svn: 1712
2002-02-05 02:52:05 +00:00
Chris Lattner
dc3aec7a90
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
llvm-svn: 1711
2002-02-05 02:51:01 +00:00
Chris Lattner
a8170f0944
* Code Cleanups
...
* Introduce RAV to allow stream I/O instead of using printValue
llvm-svn: 1710
2002-02-05 01:43:49 +00:00
Chris Lattner
467da46166
* Add a #include not indirectly included any more
...
llvm-svn: 1707
2002-02-05 00:35:14 +00:00
Chris Lattner
817f1768d4
* RegisterAllocation _uses_ LiveVar analysis, instead of creating it's own copy
...
llvm-svn: 1701
2002-02-04 20:02:38 +00:00
Chris Lattner
9cd29563f0
* The itf exposed by InstrScheduling is now a single function to create the right pass
...
* InstructionScheduling is now a real pass
* InstrSched _uses_ LiveVar analysis, instead of creating it's own copy many times
through a loop. In this was LiveVarAnalysis is actually even SHARED by Register
allocation.
* SchedPriorities is now passed the live var information in
llvm-svn: 1700
2002-02-04 20:02:16 +00:00
Chris Lattner
e264071f46
Switch register allocator over to using LoopInfo directly instead of indirectly through LoopDepthCalculator
...
llvm-svn: 1696
2002-02-04 17:48:00 +00:00
Chris Lattner
bb19367753
Make LoopDeptCalculator be an internal artifact of how RegAlloc is implemented,
...
do not expose it. Additionally, have it be auto generated by the pass framework
for us.
llvm-svn: 1695
2002-02-04 17:39:42 +00:00
Chris Lattner
c457462f99
Make #include "llvm/Analysis/LoopDepth.h" be an internal artifact of how register allocation is implemented.
...
llvm-svn: 1693
2002-02-04 17:38:48 +00:00
Chris Lattner
f3f13580e9
* Add #includes removed from headers
...
* ValueSet interface converted from add/remove to insert/erase
* Minor cleanups
llvm-svn: 1689
2002-02-04 16:36:59 +00:00
Chris Lattner
69e3aba1e9
Remove dependence on BBLiveVar from InstrScheduling
...
Minor cleanups
llvm-svn: 1688
2002-02-04 16:35:45 +00:00
Chris Lattner
8bfb48c8d3
Convert RegisterAllocator interface to opaque pass type, so that users do not
...
need to know _anything_ about RegAlloc to use it. Well in the end maybe.
llvm-svn: 1681
2002-02-04 15:54:09 +00:00
Chris Lattner
0de4b16eef
Add #includes neccesary since they were removed from .h files
...
llvm-svn: 1675
2002-02-04 05:56:09 +00:00
Chris Lattner
f0828cf3dd
Move instrIsFeasible from InstrScheduling.h
...
llvm-svn: 1674
2002-02-04 05:55:42 +00:00
Chris Lattner
009faad8e4
* Minor cleanups
...
* Reduce number of #includes, sometimes drastically (LiveRangeInfo.h lost _7_)
* Move instrIsFeasible() from InstrScheduling.h to SchedPriorities.h
* Delete blank lines at end of files
llvm-svn: 1672
2002-02-04 05:52:08 +00:00
Chris Lattner
45cdd0fb0c
* Move command line parsing debug stuff to InstrScheduling internal header file
...
SchedPriorities.h
llvm-svn: 1669
2002-02-04 02:44:20 +00:00
Chris Lattner
9a8ff2595a
Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
...
that has a very minimal interface (like it should have).
llvm-svn: 1667
2002-02-04 00:33:08 +00:00
Chris Lattner
e1289c8b71
Code pulled out of MAchineInstr.(h|cpp)
...
llvm-svn: 1660
2002-02-03 07:54:50 +00:00
Chris Lattner
4315c295f5
Lots of code cleanups, no functional changes
...
llvm-svn: 1650
2002-02-03 07:46:34 +00:00
Chris Lattner
b8b17dc6dc
* Prune #includes
...
* Remove MachineCodeFor(Method|VMInstr) code to their own .cpp files
llvm-svn: 1649
2002-02-03 07:46:01 +00:00
Chris Lattner
92340322ab
* Switch over to cleaner TmpInstruction model
...
llvm-svn: 1648
2002-02-03 07:39:06 +00:00
Chris Lattner
53b8194805
* Straighten out #includes
...
* Switch to MAchineCodeForInstruction model instead of MachineCodeForVMInstr
llvm-svn: 1647
2002-02-03 07:33:46 +00:00
Chris Lattner
4e43c744da
* Swich to annotation model for MachineCodeForInstruction
...
llvm-svn: 1646
2002-02-03 07:31:41 +00:00
Chris Lattner
8ea2029cfa
Remove extraneous #includes
...
llvm-svn: 1645
2002-02-03 07:30:08 +00:00
Chris Lattner
a58db0f194
* Straighten out #includes
...
* Switch from MachineCodeForVMInstr to MachineCodeForInstruction model
llvm-svn: 1644
2002-02-03 07:29:45 +00:00
Chris Lattner
b44b5b6f9a
* Get machine instrs from Instructin's by using MachineCodeForInstruction::get
...
* Convert a few (*X). to X->
llvm-svn: 1643
2002-02-03 07:28:30 +00:00
Chris Lattner
76ac6e30bd
Add a class forward decl
...
llvm-svn: 1637
2002-02-03 07:13:04 +00:00
Chris Lattner
3d52646383
LoopDepth calculation is now in CFG namespace
...
llvm-svn: 1601
2002-01-31 00:41:13 +00:00
Chris Lattner
24eb24166b
Make it build with 2.95.3
...
llvm-svn: 1554
2002-01-23 05:47:57 +00:00
Chris Lattner
d0e1f35161
Oops lost a parenthesis somehow :(
...
llvm-svn: 1504
2002-01-21 01:33:12 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
80acf30a7f
Fixed a bug in spill cost estimation
...
llvm-svn: 1500
2002-01-08 16:29:23 +00:00
Ruchira Sasanka
b6d7a004fa
PhyRegAlloc.cpp: Added temp area resetting before every call
...
llvm-svn: 1499
2002-01-07 21:09:06 +00:00
Ruchira Sasanka
222c51efe9
Added destructors and comments.
...
Added correct spill candidate selection logic.
llvm-svn: 1493
2002-01-07 19:19:18 +00:00
Ruchira Sasanka
3d5efa3be1
Added comments, destructors where necessary.
...
llvm-svn: 1491
2002-01-07 19:16:26 +00:00
Vikram S. Adve
0607fbbf01
Eliminate all uses of memInst->getIndicesBROKEN().
...
llvm-svn: 1485
2001-12-15 00:36:32 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
bcf2df7058
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
b914467e57
Stuff after a #endif is not valid CPP input and breaks some compilers
...
llvm-svn: 1375
2001-11-26 18:56:52 +00:00
Chris Lattner
9236d30e29
The old getIndices has been deprecated, because it no longer works. It now
...
is named getIndicesBROKEN() and shall be removed when the codebase is updated
to not call it
llvm-svn: 1338
2001-11-26 16:56:19 +00:00
Ruchira Sasanka
771ffc7640
Commented some popTempArg.. since it leads to a bug
...
llvm-svn: 1326
2001-11-15 22:02:06 +00:00
Ruchira Sasanka
647337ad60
Added naming to inserted phi copy values - for easy debugging
...
llvm-svn: 1325
2001-11-15 20:46:40 +00:00
Ruchira Sasanka
63203e9c07
Fixed a bug in setReLRegsUsedByMI
...
llvm-svn: 1323
2001-11-15 20:23:19 +00:00
Ruchira Sasanka
bcd55f277e
Changed some names of methods, added const etc.
...
llvm-svn: 1322
2001-11-15 20:22:37 +00:00
Vikram S. Adve
bcd2ba2fea
Modify AllocateLocalVar method to take a size argument.
...
llvm-svn: 1318
2001-11-15 15:22:26 +00:00