platform/upstream/llvm.git
12 years agoWe never call adjustCopiesBackFrom() for partial copies.
Jakob Stoklund Olesen [Tue, 15 May 2012 22:18:49 +0000 (22:18 +0000)]
We never call adjustCopiesBackFrom() for partial copies.

There is no need to look at an always null SrcIdx.

llvm-svn: 156866

12 years agollvm-config: Use sys::fs::equivalent instead of string comparison.
Daniel Dunbar [Tue, 15 May 2012 22:07:18 +0000 (22:07 +0000)]
llvm-config: Use sys::fs::equivalent instead of string comparison.
 - Hopefully fixes PR11600 (untested).

llvm-svn: 156865

12 years ago[Support] Add a version of sys::fs::equivalent() that treats errors as false.
Daniel Dunbar [Tue, 15 May 2012 22:07:14 +0000 (22:07 +0000)]
[Support] Add a version of sys::fs::equivalent() that treats errors as false.

llvm-svn: 156864

12 years agoDon't warn when NULL is used within a macro but its conversion is outside a macro.
David Blaikie [Tue, 15 May 2012 21:57:38 +0000 (21:57 +0000)]
Don't warn when NULL is used within a macro but its conversion is outside a macro.

This fixes the included test case & was reported by Nico Weber.

It's a little bit nasty using the difference in the conversion context, but
seems to me like a not unreasonable solution. I did have to fix up the
conversion context for conditional operators (it seems correct to me to include
the context for which we're actually doing the comparison - across all the
nested conditionals, rather than the innermost conditional which might not
actually have the problematic implicit conversion at all) and template default
arguments (this is a bit of a hack, since we don't have the source location of
the '=' anymore, so I just used the start of the parameter - open to
suggestions there)

llvm-svn: 156861

12 years agoTypo.
Richard Smith [Tue, 15 May 2012 21:42:17 +0000 (21:42 +0000)]
Typo.

llvm-svn: 156860

12 years ago[docs] Remove unsupported references to ExtraSource variable.
Daniel Dunbar [Tue, 15 May 2012 21:32:27 +0000 (21:32 +0000)]
[docs] Remove unsupported references to ExtraSource variable.

llvm-svn: 156857

12 years agoIf we see a declaration which is either missing a type or has a malformed type,
Richard Smith [Tue, 15 May 2012 21:29:55 +0000 (21:29 +0000)]
If we see a declaration which is either missing a type or has a malformed type,
and the thing we have has a scope specifier, and we're in a context that doesn't
allow declaring a qualified name, then the error is a malformed type, not a
missing type.

llvm-svn: 156856

12 years agoAdd i386-only expectedFailure decorators for current ToT.
Johnny Chen [Tue, 15 May 2012 21:27:40 +0000 (21:27 +0000)]
Add i386-only expectedFailure decorators for current ToT.

llvm-svn: 156855

12 years agoDon't use the implicit int rule for error recovery in C++. Instead, try to
Richard Smith [Tue, 15 May 2012 21:01:51 +0000 (21:01 +0000)]
Don't use the implicit int rule for error recovery in C++. Instead, try to
disambiguate whether the type name was forgotten or mistyped.

llvm-svn: 156854

12 years agoAdd the Objective-C runtime linking arguments after user-specified
Douglas Gregor [Tue, 15 May 2012 21:00:27 +0000 (21:00 +0000)]
Add the Objective-C runtime linking arguments after user-specified
linker arguments. Fixes <rdar://problem/11417441>.

llvm-svn: 156853

12 years agoAdd blurb for Crack.
Bill Wendling [Tue, 15 May 2012 20:47:23 +0000 (20:47 +0000)]
Add blurb for Crack.

llvm-svn: 156852

12 years agoAdd documentation about boxing enum types and a codegen test to make
Argyrios Kyrtzidis [Tue, 15 May 2012 20:45:35 +0000 (20:45 +0000)]
Add documentation about boxing enum types and a codegen test to make
sure we pick up the underlying type, per suggestion by Fariborz.

No functionality change.

llvm-svn: 156851

12 years agoAdd a test case for r156840, a fix to llvm-objdump when disassembling using
Kevin Enderby [Tue, 15 May 2012 20:20:50 +0000 (20:20 +0000)]
Add a test case for r156840, a fix to llvm-objdump when disassembling using
-macho to disassemble the last symbol to the end of the section.

llvm-svn: 156850

