platform/upstream/llvm.git
11 years ago<rdar://problem/13509689> Introduce -module-file-info option that provides informatio...
Douglas Gregor [Wed, 27 Mar 2013 16:47:18 +0000 (16:47 +0000)]
<rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file.

This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.

llvm-svn: 178148

11 years agoCleanup the simplify_type implementation.
Rafael Espindola [Wed, 27 Mar 2013 16:43:11 +0000 (16:43 +0000)]
Cleanup the simplify_type implementation.

As far as simplify_type is concerned, there are 3 kinds of smart pointers:

* const correct: A 'const MyPtr<int> &' produces a 'const int*'. A
'MyPtr<int> &' produces a 'int *'.
* always const: Even a 'MyPtr<int> &' produces a 'const int*'.
* no const: Even a 'const MyPtr<int> &' produces a 'int*'.

This patch then does the following:

* Removes the unused specializations. Since they are unused, it is hard
to know which kind should be implemented.
* Make sure we don't drop const.
* Fix the default forwarding so that const correct pointer only need
one specialization.
* Simplifies the existing specializations.

llvm-svn: 178147

11 years agoAdd const in preparation for a simplify_type change in llvm.
Rafael Espindola [Wed, 27 Mar 2013 15:37:54 +0000 (15:37 +0000)]
Add const in preparation for a simplify_type change in llvm.

llvm-svn: 178146

11 years agoR600/SI: add SETO/SETUO patterns
Christian Konig [Wed, 27 Mar 2013 15:27:31 +0000 (15:27 +0000)]
R600/SI: add SETO/SETUO patterns

6 more piglit tests.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178145

11 years agoSilence warning about mixing || in &&, fix up 80-cols.
Benjamin Kramer [Wed, 27 Mar 2013 15:03:14 +0000 (15:03 +0000)]
Silence warning about mixing || in &&, fix up 80-cols.

llvm-svn: 178144

11 years agoAdd another expected note. Two errors => two notes.
Tim Northover [Wed, 27 Mar 2013 13:50:57 +0000 (13:50 +0000)]
Add another expected note. Two errors => two notes.

llvm-svn: 178143

11 years agoPrint PPC ZERO as 0 (not r0) even on Darwin
Hal Finkel [Wed, 27 Mar 2013 13:20:52 +0000 (13:20 +0000)]
Print PPC ZERO as 0 (not r0) even on Darwin

It seems that the Darwin PPC assembler requires r0 to be written as 0 when it
means 0 (at least in lwarx/stwcx.). Fixes PR15605.

llvm-svn: 178142

11 years agoSwitch to LLVM support function abs64 to keep VS2008 happy.
Tim Northover [Wed, 27 Mar 2013 13:15:08 +0000 (13:15 +0000)]
Switch to LLVM support function abs64 to keep VS2008 happy.

llvm-svn: 178141

11 years agoDisable ASan/MSan symbolization of reports in tests.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:11:46 +0000 (13:11 +0000)]
Disable ASan/MSan symbolization of reports in tests.

It was using an instrumented symbolizer binary, which is a potential fork bomb.

llvm-svn: 178140

11 years agoDisable ASan/MSan symbolization of reports in tests.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:11:12 +0000 (13:11 +0000)]
Disable ASan/MSan symbolization of reports in tests.

It was using an instrumented symbolizer binary, which is a potential fork bomb.

llvm-svn: 178139

11 years agoMark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:05:40 +0000 (13:05 +0000)]
Mark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.

llvm-svn: 178138

11 years agoFix target-customized spilling in the register scavenger
Hal Finkel [Wed, 27 Mar 2013 13:00:56 +0000 (13:00 +0000)]
Fix target-customized spilling in the register scavenger

This is a follow-up to r178073 (which should actually make target-customized
spilling work again).

I still don't have a regression test for this (but it would be good to have
one; Thumb 1 and Mips16 use this callback as well).

Patch by Richard Sandiford.

llvm-svn: 178137

11 years ago<rdar://problem/13317030> Consider using directives when performing unqualified name...
Douglas Gregor [Wed, 27 Mar 2013 12:51:49 +0000 (12:51 +0000)]
<rdar://problem/13317030> Consider using directives when performing unqualified name lookup into declarations contexts represented by the qualified-id but not in the actual scope hierarchy.

