Commit Graph

718 Commits

Author SHA1 Message Date
Chris Lattner
1c7907e896 Fix minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4355 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:11:17 +00:00
Chris Lattner
0fa600dd35 Don't pass default args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4354 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:10:56 +00:00
Misha Brukman
e585a7d12a Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4352 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:01:13 +00:00
Misha Brukman
b7551ef115 Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4351 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:00:31 +00:00
Chris Lattner
5638bf973f Don't bother passing in default value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4347 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:46:25 +00:00
Chris Lattner
ccdf23ebbb Rename some regalloc fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:43:23 +00:00
Chris Lattner
4e3be2f728 Fixes to work with updated RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4345 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:32:07 +00:00
Chris Lattner
f726e776b8 Eliminate usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:22:04 +00:00
Chris Lattner
fcffe865f9 Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4342 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:01:16 +00:00
Chris Lattner
fb3a0aed9b Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4341 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:50:08 +00:00
Chris Lattner
601fc7c71c Eliminate uses of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4340 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:01:21 +00:00
Chris Lattner
d0aa0cdbc6 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:30:46 +00:00
Chris Lattner
c5ddc8b74b Make Scheduling Class variables be 'unsigned' instead of 'int'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:53:02 +00:00
Chris Lattner
133f079c8c Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4331 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:45:29 +00:00
Chris Lattner
0be79c6c1b Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:28:39 +00:00
Chris Lattner
4a63b72df9 Don't #include <Support/*>, #include "Support/*"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:11:53 +00:00
Chris Lattner
e61a584f98 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:37 +00:00
Chris Lattner
55291ead55 Rename MachineCodeForBasicBlock to MachineBasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:47 +00:00
Chris Lattner
32be9f6cd4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:27 +00:00
Chris Lattner
a4f808b54e Fixes to previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4314 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:27:30 +00:00
Chris Lattner
51a8d85281 Inline some methods from .cpp files into .h files, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:21:55 +00:00
Chris Lattner
227c3d355b Move machine code generation/destruction passes out of Sparc.cpp because
they are generic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4310 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:12:41 +00:00
Chris Lattner
4f9463772b Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
really is sparc specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4308 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:03:43 +00:00
Misha Brukman
fce1143bcf Changed MachineCodeForMethod' to MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:28:31 +00:00
Chris Lattner
dc476b87d9 change ++ to +1 when using random access iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4292 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 19:09:51 +00:00
Chris Lattner
e2d053ad18 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4277 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 02:01:33 +00:00
Chris Lattner
232c3be0b5 Fix misspelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4276 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 01:43:26 +00:00
Chris Lattner
a0877726df 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4269 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 03:30:47 +00:00
Chris Lattner
54b866b896 Minor cleanups
Make sure to have a pass name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4268 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 01:12:01 +00:00
Chris Lattner
0ceeb42c97 Ensure definate initialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:34:11 +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
d344242f2e Make sure to escape \'s when they are output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4179 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 19:56:24 +00:00
Vikram S. Adve
edf3a727b7 Print "circular" warning message only in debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:49 +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
Vikram S. Adve
cf911de3c6 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:30:55 +00:00
Chris Lattner
bb6b121689 Allow emission of names that start with an underscore. This is needed to
interface with code that uses symbols in the ansi-c protected namespace.  In
most cases this comes from system header files, such as stdio.h.  In particular,
without this change, a reference to the __iob symbol is mangled into ll_iob,
which is not resolved by libc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 06:14:18 +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
Vikram S. Adve
1632e882f1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4138 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:40:37 +00:00
Vikram S. Adve
acf0f704f9 Major bug fix: was not adding CD edges for RETURNs!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4137 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:39:22 +00:00
Vikram S. Adve
fee76265ff Several major fixes, particularly in emitting constant aggregates:
(1) Padding bytes between structure fields (for alignment) were never
    being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
    were never handled.
(3) Support new model for external/uninitialized/initialized globals.
    Uninitialized globals are no longer emitted since they are external.
    Initialized globals may go either in .bss or in .data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4134 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:32:18 +00:00