12 years agoreuse the result of some expensive computations in getSignExtendExpr() and getZeroExt...
Nuno Lopes [Tue, 15 May 2012 20:20:14 +0000 (20:20 +0000)]
reuse the result of some expensive computations in getSignExtendExpr() and getZeroExtendExpr()
this gives a speedup of > 80 in a debug build in the test case of PR12825 (php_sha512_crypt_r)

llvm-svn: 156849

12 years agoExtend the CoalescerPair interface to handle symmetric sub-register copies.
Jakob Stoklund Olesen [Tue, 15 May 2012 20:09:43 +0000 (20:09 +0000)]
Extend the CoalescerPair interface to handle symmetric sub-register copies.

Now both SrcReg and DstReg can be sub-registers of the final coalesced
register.

CoalescerPair::setRegisters still rejects such copies because
RegisterCoalescer doesn't yet handle them.

llvm-svn: 156848

12 years agoUpdate MIPS' section in the release notes. Patch by Simon Atanasyan.
Akira Hatanaka [Tue, 15 May 2012 20:06:41 +0000 (20:06 +0000)]
Update MIPS' section in the release notes. Patch by Simon Atanasyan.

llvm-svn: 156847

12 years ago[clang.py] Store reference to TranslationUnit in Cursor and Type
Gregory Szorc [Tue, 15 May 2012 19:51:02 +0000 (19:51 +0000)]
[clang.py] Store reference to TranslationUnit in Cursor and Type

llvm-svn: 156846

12 years agoModified "image lookup -t <typename>" to expand typedefs.
Greg Clayton [Tue, 15 May 2012 19:26:12 +0000 (19:26 +0000)]
Modified "image lookup -t <typename>" to expand typedefs.

llvm-svn: 156845

12 years ago[objcmt] Rewrite [NSNumber numberWith*] messages to the new @() boxing syntax.
Argyrios Kyrtzidis [Tue, 15 May 2012 19:17:49 +0000 (19:17 +0000)]
[objcmt] Rewrite [NSNumber numberWith*] messages to the new @() boxing syntax.

There are some caveats:
-If an implicit cast (e.g. int -> float for numberWithFloat:) was required, the message
 will not get rewritten
-If the message was with numberWithInteger:/numberWithUnsignedInteger:, which are very
 commonly used, be more liberal and allow the boxing syntax if the underlying type has
 same signedness and will not lose precision.

Part of rdar://11438360

llvm-svn: 156844

12 years agoAllow objc @() syntax for enum types.
Argyrios Kyrtzidis [Tue, 15 May 2012 19:17:44 +0000 (19:17 +0000)]
Allow objc @() syntax for enum types.

Previously we would reject it as illegal using a value of
enum type and on ObjC++ it was illegal to use an enumerator
as well.

rdar://11454917

llvm-svn: 156843

12 years agoAdd -enable-aa-sched-mi, off by default, for AliasAnalysis inside MachineScheduler.
Andrew Trick [Tue, 15 May 2012 18:59:41 +0000 (18:59 +0000)]
Add -enable-aa-sched-mi, off by default, for AliasAnalysis inside MachineScheduler.

This feature avoids creating edges in the scheduler's dependence graph
for non-aliasing memory operations according to whichever alias
analysis is available. It has been fully tested in Hexagon. Before
making this default, it needs to be extended to handle multiple
MachineMemOperands, compile time needs more evaluation, and
benchmarking on X86 and ARM is needed.

Patch by Sergei Larin!

llvm-svn: 156842

12 years agoDo not link with Objective-C libraries with -nostdlib or -nodefaultlibs.
Bob Wilson [Tue, 15 May 2012 18:57:39 +0000 (18:57 +0000)]
Do not link with Objective-C libraries with -nostdlib or -nodefaultlibs.
<rdar://problem/11433499>

llvm-svn: 156841

12 years agoFixed a bug in llvm-objdump when disassembling using -macho option for a binary
Kevin Enderby [Tue, 15 May 2012 18:57:14 +0000 (18:57 +0000)]
Fixed a bug in llvm-objdump when disassembling using -macho option for a binary
that has more than one symbol.  The last symbol was not being disassembled to
the end of the section.

llvm-svn: 156840

12 years agollvm-build: Add support for non-installed libraries (e.g., gtest).
Daniel Dunbar [Tue, 15 May 2012 18:44:17 +0000 (18:44 +0000)]
llvm-build: Add support for non-installed libraries (e.g., gtest).
 - These libraries are only reported by llvm-config when run from a development
   tree.