llvm-svn: 178136

11 years agoDisable Initialize.MultipleThreads test under MemorySanitizer.
Evgeniy Stepanov [Wed, 27 Mar 2013 12:50:49 +0000 (12:50 +0000)]
Disable Initialize.MultipleThreads test under MemorySanitizer.

Fails due to insufficient thread stack.

llvm-svn: 178135

11 years agoEnabling the generation of dependency breakers for partial updates on Cortex-A15...
Silviu Baranga [Wed, 27 Mar 2013 12:38:44 +0000 (12:38 +0000)]
Enabling the generation of dependency breakers for partial updates on Cortex-A15. Also fixing a small bug in getting the update clearence for VLD1LNd32.

llvm-svn: 178134

11 years agoSplit line comments
Alexander Kornienko [Wed, 27 Mar 2013 11:52:18 +0000 (11:52 +0000)]
Split line comments

Summary:
Split line comments that exceed column limit + fixed leading whitespace
handling when splitting block comments.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D577

llvm-svn: 178133

11 years agoHexagon: Disable optimizations at O0.
Jyotsna Verma [Wed, 27 Mar 2013 11:14:24 +0000 (11:14 +0000)]
Hexagon: Disable optimizations at O0.

llvm-svn: 178132

11 years ago[ASan] Demangle global names in error reports.
Alexey Samsonov [Wed, 27 Mar 2013 10:41:22 +0000 (10:41 +0000)]
[ASan] Demangle global names in error reports.

llvm-svn: 178131

11 years agoImprove performance of LinkModules when linking with modules with large numbers of...
James Molloy [Wed, 27 Mar 2013 10:23:32 +0000 (10:23 +0000)]
Improve performance of LinkModules when linking with modules with large numbers of functions which link lazily. Instead of creating and destroying function prototypes irrespective of if they are used, only create them if they are used.

llvm-svn: 178130

11 years ago[TSan] Fixup for r178128: verify that TSan indeed doesn't report race
Alexey Samsonov [Wed, 27 Mar 2013 10:22:51 +0000 (10:22 +0000)]
[TSan] Fixup for r178128: verify that TSan indeed doesn't report race

llvm-svn: 178129

11 years ago[TSan] Run test output through FileCheck
Alexey Samsonov [Wed, 27 Mar 2013 09:25:06 +0000 (09:25 +0000)]
[TSan] Run test output through FileCheck

llvm-svn: 178128

11 years agoR600/SI: add cummuting of rev instructions
Christian Konig [Wed, 27 Mar 2013 09:12:59 +0000 (09:12 +0000)]
R600/SI: add cummuting of rev instructions

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178127

11 years agoR600/SI: add mulhu/mulhs patterns
Christian Konig [Wed, 27 Mar 2013 09:12:51 +0000 (09:12 +0000)]
R600/SI: add mulhu/mulhs patterns

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178126

11 years agoR600/SI: add srl/sha patterns for SI
Christian Konig [Wed, 27 Mar 2013 09:12:44 +0000 (09:12 +0000)]
R600/SI: add srl/sha patterns for SI

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178125

11 years agoAllocate r0 on PPC
Hal Finkel [Wed, 27 Mar 2013 06:52:27 +0000 (06:52 +0000)]
Allocate r0 on PPC

The R0 register can now be allocated because instructions
that cannot use R0 as a GPR have been appropriately marked.

llvm-svn: 178123

11 years agoFix testcase to add expected note.
Bill Wendling [Wed, 27 Mar 2013 06:45:37 +0000 (06:45 +0000)]
Fix testcase to add expected note.

llvm-svn: 178122

11 years agoUse the PPC no-r0 class on the TOC LD pseudos
Hal Finkel [Wed, 27 Mar 2013 06:36:55 +0000 (06:36 +0000)]
Use the PPC no-r0 class on the TOC LD pseudos

The register parameter in these instructions becomes the base register in an
r+i ld instruction (and, thus, cannot be r0).

This is not yet testable because we don't yet allocate r0 (and even then any
test would be very fragile).

llvm-svn: 178121

