Evan Cheng
fa6b366892
Enable -coalescer-commute-instrs by default.
...
llvm-svn: 47623
2008-02-26 20:40:22 +00:00
Dan Gohman
9db0aa86d9
Avoid aborting on invalid shift counts.
...
llvm-svn: 47612
2008-02-26 18:50:50 +00:00
Chris Lattner
07c83cc86e
Fix PR2096, a regression introduced with my patch last night. This
...
also fixes cfrac, flops, and 175.vpr
llvm-svn: 47605
2008-02-26 17:09:59 +00:00
Duncan Sands
7cdbbfd067
Fix a nasty bug in LegalizeTypes (spotted in
...
CodeGen/PowerPC/illegal-element-type.ll): suppose
a node X is processed, and processing maps it to
a node Y. Then X continues to exist in the DAG,
but with no users. While processing some other
node, a new node may be created that happens to
be equal to X, and thus X will be reused rather
than a truly new node. This can cause X to
"magically reappear", and since it is in the
Processed state in will not be reprocessed, so
at the end of type legalization the illegal node
X can still be present. The solution is to replace
X with Y whenever X gets resurrected like this.
llvm-svn: 47601
2008-02-26 11:21:42 +00:00
Bill Wendling
7bb51dfbb1
De-tabify.
...
llvm-svn: 47598
2008-02-26 10:51:52 +00:00
Evan Cheng
2ff0b0e681
This is possible:
...
vr1 = extract_subreg vr2, 3
...
vr3 = extract_subreg vr1, 2
The end result is vr3 is equal to vr2 with subidx 2.
llvm-svn: 47592
2008-02-26 08:03:41 +00:00
Chris Lattner
e7c14013f5
Fix isNegatibleForFree to not return true for ConstantFP nodes
...
after legalize. Just because a constant is legal (e.g. 0.0 in SSE)
doesn't mean that its negated value is legal (-0.0). We could make
this stronger by checking to see if the negated constant is actually
legal post negation, but it doesn't seem like a big deal.
llvm-svn: 47591
2008-02-26 07:04:54 +00:00
Evan Cheng
ccc0c996a4
Refactor inline asm constraint matching code out of SDIsel into TargetLowering.
...
llvm-svn: 47587
2008-02-26 02:33:44 +00:00
Dan Gohman
432e4a6742
Make some static variables const.
...
llvm-svn: 47566
2008-02-25 21:39:34 +00:00
Dan Gohman
1f372edd97
Convert MaskedValueIsZero and all its users to use APInt. Also add
...
a SignBitIsZero function to simplify a common use case.
llvm-svn: 47561
2008-02-25 21:11:39 +00:00
Evan Cheng
548677022c
All remat'ed loads cannot be folded into two-address code. Not just argument loads. This change doesn't really have any impact on codegen.
...
llvm-svn: 47557
2008-02-25 19:24:01 +00:00
Duncan Sands
896c519d19
In debug builds check that the key property holds: all
...
result and operand types are legal.
llvm-svn: 47546
2008-02-25 16:21:21 +00:00
Evan Cheng
589a9fb6dc
Correctly determine whether a argument load can be folded into its uses.
...
llvm-svn: 47545
2008-02-25 08:50:41 +00:00
Duncan Sands
ba3d7e8e7d
Add support to LegalizeTypes for building legal vectors
...
out of illegal elements (BUILD_VECTOR). Uses and beefs
up BUILD_PAIR, though it didn't really have to. Like
most of LegalizeTypes, does not support soft-float.
This cures all "make check" vector building failures.
llvm-svn: 47537
2008-02-24 07:36:03 +00:00
Bill Wendling
a7d1ed4c98
Some platforms use the same name for 32-bit and 64-bit registers (like
...
%r3 on PPC) in their ASM files. However, it's hard for humans to read
during debugging. Adding a new field to the register data that lets you
specify a different name to be printed than the one that goes into the
ASM file -- %x3 instead of %r3, for instance.
llvm-svn: 47534
2008-02-24 00:56:13 +00:00
Evan Cheng
504c645b3e
Rematerialization logic was overly conservative when it comes to loads from fixed stack slots.
...
llvm-svn: 47529
2008-02-23 03:38:34 +00:00
Evan Cheng
379682b0e5
If remating a machine instr with virtual register operand, make sure the vr is avaliable at all uses regardless of whether it would be folded.
...
llvm-svn: 47526
2008-02-23 02:14:42 +00:00
Evan Cheng
e70afb021b
Recognize loads of arguments as re-materializable first. Therefore if isReallyTriviallyReMaterializable() returns true it doesn't confuse it as a "normal" re-materializable instruction.
...
llvm-svn: 47520
2008-02-23 01:44:27 +00:00
Evan Cheng
4f5cb4cdac
Fix spill weight updating bug.
...
llvm-svn: 47507
2008-02-23 00:33:04 +00:00
Evan Cheng
b6d981bddd
Same isPhysRegAvailable bug as local register allocator.
...
llvm-svn: 47500
2008-02-22 20:31:32 +00:00
Evan Cheng
52c15b3e6d
Really really bad local register allocator bug. On X86, it was never using ESI, EDI, and EBP because of a bug in RALocal::isPhysRegAvailable(). For example, when
...
it checks if ESI is available, it then looks at registers aliases to ESI. SIL is marked -2 (not allocatable) but isPhysRegAvailable() incorrectly assumes it is in use and returns false for ESI.
llvm-svn: 47499
2008-02-22 20:30:53 +00:00
Evan Cheng
a1977d32f0
Add debugging printfs.
...
llvm-svn: 47496
2008-02-22 19:57:06 +00:00
Evan Cheng
ea1ef87ea2
Make sure reload of implicit uses are issued before remat's.
...
llvm-svn: 47492
2008-02-22 19:22:06 +00:00
Dale Johannesen
eabc5f39af
Pass alignment on ByVal parameters, from FE, all
...
the way through. It is now used for codegen.
llvm-svn: 47484
2008-02-22 17:49:45 +00:00
Evan Cheng
c373911461
Enable re-materialization of instructions which have virtual register operands if
...
the definition of the operand also reaches its uses.
llvm-svn: 47475
2008-02-22 09:24:50 +00:00
Evan Cheng
271aef2b03
Fix compiler warning.
...
llvm-svn: 47468
2008-02-22 01:48:00 +00:00
Dan Gohman
f3057a939d
Fix a regression in 403.gcc and 186.crafty introduced in 47383. To test
...
that a value is >= 32, check that all of the high bits are zero, not
just one or more.
llvm-svn: 47467
2008-02-22 01:12:31 +00:00
Chris Lattner
3422b673d1
Make the clobber analysis a bit more smart: we only are careful about
...
early clobbers if the clobber list contains a *register* not some thing
like {memory}, {dirflag} etc.
llvm-svn: 47457
2008-02-21 20:54:31 +00:00
Chris Lattner
bdd4c8b04d
Treat clobber operands like early clobbers: if we have
...
any, we force sdisel to do all regalloc for an asm. This
leads to gross but correct codegen.
This fixes the rest of PR2078.
llvm-svn: 47454
2008-02-21 19:43:13 +00:00
Bill Wendling
15526b2e52
Clear PhysRegPartUse for the sub register as well.
...
llvm-svn: 47453
2008-02-21 19:35:27 +00:00
Bill Wendling
963192f40b
Adjust the MaxAlignment for the special register scavenging spill slot.
...
llvm-svn: 47452
2008-02-21 19:33:53 +00:00
Evan Cheng
31160f5b98
Help testing.
...
llvm-svn: 47448
2008-02-21 19:20:21 +00:00
Andrew Lenharth
7254826c40
Better names as per Evan's request
...
llvm-svn: 47435
2008-02-21 16:11:38 +00:00
Andrew Lenharth
95528943e9
Atomic op support. If any gcc test uses __sync builtins, it might start failing on archs that haven't implemented them yet
...
llvm-svn: 47430
2008-02-21 06:45:13 +00:00
Chris Lattner
4da4f85090
Add support for matching mem operands. This fixes PR1133, patch by
...
Eli Friedman. This implements CodeGen/Generic/2008-02-20-MatchingMem.ll.
llvm-svn: 47428
2008-02-21 05:27:19 +00:00
Chris Lattner
83c93d5afd
Fix a (harmless) but where vregs were added to the used reg lists for
...
inline asms.
Fix PR2078 by marking aliases of registers used when a register is
marked used. This prevents EAX from being allocated when AX is listed
in the clobber set for the asm.
llvm-svn: 47426
2008-02-21 04:55:52 +00:00
Evan Cheng
911f6bd799
Clean up some spilling code using MachineRegisterInfo.
...
llvm-svn: 47416
2008-02-21 00:34:19 +00:00
Bill Wendling
eac9e5ef21
Remove one of the fixmes that I put in there. From Evan:
...
No need to go up more levels. A def of a register also sets its sub-registers
(so if PhysRegInfo[SuperReg] is NULL, it means SuperReg's super registers are
not previously defined).
llvm-svn: 47399
2008-02-20 20:56:45 +00:00
Bill Wendling
cf2d1aa485
Improve some comments explaining the "handle kills" stuff better.
...
llvm-svn: 47395
2008-02-20 19:35:34 +00:00
Bill Wendling
0b72219681
Fix comment.
...
llvm-svn: 47389
2008-02-20 19:09:14 +00:00
Devang Patel
57b4eedad9
assert is more effective reminder then FIXME tag for unimplemented features.
...
llvm-svn: 47388
2008-02-20 18:37:40 +00:00
Duncan Sands
e7b462b329
LegalizeTypes support for scalarizing a vector store
...
and splitting extract_subvector. This fixes nine
"make check" testcases, for example
2008-02-04-ExtractSubvector.ll and (partially)
CodeGen/Generic/vector.ll.
llvm-svn: 47384
2008-02-20 17:38:09 +00:00
Dan Gohman
34fc7dbf5b
Convert Legalize to use the APInt form of ComputeMaskedBits.
...
llvm-svn: 47383
2008-02-20 16:57:27 +00:00
Dan Gohman
360c86aed5
Add explicit keywords.
...
llvm-svn: 47382
2008-02-20 16:44:09 +00:00
Dan Gohman
d0ff91dac5
Convert DAGCombiner to use the APInt form of ComputeMaskedBits.
...
llvm-svn: 47381
2008-02-20 16:33:30 +00:00
Dan Gohman
b717fdaa7b
Use APInt::intersects.
...
llvm-svn: 47380
2008-02-20 16:30:17 +00:00
Anton Korobeynikov
18991d78fa
Fix newly-introduced 4.3 warnings
...
llvm-svn: 47375
2008-02-20 12:07:57 +00:00
Anton Korobeynikov
035eaacd1f
Update gcc 4.3 warnings fix patch with recent head changes
...
llvm-svn: 47368
2008-02-20 11:10:28 +00:00
Anton Korobeynikov
579f07135a
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Bill Wendling
b912351ec9
Added some comments and reformatted others. No functionality change.
...
Added two "FIXMEs" for code that looks dubious to me (but I could be
wrong).
llvm-svn: 47366
2008-02-20 09:15:16 +00:00