Commit Graph

107319 Commits

Author SHA1 Message Date
Benjamin Kramer 8a9cc4fe28 Remove dead variables.
llvm-svn: 133346
2011-06-18 10:34:07 +00:00
Benjamin Kramer dd19c0114d 80 cols.
llvm-svn: 133345
2011-06-18 10:34:00 +00:00
Hans Wennborg 4ab4a8e63a Fix PR10103: Less code for enum type translation.
In cases such as the attached test, where the case value for a switch
destination is used in a phi node that follows the destination, it
might be better to replace that value with the condition value of the
switch, so that more blocks can be folded away with
TryToSimplifyUncondBranchFromEmptyBlock because there are less
conflicts in the phi node.

llvm-svn: 133344
2011-06-18 10:28:47 +00:00
Chandler Carruth 54a2c06cf2 Remove more unnecessary dependencies now that the Frontend -> ARCMigrate
edge has been broken.

llvm-svn: 133343
2011-06-18 09:07:35 +00:00
NAKAMURA Takumi 16484a6bc8 tools/arcmt-test: Don't attempt to link redundant libclang (clang-c).
llvm-svn: 133342
2011-06-18 08:52:27 +00:00
John McCall 9cc574d538 Clarify the semantics of init methods, and point out a few places
where mismatched semantics can cause undefined behavior.

llvm-svn: 133341
2011-06-18 08:15:19 +00:00
John McCall f8d4799267 A couple of minor changes to the ARC spec, plus a new section
specifying that retain/release/autorelease/retainCount are forbidden,
plus a section talking about the behavior of dealloc.

llvm-svn: 133340
2011-06-18 07:31:30 +00:00
Nick Lewycky 4c94631505 Add test for r133251.
llvm-svn: 133339
2011-06-18 07:23:25 +00:00
Cameron Zwarich 9601ddb2f3 When scalar replacement returns a vector type, only accept it if the vector
type's bitwidth matches the (allocated) size of the alloca. This severely
pessimizes vector scalar replacement when the only vector type being used is
something like <3 x float> on x86 or ARM whose allocated size matches a
<4 x float>.

I hope to fix some of the flawed assumptions about allocated size throughout
scalar replacement and reenable this in most cases.

llvm-svn: 133338
2011-06-18 06:17:51 +00:00
Chris Lattner 80ed9dc9e5 rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is
for pre-2.9 bitcode files.  We keep x86 unaligned loads, movnt, crc32, and the
target indep prefetch change.

As usual, updating the testsuite is a PITA.

llvm-svn: 133337
2011-06-18 06:05:24 +00:00
Cameron Zwarich 2a26100c87 Fix an invalid bitcast crash that occurs when doing a partial memset of a vector
alloca. Fixes part of <rdar://problem/9580800>.

llvm-svn: 133336
2011-06-18 05:47:49 +00:00
Cameron Zwarich cd42038fdc Remove a pointless assignment. Nothing checks the value of VectorTy anymore now
unless ScalarKind is Vector.

llvm-svn: 133335
2011-06-18 05:47:45 +00:00
Jakob Stoklund Olesen afef422265 Use the correct comparator to avoid depending on pointer values.
This should fix the Linux buildbots.

llvm-svn: 133334
2011-06-18 05:44:55 +00:00
Jakob Stoklund Olesen 8e188be035 Store CodeGenRegisters as pointers so they won't be reallocated.
Reuse the CodeGenRegBank DenseMap in a few places that would build their
own or use linear search.

llvm-svn: 133333
2011-06-18 04:26:06 +00:00
Jakob Stoklund Olesen d53674aaf1 Remove MethodProtos/MethodBodies and allocation_order_begin/end.
Targets that need to change the default allocation order should use the
AltOrders mechanism instead. See the X86 and ARM targets for examples.

The allocation_order_begin() and allocation_order_end() methods have been
replaced with getRawAllocationOrder(), and there is further support
functions in RegisterClassInfo.

It is no longer possible to insert arbitrary code into generated
register classes. This is a feature.

llvm-svn: 133332
2011-06-18 03:08:20 +00:00
Jakob Stoklund Olesen b68fee1e82 Delete unneeded allocation order override.
llvm-svn: 133331
2011-06-18 02:30:02 +00:00
Chandler Carruth 53e61b05ce Accept no-return stripping conversions for pointer type arguments after
deducing template parameter types. Recently Clang began enforcing the
more strict checking that the argument type and the deduced function
parameter type (after substitution) match, but that only consideres
qualification conversions.