11 years agoPass the diagnostic in for better error messages.
Bill Wendling [Wed, 27 Mar 2013 06:06:26 +0000 (06:06 +0000)]
Pass the diagnostic in for better error messages.

llvm-svn: 178120

11 years agoApply the no-r0 register class to the PPC SELECT_CC_I[4|8] pseudos
Hal Finkel [Wed, 27 Mar 2013 05:57:58 +0000 (05:57 +0000)]
Apply the no-r0 register class to the PPC SELECT_CC_I[4|8] pseudos

Either operand of these pseudo instructions can be transformed into the first
operand of an isel instruction (and this operand cannot be r0).

This is not yet testable because we don't yet allocate r0 (and even when we do,
any test would be very fragile).

llvm-svn: 178119

11 years agoApply the no-r0 class to PPC TOC ADDI[S] pseudo instructions
Hal Finkel [Wed, 27 Mar 2013 05:57:56 +0000 (05:57 +0000)]
Apply the no-r0 class to PPC TOC ADDI[S] pseudo instructions

Like the addi/addis instructions themselves, these pseudo instructions also
cannot have r0 as their register parameter (because it will be interpreted as
the value 0).

This is not yet testable because we don't yet allocate r0 (and even when we do,
any regression test would be very fragile because it would depend on the
register allocator heuristics).

llvm-svn: 178118

11 years ago[lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Buil...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 05:12:34 +0000 (05:12 +0000)]
[lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Builtin_intrinsics.sse2

Module "sse" implicitly exports module "sse2".
This is bad because we also have module "sse2" export module "sse" (as intended) so we end up with a cycle
in the module import graph:
1. sse2 -> (also imports) sse
2. sse -> (also imports) sse2

To eliminate the cycle remove 2.; importing module "sse2" will also import module "sse", but just importing
module "sse" will not also import module "sse2".

rdar://13240552

llvm-svn: 178117

11 years agoRevert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
Daniel Dunbar [Wed, 27 Mar 2013 04:10:25 +0000 (04:10 +0000)]
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
bootstrap with libc++.

llvm-svn: 178116

11 years agoFixed a problem where inline assembly errors caused
Sean Callanan [Wed, 27 Mar 2013 03:09:55 +0000 (03:09 +0000)]
Fixed a problem where inline assembly errors caused
LLDB to crash.

<rdar://problem/13497915>

llvm-svn: 178115

11 years agoRemove the link register from the GPR classes on PowerPC.
Bill Schmidt [Wed, 27 Mar 2013 02:40:14 +0000 (02:40 +0000)]
Remove the link register from the GPR classes on PowerPC.

Some implementation detail in the forgotten past required the link
register to be placed in the GPRC and G8RC register classes.  This is
just wrong on the face of it, and causes several extra intersection
register classes to be generated.  I found this was having evil
effects on instruction scheduling, by causing the wrong register class
to be consulted for register pressure decisions.

No code generation changes are expected, other than some minor changes
in instruction order.  Seven tests in the test bucket required minor
tweaks to adjust to the new normal.

llvm-svn: 178114

11 years agoDon't use a "uintptr_t" for the metadata key, use a "void *". This removes all of...
Greg Clayton [Wed, 27 Mar 2013 01:48:02 +0000 (01:48 +0000)]
Don't use a "uintptr_t" for the metadata key, use a "void *".  This removes all of the casts that were being used and cleans the code up a bit. Also added the ability to dump the metadata.

llvm-svn: 178113

11 years agoPrune more stuff out of the build and source folders after building clang.
Greg Clayton [Wed, 27 Mar 2013 01:46:51 +0000 (01:46 +0000)]
Prune more stuff out of the build and source folders after building clang.

llvm-svn: 178112

11 years agoImplement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.
Joao Matos [Wed, 27 Mar 2013 01:34:16 +0000 (01:34 +0000)]
Implement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.

Patch by me and Ryan Molden.

llvm-svn: 178111

11 years ago[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:37 +0000 (01:25 +0000)]
[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.

This makes it identical with the system definition.

llvm-svn: 178110

11 years ago[modules] Before marking the module imported macros as ambiguous, check if this is...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:34 +0000 (01:25 +0000)]
[modules] Before marking the module imported macros as ambiguous, check if this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.

For example (these come from different modules):
   \#define LONG_MAX __LONG_MAX__ (clang's limits.h)
   \#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.

llvm-svn: 178109

11 years agoRemove IdentifierInfo::setHadMacroDefinition()
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:31 +0000 (01:25 +0000)]
Remove IdentifierInfo::setHadMacroDefinition()