llvm-svn: 156838

12 years agollvm-build: Don't emit library information for disabled targets.
Daniel Dunbar [Tue, 15 May 2012 18:44:12 +0000 (18:44 +0000)]
llvm-build: Don't emit library information for disabled targets.

llvm-svn: 156837

12 years ago[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
Daniel Dunbar [Tue, 15 May 2012 18:44:09 +0000 (18:44 +0000)]
[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check.

llvm-svn: 156836

12 years ago<rdar://problem/11455398>
Greg Clayton [Tue, 15 May 2012 18:43:44 +0000 (18:43 +0000)]
<rdar://problem/11455398>

Add "--name" option to "image lookup" that will search both functions and symbols.

Also made all of the output from any of the "image lookup" commands be the same regardless of the lookup type (function name, symbol name, func or symbol, file and line, address, etc). The --verbose or -v option also will expand the results as needed and display things so they look the same.

llvm-svn: 156835

12 years agoAdd the output of "clang --version" to scan-build results, from Gerald Combs!
Douglas Gregor [Tue, 15 May 2012 18:41:55 +0000 (18:41 +0000)]
Add the output of "clang --version" to scan-build results, from Gerald Combs!

llvm-svn: 156834

12 years agoobjc: avoid duplicate diagnostics on certain type mismatches
Fariborz Jahanian [Tue, 15 May 2012 18:12:51 +0000 (18:12 +0000)]
objc: avoid duplicate diagnostics on certain type mismatches
between property and its backing ivar.

llvm-svn: 156832

12 years agoRemove word 'block' from option and diagnostic I added
Fariborz Jahanian [Tue, 15 May 2012 17:43:16 +0000 (17:43 +0000)]
Remove word 'block' from option and diagnostic I added
in r156825.

llvm-svn: 156831

12 years agoAllow MCCodeEmitter access to the target MCRegisterInfo.
Jim Grosbach [Tue, 15 May 2012 17:36:07 +0000 (17:36 +0000)]
Allow MCCodeEmitter access to the target MCRegisterInfo.

Add MRI to the createMCCodeEmitter() call.

llvm-svn: 156830

12 years agoTableGen'erate mapping physical registers to encoding values.
Jim Grosbach [Tue, 15 May 2012 17:35:57 +0000 (17:35 +0000)]
TableGen'erate mapping physical registers to encoding values.

Many targets always use the same bitwise encoding value for physical
registers in all (or most) instructions. Add this mapping to the
.td files and TableGen'erate the information and expose an accessor
in MCRegisterInfo.

patch by Tom Stellard.

llvm-svn: 156829

12 years agoAllow MCCodeEmitter access to the target MCRegisterInfo.
Jim Grosbach [Tue, 15 May 2012 17:35:52 +0000 (17:35 +0000)]
Allow MCCodeEmitter access to the target MCRegisterInfo.

Add the MCRegisterInfo to the factories and constructors.

Patch by Tom Stellard <Tom.Stellard@amd.com>.

llvm-svn: 156828

12 years agoChanging std::string to SmallString for r156826.
David Blaikie [Tue, 15 May 2012 17:18:27 +0000 (17:18 +0000)]
Changing std::string to SmallString for r156826.

Based on code review feedback by Jordan Rose.

llvm-svn: 156827

12 years agoImprove some of the conversion warnings to fire on conversion to bool.
David Blaikie [Tue, 15 May 2012 16:56:36 +0000 (16:56 +0000)]
Improve some of the conversion warnings to fire on conversion to bool.

Moves the bool bail-out down a little in SemaChecking - so now
-Wnull-conversion and -Wliteral-conversion can fire when the target type is
bool.

Also improve the wording/details in the -Wliteral-conversion warning to match
the -Wconstant-conversion.

llvm-svn: 156826

12 years agoobjective-c nonfragile abi: discourage ivar declarations
Fariborz Jahanian [Tue, 15 May 2012 16:33:04 +0000 (16:33 +0000)]
objective-c nonfragile abi: discourage ivar declarations
in @interface by issuing warning (off by default) under
opt'ed in flag -Winterface-block-ivar. // rdar://10763173

llvm-svn: 156825

12 years agoEnable all Hexagon tests.
Sirish Pande [Tue, 15 May 2012 16:13:12 +0000 (16:13 +0000)]
Enable all Hexagon tests.

llvm-svn: 156824

12 years agominor simplification to code: Ty is already a SCEV type; don't need to run getEffecti...
Nuno Lopes [Tue, 15 May 2012 15:44:38 +0000 (15:44 +0000)]
minor simplification to code: Ty is already a SCEV type; don't need to run getEffectiveSCEVType() twice

llvm-svn: 156823

12 years ago[tsan] makefile machinery to build tsan-rt (linux-x86_64 only)
Kostya Serebryany [Tue, 15 May 2012 15:17:35 +0000 (15:17 +0000)]
[tsan] makefile machinery to build tsan-rt (linux-x86_64 only)

llvm-svn: 156822

12 years agoFix our handling of visibility in explicit template instantiations.
Rafael Espindola [Tue, 15 May 2012 14:09:55 +0000 (14:09 +0000)]
Fix our handling of visibility in explicit template instantiations.

* Don't copy the visibility attribute during instantiations. We have to be able
  to distinguish

 struct HIDDEN foo {};
 template<class T>
 DEFAULT void bar() {}
 template DEFAULT void bar<foo>();

from

 struct HIDDEN foo {};
 template<class T>
 DEFAULT void bar() {}
 template void bar<foo>();

* If an instantiation has an attribute, it takes precedence over an attribute
  in the template.

* With instantiation attributes handled with the above logic, we can now
  select the minimum visibility when looking at template arguments.

llvm-svn: 156821

12 years agoAdd a note about atomic builtins to c11 section of release notes.
David Chisnall [Tue, 15 May 2012 13:18:03 +0000 (13:18 +0000)]
Add a note about atomic builtins to c11 section of release notes.

llvm-svn: 156820

12 years agoAdd some release notes about compiler-rt and libc++
David Chisnall [Tue, 15 May 2012 13:06:46 +0000 (13:06 +0000)]
Add some release notes about compiler-rt and libc++

llvm-svn: 156819

12 years ago[asan] fix the old-style Makefile, which we still need to run asan tests
Kostya Serebryany [Tue, 15 May 2012 12:41:14 +0000 (12:41 +0000)]
[asan] fix the old-style Makefile, which we still need to run asan tests

llvm-svn: 156818

12 years agoUpdate atomic.c to work with the new clang builtins.
David Chisnall [Tue, 15 May 2012 12:36:14 +0000 (12:36 +0000)]
Update atomic.c to work with the new clang builtins.

llvm-svn: 156817

12 years ago[asan] move lib/asan/interception to lib/interception so that other tools (e.g. tsan...
Kostya Serebryany [Tue, 15 May 2012 12:21:33 +0000 (12:21 +0000)]
[asan] move lib/asan/interception to lib/interception so that other tools (e.g. tsan) can use it

llvm-svn: 156816

12 years agoTeach SimplifyLibCalls about stpcpy.
David Majnemer [Tue, 15 May 2012 11:46:21 +0000 (11:46 +0000)]
Teach SimplifyLibCalls about stpcpy.

llvm-svn: 156815

12 years agoFixes crasher bug in JSONCompilationDatabase for invalid input.
Manuel Klimek [Tue, 15 May 2012 11:46:07 +0000 (11:46 +0000)]
Fixes crasher bug in JSONCompilationDatabase for invalid input.

llvm-svn: 156814

12 years agoadd embedded linux variants that occur in the field
Gabor Greif [Tue, 15 May 2012 11:21:03 +0000 (11:21 +0000)]
add embedded linux variants that occur in the field

llvm-svn: 156813

12 years agoRemove warning about testing unsigned int with int.
Bill Wendling [Tue, 15 May 2012 09:59:13 +0000 (09:59 +0000)]
Remove warning about testing unsigned int with int.

llvm-svn: 156812

12 years agoFixed one small stupid, but critical bug.
Stepan Dyatkovskiy [Tue, 15 May 2012 09:21:39 +0000 (09:21 +0000)]
Fixed one small stupid, but critical bug.

llvm-svn: 156810

12 years agoThis patch fixes the cmake build to create libclang.so/libclang.a on linux
Manuel Klimek [Tue, 15 May 2012 08:58:48 +0000 (08:58 +0000)]
This patch fixes the cmake build to create libclang.so/libclang.a on linux
instead of liblibclang.so/liblibclang.a.

Patch by Arnaud de Grandmaison.

llvm-svn: 156809

12 years agoRejected r156804 due to buildbots failures.
Stepan Dyatkovskiy [Tue, 15 May 2012 06:50:18 +0000 (06:50 +0000)]
Rejected r156804 due to buildbots failures.

llvm-svn: 156808

12 years agoFurther improvement to wording of overload resolution diagnostics, and including
Richard Smith [Tue, 15 May 2012 06:21:54 +0000 (06:21 +0000)]
Further improvement to wording of overload resolution diagnostics, and including
the sole parameter name in the diagnostic in more cases. Patch by Terry Long!

llvm-svn: 156807

12 years agoPR12798: Don't drop part of the nested name specifier when instantiating a
Richard Smith [Tue, 15 May 2012 06:15:11 +0000 (06:15 +0000)]
PR12798: Don't drop part of the nested name specifier when instantiating a
pseudo-destructor expression. This can affect whether virtual dispatch for
the destructor call is bypassed.

llvm-svn: 156806

12 years agoTest file I forgot to 'svn add' in r156802.
Richard Smith [Tue, 15 May 2012 05:39:53 +0000 (05:39 +0000)]
Test file I forgot to 'svn add' in r156802.

llvm-svn: 156805

12 years agoSelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder...
Stepan Dyatkovskiy [Tue, 15 May 2012 05:09:41 +0000 (05:09 +0000)]
SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.

llvm-svn: 156804

12 years agoPR12826: Converting an lvalue to an xvalue is a no-op conversion, not an lvalue-to...
Richard Smith [Tue, 15 May 2012 05:04:02 +0000 (05:04 +0000)]
PR12826: Converting an lvalue to an xvalue is a no-op conversion, not an lvalue-to-rvalue conversion.

llvm-svn: 156803

12 years agoFold the six functions checking explicitly-defaulted special member functions
Richard Smith [Tue, 15 May 2012 04:39:51 +0000 (04:39 +0000)]
Fold the six functions checking explicitly-defaulted special member functions
into one. These were all performing almost identical checks, with different bugs
in each of them.

This fixes PR12806 (we weren't setting the exception specification for an
explicitly-defaulted, non-user-provided default constructor) and enforces
8.4.2/2's rule that an in-class defaulted member must exactly match the implicit
parameter type.

llvm-svn: 156802

12 years agoTemporarily disable anti-dependence breaking for Mips until bug 12829 is
Akira Hatanaka [Tue, 15 May 2012 03:14:52 +0000 (03:14 +0000)]
Temporarily disable anti-dependence breaking for Mips until bug 12829 is
resolved.

llvm-svn: 156801

12 years agoFixed a typo: "aync" => "async"
Greg Clayton [Tue, 15 May 2012 02:50:49 +0000 (02:50 +0000)]
Fixed a typo: "aync" => "async"

llvm-svn: 156797

12 years ago<rdar://problem/11451919>
Greg Clayton [Tue, 15 May 2012 02:44:13 +0000 (02:44 +0000)]
<rdar://problem/11451919>

Fixed the test suite not working on i386 due to recent default arch detection changes.

llvm-svn: 156796

12 years ago<rdar://problem/11240464>
Greg Clayton [Tue, 15 May 2012 02:33:01 +0000 (02:33 +0000)]
<rdar://problem/11240464>

Correctly unique a class' methods when we detect that a class has been uniqued to another.

llvm-svn: 156795

12 years agoChange the mangling of a ref-qualifier on a function type so that
John McCall [Tue, 15 May 2012 02:01:59 +0000 (02:01 +0000)]
Change the mangling of a ref-qualifier on a function type so that
it is placed in a position which is never ambiguous with a
reference-to-function type.  This follows some recent discussion
and ensuing proposal on cxx-abi-dev.  It is not necessary to
change the mangling of CV-qualifiers because you cannot
apply CV-qualification in the normal sense to a function type.
It is not necessary to change the mangling of ref-qualifiers on
method declarations because they appear in an unambiguous
location.

In addition, mangle CV-qualifiers and ref-qualifiers on function
types when they occur in positions other than member pointers
(that is, when they appear as template arguments).

This is a minor ABI break with previous releases of clang.  It
is not considered critical because (1) ref-qualifiers are
relatively rare, since AFAIK we're the only implementing compiler,
and (2) they're particularly likely to come up in contexts that
do not rely on the ODR for correctness.  We apologize for any
inconvenience;  this is the right thing to do.

llvm-svn: 156794

12 years agoFixing a bug where the summary for certain NSStrings was being returned as empty...
Enrico Granata [Tue, 15 May 2012 01:22:45 +0000 (01:22 +0000)]
Fixing a bug where the summary for certain NSStrings was being returned as empty in spite of the string actually having a content

llvm-svn: 156793

12 years agoCreate a struct representing register units in TableGen.
Jakob Stoklund Olesen [Tue, 15 May 2012 00:50:23 +0000 (00:50 +0000)]
Create a struct representing register units in TableGen.

Besides the weight, we also want to store up to two root registers per
unit. Most units will have a single root, the leaf register they
represent. Units created for ad hoc aliasing get two roots: The two
aliasing registers.

The root registers can be used to compute the set of overlapping
registers.

llvm-svn: 156792

12 years agoRemove extraneous ';'.
Bill Wendling [Tue, 15 May 2012 00:41:56 +0000 (00:41 +0000)]
Remove extraneous ';'.

llvm-svn: 156791

12 years agoAdd a command line option to skip the delay slot filler pass entirely for Mips.
Akira Hatanaka [Mon, 14 May 2012 23:59:17 +0000 (23:59 +0000)]
Add a command line option to skip the delay slot filler pass entirely for Mips.

The purpose of this option is to silence error messages issued by machine
verifier passes and enable them to run to the end. If this option is not
provided, -verify-machineinstrs complains when it discovers there is a
non-terminator instruction (an instruction that is in a delay slot) after the
first terminator in a basic block.

llvm-svn: 156790

12 years ago[objcmt] When rewriting to subscripting syntax, make sure we put
Argyrios Kyrtzidis [Mon, 14 May 2012 23:33:49 +0000 (23:33 +0000)]
[objcmt] When rewriting to subscripting syntax, make sure we put
the receiver in parentheses when necessary.

Part of rdar://11438360

llvm-svn: 156789

12 years agoobjc: allow typedef'ing an id to a pointer to a c-struct only.
Fariborz Jahanian [Mon, 14 May 2012 22:48:56 +0000 (22:48 +0000)]
objc: allow typedef'ing an id to a pointer to a c-struct only.
// rdar://11356439

llvm-svn: 156788

12 years ago[Support/YAMLParser] Use rtrim on plain scalars.
Michael J. Spencer [Mon, 14 May 2012 22:43:34 +0000 (22:43 +0000)]
[Support/YAMLParser] Use rtrim on plain scalars.

llvm-svn: 156787

12 years agoRecover properly from a redundant 'typename' before a non-nested name. This is
Richard Smith [Mon, 14 May 2012 22:43:34 +0000 (22:43 +0000)]
Recover properly from a redundant 'typename' before a non-nested name. This is
permitted as a Microsoft extension. Patch by William Wilson! (Plus some minor
tweaking by me.)

llvm-svn: 156786

12 years ago[Support/COFF] Make the order of members in symbol match the standard.
Michael J. Spencer [Mon, 14 May 2012 22:43:21 +0000 (22:43 +0000)]
[Support/COFF] Make the order of members in symbol match the standard.

llvm-svn: 156785

12 years ago[analyzer] Fix a crash in templated code which uses blocks.
Anna Zaks [Mon, 14 May 2012 22:38:24 +0000 (22:38 +0000)]
[analyzer] Fix a crash in templated code which uses blocks.

We should investigate why signature info is not set in this case.

llvm-svn: 156784

12 years agoSlightly generalize FileCheck patterns to unbreak -Asserts builds.
Richard Smith [Mon, 14 May 2012 22:06:02 +0000 (22:06 +0000)]
Slightly generalize FileCheck patterns to unbreak -Asserts builds.

llvm-svn: 156783

12 years ago[objcmt] When rewriting to array/dictionary literals, add an explicit
Argyrios Kyrtzidis [Mon, 14 May 2012 22:01:53 +0000 (22:01 +0000)]
[objcmt] When rewriting to array/dictionary literals, add an explicit
cast to 'id' for any argument that requires it.

Part of rdar://11438360.

llvm-svn: 156782

12 years agoImplement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and the
Richard Smith [Mon, 14 May 2012 21:57:21 +0000 (21:57 +0000)]
Implement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and the
expression is treated as an lvalue.

llvm-svn: 156781

12 years agoFix use of uninitialized variable.
David Blaikie [Mon, 14 May 2012 21:48:19 +0000 (21:48 +0000)]
Fix use of uninitialized variable.

Found by GCC's maybe-uninitialized.

llvm-svn: 156780

12 years agoFixing a typo in the lldb-gdb webpage
Enrico Granata [Mon, 14 May 2012 21:39:38 +0000 (21:39 +0000)]
Fixing a typo in the lldb-gdb webpage

llvm-svn: 156779

12 years agoDon't access MO reference after invalidating operand list.
Jakob Stoklund Olesen [Mon, 14 May 2012 21:30:58 +0000 (21:30 +0000)]
Don't access MO reference after invalidating operand list.

This should unbreak llvm-x86_64-linux.

llvm-svn: 156778

12 years agoFix PR12821.
Jakob Stoklund Olesen [Mon, 14 May 2012 21:10:25 +0000 (21:10 +0000)]
Fix PR12821.

RAFast must add an <imp-def> operand when it is rewriting a sub-register
def that isn't a read-modify-write.

llvm-svn: 156777

12 years agoMove the capture analysis from MemoryDependencyAnalysis to a more general place
Chad Rosier [Mon, 14 May 2012 20:35:04 +0000 (20:35 +0000)]
Move the capture analysis from MemoryDependencyAnalysis to a more general place
so that it can be reused in MemCpyOptimizer.  This analysis is needed to remove
an unnecessary memcpy when returning a struct into a local variable.
rdar://11341081
PR12686

llvm-svn: 156776

12 years agoRevert 156634 upon request until code improvement changes are made.
Brendon Cahoon [Mon, 14 May 2012 19:35:42 +0000 (19:35 +0000)]
Revert 156634 upon request until code improvement changes are made.

llvm-svn: 156775

12 years agoRename @llvm.debugger to @llvm.debugtrap.
Dan Gohman [Mon, 14 May 2012 18:58:10 +0000 (18:58 +0000)]
Rename @llvm.debugger to @llvm.debugtrap.

llvm-svn: 156774

12 years agoFix missing NEON registers for the 'register read' command with the lldb debugserver...
Johnny Chen [Mon, 14 May 2012 18:44:23 +0000 (18:44 +0000)]
Fix missing NEON registers for the 'register read' command with the lldb debugserver which supports the 'qRegisterInfo' packet
that dynamically discovers remote register context information.

o GDBRemoteRegisterContext.h:

Change the prototype of HardcodeARMRegisters() to take a boolean flag, which now becomes

    void
    HardcodeARMRegisters(bool from_scratch);

o GDBRemoteRegisterContext.cpp:

HardcodeARMRegisters() now checks the from_scratch flag and decides whether to add composite registers to the already
existing primordial registers based on a table called g_composites which describes the composite registers.

o ProcessGDBRemote.cpp:

Modify the logic of ProcessGDBRemote::BuildDynamicRegisterInfo() to call m_register_info.HardcodeARMRegisters()
with the newly introduced 'bool from_scrach' flag.

rdar://problem/10652076

llvm-svn: 156773

12 years agoRelease notes for MIPS backend.
Akira Hatanaka [Mon, 14 May 2012 18:40:07 +0000 (18:40 +0000)]
Release notes for MIPS backend.

llvm-svn: 156772

12 years agoTeach the driver on Linux to respect -nodefaultlibs.
Chandler Carruth [Mon, 14 May 2012 18:31:18 +0000 (18:31 +0000)]
Teach the driver on Linux to respect -nodefaultlibs.

Patch from Andrew C. Morrow.

llvm-svn: 156771

12 years agoRemove a stale forward declaration.
Andrew Trick [Mon, 14 May 2012 18:03:19 +0000 (18:03 +0000)]
Remove a stale forward declaration.

llvm-svn: 156770

12 years ago[analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.
Jordy Rose [Mon, 14 May 2012 17:58:35 +0000 (17:58 +0000)]
[analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.

We check the address of the last element accessed, but with 0 calculating that
address results in element -1. This patch bails out early (and avoids a bunch
of other work at that).

Fixes PR12807.

llvm-svn: 156769

12 years agoRemove the expensive BitVector::operator~().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:46:27 +0000 (15:46 +0000)]
Remove the expensive BitVector::operator~().

Returning a temporary BitVector is very expensive. If you must, create
the temporary explicitly: Use BitVector(A).flip() instead of ~A.

llvm-svn: 156768

12 years agoRemove BitVector binops.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:37:25 +0000 (15:37 +0000)]
Remove BitVector binops.

These operators were crazy slow, calling malloc to return a temporary
result. At the same time, they look very innocent when used in code.

If you need temporary BitVectors to compute your thing, create them
explicitly, and use the inplace logical operators. This makes the high
cost explicit in the code.

llvm-svn: 156767

12 years agotsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)
Dmitry Vyukov [Mon, 14 May 2012 15:33:00 +0000 (15:33 +0000)]
tsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)

llvm-svn: 156766

12 years agotsan: enabled report suppression for signal-unsafe reports
Dmitry Vyukov [Mon, 14 May 2012 15:28:03 +0000 (15:28 +0000)]
tsan: enabled report suppression for signal-unsafe reports

llvm-svn: 156765

12 years agotsan: fix output_tests script to actually verify tests results
Dmitry Vyukov [Mon, 14 May 2012 15:25:35 +0000 (15:25 +0000)]
tsan: fix output_tests script to actually verify tests results

llvm-svn: 156764

12 years agoConsider ad hoc aliasing when building RegUnits.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:20:39 +0000 (15:20 +0000)]
Consider ad hoc aliasing when building RegUnits.

