platform/upstream/llvm.git
11 years ago[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
Chad Rosier [Thu, 18 Oct 2012 20:27:15 +0000 (20:27 +0000)]
[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.

llvm-svn: 166222

11 years ago[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
Chad Rosier [Thu, 18 Oct 2012 20:27:06 +0000 (20:27 +0000)]
[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.

llvm-svn: 166221

11 years agoUse an export list when building JIT unittests. <rdar://problem/12473675>
Bob Wilson [Thu, 18 Oct 2012 20:25:36 +0000 (20:25 +0000)]
Use an export list when building JIT unittests. <rdar://problem/12473675>

When building with LTO, the internalize pass is hiding some global symbols
that are necessary for the JIT unittests. It seems like that may be a bug in
LTO to do that by default, but until that gets fixed, this change makes sure
that we export the necessary symbols for the tests to pass.

llvm-svn: 166220

11 years agoFix Objective-C implicit property synthesis for C++ classes so we use valid
Eli Friedman [Thu, 18 Oct 2012 20:14:08 +0000 (20:14 +0000)]
Fix Objective-C implicit property synthesis for C++ classes so we use valid
source locations in places where it is necessary for diagnostics.  By itself,
this causes assertions, so while I'm here, also fix property synthesis
for properties of C++ class type so we use so we properly set up a scope
and mark variable declarations.

<rdar://problem/12514189>.

llvm-svn: 166219

11 years agoEmit diagnostics in chunks even when we're trying to print colored template diffs.
Benjamin Kramer [Thu, 18 Oct 2012 20:09:54 +0000 (20:09 +0000)]
Emit diagnostics in chunks even when we're trying to print colored template diffs.

char-by-char is really slow on an unbuffered stream.

llvm-svn: 166218

11 years agoUse pre-python 2.5 syntax in lit.cfg.
Sebastian Pop [Thu, 18 Oct 2012 19:58:28 +0000 (19:58 +0000)]
Use pre-python 2.5 syntax in lit.cfg.

Author:    Quentin Neill <qneill@codeaurora.org>
llvm-svn: 166217

11 years agoClear unknown mem ops when merging stack slots (pr14090)
Sebastian Pop [Thu, 18 Oct 2012 19:53:48 +0000 (19:53 +0000)]
Clear unknown mem ops when merging stack slots (pr14090)

When merging stack slots, if StackColoring::remapInstructions gets a
value back from GetUnderlyingObject that it does not know about or is
not itself a stack slot, clear the memory operand in case it aliases
the merged slot. This prevents the introduction of incorrect aliasing
information.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166216

11 years agoChange MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*
Sebastian Pop [Thu, 18 Oct 2012 19:53:45 +0000 (19:53 +0000)]
Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*

This more accurately reflects what is actually being stored in the
field.

No functionality change intended.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166215

11 years ago[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
Chad Rosier [Thu, 18 Oct 2012 19:39:37 +0000 (19:39 +0000)]
[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
*NamedDecl.  In turn, build the expressions after we're finished parsing the
asm.  This avoids a crasher if the lookup fails.

llvm-svn: 166213

11 years ago[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
Chad Rosier [Thu, 18 Oct 2012 19:39:30 +0000 (19:39 +0000)]
[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
*NamedDecl.  In turn, build the expressions after we're finished parsing the
asm.  This avoids a crasher if the lookup fails.

llvm-svn: 166212

11 years ago[analyzer] Ivar invalidation: identify properties declared in protocols.
Anna Zaks [Thu, 18 Oct 2012 19:17:57 +0000 (19:17 +0000)]
[analyzer] Ivar invalidation: identify properties declared in protocols.

llvm-svn: 166211

11 years agoFactor CollectClassPropertyImplementations out of Sema into AST
Anna Zaks [Thu, 18 Oct 2012 19:17:53 +0000 (19:17 +0000)]
Factor CollectClassPropertyImplementations out of Sema into AST

This would make it possible for the analyzer to use the function.

llvm-svn: 166210

11 years agoPatch for decl printer test of objective-c methods.
Fariborz Jahanian [Thu, 18 Oct 2012 19:12:17 +0000 (19:12 +0000)]
Patch for decl printer test of objective-c methods.
Patch by Dmitri Gribenko.

llvm-svn: 166209

11 years agoFrom Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources.
Axel Naumann [Thu, 18 Oct 2012 19:05:02 +0000 (19:05 +0000)]
From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources.

llvm-svn: 166208

11 years agoRevert "We need this symbol after an LTO build."
Bob Wilson [Thu, 18 Oct 2012 18:52:54 +0000 (18:52 +0000)]
Revert "We need this symbol after an LTO build."

This reverts commit 165776.  The plug-in uses this symbol; it does not
define it.  It needs to be exported from bugpoint itself, not from the plug-in.

llvm-svn: 166207

11 years agoCollapse the original file name and original file ID records into a
Douglas Gregor [Thu, 18 Oct 2012 18:36:53 +0000 (18:36 +0000)]
Collapse the original file name and original file ID records into a
single record.

llvm-svn: 166206

11 years agoAvoid reconstructing the pointer set when searching for duplicated read/write pointers.
Nadav Rotem [Thu, 18 Oct 2012 18:34:50 +0000 (18:34 +0000)]
Avoid reconstructing the pointer set when searching for duplicated read/write pointers.

llvm-svn: 166205

11 years agoCollapse the "version control revision/tag" AST file record into the
Douglas Gregor [Thu, 18 Oct 2012 18:27:37 +0000 (18:27 +0000)]
Collapse the "version control revision/tag" AST file record into the
metadata record, which already had other version information. Clean up
the block info block along the way.

llvm-svn: 166204

11 years agoFix more documentation comments in Comment.h
Dmitri Gribenko [Thu, 18 Oct 2012 18:21:40 +0000 (18:21 +0000)]
Fix more documentation comments in Comment.h

llvm-svn: 166203

11 years agoExpand the comment for DeclInfo::CurrentDecl.
Dmitri Gribenko [Thu, 18 Oct 2012 18:18:26 +0000 (18:18 +0000)]
Expand the comment for DeclInfo::CurrentDecl.

llvm-svn: 166202

11 years agoUpdate the LangRef documentation for the per pointer address space support.
Micah Villmow [Thu, 18 Oct 2012 18:18:17 +0000 (18:18 +0000)]
Update the LangRef documentation for the per pointer address space support.

llvm-svn: 166201

11 years agoCosmetic change -- move two simplifiers to the right commented statement group.
Meador Inge [Thu, 18 Oct 2012 18:12:43 +0000 (18:12 +0000)]
Cosmetic change -- move two simplifiers to the right commented statement group.

llvm-svn: 166199

11 years agoinstcombine: Migrate strcpy optimizations
Meador Inge [Thu, 18 Oct 2012 18:12:40 +0000 (18:12 +0000)]
instcombine: Migrate strcpy optimizations

This patch migrates the strcpy optimizations from the simplify-libcalls pass
into the instcombine library call simplifier.  Note also that StrCpyChkOpt
has been updated with a few simplifications that were being done in the
simplify-libcalls version of StrCpyOpt, but not in the migrated implementation
of StrCpyOpt.  There is no reason to overload StrCpyOpt with fortified and
regular simplifications in the new model since there is already a dedicated
simplifier for __strcpy_chk.

llvm-svn: 166198

11 years agotest commit: verifying access from new address
Eli Bendersky [Thu, 18 Oct 2012 18:12:05 +0000 (18:12 +0000)]
test commit: verifying access from new address

llvm-svn: 166197

11 years agoIn SimplifySelectOps we pulled two loads through a select node despite the fact that...
Nadav Rotem [Thu, 18 Oct 2012 18:06:48 +0000 (18:06 +0000)]
In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.

rdar://12513091

llvm-svn: 166196

11 years agoSplit the target options out into their own record within the AST
Douglas Gregor [Thu, 18 Oct 2012 17:58:09 +0000 (17:58 +0000)]
Split the target options out into their own record within the AST
file's control block.

llvm-svn: 166195

11 years agoDR1442: In a range-based for statement, namespace 'std' is not an associated
Richard Smith [Thu, 18 Oct 2012 17:56:02 +0000 (17:56 +0000)]
DR1442: In a range-based for statement, namespace 'std' is not an associated
namespace.

llvm-svn: 166194

11 years ago[ms-inline asm] Remove accidental commit.
Chad Rosier [Thu, 18 Oct 2012 17:51:43 +0000 (17:51 +0000)]
[ms-inline asm] Remove accidental commit.

llvm-svn: 166193

11 years agoImprove comment in couple of fields of DeclInfo.
Fariborz Jahanian [Thu, 18 Oct 2012 17:32:05 +0000 (17:32 +0000)]
Improve comment in couple of fields of DeclInfo.

llvm-svn: 166192

11 years agoWhen looking for a vector representation of a scalar, do a single lookup. Also, cache...
Nadav Rotem [Thu, 18 Oct 2012 17:31:49 +0000 (17:31 +0000)]
When looking for a vector representation of a scalar, do a single lookup. Also, cache the result of the broadcast instruction.
No functionality change.

llvm-svn: 166191

11 years agoFix this test to match recent addition of declaration tag.
Fariborz Jahanian [Thu, 18 Oct 2012 17:19:41 +0000 (17:19 +0000)]
Fix this test to match recent addition of declaration tag.

llvm-svn: 166190

11 years agoThis update does the following:
Sid Manning [Thu, 18 Oct 2012 17:16:19 +0000 (17:16 +0000)]
This update does the following:
  * Moves enum Scope from DefinedAtom.h to Atom.h
  * Adds scope method to AbsoluteAtom class
  * Updates YAML to print scope of AbsoluteAtoms
  * Update Native Reader/Writer to handle this new, "attribute"
  * Adds testcase
Reviewed and approved by Nick Kledzik

llvm-svn: 166189

11 years agoPR14021: Copy lookup results to ensure safe iteration.
David Blaikie [Thu, 18 Oct 2012 16:57:32 +0000 (16:57 +0000)]
PR14021: Copy lookup results to ensure safe iteration.

Within the body of the loop the underlying map may be modified via

  Sema::AddOverloadCandidate
    -> Sema::CompareReferenceRelationship
    -> Sema::RequireCompleteType

to avoid the use of invalid iterators the sequence is copied first.

A reliable, though large, test case is available - it will be reduced and
committed shortly.

Patch by Robert Muth. Review by myself, Nico Weber, and Rafael Espindola.

llvm-svn: 166188

11 years ago<rdar://problem/12462048>
Greg Clayton [Thu, 18 Oct 2012 16:33:33 +0000 (16:33 +0000)]
<rdar://problem/12462048>
<rdar://problem/12068650>

More fixes to how we handle paths that are used to create a target.

This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing".

llvm-svn: 166186

11 years ago[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
Chad Rosier [Thu, 18 Oct 2012 15:49:40 +0000 (15:49 +0000)]
[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer.  Use the new ParseMSInlineAsm() API and add an implementation of the
MCAsmParserSemaCallback interface.

llvm-svn: 166184

11 years ago[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
Chad Rosier [Thu, 18 Oct 2012 15:49:34 +0000 (15:49 +0000)]
[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer.  Add the ParseMSInlineAsm() function, which is the new interface to
clang.  Also expose the new MCAsmParserSemaCallback interface, which is used
by the back-end to do name lookup in Sema.  Finally, remove the now defunct
APIs introduced in r165946.

llvm-svn: 166183

11 years agoFix typo (test commit)
Andy Gibbs [Thu, 18 Oct 2012 15:24:46 +0000 (15:24 +0000)]
Fix typo (test commit)

llvm-svn: 166181

11 years ago[asan] Disable new/delete interceptors on Android and make them visible elsewhere.
Evgeniy Stepanov [Thu, 18 Oct 2012 15:22:08 +0000 (15:22 +0000)]
[asan] Disable new/delete interceptors on Android and make them visible elsewhere.

llvm-svn: 166180

11 years agoUn-XFAIL some tests for comment to XML conversion. This reverts r166151 and
Dmitri Gribenko [Thu, 18 Oct 2012 14:33:01 +0000 (14:33 +0000)]
Un-XFAIL some tests for comment to XML conversion.  This reverts r166151 and
fixes the tests for builds without libxml2.

llvm-svn: 166179

11 years agoThis patch fixes failures in the SingleSource/Regression/C/uint64_to_float
Ulrich Weigand [Thu, 18 Oct 2012 13:16:11 +0000 (13:16 +0000)]
This patch fixes failures in the SingleSource/Regression/C/uint64_to_float
test case on PowerPC caused by rounding errors when converting from a 64-bit
integer to a single-precision floating point. The reason for this are
double-rounding effects, since on PowerPC we have to convert to an
intermediate double-precision value first, which gets rounded to the
final single-precision result.

The patch fixes the problem by preparing the 64-bit integer so that the
first conversion step to double-precision will always be exact, and the
final rounding step will result in the correctly-rounded single-precision
result.  The generated code sequence is equivalent to what GCC would generate.

When -enable-unsafe-fp-math is in effect, that extra effort is omitted
and we accept possible rounding errors (just like GCC does as well).

llvm-svn: 166178

11 years ago[Sanitizer] fall back to online symbolizer if user-provided callback failed
Alexey Samsonov [Thu, 18 Oct 2012 11:46:22 +0000 (11:46 +0000)]
[Sanitizer] fall back to online symbolizer if user-provided callback failed

llvm-svn: 166177

11 years agoRefactor insert and extract of sub-integers into static helpers that
Chandler Carruth [Thu, 18 Oct 2012 09:56:08 +0000 (09:56 +0000)]
Refactor insert and extract of sub-integers into static helpers that
operate purely on values. Sink the alloca loading and storing logic into
the rewrite routines that are specific to alloca-integer-rewrite
driving. This is just a refactoring here, but the subsequent step will
be to reuse the insertion and extraction logic when rewriting integer
loads and stores that have been split and decomposed into narrower loads
and stores.

No functionality changed other than different names for instructions.

llvm-svn: 166176

11 years agoThis FIXME was fixed some time ago. =]
Chandler Carruth [Thu, 18 Oct 2012 09:56:06 +0000 (09:56 +0000)]
This FIXME was fixed some time ago. =]

llvm-svn: 166175

11 years agoFixed some corner cases due to implicit int TypeLoc and simplified the logic.
Abramo Bagnara [Thu, 18 Oct 2012 08:29:37 +0000 (08:29 +0000)]
Fixed some corner cases due to implicit int TypeLoc and simplified the logic.

llvm-svn: 166174

11 years agoRe-enable this test now that r166172 has hacked around the terrible
Chandler Carruth [Thu, 18 Oct 2012 08:06:28 +0000 (08:06 +0000)]
Re-enable this test now that r166172 has hacked around the terrible
limitations of the pass manager stack in the pass manager builder.

llvm-svn: 166173

11 years agoIntroduce a BarrierNoop pass, a hack designed to allow *some* control
Chandler Carruth [Thu, 18 Oct 2012 08:05:46 +0000 (08:05 +0000)]
Introduce a BarrierNoop pass, a hack designed to allow *some* control
over the implicitly-formed-and-nesting CGSCC pass manager and function
pass managers, especially when using them on the opt commandline or
using extension points in the module builder. The '-barrier' opt flag
(or the pass itself) will create a no-op module pass in the pipeline,
resetting the pass manager stack, and allowing the creation of a new
pipeline of function passes or CGSCC passes to be created that is
independent from any previous pipelines.

For example, this can be used to test running two CGSCC passes in
independent CGSCC pass managers as opposed to in the same CGSCC pass
manager. It also allows us to introduce a further hack into the
PassManagerBuilder to separate the O0 pipeline extension passes from the
always-inliner's CGSCC pass manager, which they likely do not want to
participate in... At the very least none of the Sanitizer passes want
this behavior.

This fixes a bug with ASan at O0 currently, and I'll commit the ASan
test which covers this pass. I'm happy to add a test case that this pass
exists and works, but not sure how much time folks would like me to
spend adding test cases for the details of its behavior of partition
pass managers.... The whole thing is just vile, and mostly intended to
unblock ASan, so I'm hoping to rip this all out in a brave new pass
manager world.

llvm-svn: 166172

11 years agoPut used="1" on all used declarations in the XML dumper. This allows us to
Nick Lewycky [Thu, 18 Oct 2012 07:55:46 +0000 (07:55 +0000)]
Put used="1" on all used declarations in the XML dumper. This allows us to
start seeing the bit so that we can find bugs and write tests for it.

llvm-svn: 166171

11 years agoremove unused variable to fix a warning.
Nadav Rotem [Thu, 18 Oct 2012 06:09:21 +0000 (06:09 +0000)]
remove unused variable to fix a warning.

llvm-svn: 166170

11 years agoAdd a small example which shows a vectorizable loop with a non-pow-of-two count
Nadav Rotem [Thu, 18 Oct 2012 05:46:16 +0000 (05:46 +0000)]
Add a small example which shows a vectorizable loop with a non-pow-of-two count

llvm-svn: 166169

11 years agoTemporarily revert the TargetTransform changes.
Bob Wilson [Thu, 18 Oct 2012 05:43:52 +0000 (05:43 +0000)]
Temporarily revert the TargetTransform changes.

The TargetTransform changes are breaking LTO bootstraps of clang.  I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.

This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741

llvm-svn: 166168

11 years agoRemove the use of dominators and AA.
Nadav Rotem [Thu, 18 Oct 2012 05:33:02 +0000 (05:33 +0000)]
Remove the use of dominators and AA.

llvm-svn: 166167

11 years agoStart factoring the on-disk records for an AST file into a control
Douglas Gregor [Thu, 18 Oct 2012 05:31:06 +0000 (05:31 +0000)]
Start factoring the on-disk records for an AST file into a control
block, which stores information about how the AST file to generated,
from the AST block, which stores the actual serialized AST. The
information in the control block should be enough to determine whether
the AST file is up-to-date and compatible with the current translation
unit, and reading it should not cause any side effects that aren't
easy to undo. That way, we can back out from an attempt to read an
incompatible or out-of-date AST file.

Note that there is still more factoring to do. In particular,
information about the source files used to generate the AST file
(along with their time stamps, sizes, etc.) still resides in the
source manager block.

llvm-svn: 166166

11 years agoVectorizer: Add support for loops with an unknown count. For example:
Nadav Rotem [Thu, 18 Oct 2012 05:29:12 +0000 (05:29 +0000)]
Vectorizer: Add support for loops with an unknown count. For example:

     for (i=0; i<n; i++){
        a[i] = b[i+1] + c[i+3];
     }

llvm-svn: 166165

11 years agoRevert svn r165741 "Add TargetTransformInfo to the clang driver."
Bob Wilson [Thu, 18 Oct 2012 05:23:42 +0000 (05:23 +0000)]
Revert svn r165741 "Add TargetTransformInfo to the clang driver."

Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang,
so I'm reverting it for now, along with follow-on patches like this one.

llvm-svn: 166164

11 years agolibclang/CXComment.cpp: Fix abuse of StringRef.
NAKAMURA Takumi [Thu, 18 Oct 2012 01:38:53 +0000 (01:38 +0000)]
libclang/CXComment.cpp: Fix abuse of StringRef.

llvm-svn: 166163

11 years agoTests for DR1507.
Richard Smith [Thu, 18 Oct 2012 00:44:17 +0000 (00:44 +0000)]
Tests for DR1507.

llvm-svn: 166162

11 years ago[libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.
Argyrios Kyrtzidis [Thu, 18 Oct 2012 00:17:05 +0000 (00:17 +0000)]
[libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.

llvm-svn: 166161

11 years ago[libclang] Add a test for annotation of module headers
Argyrios Kyrtzidis [Thu, 18 Oct 2012 00:16:56 +0000 (00:16 +0000)]
[libclang] Add a test for annotation of module headers

llvm-svn: 166160

11 years agoRevert r166157 because some tests fail...
Bill Wendling [Wed, 17 Oct 2012 23:56:05 +0000 (23:56 +0000)]
Revert r166157 because some tests fail...

llvm-svn: 166159

11 years agoUpdate comment to match DR1502.
Richard Smith [Wed, 17 Oct 2012 23:55:38 +0000 (23:55 +0000)]
Update comment to match DR1502.

llvm-svn: 166158

11 years agoCheck that the operand of the GEP is not the GEP itself. This occurred during an...
Bill Wendling [Wed, 17 Oct 2012 23:54:19 +0000 (23:54 +0000)]
Check that the operand of the GEP is not the GEP itself. This occurred during an LTO build of LLVM.

llvm-svn: 166157

11 years agoDR1535: only potentially-evaluated typeid expressions are disallowed in constant
Richard Smith [Wed, 17 Oct 2012 23:52:07 +0000 (23:52 +0000)]
DR1535: only potentially-evaluated typeid expressions are disallowed in constant
expressions, not *any* typeid on a polymorphic class type.

llvm-svn: 166156

11 years agoRevert part of r166049 back and enable test case in r166125.
Michael Liao [Wed, 17 Oct 2012 23:45:54 +0000 (23:45 +0000)]
Revert part of r166049 back and enable test case in r166125.

- Folding (trunc (concat ... X )) to (concat ... (trunc X) ...) is valid
  when '...' are all 'undef's.
- r166125 relies on this transformation.

llvm-svn: 166155

11 years agoFix -Woverloaded-virtual when the using statement refers to a base declaration of...
David Blaikie [Wed, 17 Oct 2012 23:45:39 +0000 (23:45 +0000)]
Fix -Woverloaded-virtual when the using statement refers to a base declaration of a virtual function.

GCC and Clang both do not warn on:

  struct a { virtual void func(); };
  struct b: a { virtual void func(); void func(int); };
  struct c: b { void func(int); using b::func; };

but if the "using" was using a::func GCC would still remain silent where Clang
would warn. This change makes Clang consistent with GCC's existing behavior.

llvm-svn: 166154

11 years agoLoopVectorize.cpp: Fix a warning. [-Wunused-variable]
NAKAMURA Takumi [Wed, 17 Oct 2012 23:40:15 +0000 (23:40 +0000)]
LoopVectorize.cpp: Fix a warning. [-Wunused-variable]

llvm-svn: 166153

11 years agoDR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.
Richard Smith [Wed, 17 Oct 2012 23:31:46 +0000 (23:31 +0000)]
DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.

llvm-svn: 166152

11 years agoXFAIL these tests until I can figure out what is going on on
Fariborz Jahanian [Wed, 17 Oct 2012 23:25:40 +0000 (23:25 +0000)]
XFAIL these tests until I can figure out what is going on on
other platforms.

llvm-svn: 166151

11 years agoAdds couple of missing warning flags so warnings can be turned
Fariborz Jahanian [Wed, 17 Oct 2012 23:19:22 +0000 (23:19 +0000)]
Adds couple of missing warning flags so warnings can be turned
off. // rdar://12501960

llvm-svn: 166150

11 years agoDisable extract-concat test case temporarily
Michael Liao [Wed, 17 Oct 2012 23:08:19 +0000 (23:08 +0000)]
Disable extract-concat test case temporarily

llvm-svn: 166141

11 years agoAdd -std=c++1y argument, for *highly* experimental C++14 support.
Richard Smith [Wed, 17 Oct 2012 23:07:52 +0000 (23:07 +0000)]
Add -std=c++1y argument, for *highly* experimental C++14 support.

llvm-svn: 166139

11 years agoRemove redundant SetInsertPoint call.
Jakub Staszak [Wed, 17 Oct 2012 23:06:37 +0000 (23:06 +0000)]
Remove redundant SetInsertPoint call.

llvm-svn: 166138

11 years ago<rdar://problem/12462048>
Greg Clayton [Wed, 17 Oct 2012 22:57:12 +0000 (22:57 +0000)]
<rdar://problem/12462048>

LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings:

target.arg0 (string) =

There is also the program argument that are separate from the first argument that have existed for a while:

target.run-args (arguments) =

When running "target create <exe>", we will place the untouched "<exe>" into target.arg0 to ensure when we run, we run with what the user typed. This has been added to the ProcessLaunchInfo and all other needed places so we always carry around the:
- resolved executable path
- argv0
- program args

Some systems may not support separating argv0 from the resolved executable path and the ProcessLaunchInfo needs to carry all of this information along so that each platform can make that decision.

llvm-svn: 166137

11 years agoRevert r166049
Michael Liao [Wed, 17 Oct 2012 22:41:15 +0000 (22:41 +0000)]
Revert r166049

- In general, it's unsafe for this transformation.

llvm-svn: 166135

11 years agoAdd conditional branch instructions and their patterns.
Reed Kotler [Wed, 17 Oct 2012 22:29:54 +0000 (22:29 +0000)]
Add conditional branch instructions and their patterns.

llvm-svn: 166134

11 years agoImprovements to the data formatters logging - plus, new log messages when our dynamic...
Enrico Granata [Wed, 17 Oct 2012 22:23:56 +0000 (22:23 +0000)]
Improvements to the data formatters logging - plus, new log messages when our dynamic type changes

llvm-svn: 166133

11 years agoFixed ClangASTContext to own its TargetOptions
Sean Callanan [Wed, 17 Oct 2012 22:11:14 +0000 (22:11 +0000)]
Fixed ClangASTContext to own its TargetOptions
using a reference-counted pointer.  This avoids
memory-management problems when the TargetOptions
are deleted.

llvm-svn: 166132

11 years agoAdded support for "bool", "true", and "false" to
Sean Callanan [Wed, 17 Oct 2012 22:09:59 +0000 (22:09 +0000)]
Added support for "bool", "true", and "false" to
the expression parser (also wchar_t) and added a
test case.

llvm-svn: 166131

11 years ago[Doc parsing]: This patch adds <Declaration> tag to
Fariborz Jahanian [Wed, 17 Oct 2012 21:58:03 +0000 (21:58 +0000)]
[Doc parsing]: This patch adds <Declaration> tag to
XML comment for declarations which pretty-prints
declaration. I had to XFAIL one test annotate-comments.cpp.
This test is currently unmaintainable as written.
Dmitri G., can you see what we can do about this test.
We should change this test such that adding a new tag does not wreck
havoc to the test.

llvm-svn: 166130

11 years ago[analyzer] CmpRuns: cleanup APIs, allow processing of plists with no
Anna Zaks [Wed, 17 Oct 2012 21:09:26 +0000 (21:09 +0000)]
[analyzer] CmpRuns: cleanup APIs, allow processing of plists with no
clang_version, fix the compare routine.

llvm-svn: 166129

11 years agoFix some typos and wrong indenting.
Roman Divacky [Wed, 17 Oct 2012 21:07:35 +0000 (21:07 +0000)]
Fix some typos and wrong indenting.

llvm-svn: 166128

11 years agoAdded register write examples and also how to modify the pc. For this we show and...
Greg Clayton [Wed, 17 Oct 2012 20:58:52 +0000 (20:58 +0000)]
Added register write examples and also how to modify the pc. For this we show and example of GDB using the "jump" command, and LLDB using "register write" with an expression.

llvm-svn: 166127

11 years agoTeach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i
Michael Liao [Wed, 17 Oct 2012 20:48:33 +0000 (20:48 +0000)]
Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i

- If the extracted vector has the same type of all vectored being concatenated
  together, it should be simplified directly into v_i, where i is the index of
  the element being extracted.

llvm-svn: 166125

11 years agoSwitch MRI::UsedPhysRegs to a register unit bit vector.
Jakob Stoklund Olesen [Wed, 17 Oct 2012 20:26:33 +0000 (20:26 +0000)]
Switch MRI::UsedPhysRegs to a register unit bit vector.

This is a more compact, less redundant representation, and it avoids
scanning long lists of aliases for ARM D-registers, for example.

llvm-svn: 166124

11 years agoUpdate the release notes about how to enable the loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 19:49:21 +0000 (19:49 +0000)]
Update the release notes about how to enable the loop vectorizer.

llvm-svn: 166123

11 years agoAdd a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
Evan Cheng [Wed, 17 Oct 2012 19:39:36 +0000 (19:39 +0000)]
Add a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
any scheduling heuristics nor does it build up any scheduling data structure
that other heuristics use. It essentially linearize by doing a DFA walk but
it does handle glues correctly.

IMPORTANT: it probably can't handle all the physical register dependencies so
it's not suitable for x86. It also doesn't deal with dbg_value nodes right now
so it's definitely is still WIP.

rdar://12474515

llvm-svn: 166122

11 years ago[analyzer] When binding to a ParenExpr, bind to its inner expression instead.
Jordan Rose [Wed, 17 Oct 2012 19:35:44 +0000 (19:35 +0000)]
[analyzer] When binding to a ParenExpr, bind to its inner expression instead.

This actually looks through several kinds of expression, such as
OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup
should be consistent, and so if the environment needs to be modified later,
the code doing the modification will not have to manually look through these
"transparent" expressions to find the real binding to change.

This is necessary for proper updating of struct rvalues as described in
the previous commit.

llvm-svn: 166121

11 years ago[analyzer] Create a temporary region when accessing a struct rvalue.
Jordan Rose [Wed, 17 Oct 2012 19:35:37 +0000 (19:35 +0000)]
[analyzer] Create a temporary region when accessing a struct rvalue.

In C++, rvalues that need to have their address taken (for example, to be
passed to a function by const reference) will be wrapped in a
MaterializeTemporaryExpr, which lets CodeGen know to create a temporary
region to store this value. However, MaterializeTemporaryExprs are /not/
created when a method is called on an rvalue struct, even though the 'this'
pointer needs a valid value. CodeGen works around this by creating a
temporary region anyway; now, so does the analyzer.

The analyzer also does this when accessing a field of a struct rvalue.
This is a little unfortunate, since the rest of the struct will soon be
thrown away, but it does make things consistent with the rest of the
analyzer.

This allows us to bring back the assumption that all known 'this' values
are Locs. This is a revised version of r164828-9, reverted in r164876-7.

<rdar://problem/12137950>

llvm-svn: 166120

11 years ago<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective...
Enrico Granata [Wed, 17 Oct 2012 19:03:34 +0000 (19:03 +0000)]
<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective-C pointer changed but we still reported the one-true-definition for the previous type. This was causing issues where a variable could be reported as being of an entirely different type after an assignment

llvm-svn: 166119

11 years agoMove -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.
David Blaikie [Wed, 17 Oct 2012 18:47:30 +0000 (18:47 +0000)]
Move -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.

Addressing feedback on r166039 given by Matt Beaumont-Gay.

llvm-svn: 166118

11 years agoMerge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().
Jakob Stoklund Olesen [Wed, 17 Oct 2012 18:44:18 +0000 (18:44 +0000)]
Merge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().

All callers of these functions really want the isPhysRegOrOverlapUsed()
functionality which also checks aliases. For historical reasons, targets
without register aliases were calling isPhysRegUsed() instead.

Change isPhysRegUsed() to also check aliases, and switch all
isPhysRegOrOverlapUsed() callers to isPhysRegUsed().

llvm-svn: 166117

11 years agoUpdate the release notes about the store-merge dag optimization.
Nadav Rotem [Wed, 17 Oct 2012 18:35:21 +0000 (18:35 +0000)]
Update the release notes about the store-merge dag optimization.

llvm-svn: 166116

11 years agoUpdate the release notes about the new TargetTransformInfo API changes.
Nadav Rotem [Wed, 17 Oct 2012 18:33:50 +0000 (18:33 +0000)]
Update the release notes about the new TargetTransformInfo API changes.

llvm-svn: 166115

11 years agobuild/clang_darwin: Don't try to build ARM contents on 10.6.
Daniel Dunbar [Wed, 17 Oct 2012 18:33:43 +0000 (18:33 +0000)]
build/clang_darwin: Don't try to build ARM contents on 10.6.

 - The cctools' ranlib on 10.6 has a bug and can't understand our ARM object
   files.

llvm-svn: 166114

11 years agoUpdate the release notes about the new loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 18:30:09 +0000 (18:30 +0000)]
Update the release notes about the new loop vectorizer.

llvm-svn: 166113

11 years agoAdd a loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 18:25:06 +0000 (18:25 +0000)]
Add a loop vectorizer.

llvm-svn: 166112

11 years agobuild/make: There is no need to put timestamps into .dir files, and it just
Daniel Dunbar [Wed, 17 Oct 2012 18:21:21 +0000 (18:21 +0000)]
build/make: There is no need to put timestamps into .dir files, and it just
makes trees less comparable.

llvm-svn: 166111

11 years agoCheck for empty YMM use-def lists in X86VZeroUpper.
Jakob Stoklund Olesen [Wed, 17 Oct 2012 17:52:35 +0000 (17:52 +0000)]
Check for empty YMM use-def lists in X86VZeroUpper.

The previous MRI.isPhysRegUsed(YMM0) would also return true when the
function contains a call to a function that may clobber YMM0. That's
most of them.

Checking the use-def chains allows us to skip functions that don't
explicitly mention YMM registers.

llvm-svn: 166110

11 years agoRevert r158009 since there are some uses of artificial functions in
Eric Christopher [Wed, 17 Oct 2012 17:37:17 +0000 (17:37 +0000)]
Revert r158009 since there are some uses of artificial functions in
debug info.

llvm-svn: 166109

11 years agoFix fallout from RegInfo => FrameLowering refactoring on MSP430.
Anton Korobeynikov [Wed, 17 Oct 2012 17:37:11 +0000 (17:37 +0000)]
Fix fallout from RegInfo => FrameLowering refactoring on MSP430.
Patch by Job Noorman!

llvm-svn: 166108

11 years agomisched: Better handling of invalid latencies in the machine model
Andrew Trick [Wed, 17 Oct 2012 17:27:10 +0000 (17:27 +0000)]
misched: Better handling of invalid latencies in the machine model

llvm-svn: 166107