1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

71944 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
357867ae35 Disable physical register coalescing by default.
Joining physregs is inherently dangerous because it uses a heuristic to avoid
creating invalid code. Linear scan had an emergency spilling mechanism to deal
with those rare cases. The new greedy allocator does not.

The greedy register allocator is much better at taking hints, so this has almost
no impact on code size and quality. The few cases where it matters show up as
unit tests that now have -join-physregs enabled explicitly.

llvm-svn: 130896
2011-05-04 23:59:00 +00:00
Devang Patel
9faa957c2a Set debug loc for new instructions.
llvm-svn: 130895
2011-05-04 23:58:50 +00:00
Devang Patel
236dc68956 Set debug location for new PHI nodes created in exit block.
llvm-svn: 130894
2011-05-04 23:58:22 +00:00
Jakob Stoklund Olesen
f27731bf40 Prepare remaining tests for -join-physreg going away.
llvm-svn: 130893
2011-05-04 23:54:59 +00:00
Jakob Stoklund Olesen
da250b29e2 Fix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.
It is OK for B to be any GR8_ABCD_H superclass, the returned register class
doesn't have to map surjectively onto B.

llvm-svn: 130892
2011-05-04 23:54:54 +00:00
Jakob Stoklund Olesen
e964058440 Fix a batch of x86 tests to be coalescer independent.
Most of these tests require a single mov instruction that can come either before
or after a 2-addr instruction. -join-physregs changes the behavior, but the
results are equivalent.

llvm-svn: 130891
2011-05-04 23:54:51 +00:00
Bill Wendling
08ab6e7d9c Document the automatic alias printing of InstAliases.
llvm-svn: 130889
2011-05-04 23:40:14 +00:00
Ted Kremenek
be5353a070 Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
llvm-svn: 130885
2011-05-04 23:26:59 +00:00
Dan Gohman
62dbd536c0 Give this test an explicit register allocator, so that it can work even if
the default register allocator is changed.

llvm-svn: 130883
2011-05-04 23:14:02 +00:00
Bill Wendling
279e17e523 SjLj EH could produce a machine basic block that legitimately has more than one
landing pad as its successor.

SjLj exception handling jumps to the correct landing pad via a switch statement
that's generated right before code-gen. Loosen the constraint in the machine
instruction verifier to allow for this. Note, this isn't the most rigorous check
since we cannot determine where that switch statement came from. But it's
marginally better than turning this check off when SjLj exceptions are used.
<rdar://problem/9187612>

llvm-svn: 130881
2011-05-04 22:54:05 +00:00
Devang Patel
7774df3aa6 Preserve line number information while threading jumps.
llvm-svn: 130880
2011-05-04 22:48:19 +00:00
Nick Lewycky
e3e47cc4d8 Create the parent directories to place the .gcda files in if they don't exist.
That's kinda weird because the .gcno files are supposed to already be there,
but libgcov does this and somehow Google has managed to depend on it.

llvm-svn: 130879
2011-05-04 22:34:29 +00:00
Eli Friedman
5b78092546 Re-commit r130862 with a minor change to avoid an iterator running off the edge in some cases.
Original message:

Teach MachineCSE how to do simple cross-block CSE involving physregs.  This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .

llvm-svn: 130877
2011-05-04 22:10:36 +00:00
Devang Patel
86e9457cfb Preserve line number info.
llvm-svn: 130876
2011-05-04 21:58:58 +00:00
Galina Kistanova
3b29721cf4 This test fails on ARM. The test shouldn't explicitly specify alignment (and alignment 4 is wrong) and requires hard-float.
llvm-svn: 130875
2011-05-04 21:57:44 +00:00
Devang Patel
7f23f2aba6 If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.
llvm-svn: 130874
2011-05-04 21:57:22 +00:00
Devang Patel
e077bd8a58 preserve line number info.
llvm-svn: 130869
2011-05-04 21:37:05 +00:00
Eli Friedman
cc74616be6 Back out r130862; it appears to be breaking bootstrap.
llvm-svn: 130867
2011-05-04 20:48:42 +00:00
Eli Friedman
e086e00208 Teach MachineCSE how to do simple cross-block CSE involving physregs. This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .
llvm-svn: 130862
2011-05-04 19:54:24 +00:00
Duncan Sands
9a37d60dff Remove an unused variable.
llvm-svn: 130860
2011-05-04 19:13:01 +00:00
Jakob Stoklund Olesen
5ea6203ea6 Fix more register and coalescing dependencies.
llvm-svn: 130859
2011-05-04 19:02:11 +00:00
Jakob Stoklund Olesen
780e6d1f64 Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.
These tests all follow the same pattern:

	mov	r2, r0
	movs	r0, #0
	$CMP	r2, r1
	it	eq
	moveq	r0, #1
	bx	lr

The first 'mov' can be eliminated by rematerializing 'movs r0, #0' below the
test instruction:

	$CMP	r0, r1
	mov.w	r0, #0
	it	eq
	moveq	r0, #1
	bx	lr

So far, only physreg coalescing can do that. The register allocators won't yet
split live ranges just to eliminate copies. They can learn, but this particular
problem is not likely to show up in real code. It only appears because r0 is
used for both the function argument and return value.