Register units can be used to compute if two registers overlap:

  A overlaps B iff units(A) intersects units(B).

With this change, the above holds true even on targets that use ad hoc
aliasing (currently only ARM). This means that register units can be
used to implement regsOverlap() more efficiently, and the register
allocator can use the concept to model interference.

When there is no ad hoc aliasing, the register units correspond to the
maximal cliques in the register overlap graph. This is optimal, no other
register unit assignment can have fewer units.

With ad hoc aliasing, weird things are possible, and we don't try too
hard to compute the maximal cliques. The current approach is always
correct, and it works very well (probably optimally) as long as the ad
hoc aliasing doesn't have cliques larger than pairs. It seems unlikely
that any target would need more.

llvm-svn: 156763

12 years agoRecord the ad hoc aliasing graph in CodeGenRegister.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:12:37 +0000 (15:12 +0000)]
Record the ad hoc aliasing graph in CodeGenRegister.

The ad hoc aliasing specified in the 'Aliases' list in .td files is
currently only used by computeOverlaps(). It will soon be needed to
build accurate register units as well, so build the undirected graph in
CodeGenRegister::buildObjectGraph() instead.

Aliasing is a symmetric relationship with only one direction specified
in the .td files. Make sure both directions are represented in
getExplicitAliases().

llvm-svn: 156762