It's not used anymore.

llvm-svn: 178108

11 years ago[PCH/modules] Remove HiddenName::MacroUndef
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:28 +0000 (01:25 +0000)]
[PCH/modules] Remove HiddenName::MacroUndef

llvm-svn: 178107

11 years ago[Preprocessor] Remove PPMutationListener.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:24 +0000 (01:25 +0000)]
[Preprocessor] Remove PPMutationListener.

It's not used anymore.

llvm-svn: 178106

11 years ago[modules] Re-enable the "ambiguous expansion of macro" warning.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:19 +0000 (01:25 +0000)]
[modules] Re-enable the "ambiguous expansion of macro" warning.

Also update "test/Modules/macros.c" to test modified semantics:
-When there is an ambiguous macro, expand using the latest introduced version, not the first one.
-#undefs in submodules cause the macro to not be exported by that submodule, it doesn't cause
 undefining of macros in the translation unit that imported that submodule.
 This reduces macro namespace interference across modules.

llvm-svn: 178105

11 years agoRevised to use MemoryBuffer. Removed redundant llvm:: qualifiers. Removed unnecessar...
John Thompson [Wed, 27 Mar 2013 01:02:46 +0000 (01:02 +0000)]
Revised to use MemoryBuffer. Removed redundant llvm:: qualifiers.  Removed unnecessary c_str() calls.  Reformatted with clang-format.

llvm-svn: 178104

11 years agoPR15597: Fix a confusion between the implicit exception specification and the
Richard Smith [Wed, 27 Mar 2013 00:22:47 +0000 (00:22 +0000)]
PR15597: Fix a confusion between the implicit exception specification and the
uninstantiated exception specification when a special member within a class
template is both defaulted and given an exception specification on its first
declaration.

llvm-svn: 178103

11 years agoIf we're unable to create the TargetMachine, then just quit producing the
Chad Rosier [Wed, 27 Mar 2013 00:14:35 +0000 (00:14 +0000)]
If we're unable to create the TargetMachine, then just quit producing the
backend output; there's no need to report a fatal error.  This reverts r178042.
Part of rdar://13295753 and rdar://13401547

llvm-svn: 178102

11 years agoAdded back in the test for arc-annotations.
Michael Gottesman [Wed, 27 Mar 2013 00:09:58 +0000 (00:09 +0000)]
Added back in the test for arc-annotations.

The test was removed since I had not turned off the test during release
builds. This fails since ARC annotations support  is conditionally
compiled out during release builds. I added the proper requires header
to assuage this issue.

llvm-svn: 178101

11 years agoUpdate debug info test for schema change made to LLVM.
David Blaikie [Wed, 27 Mar 2013 00:08:24 +0000 (00:08 +0000)]
Update debug info test for schema change made to LLVM.

This accounts for the addition of another field to DIScopes that will be used
to store a list of DIImportedModules in the future.

llvm-svn: 178100

11 years agoAdding DIImportedModules to DIScopes.
David Blaikie [Wed, 27 Mar 2013 00:07:26 +0000 (00:07 +0000)]
Adding DIImportedModules to DIScopes.

This is just the basic groundwork for supporting DW_TAG_imported_module but I
wanted to commit this before pushing support further into Clang or LLVM so that
this rather churny change is isolated from the rest of the work. The major
churn here is obviously adding another field (within the common DIScope prefix)
to all DIScopes (files, classes, namespaces, lexical scopes, etc). This should
be the last big churny change needed for DW_TAG_imported_module/using directive
support/PR14606.

llvm-svn: 178099

11 years agoMake the -Wreinterpret-base-class logic safe against invalid
John McCall [Wed, 27 Mar 2013 00:03:48 +0000 (00:03 +0000)]
Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.

llvm-svn: 178098

11 years agoSplit "incomplete implementation" warnings for ObjC into separate warnings.
Ted Kremenek [Wed, 27 Mar 2013 00:02:21 +0000 (00:02 +0000)]
Split "incomplete implementation" warnings for ObjC into separate warnings.

Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes.  Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