llvm-svn: 130858
2011-05-04 19:02:07 +00:00
Jakob Stoklund Olesen
6eef723c97 Implement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.
llvm-svn: 130857
2011-05-04 19:02:04 +00:00
Jakob Stoklund Olesen
b85b71f4de FileCheckize and break dependence on coalescing order.
llvm-svn: 130856
2011-05-04 19:02:01 +00:00
Jakob Stoklund Olesen
8a075ce7ea Explicitly request -join-physregs for some tests that depend on it.
llvm-svn: 130855
2011-05-04 19:01:59 +00:00
Devang Patel
8823e24dde Do not emit location expression size twice.
llvm-svn: 130854
2011-05-04 19:00:57 +00:00
Rafael Espindola
9e59931156 Fix cmake build.
llvm-svn: 130850
2011-05-04 18:46:56 +00:00
Akira Hatanaka
8ab44cecb4 Remove LLVM IR metadata in test case committed in r130847.
llvm-svn: 130849
2011-05-04 18:28:36 +00:00
Akira Hatanaka
e9a2d2a78f Prevent instructions using $gp from being placed between a jalr and the instruction that restores the clobbered $gp.
llvm-svn: 130847
2011-05-04 17:54:27 +00:00
Rafael Espindola
8346c59e6a Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.

While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.

llvm-svn: 130846
2011-05-04 17:44:06 +00:00
Jakob Stoklund Olesen
372f33d560 Rename -disable-physical-join to -join-physregs and invert it.
Physreg joining is still on by default, but I will turn it off shortly.

llvm-svn: 130844
2011-05-04 16:45:05 +00:00
Devang Patel
a6e69a5541 Tighten up check for empty (i.e. no meaningful debug info) module. This fixes dwarf-die2.c test case from gcc test suite.
llvm-svn: 130842
2011-05-04 16:34:02 +00:00
Duncan Sands
586612a764 Add variations on: max(x,y) >= min(x,z) folds to true. This isn't that common,
but according to my super-optimizer there are only two missed simplifications
of -instsimplify kind when compiling bzip2, and this is one of them.  It amuses
me to have bzip2 be perfectly optimized as far as instsimplify goes!

llvm-svn: 130840
2011-05-04 16:05:05 +00:00
Nick Lewycky
a3eaa327d9 Emit gcov data files to the directory specified in the metadata produced by the
frontend, if applicable.

llvm-svn: 130835
2011-05-04 04:03:04 +00:00
Nick Lewycky
75424d52d7 Fix crash when not setting GCOV_PREFIX.
llvm-svn: 130834
2011-05-04 03:58:45 +00:00
Bill Wendling
8495856e95 Remove dead intrinsics.
llvm-svn: 130831
2011-05-04 02:40:54 +00:00
Andrew Trick
db8b89e46b indvars: Added DisableIVRewrite and WidenIVs.
This adds functionality to remove size/zero extension during indvars
without generating a canonical IV and rewriting all IV users. It's
disabled by default so should have no effect on codegen. Work in progress.

llvm-svn: 130829
2011-05-04 02:10:13 +00:00
Nick Lewycky
90307d5608 The system suppression file should catch these, but since they *once again* are
not, I'll just add them here and be done with it.

llvm-svn: 130819
2011-05-04 01:03:02 +00:00
Jakob Stoklund Olesen
4d020cd8e5 Don't depend on the physreg coalescing order.
llvm-svn: 130818
2011-05-04 01:01:47 +00:00
Jakob Stoklund Olesen
307c86d1ee Don't run this test through -regalloc=basic.
The basic allocator is really bad about hinting, so it doesn't eliminate all
copies when physreg joining is disabled.

llvm-svn: 130817
2011-05-04 01:01:44 +00:00
Jakob Stoklund Olesen
20af0b593b Fix register-dependent XCore tests
llvm-svn: 130816
2011-05-04 01:01:41 +00:00
Jakob Stoklund Olesen
55e2c5ec6e Fix register-dependent test in MSP430.
llvm-svn: 130815
2011-05-04 01:01:39 +00:00
Jakob Stoklund Olesen
9703690633 Implement MSP430RegisterInfo::getMatchingSuperRegClass to enable cross-class
coalescing.

llvm-svn: 130814
2011-05-04 01:01:36 +00:00
Eric Christopher
4f90f378ee Remove some random comments that snuck in from somewhere.
llvm-svn: 130812
2011-05-04 00:48:02 +00:00
Jakob Stoklund Olesen
da28d31f03 Mark ultra-super-registers QQQQ as call-clobbered instead of the D sub-registers.
LiveVariables doesn't understand that clobbering D0 and D1 completely overwrites
Q0, so if Q0 is live-in to a function, its live range will extend beyond a
function call that only clobbers D0 and D1. This shows up in the
ARM/2009-11-01-NeonMoves test case.

LiveVariables should probably implement the much stricter rules for physreg
liveness that RAFast imposes - a physreg is killed by the first use of any
alias.

llvm-svn: 130801
2011-05-03 22:31:24 +00:00
Jakob Stoklund Olesen
4755a27704 Fix a bunch of ARM tests to be register allocation independent.
llvm-svn: 130800
2011-05-03 22:31:21 +00:00
Andrew Trick
6196cc1640 indvars: Added canExpandBackEdgeTakenCount.
Only create a canonical IV for backedge taken count if it will
actually be used by LinearFunctionTestReplace. And some related
cleanup, preparing to reduce dependence on canonical IVs.
No significant effect on x86 or arm in the test-suite.

llvm-svn: 130799
2011-05-03 22:24:10 +00:00
Devang Patel
3506ad5c7f Even if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite.
llvm-svn: 130794
2011-05-03 21:50:34 +00:00
Daniel Dunbar
3cd9c46c3a MCDwarf: Don't save Twine to local variable, this is almost never safe to do
(and should thus never be done).
 - Should fix a crash on win32.

llvm-svn: 130793
2011-05-03 21:33:37 +00:00
Bill Wendling
67f5e8f0a7 Replace the "movnt" intrinsics with a native store + nontemporal metadata bit.
<rdar://problem/8460511>

llvm-svn: 130791
2011-05-03 21:11:17 +00:00