12 years agoCompute topological signatures of registers.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:10:07 +0000 (15:10 +0000)]
Compute topological signatures of registers.

TableGen creates new register classes and sub-register indices based on
the sub-register structure present in the register bank. So far, it has
been doing that on a per-register basis, but that is not very efficient.

This patch teaches TableGen to compute topological signatures for
registers, and use that to reduce the amount of redundant computation.
Registers get the same TopoSig if they have identical sub-register
structure.

TopoSigs are not currently exposed outside TableGen.

llvm-svn: 156761

12 years agoAdd BitVector::anyCommon().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:01:19 +0000 (15:01 +0000)]
Add BitVector::anyCommon().

The existing operation (A & B).any() is very slow.

llvm-svn: 156760

12 years agotsan: make addr2line symbolizer understand dynamic libraries
Dmitry Vyukov [Mon, 14 May 2012 14:38:29 +0000 (14:38 +0000)]
tsan: make addr2line symbolizer understand dynamic libraries
Collect info about all dynamic libraries in the process (name, base, size).
Determine to what dyn lib the address relates, route request to addr2line instance for the lib.

llvm-svn: 156759

12 years agotsan: update output tests to race on heap memory
Dmitry Vyukov [Mon, 14 May 2012 14:00:07 +0000 (14:00 +0000)]
tsan: update output tests to race on heap memory
Races on stack of main thread are problematic for COMPAT mapping, because it's not 1-to-1 and race addr is not properly mapped from shadow back to application memory.
Update output tests to race heap memory.

llvm-svn: 156758

12 years agoSwitchInst cosmetics: renamed "Hash" method to "hash"
Stepan Dyatkovskiy [Mon, 14 May 2012 08:26:31 +0000 (08:26 +0000)]
SwitchInst cosmetics: renamed "Hash" method to "hash"

llvm-svn: 156757