Commit Graph

105203 Commits

Author SHA1 Message Date
Nick Lewycky 85c011ddc4 Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.

llvm-svn: 130899
2011-05-05 00:08:20 +00:00
Alexis Hunt e262299b72 Change cycle detection to be based off of a warning flag.
llvm-svn: 130898
2011-05-05 00:05:47 +00:00
Nick Lewycky a3d5d167a8 When the path wasn't emitted by the frontend, discard any path on the source
filename.

llvm-svn: 130897
2011-05-05 00:03:30 +00:00
Jakob Stoklund Olesen 1d3854d583 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 ffb798c1c6 Set debug loc for new instructions.
llvm-svn: 130895
2011-05-04 23:58:50 +00:00
Devang Patel ac794d46bf 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 17d4f9bbcc Prepare remaining tests for -join-physreg going away.
llvm-svn: 130893
2011-05-04 23:54:59 +00:00
Jakob Stoklund Olesen 808dca12f8 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 369bddf5ad 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
Douglas Gregor d4a8cede47 When adding KVC code completions, keep track of all of the selectors
that we've previously seen, both in declared methods and from previous
KVC completions, to eliminate duplicates. Fixes <rdar://problem/9162207>.

llvm-svn: 130890
2011-05-04 23:50:46 +00:00
Bill Wendling 260c4a9466 Document the automatic alias printing of InstAliases.
llvm-svn: 130889
2011-05-04 23:40:14 +00:00
Alexis Hunt 27a761d5bd there i fixed it
Increase robustness of the delegating constructor cycle detection
mechanism. No more infinite loops on invalid or logic errors leading to
false results. Ensure that this is maintained correctly accross
serialization.

llvm-svn: 130887
2011-05-04 23:29:54 +00:00
Ted Kremenek 2159b8d246 ASTUnit::LoadFromASTFile(): recover the resources from an ASTReader if it crashes during PCH validation.
llvm-svn: 130886
2011-05-04 23:27:12 +00:00
Ted Kremenek 37d44bdd92 Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
llvm-svn: 130885
2011-05-04 23:26:59 +00:00
Dan Gohman dd550305e6 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
Douglas Gregor dfd4b74131 Clean up Sema::BuildCXXNestedNameSpecifier()'s creation of TypeLoc
information. Rather than looking at the declaration kind to figure out
what TypeLoc to build, look at the type; it makes so much more
sense. Fixes <rdar://problem/9086649>.

llvm-svn: 130882
2011-05-04 23:05:40 +00:00
Bill Wendling 2a40131f6b 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 306f8db721 Preserve line number information while threading jumps.
llvm-svn: 130880
2011-05-04 22:48:19 +00:00
Nick Lewycky 892e9934ba 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
Matt Beaumont-Gay 3c27391a90 Implement Sema::isExprCallable.
We can use this to produce nice diagnostics (and try to fixit-and-recover) in
various cases where we might see "MyFunction" instead of "MyFunction()". The
changes in SemaExpr are an example of how to use isExprCallable.

llvm-svn: 130878
2011-05-04 22:10:40 +00:00
Eli Friedman 0fe4608af2 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 c7e4fa7c19 Preserve line number info.
llvm-svn: 130876
2011-05-04 21:58:58 +00:00
Galina Kistanova e53ae508ec 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 1fb95c996b 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
Douglas Gregor b4f4d512ad When converting an integral template argument value to a non-type
template parameter of type 'bool', force the value to be zero or
one. Fixes <rdar://problem/9169404>.

llvm-svn: 130873
2011-05-04 21:55:00 +00:00
Nick Kledzik de214e29df <rdar://problem/9014045> more support for Apple internal build environments
llvm-svn: 130872
2011-05-04 21:50:46 +00:00
Caroline Tice 0de8d4503b Add ability to search backwards through command
history for a particular substring, using ctrl-r key.

llvm-svn: 130871
2011-05-04 21:39:02 +00:00
Bill Wendling f7d4598b74 Pack ivar offsets together.
Ivar offsets for synthesized ivars are wrong, which could end up with a large
number of dirty pages because of ivar fixups at runtime. When we pack all of the
synthesized ivars into the same section, it limits the number of dirty pages
created. Place them in the "__DATA,__objc_ivar" section.
<rdar://problem/9374905>

llvm-svn: 130870
2011-05-04 21:37:25 +00:00
Devang Patel 0daa07eb90 preserve line number info.
llvm-svn: 130869
2011-05-04 21:37:05 +00:00
Eli Friedman 3bd79ba856 Back out r130862; it appears to be breaking bootstrap.
llvm-svn: 130867
2011-05-04 20:48:42 +00:00
Nick Lewycky 480cb9918d Record where the GCOV data files should be placed.
llvm-svn: 130866
2011-05-04 20:46:58 +00:00
Johnny Chen 63cc1de58d Use '-f c' to print each element of a string as a char.
llvm-svn: 130865
2011-05-04 20:38:01 +00:00
Bill Wendling 6869b6abf8 Simplification noticed by Chris.
llvm-svn: 130864
2011-05-04 20:28:12 +00:00
Eli Friedman a16fc2fec0 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
Daniel Dunbar 7e0058626a tests: Tweak test to at least use a standard arch, to ensure we try to invoke
Clang.

llvm-svn: 130861
2011-05-04 19:52:08 +00:00
Duncan Sands 9aa54fef84 Remove an unused variable.
llvm-svn: 130860
2011-05-04 19:13:01 +00:00
Jakob Stoklund Olesen 28a93a49bb Fix more register and coalescing dependencies.
llvm-svn: 130859
2011-05-04 19:02:11 +00:00
Jakob Stoklund Olesen d7fd7bfc31 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 093a94cdae Implement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.
llvm-svn: 130857
2011-05-04 19:02:04 +00:00
Jakob Stoklund Olesen e7528c45ea FileCheckize and break dependence on coalescing order.
llvm-svn: 130856
2011-05-04 19:02:01 +00:00
Jakob Stoklund Olesen 067ba3c23c Explicitly request -join-physregs for some tests that depend on it.
llvm-svn: 130855
2011-05-04 19:01:59 +00:00
Devang Patel 39ecf816c5 Do not emit location expression size twice.
llvm-svn: 130854
2011-05-04 19:00:57 +00:00
Fariborz Jahanian 9d82fea378 And a test case for my last patch.
llvm-svn: 130853
2011-05-04 18:58:27 +00:00
Fariborz Jahanian 84335f7c8e More ms_struct bitfield stuff:
Adjacent bit fields are packed into the same 1-, 2-, or
4-byte allocation unit if the integral types are the same
size. // rdar://8823265.

llvm-svn: 130851
2011-05-04 18:51:37 +00:00
Rafael Espindola 2998e6ce46 Fix cmake build.
llvm-svn: 130850
2011-05-04 18:46:56 +00:00
Akira Hatanaka 3bace5d223 Remove LLVM IR metadata in test case committed in r130847.
llvm-svn: 130849
2011-05-04 18:28:36 +00:00
Johnny Chen ca5942ffe3 Forgot to check in this change with r130811.
llvm-svn: 130848
2011-05-04 18:01:44 +00:00
Akira Hatanaka 23e8ecf125 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 a75589171a 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 f71fe4333b 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