Dan Gohman
bf764c6a4c
Fix edito in the PseudoSourceValue name list.
...
llvm-svn: 53562
2008-07-14 17:45:47 +00:00
Duncan Sands
ef690bbffe
I don't think BUILD_PAIR can have a vector result.
...
Remove support for this.
llvm-svn: 53559
2008-07-14 17:34:19 +00:00
Duncan Sands
bb3251e1f4
Tighten up some checks. Fix FPOWI splitting for
...
non-power-of-two vectors.
llvm-svn: 53558
2008-07-14 17:33:37 +00:00
Duncan Sands
134155a263
An INSERT_VECTOR_ELT can insert a larger value
...
than the vector element type. Don't forget to
handle this when the insertion index is not a
constant.
llvm-svn: 53556
2008-07-14 17:32:02 +00:00
Duncan Sands
5a4bab9849
According to the docs, it is possible to have an
...
extending load of a vector. Handle this case when
splitting vector loads. I'm not completely sure
what is supposed to happen, but I think it means
hi should be set to undef. LegalizeDAG does not
consider this case.
llvm-svn: 53555
2008-07-14 17:27:46 +00:00
Duncan Sands
fd63c72205
There should be no extending loads or truncating
...
stores of one-element vectors. Also, neaten the
handling of INSERT_VECTOR_ELT when the inserted
type is larger than the vector element type.
llvm-svn: 53554
2008-07-14 17:22:31 +00:00
Duncan Sands
a9d2c2042e
Ignore TargetConstant with an illegal type. These
...
are used for passing huge immediates in inline ASM
from the front-end straight down to the ASM writer.
Of course this is a hack, but it is simple, limited
in scope, works in practice, and is what LegalizeDAG
does.
llvm-svn: 53553
2008-07-14 17:15:45 +00:00
Evan Cheng
7457283357
Typos.
...
llvm-svn: 53504
2008-07-12 02:22:07 +00:00
Evan Cheng
05e5317cab
Fix PR2536: a nasty spiller bug. If a two-address instruction uses a register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g.
...
8 %reg1024<def> = IMPLICIT_DEF
12 %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2
The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap.
llvm-svn: 53503
2008-07-12 01:56:02 +00:00
Evan Cheng
ebf7ff4531
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
4c18394001
Include a frame index in the "fixed stack" pseudo source value
...
instead of using the frame index for the SVOffset, which was
inconsistent.
llvm-svn: 53486
2008-07-11 22:44:52 +00:00
Dan Gohman
b21183f645
Fix an obsolete top-level comment.
...
llvm-svn: 53481
2008-07-11 22:39:58 +00:00
Dan Gohman
3b91ef27b5
Factor out debugging code into the common base class.
...
llvm-svn: 53480
2008-07-11 22:36:22 +00:00
Dan Gohman
6ee2195ab1
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
d7a32ecde2
Trim unnecessary #includes.
...
llvm-svn: 53471
2008-07-11 20:38:31 +00:00
Duncan Sands
eb04d356e3
Remove an apparently useless routine: there should
...
be no need to split the result of a vector RET node,
since they are always already legal.
llvm-svn: 53462
2008-07-11 17:02:09 +00:00
Duncan Sands
1e3fe05638
It is pointless to turn a UINT_TO_FP into an
...
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
llvm-svn: 53461
2008-07-11 17:00:14 +00:00
Duncan Sands
58130a26f4
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
52f1dbf139
Port a shift-by-1 optimization from LegalizeDAG: it
...
was presumably added after the rest of the code was
copied to LegalizeTypes.
llvm-svn: 53459
2008-07-11 16:54:57 +00:00
Duncan Sands
669d4d6909
Add support for 128 bit shifts and 32 bit shifts
...
on 16 bit machines.
llvm-svn: 53458
2008-07-11 16:52:29 +00:00
Chris Lattner
78d60a220b
Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
...
when working on legalizetypes. Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.
llvm-svn: 53435
2008-07-10 23:46:13 +00:00
Chris Lattner
5e784a8ebd
make legalize types be a command line option: -enable-legalize-types.
...
llvm-svn: 53434
2008-07-10 23:37:50 +00:00
Dan Gohman
1f42b96c7e
Make stack slot coloring's debug output more consistent with
...
other passes.
llvm-svn: 53415
2008-07-10 19:49:32 +00:00
Evan Cheng
d7023b66ea
Change StackSlotForVirtReg (which maps vregs to frame indices) from std::map to IndexedMap.
...
llvm-svn: 53414
2008-07-10 18:23:23 +00:00
Duncan Sands
a6c09579f0
Add support for 128 bit multiplicative operations.
...
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
llvm-svn: 53408
2008-07-10 15:35:05 +00:00
Duncan Sands
90a916539d
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
...
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
llvm-svn: 53407
2008-07-10 15:33:02 +00:00
Duncan Sands
91912e046a
Fix a FIXME: use an apint in CTTZ legalization.
...
llvm-svn: 53406
2008-07-10 15:30:54 +00:00
Duncan Sands
f2734eabf2
Remove PromoteIntRes_FP_ROUND - not sure what it
...
was doing there: FP_ROUND returns a float, not an
integer.
llvm-svn: 53405
2008-07-10 15:29:55 +00:00
Duncan Sands
16f5ab06b0
Make sure the alignment of the temporary created
...
in CreateStackStoreLoad is good enough for both
the source and destination types.
llvm-svn: 53404
2008-07-10 15:26:17 +00:00
Duncan Sands
a219bb03e1
Make the LegalizeType method naming scheme more regular.
...
llvm-svn: 53403
2008-07-10 15:25:04 +00:00
Duncan Sands
8afe39dc56
Don't barf when dumping a constant that contains
...
a ginormous value (eg: i128 -1).
llvm-svn: 53402
2008-07-10 11:23:14 +00:00
Evan Cheng
3ec3113431
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
...
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
llvm-svn: 53394
2008-07-10 07:35:43 +00:00
Owen Anderson
65e43ae1e8
Use DenseMap instead of std::map in local register allocation. This improves the time on instcombine from .31s to .22s
...
llvm-svn: 53390
2008-07-10 01:56:35 +00:00
Owen Anderson
189609bb36
Fix 403.gcc. Finally got the check for two-address-ness correct.
...
llvm-svn: 53389
2008-07-10 01:53:01 +00:00
Owen Anderson
35080ed650
Revert r53367, which was breaking things.
...
llvm-svn: 53378
2008-07-09 23:09:10 +00:00
Dan Gohman
e10fc737ca
Simplify hasNUsesOfValue and hasAnyUsesOfValue even more. This
...
makes their special-case checks of use_size() less beneficial,
so remove them. This eliminates all but one use of use_size(),
which is in AssignTopologicalOrder, which uses it only once for
each node, and so can reasonably afford to recompute it, as
this allows the UsesSize field of SDNode to be removed
altogether.
llvm-svn: 53377
2008-07-09 23:03:14 +00:00
Dan Gohman
6ba50d7fc1
hasAnyUseOfValue can check SDUse nodes of its users directly instead
...
of examining every operand of every user.
llvm-svn: 53374
2008-07-09 22:39:01 +00:00
Dan Gohman
679872b05f
Move MemoryVT out of LSBaseNode into MemSDNode, allowing the
...
getMemOperand function to be moved into the base class as well
and made non-virtual.
llvm-svn: 53372
2008-07-09 22:08:04 +00:00
Evan Cheng
082f7f802e
Avoid creating expensive comment string if it's not going to be printed.
...
llvm-svn: 53369
2008-07-09 21:53:02 +00:00
Owen Anderson
8174cf28a3
Loosen our check here. Local regalloc only cares that the reg is used and def'd by the same instruction, but about the details of
...
the relationship.
llvm-svn: 53367
2008-07-09 21:34:36 +00:00
Dan Gohman
f6e651fcf2
Move the IsVolatile and SVOffset fields into the MemSDNode base
...
class, and store IsVolatile and Alignment in a more compact form.
This makes AtomicSDNode slightly larger, but it shrinks LoadSDNode
and StoreSDNode, which are much more common and are the largest of
the SDNode subclasses. Also, this lets the isVolatile() and
getAlignment() accessors be non-virtual.
llvm-svn: 53361
2008-07-09 21:23:02 +00:00
Owen Anderson
50a64de51e
Don't use an expensive check for two-address-ness when we have the information sitting around to determine it much more quickly,
...
This speeds up the local register allocator from 0.37s to 0.31s on instcombine.
llvm-svn: 53359
2008-07-09 21:15:10 +00:00
Owen Anderson
58912683fd
Factor local liveness computation out into its own function.
...
llvm-svn: 53352
2008-07-09 20:14:53 +00:00
Dan Gohman
0975e33ffc
Reuse the MO variable instead of recomputing it in RegAllocLocal.
...
Keep RegAllocSimple in sync.
llvm-svn: 53351
2008-07-09 20:12:26 +00:00
Dan Gohman
c27e4e9651
Give RegAllocSimple a TargetInstrInfo member to keep it consistent
...
with RegAllocLocal.
llvm-svn: 53347
2008-07-09 19:56:01 +00:00
Dan Gohman
ad2c9877ce
RegAllocLocal has a TargetInstrInfo data member. Use it instead
...
of having local variables duplicate it.
llvm-svn: 53346
2008-07-09 19:55:19 +00:00
Dan Gohman
4d221ae533
Use find with std::map, when that's what's needed, instead of lower_bound
...
with extra checks.
llvm-svn: 53344
2008-07-09 19:51:00 +00:00
Anton Korobeynikov
f16db15839
Switch to new section name handling facility
...
llvm-svn: 53316
2008-07-09 13:27:16 +00:00
Duncan Sands
e66e7b80f0
Remove some unneeded includes.
...
llvm-svn: 53289
2008-07-09 12:08:25 +00:00
Duncan Sands
828e080f3b
Redo LegalizeTypes soft float support for
...
SINT_TO_FP and UINT_TO_FP. This now produces
the same code as LegalizeDAG (the previous
code was based on a mistaken idea of what
LegalizeDAG did in this case).
llvm-svn: 53288
2008-07-09 12:07:22 +00:00