One problem with this patch is that we check noreturn conversions and
qualification conversions independently. If a valid conversion would
require *both*, perhaps interleaved with each other, it will be
rejected. If this actually occurs (I'm not yet sure it does) and is in
fact a problem (I'm not yet sure it is), there is a FIXME to implement
more intelligent conversion checking.

However, this step at least allows Clang to resume accepting valid code
we're seeing in the wild.

llvm-svn: 133327
2011-06-18 01:19:03 +00:00
Jakob Stoklund Olesen 831ae0105a Switch ARM to using AltOrders instead of MethodBodies.
This slightly changes the GPR allocation order on Darwin where R9 is not
a callee-saved register:

Before: %R0 %R1 %R2 %R3 %R12 %R9 %LR %R4 %R5 %R6 %R8 %R10 %R11
After:  %R0 %R1 %R2 %R3 %R9 %R12 %LR %R4 %R5 %R6 %R8 %R10 %R11
llvm-svn: 133326
2011-06-18 01:14:46 +00:00
Jakob Stoklund Olesen 3337f7d50a Switch x86 to using AltOrders instead of MethodBodies.
llvm-svn: 133325
2011-06-18 01:14:43 +00:00
Galina Kistanova 197ea52d4b Moved to the right place.
llvm-svn: 133324
2011-06-18 00:59:37 +00:00
Argyrios Kyrtzidis 90b6a2a6a7 [arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager
because it is going to modify the input file.

llvm-svn: 133323
2011-06-18 00:53:41 +00:00
Argyrios Kyrtzidis 0f3f9f78f8 [arcmt] Const'ify.
llvm-svn: 133322
2011-06-18 00:53:34 +00:00
Jakob Stoklund Olesen 19d968e62f Reserve D16-D13 on subtargets that don't support them.
llvm-svn: 133321
2011-06-18 00:53:27 +00:00
Jakob Stoklund Olesen 35cea3da35 Provide AltOrders for specifying alternative allocation orders.
A register class can define AltOrders and AltOrderSelect instead of
defining method protos and bodies. The AltOrders lists can be defined
with set operations, and TableGen can verify that the alternative
allocation orders only contain valid registers.

This is currently an opt-in feature, and it is still possible to
override allocation_order_begin/end. That will not be true for long.

llvm-svn: 133320
2011-06-18 00:50:49 +00:00
Bill Wendling 098321c145 * Override the "EmitBytes" function, since it can sneak values in that way.
* Make this used only if CFI is used.

llvm-svn: 133319
2011-06-18 00:19:35 +00:00
Eric Christopher e4a1266a9a Fix UMULO support for 2x register width to allow the full
range without a libcall to a new mulo<mode> libcall
that we'd have to create.

Finishes the rest of rdar://9090077 and rdar://9210061

llvm-svn: 133318
2011-06-18 00:09:57 +00:00
Greg Clayton 4e4294bdee Added a new format for displaying an array of characters: eFormatCharArray
This us useful because sometomes you have to show a single character as: 'a'
(using eFormatChar) and other times you might have an array of single 
charcters for display as: 'a' 'b' 'c', and other times you might want to 
show the contents of buffer of characters that can contain non printable
chars: "\0\x22\n123". 

This also fixes an issue that currently happens when you have a single character
C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output
as "'a'" incorrectly due to the way the eFormatChar format output worked.

llvm-svn: 133316
2011-06-17 23:50:44 +00:00
Argyrios Kyrtzidis 1240f4e53a [arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we hoped it would be.
llvm-svn: 133315
2011-06-17 23:49:31 +00:00
Bill Wendling 804e6d191b Remove false assertion.
llvm-svn: 133314
2011-06-17 23:42:01 +00:00
Jakob Stoklund Olesen becf3d3f29 Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.
llvm-svn: 133313
2011-06-17 23:26:52 +00:00
Argyrios Kyrtzidis 95a76f3715 Fix regression with @encode string. rdar://9624314.
llvm-svn: 133312
2011-06-17 23:19:38 +00:00
Eric Christopher 00758b08ae Missed a rename here 4 args instead of 3.
llvm-svn: 133311
2011-06-17 23:19:18 +00:00
Jakob Stoklund Olesen d3fec5edc1 Zap the last reference to allocation_order_begin().
llvm-svn: 133310
2011-06-17 23:17:13 +00:00
Douglas Gregor d7357a9b8e Objective-C++ ARC: eliminate the utterly unjustified loophole that
silently dropped ownership qualifiers that were being applied to
ownership-qualified, substituted type that was *not* a substituted
template type parameter. We now provide a diagnostic in such cases,
and recover by dropping the added qualifiers.

Document this behavior in the ARC specification.

llvm-svn: 133309
2011-06-17 23:16:24 +00:00
Jakob Stoklund Olesen 157e6a79a1 SI, DI, BP, and SP don't have 8-bit sub-registers in x86 mode.
llvm-svn: 133308
2011-06-17 23:15:00 +00:00
Eric Christopher 232431c389 Fix comment.
llvm-svn: 133307
2011-06-17 22:35:59 +00:00
Douglas Gregor b5176a5328 Objective-C++ ARC: do not mangle __unsafe_unretained lifetime
qualifiers, so that an __unsafe_unretained-qualified type T in ARC code
will have the same mangling as T in non-ARC code, improving ABI
interoperability. This works now because we infer or require a
lifetime qualifier everywhere one can appear in an external
interface. Another part of <rdar://problem/9595486>.

llvm-svn: 133306
2011-06-17 22:26:49 +00:00
Matt Beaumont-Gay c3dfb5fa89 Fix -Asserts build
llvm-svn: 133305
2011-06-17 22:21:12 +00:00
Douglas Gregor 4fdf57b0b2 Fix a grammaro
llvm-svn: 133304
2011-06-17 22:19:27 +00:00
Douglas Gregor e46db90c9a Objective-ARC++: infer template type arguments of
ownership-unqualified retainable object type as __strong. This allows
us to write, e.g.,

  std::vector<id>

and we'll infer that the vector's element types have __strong
ownership semantics, which is far nicer than requiring:

  std::vector<__strong id>

Note that we allow one to override the ownership qualifier of a
substituted template type parameter, e.g., given

  template<typename T>
  struct X {
    typedef __weak T type;
  };

X<id> is treated the same as X<__strong id>. At instantiation type,
the __weak in "__weak T" overrides the (inferred or specified)
__strong on the template argument type, so that we can still provide
metaprogramming transformations.

This is part of <rdar://problem/9595486>.

llvm-svn: 133303
2011-06-17 22:11:49 +00:00
Greg Clayton c662ec8bd3 Fixed variable parsing to not parse block variables over and over due to an
issue in the way block variables are marked as parsed. In the DWARF parser we
always parse all blocks for a function at once, so we can mark all blocks as
having all variables parsed and avoid recursive function calls to try and
reparse things that have already been handled.

Fixed an issue with how variables get scoped into blocks. The DWARF parser can
now handle abtract class definitions that contain concrete static variables.
When the concrete instance of the class functions get instantiated, they will
track down the concrete block for the abtract block and add the variable to
each block.

llvm-svn: 133302
2011-06-17 22:10:16 +00:00
Chad Rosier c76b9d8c2f Revert r133285. Causing odd failures on Dragonegg.
llvm-svn: 133301
2011-06-17 22:08:25 +00:00
John McCall 0c07bee8bd Only accept __bridge_retain in system headers, as Doug suggested.
llvm-svn: 133300
2011-06-17 21:56:12 +00:00
Bill Wendling 03cb993560 Disable for another investigation.
llvm-svn: 133299
2011-06-17 21:44:15 +00:00
Devang Patel 6f7315b0ca Set debug loc for new preheader's terminator.
llvm-svn: 133298
2011-06-17 21:36:44 +00:00
Bill Wendling 23de6d07c4 Support only DwarfCFI or SjLj exception handling in LSDA decoder.
llvm-svn: 133297
2011-06-17 21:31:43 +00:00
Bill Wendling 590adcbcbf SjLj exception handling LSDA decoding support wasn't represented correctly. Use
the correct values, etc. In particular, the exception handling type is SjLj, not
ARM.

llvm-svn: 133296
2011-06-17 21:29:06 +00:00
John McCall 0c32925aa0 As a hopefully temporary workaround for a header mistake, treat
__bridge_retain as a synonym for __bridge_retained.

llvm-svn: 133295
2011-06-17 21:23:37 +00:00
Johnny Chen f733f7d730 Test case test_connect_remote() has been passing consistently for some times.
Let's remove the @expectedFailure marker from it.

llvm-svn: 133294
2011-06-17 21:17:56 +00:00
Bill Wendling cc648ad092 Disable to investigate ARM failure.
llvm-svn: 133293
2011-06-17 21:09:50 +00:00