llvm-svn: 178097

11 years agoDon't spill PPC VRSAVE on non-Darwin (even in SjLj)
Hal Finkel [Wed, 27 Mar 2013 00:02:20 +0000 (00:02 +0000)]
Don't spill PPC VRSAVE on non-Darwin (even in SjLj)

As Bill Schmidt pointed out to me, only on Darwin do we need to spill/restore
VRSAVE in the SjLj code. For non-Darwin, don't spill/restore VRSAVE (and I've
added some asserts to make sure that we're not).

As it turns out, we're not currently handling the Darwin case correctly (I've
added a FIXME in the test case). I've tried adding various implied register
definitions/uses to force the spill without success, so I'll need to address
this later.

llvm-svn: 178096

11 years ago<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference...
Douglas Gregor [Tue, 26 Mar 2013 23:59:23 +0000 (23:59 +0000)]
<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type.

llvm-svn: 178095

11 years ago[analyzer] Better test for r178063.
Anna Zaks [Tue, 26 Mar 2013 23:58:52 +0000 (23:58 +0000)]
[analyzer] Better test for r178063.

Jordan pointed out that my previously committed test was bogus.

llvm-svn: 178094

11 years ago[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Anna Zaks [Tue, 26 Mar 2013 23:58:49 +0000 (23:58 +0000)]
[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.

Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit.

Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr
or ExprWithCleanups.

llvm-svn: 178093

11 years agoRemove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
David Blaikie [Tue, 26 Mar 2013 23:47:35 +0000 (23:47 +0000)]
Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType

llvm-svn: 178092

11 years agoMake DIBuilder::createClassType more type safe by returning DICompositeType rather...
David Blaikie [Tue, 26 Mar 2013 23:46:39 +0000 (23:46 +0000)]
Make DIBuilder::createClassType more type safe by returning DICompositeType rather than DIType

llvm-svn: 178091

11 years agoDebugInfo: more support for mutating DICompositeType to reduce magic number usage...
David Blaikie [Tue, 26 Mar 2013 23:46:36 +0000 (23:46 +0000)]
DebugInfo: more support for mutating DICompositeType to reduce magic number usage in Clang

llvm-svn: 178090

11 years ago[driver] Do not generate crash diagnostics if the compilation command failed
Chad Rosier [Tue, 26 Mar 2013 23:41:30 +0000 (23:41 +0000)]
[driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://13362359

llvm-svn: 178089

11 years ago<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns...
Douglas Gregor [Tue, 26 Mar 2013 23:36:30 +0000 (23:36 +0000)]
<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.

When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.

llvm-svn: 178088

11 years agoAdd a boolean parameter to the ExecuteAndWait static function to indicated
Chad Rosier [Tue, 26 Mar 2013 23:35:00 +0000 (23:35 +0000)]
Add a boolean parameter to the ExecuteAndWait static function to indicated
if execution failed.  ExecuteAndWait returns -1 upon an execution failure, but
checking the return value isn't sufficient because the wait command may
return -1 as well.  This new parameter is to be used by the clang driver in a
subsequent commit.
Part of rdar://13362359

llvm-svn: 178087

11 years agoRemove a FIXME that's not planned to be fixed. We only generated crash
Chad Rosier [Tue, 26 Mar 2013 23:25:41 +0000 (23:25 +0000)]
Remove a FIXME that's not planned to be fixed.  We only generated crash
diagnostics for the first failing command.

llvm-svn: 178086

11 years agoCleaned up how LLDB.framework was being linked to and also how the target dependencies.
Greg Clayton [Tue, 26 Mar 2013 22:52:20 +0000 (22:52 +0000)]
Cleaned up how LLDB.framework was being linked to and also how the target dependencies.

llvm-svn: 178085

11 years agoUse the full path when outputting the `.gcda' file.
Bill Wendling [Tue, 26 Mar 2013 22:47:50 +0000 (22:47 +0000)]
Use the full path when outputting the `.gcda' file.

If we compile a single source program, the `.gcda' file will be generated where
the program was executed. This isn't desirable, because that place may be at an
unpredictable place (the program could call `chdir' for instance).

Instead, we will output the `.gcda' file in the same place we output the `.gcno'
file. I.e., the directory where the executable was generated. This matches GCC's
behavior.

<rdar://problem/13061072> & PR11809

llvm-svn: 178084

11 years agoAdd XTEST codegen support
Michael Liao [Tue, 26 Mar 2013 22:47:01 +0000 (22:47 +0000)]
Add XTEST codegen support

llvm-svn: 178083

11 years agoAdd HLE target feature
Michael Liao [Tue, 26 Mar 2013 22:46:02 +0000 (22:46 +0000)]
Add HLE target feature

llvm-svn: 178082

11 years ago<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return...
Douglas Gregor [Tue, 26 Mar 2013 22:43:55 +0000 (22:43 +0000)]
<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.

llvm-svn: 178081

11 years agoEnable SandyBridgeModel for all modern Intel P6 descendants.
Jakob Stoklund Olesen [Tue, 26 Mar 2013 22:19:12 +0000 (22:19 +0000)]
Enable SandyBridgeModel for all modern Intel P6 descendants.

All Intel CPUs since Yonah look a lot alike, at least at the granularity
of the scheduling models. We can add more accurate models for
processors that aren't Sandy Bridge if required. Haswell will probably
need its own.

The Atom processor and anything based on NetBurst is completely
different. So are the non-Intel chips.

llvm-svn: 178080

11 years agoDebug Info: remove use of magic numbers to tweak specific debug info metadata fields
David Blaikie [Tue, 26 Mar 2013 22:09:53 +0000 (22:09 +0000)]
Debug Info: remove use of magic numbers to tweak specific debug info metadata fields

llvm-svn: 178079

11 years agoDebug Info: Provide a means to update the members of a composite type
David Blaikie [Tue, 26 Mar 2013 21:59:17 +0000 (21:59 +0000)]
Debug Info: Provide a means to update the members of a composite type

This will be used to factor out some uses of magic number operand offsets
inside Clang where these fields were updated in an effort to resolve forward
declarations/circular references.

llvm-svn: 178078

11 years agoRestore real bit lengths on PPC register numbers
Hal Finkel [Tue, 26 Mar 2013 21:50:26 +0000 (21:50 +0000)]
Restore real bit lengths on PPC register numbers

As suggested by Bill Schmidt (in reviewing r178067), use the real register
number bit lengths (which is self-documenting, and prevents using illegal
numbers), and set only the relevant bits in HWEncoding (which defaults to 0).

No functionality change intended.

llvm-svn: 178077

11 years ago<rdar://problem/13339196>
Enrico Granata [Tue, 26 Mar 2013 21:44:13 +0000 (21:44 +0000)]
<rdar://problem/13339196>

The algorithm to access an item in a __NSArrayM was not reacting properly to deletions
The fix is to use a smarter formula that accounts for items shifting and the resulting notion of offsets in the table

llvm-svn: 178076

11 years agoTighten up the iterator requirements for the vector member templates. This is especi...
Howard Hinnant [Tue, 26 Mar 2013 21:40:54 +0000 (21:40 +0000)]
Tighten up the iterator requirements for the vector member templates.  This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I.  Test case included for this latter point.

llvm-svn: 178075

11 years agoTableGen SubtargetEmitter fix to allow A9 and Swift to coexist.
Andrew Trick [Tue, 26 Mar 2013 21:36:39 +0000 (21:36 +0000)]
TableGen SubtargetEmitter fix to allow A9 and Swift to coexist.

Allow variants to be defined only for some processors on a target.

llvm-svn: 178074

11 years agoFix the register scavenger for targets that provide custom spilling
Hal Finkel [Tue, 26 Mar 2013 21:20:15 +0000 (21:20 +0000)]
Fix the register scavenger for targets that provide custom spilling

As pointed out by Richard Sandiford, my recent updates to the register
scavenger broke targets that use custom spilling (because the new code assumed
that if there were no valid spill slots, than spilling would be impossible).

I don't have a test case, but it should be possible to create one for Thumb 1,
Mips 16, etc.

llvm-svn: 178073

11 years ago<rdar://problem/13246939>
Enrico Granata [Tue, 26 Mar 2013 21:13:57 +0000 (21:13 +0000)]
<rdar://problem/13246939>

Make format uint64_t[] actually work as designed

llvm-svn: 178072

11 years agoAdd a way to dump a ClangASTType to stdout for debugging purposes.
Greg Clayton [Tue, 26 Mar 2013 21:01:37 +0000 (21:01 +0000)]
Add a way to dump a ClangASTType to stdout for debugging purposes.

llvm-svn: 178071

11 years agoTrim the output build folder a bit to it isn't so large.
Greg Clayton [Tue, 26 Mar 2013 21:00:56 +0000 (21:00 +0000)]
Trim the output build folder a bit to it isn't so large.

llvm-svn: 178070

11 years agoA few more tweaks to the python perf tests. Now there is a MemoryMeasurement.
Greg Clayton [Tue, 26 Mar 2013 21:00:29 +0000 (21:00 +0000)]
A few more tweaks to the python perf tests. Now there is a MemoryMeasurement.

llvm-svn: 178069

11 years agoClean up logging a bit to not log when a command pipe is opened when “lldb object...
Greg Clayton [Tue, 26 Mar 2013 20:53:56 +0000 (20:53 +0000)]
Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.

llvm-svn: 178068

11 years agoPPC: Use HWEncoding and TRI->getEncodingValue
Hal Finkel [Tue, 26 Mar 2013 20:08:20 +0000 (20:08 +0000)]
PPC: Use HWEncoding and TRI->getEncodingValue

As pointed out by Jakob, we don't need to maintain a separate
register-numbering table. Instead we should let TableGen generate the table for
us from the information (already present) in PPCRegisterInfo.td.
TRI->getEncodingValue is now used to access register-encoding values.

No functionality change intended.

llvm-svn: 178067

11 years agoR600/SIMCCodeEmitter.cpp: Prune a couple of unused members, STI and Ctx. [-Wunused...
NAKAMURA Takumi [Tue, 26 Mar 2013 19:42:48 +0000 (19:42 +0000)]
R600/SIMCCodeEmitter.cpp: Prune a couple of unused members, STI and Ctx. [-Wunused-private-field]

llvm-svn: 178065

11 years agoAnother vector debug mode test, and a static test on Allocator::value_type. This...
Howard Hinnant [Tue, 26 Mar 2013 19:04:56 +0000 (19:04 +0000)]
Another vector debug mode test, and a static test on Allocator::value_type.  This partially addresses llvm.org/bugs/show_bug.cgi?id=15576.

llvm-svn: 178064

11 years ago[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC...
Anna Zaks [Tue, 26 Mar 2013 18:57:58 +0000 (18:57 +0000)]
[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC methods as top level.

This allows us to better reason about(inline) small wrapper functions.

llvm-svn: 178063

11 years ago[analyzer] micro optimization as per Jordan’s feedback on r177905.
Anna Zaks [Tue, 26 Mar 2013 18:57:51 +0000 (18:57 +0000)]
[analyzer] micro optimization as per Jordan’s feedback on r177905.

llvm-svn: 178062

11 years agoclang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
NAKAMURA Takumi [Tue, 26 Mar 2013 18:57:40 +0000 (18:57 +0000)]
clang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.

With dosish filename, it misgenerates an improper extra entry.

!1 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX/debug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX\5Cdebug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 is unexpected.

llvm-svn: 178061

11 years agoUse multiple virtual registers in PPC CR spilling
Hal Finkel [Tue, 26 Mar 2013 18:57:22 +0000 (18:57 +0000)]
Use multiple virtual registers in PPC CR spilling

Now that the register scavenger can support multiple spill slots, and PEI can
use virtual-register-based scavenging for multiple simultaneous registers, we
can use a virtual register for the transfer register in the CR spilling code.

This should eliminate the last place (outside of the prologue/epilogue) where
we depend on the unconditional availability of the r0 register. We will soon be
able to allocate it (in a somewhat restricted sense) as a GPR.

llvm-svn: 178060

11 years agoUpdate PPCRegisterInfo's use of virtual registers to be SSA
Hal Finkel [Tue, 26 Mar 2013 18:57:20 +0000 (18:57 +0000)]
Update PPCRegisterInfo's use of virtual registers to be SSA

PPC's use of PEI's virtual-register-based scavenging functionality had
redefined the virtual registers (it was non-SSA). Now that PEI supports
dealing with instructions with multiple virtual registers, this can be
cleanup up to use multiple virtual registers and keep SSA form.

No functionality change intended.

llvm-svn: 178059

11 years agoUpdate PEI's virtual-register-based scavenging to support multiple simultaneous mappings
Hal Finkel [Tue, 26 Mar 2013 18:56:54 +0000 (18:56 +0000)]
Update PEI's virtual-register-based scavenging to support multiple simultaneous mappings

The previous algorithm could not deal properly with scavenging multiple virtual
registers because it kept only one live virtual -> physical mapping (and
iterated through operands in order). Now we don't maintain a current mapping,
but rather use replaceRegWith to completely remove the virtual register as
soon as the mapping is established.

In order to allow the register scavenger to return a physical register killed
by an instruction for definition by that same instruction, we now call
RS->forward(I) prior to eliminating virtual registers defined in I. This
requires a minor update to forward to ignore virtual registers.

These new features will be tested in forthcoming commits.

llvm-svn: 178058

11 years agoData formatters cleanup:
Enrico Granata [Tue, 26 Mar 2013 18:55:08 +0000 (18:55 +0000)]
Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map

llvm-svn: 178057

11 years agoDon't crash when we have an element size of zero.
Greg Clayton [Tue, 26 Mar 2013 18:42:13 +0000 (18:42 +0000)]
Don't crash when we have an element size of zero.

llvm-svn: 178056

11 years agoRemove useGlobalsForAutomaticVariables.
Rafael Espindola [Tue, 26 Mar 2013 18:41:47 +0000 (18:41 +0000)]
Remove useGlobalsForAutomaticVariables.

It is unused since pic support went away.

llvm-svn: 178055

11 years ago[ms-cxxabi] Give the MS inheritance attributes a base class
Reid Kleckner [Tue, 26 Mar 2013 18:30:28 +0000 (18:30 +0000)]
[ms-cxxabi] Give the MS inheritance attributes a base class

Required making a handful of changes to the table generator.  Also adds
an unspecified inheritance attribute.  This opens the path for us to
apply these attributes to C++ records implicitly.

llvm-svn: 178054

11 years agoFix uninitialized read of CalleeWithThisReturn.
Manman Ren [Tue, 26 Mar 2013 18:29:15 +0000 (18:29 +0000)]
Fix uninitialized read of CalleeWithThisReturn.

Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.

PR15598

llvm-svn: 178053

11 years agoThat wasn't a typo, if the short letter option is from a non-obvious source, I capito...
Jim Ingham [Tue, 26 Mar 2013 18:29:03 +0000 (18:29 +0000)]
That wasn't a typo, if the short letter option is from a non-obvious source, I capitolize it in the help as an aid to memory.

llvm-svn: 178052

11 years agoAnnotate the remaining x86 instructions with SchedRW lists.
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:22 +0000 (18:24 +0000)]
Annotate the remaining x86 instructions with SchedRW lists.

Now all x86 instructions that have itinerary classes also have SchedRW
lists. This is required before the new scheduling models can be used.

There are still unannotated instructions remaining, but they don't have
itinerary classes either.

llvm-svn: 178051

11 years agoAnnotate x87 and mmx instructions with SchedRW lists.
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:20 +0000 (18:24 +0000)]
Annotate x87 and mmx instructions with SchedRW lists.

This only covers the instructions that were given itinerary classes for
the Atom model.

llvm-svn: 178050

11 years agoAnnotate control instructions with SchedRW lists.
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:17 +0000 (18:24 +0000)]
Annotate control instructions with SchedRW lists.

This could definitely be more granular. I am not sure if it makes a
difference.

llvm-svn: 178049

11 years agoAnnotate the rest of X86InstrInfo.td with SchedRW lists.
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:15 +0000 (18:24 +0000)]
Annotate the rest of X86InstrInfo.td with SchedRW lists.

llvm-svn: 178048

11 years agoRevised per review comments to rename test files and rearrange input files.
John Thompson [Tue, 26 Mar 2013 18:17:28 +0000 (18:17 +0000)]
Revised per review comments to rename test files and rearrange input files.

llvm-svn: 178047