Vikram S. Adve
42e90cf4be Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
We now use %g1 instead since that is shared and volatile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4133 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:24:06 +00:00
Vikram S. Adve
e0048667dd Don't mark JMPLCALL and JMPLRET as branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4132 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:22:32 +00:00
Vikram S. Adve
d3e26482ff (1) Try to evaluate constant when multiplying 2 constants.
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
    to int reg. when calling a function with no prototype.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4130 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:18:57 +00:00
Vikram S. Adve
04ef49985b Eliminate duplicate target pointer in SparcRegInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4129 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:06:04 +00:00
Vikram S. Adve
c654c784f6 Eliminate duplicate target pointer. Also add a few assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4128 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:05:30 +00:00
Vikram S. Adve
893cace8e2 Make sure to handle small negative values hiding as large unsigned longs --
this is a common case created by the front-end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4127 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:04:26 +00:00
Vikram S. Adve
d0451a9233 Major fix: extract ConstantExpr nodes and decompose them into symbolic
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4126 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:01:57 +00:00
Vikram S. Adve
cb202e3de5 Major bug fix: spill code for an instruction in a delay slot was
merrily being inserted before/after the instruction!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:12:40 +00:00
Vikram S. Adve
aebdbe6988 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:05 +00:00
Vikram S. Adve
1c397aae8e Added a couple of helper methods for live range construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:43 +00:00
Vikram S. Adve
9d67cd1468 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:22 +00:00
Vikram S. Adve
f425884e27 Fixed method getReturnValue(): it should return NULL if the
callee does not return a value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:03:54 +00:00
Vikram S. Adve
ad9c978874 Fixed incorrect assertion: spill code for function ptr should be
handled like normal operands, not like other call arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:02:40 +00:00
Vikram S. Adve
ac67006bed Return address register should be marked as "result" for the JMPL instruction
since it is defined by the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3966 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:00:15 +00:00
Vikram S. Adve
87817653fe Live ranges for Return value and return address of a Call are no longer
created here.  Instead they are created in LiveRangeInfo.cpp.  This
simplifies the code here quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:59:05 +00:00
Vikram S. Adve
106604ea6d Simplified code that handles call args and rets, so it no longer
needs the RegClass list to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:56:59 +00:00
Vikram S. Adve
4a8bb2bf23 Simplify Call translation slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3963 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:55:41 +00:00
Vikram S. Adve
94c408104a Overhaul integer conversions to match C++ ISO standard.
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3961 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:33:08 +00:00
Vikram S. Adve
5cededee92 Modify operand order for Create{Sign,Zero}ExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:29:45 +00:00
Vikram S. Adve
7e5167a3e2 Bug fix: some redundant copies were not being deleted after detection :-|.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:27:37 +00:00
Vikram S. Adve
1c10f17552 Sign-extend integer constants from original type size to 64 bits!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:26:20 +00:00
Vikram S. Adve
e9cb735131 Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:24:45 +00:00
Vikram S. Adve
1b5710a8fc Put intermediate source files in a subdirectory here instead of with
object files.  Also,


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3884 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 13:12:28 +00:00
Anand Shukla
33db9bae15 Initial version: it adds 2 empty slots at the top of stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-21 04:58:26 +00:00
Vikram S. Adve
0efb50761d Add method IGNode::getCombinedDegree to count the sum of the degrees
of two nodes, excluding duplicates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3848 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:55:04 +00:00
Vikram S. Adve
d55697cf13 Added class MachineOptInfo as interface to target-specific
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3845 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:52:09 +00:00
Vikram S. Adve
32f81a3469 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3842 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:45:47 +00:00
Vikram S. Adve
25d80cdcc6 Peephole optimization pass on final machine code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:42:11 +00:00
Vikram S. Adve
abf055c698 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3838 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:29:28 +00:00
Anand Shukla
b379470b90 Removed debug info printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 20:24:46 +00:00
Chris Lattner
82f05d8610 Add support for GCC 2.96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 17:23:09 +00:00
Vikram S. Adve
e102a64beb Use ulong instead of uint for size expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3744 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:56:45 +00:00
Vikram S. Adve
4900116ab0 Add methods to query about the representation of LLVM quantities (e.g.,
constants).  Useful for target-dependent LLVM transformations like
Preselection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3743 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:56:01 +00:00
Vikram S. Adve
13f1d71c80 Don't print out global names unnecesssarily. Also, expose pass
constructors so passes can be inserted by TargetMachine.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3742 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:54:02 +00:00
Vikram S. Adve
e1f7280bf8 Move all the code that creates code generation passes from Sparc.cpp to
TargetMachine.cpp, since it is entirely machine-independent.
Also, add options to disable optional back-end passes (preselection and
instr. scheduling).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3740 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:39:26 +00:00
Vikram S. Adve
fd0ec80197 Add a version of ChooseRegOrImmed to handle numerical constants
introduced by InstrSelection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3735 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:15:57 +00:00
Vikram S. Adve
993243e599 Fix typos in previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3726 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-15 15:33:48 +00:00
Chris Lattner
4bc2348008 RegAllocCommon no longer includes CommandLine.h so we have to include it
here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3725 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-15 07:07:55 +00:00
Vikram S. Adve
39c94e105f Break RA_DEBUG option into several levels to get better control over
debug output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3724 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 23:05:33 +00:00
Vikram S. Adve
521758fb79 Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3723 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 23:04:52 +00:00
Vikram S. Adve
7e914a967d Break RA_DEBUG option into several levels to get better output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3722 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 22:18:37 +00:00
Vikram S. Adve
7c26898401 Moving to lib/CodeGen/RegAlloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3718 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 11:57:17 +00:00
Misha Brukman
3f93eeedbd Again, including Module makes Function unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3714 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 02:07:43 +00:00
Chris Lattner
597f81fea2 Fix a bug I introduced into the code generator. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3694 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-12 20:27:10 +00:00
Chris Lattner
0374b8de2b - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3683 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-11 01:21:35 +00:00
Chris Lattner
106ff4551c - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3681 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-11 01:21:29 +00:00
Vikram S. Adve
ec7f482d90 Silly bug fix: Machine code vector could be empty for a no-op cast instruction,
e.g., cast double to double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3633 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-09 14:54:21 +00:00
Chris Lattner
823c4abb58 Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3624 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-08 21:19:29 +00:00
Chris Lattner
a175ed4194 Inform the memory leak detector that TmpInstruction objects should not be
subject to memory leak checking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3623 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-08 21:08:43 +00:00
Vikram S. Adve
f36f06bb60 Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3581 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:34:31 +00:00
Vikram S. Adve
84c0fcbde4 Bug fixes in casting between floats and ints smaller than 64 bits.
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3580 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:33:59 +00:00
Vikram S. Adve
babc0fab19 -- Use size of pointer element type instead of pointer type in array offsets!
-- A few bug fixes in casting between floats and ints.
-- Use SRL reg, 0 instead of AND reg, 0xffffffff to clear high 32 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3579 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:32:13 +00:00
Vikram S. Adve
537a877998 -- Bug fix: use byte offsets not typed offsets in output assembly!
-- Add support for ConstantExpr constants (only cast and add operators so far)
-- Avoid generating label Bbss.bss, which sometimes came out twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3578 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:28:10 +00:00
Chris Lattner
0c4e886dbf - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3574 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:08:28 +00:00
Anand Shukla
b85d265b16 moved this file from lib/Reoptimizer/Mapping
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3519 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-27 22:47:33 +00:00
Anand Shukla
5993829fbd Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3513 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-27 16:45:17 +00:00
Vikram S. Adve
74c83e44fa Use newly-added type inspection support in InstTreeNode subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3501 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 21:02:09 +00:00
Vikram S. Adve
685133382d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3500 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 21:00:08 +00:00
Vikram S. Adve
f28d9d643e LoadIdx non-terminal no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3499 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 20:58:04 +00:00
Vikram S. Adve
8cfffd3a3e Sign-extend values used to index arrays (and Simplify
SetOperandsForMemInstr significantly).  Load and Store
no longer have any indices.  Eliminate spurious sign-extension
on a cast to float/double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3498 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 20:56:53 +00:00