platform/upstream/llvm.git
11 years agoAdd include to hopefully fix windows build.
Craig Topper [Mon, 15 Jul 2013 07:15:05 +0000 (07:15 +0000)]
Add include to hopefully fix windows build.

llvm-svn: 186310

11 years agoAdd const qualifier to some static arrays.
Craig Topper [Mon, 15 Jul 2013 07:02:45 +0000 (07:02 +0000)]
Add const qualifier to some static arrays.

llvm-svn: 186309

11 years agoAdd 'static' keyword to some const arrays for consistency.
Craig Topper [Mon, 15 Jul 2013 06:54:12 +0000 (06:54 +0000)]
Add 'static' keyword to some const arrays for consistency.

llvm-svn: 186308

11 years agoMake some arrays 'static const'
Craig Topper [Mon, 15 Jul 2013 06:39:13 +0000 (06:39 +0000)]
Make some arrays 'static const'

llvm-svn: 186307

11 years agoFix to PR12262 - assertion when substituting explicit template arguments
Serge Pavlov [Mon, 15 Jul 2013 06:14:07 +0000 (06:14 +0000)]
Fix to PR12262 - assertion when substituting explicit template arguments
does not substitute a sizeof-pack expression.
The solution is proposed by Richard Smith.
Differential Revision: http://llvm-reviews.chandlerc.com/D869

llvm-svn: 186306

11 years agoRevert 186302 to fix build bots.
Craig Topper [Mon, 15 Jul 2013 05:44:18 +0000 (05:44 +0000)]
Revert 186302 to fix build bots.

llvm-svn: 186305

11 years agoBump version number to 310.99.0.
Jason Molenda [Mon, 15 Jul 2013 04:47:33 +0000 (04:47 +0000)]
Bump version number to 310.99.0.

llvm-svn: 186304

11 years agoRevert part of 186302 to fix buildbots.
Craig Topper [Mon, 15 Jul 2013 04:37:54 +0000 (04:37 +0000)]
Revert part of 186302 to fix buildbots.

llvm-svn: 186303

11 years agoUse llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
Craig Topper [Mon, 15 Jul 2013 04:28:48 +0000 (04:28 +0000)]
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

llvm-svn: 186302

11 years agoUse llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
Craig Topper [Mon, 15 Jul 2013 04:27:47 +0000 (04:27 +0000)]
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

llvm-svn: 186301

11 years agoUse llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
Craig Topper [Mon, 15 Jul 2013 03:38:40 +0000 (03:38 +0000)]
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

llvm-svn: 186300

11 years agoCommit Timothee Besset's patch to update Host/linux/Host.cpp to keep up
Jason Molenda [Mon, 15 Jul 2013 03:25:21 +0000 (03:25 +0000)]
Commit Timothee Besset's patch to update Host/linux/Host.cpp to keep up
with the changes in r186211.

llvm-svn: 186299

11 years agoMark llvm/test/Object/extract.ll as XFAIL:mingw32, for now.
NAKAMURA Takumi [Mon, 15 Jul 2013 03:04:13 +0000 (03:04 +0000)]
Mark llvm/test/Object/extract.ll as XFAIL:mingw32, for now.

FIXME: Investigate Win32's TimeValue stuff!
llvm-svn: 186298

11 years agoClarify comments.
Eric Christopher [Sun, 14 Jul 2013 22:23:54 +0000 (22:23 +0000)]
Clarify comments.

llvm-svn: 186297

11 years agoAdd DW_AT_GNU_odr_signature to the set of dwarf attributes.
Eric Christopher [Sun, 14 Jul 2013 22:02:31 +0000 (22:02 +0000)]
Add DW_AT_GNU_odr_signature to the set of dwarf attributes.

llvm-svn: 186296

11 years agoCollapse temporary variable into call.
Eric Christopher [Sun, 14 Jul 2013 21:46:51 +0000 (21:46 +0000)]
Collapse temporary variable into call.

llvm-svn: 186295

11 years agoReformat line.
Eric Christopher [Sun, 14 Jul 2013 21:15:27 +0000 (21:15 +0000)]
Reformat line.

llvm-svn: 186294

11 years agoMove BlockLiteralGeneric earlier in CGDebugInfo and remove
Eric Christopher [Sun, 14 Jul 2013 21:12:44 +0000 (21:12 +0000)]
Move BlockLiteralGeneric earlier in CGDebugInfo and remove
BlockLiteralGenericSet and replace with a call to isType() on the
BlockLiteralGeneric.

llvm-svn: 186293

11 years agoUpdate a few comments and reformat a decl for clarity.
Eric Christopher [Sun, 14 Jul 2013 21:00:07 +0000 (21:00 +0000)]
Update a few comments and reformat a decl for clarity.

llvm-svn: 186292

11 years agoUse conventional syntax for branches.
Anton Korobeynikov [Sun, 14 Jul 2013 18:19:44 +0000 (18:19 +0000)]
Use conventional syntax for branches.
Patch by Job!

llvm-svn: 186291

11 years agoCorrect inaccurate statement in FileCheck docs.
Stephen Lin [Sun, 14 Jul 2013 18:12:25 +0000 (18:12 +0000)]
Correct inaccurate statement in FileCheck docs.

llvm-svn: 186290

11 years agoScopDetect: clang-format
Tobias Grosser [Sun, 14 Jul 2013 18:09:43 +0000 (18:09 +0000)]
ScopDetect: clang-format

llvm-svn: 186289

11 years agoDependences: Use ostream printer to print analysis output
Tobias Grosser [Sun, 14 Jul 2013 18:09:40 +0000 (18:09 +0000)]
Dependences: Use ostream printer to print analysis output

llvm-svn: 186288

11 years agoReplace C++0x in a comment with C++11
Craig Topper [Sun, 14 Jul 2013 17:04:56 +0000 (17:04 +0000)]
Replace C++0x in a comment with C++11

llvm-svn: 186287

11 years agoChange cxx0x to cxx11 in diagnostic name.
Craig Topper [Sun, 14 Jul 2013 17:02:30 +0000 (17:02 +0000)]
Change cxx0x to cxx11 in diagnostic name.

llvm-svn: 186286

11 years agoChange cxx0x to cxx11 in diagnostic name.
Craig Topper [Sun, 14 Jul 2013 17:01:54 +0000 (17:01 +0000)]
Change cxx0x to cxx11 in diagnostic name.

llvm-svn: 186285

11 years agoUse SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
Craig Topper [Sun, 14 Jul 2013 16:47:36 +0000 (16:47 +0000)]
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

llvm-svn: 186284

11 years agoProperly lower jump tables on MSP430. Patch by Job Noorman!
Anton Korobeynikov [Sun, 14 Jul 2013 15:11:00 +0000 (15:11 +0000)]
Properly lower jump tables on MSP430. Patch by Job Noorman!

llvm-svn: 186283

11 years agoThe archive update test has a subtle race condition in it: if the test
Chandler Carruth [Sun, 14 Jul 2013 10:46:51 +0000 (10:46 +0000)]
The archive update test has a subtle race condition in it: if the test
is executed within the same second as the inputs for the test are
checked out from the source tree, it will fail to update due to being
below the resolution of the 'mtime' test used.

Now, this may seem improbably to you... ok, maybe *really* improbable,
but consider a system which does distributed execution of tests by
shipping their inputs to another machine and runs them. That might cause
the mtime to be quite recent during the test run. ;]

Instead, create two files directly in the test (allowing all platforms
to see the problem) and add either a use of the 'touch' command that
forces one mtime to some time quite a bit in the past, or it sleeps for
just over a second to be outside of the precision window.

llvm-svn: 186282

11 years agoSupport: No need to comment __isl_keep
Tobias Grosser [Sun, 14 Jul 2013 06:59:38 +0000 (06:59 +0000)]
Support: No need to comment __isl_keep

llvm-svn: 186281

11 years agoMass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function...
Stephen Lin [Sun, 14 Jul 2013 06:24:09 +0000 (06:24 +0000)]
Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally.

This update was done with the following bash script:

  find test/CodeGen -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc.*debug" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP
      done
      sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
      sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
      sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
      sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186280

11 years agoMake these tests more robust against IRgen choosing to emit more named metadata.
Richard Smith [Sun, 14 Jul 2013 06:18:38 +0000 (06:18 +0000)]
Make these tests more robust against IRgen choosing to emit more named metadata.

llvm-svn: 186279

11 years agoDelete a test that is checking badly for a point bug that Clang never had (and that...
Richard Smith [Sun, 14 Jul 2013 06:17:03 +0000 (06:17 +0000)]
Delete a test that is checking badly for a point bug that Clang never had (and that spuriously fails with modules enabled).

llvm-svn: 186278

11 years agoSLPVectorizer: change the order in which we search for vectorization candidates....
Nadav Rotem [Sun, 14 Jul 2013 06:15:46 +0000 (06:15 +0000)]
SLPVectorizer: change the order in which we search for vectorization candidates. Do stores first and PHIs second.

llvm-svn: 186277

11 years agoFix build by replacing '>>' with '> >'
Tobias Grosser [Sun, 14 Jul 2013 06:12:01 +0000 (06:12 +0000)]
Fix build by replacing '>>' with '> >'

llvm-svn: 186276

11 years agoAdd missing include guards into headers in lib/Headers. While it may appear
Richard Smith [Sun, 14 Jul 2013 05:41:45 +0000 (05:41 +0000)]
Add missing include guards into headers in lib/Headers. While it may appear
that these headers should not be included more than once, they are in fact
included twice when building our builtins module (in order for it to generate
submodules for them), and without this, any modular build enabling AVX and
including any builtin header fails.

Testing this is tricky because including any of these headers in a modular
build is liable to fail, due to unrelated builtin headers in the same module
including headers which might not be available on the system running the tests.
Suggestion on that front are welcome (but we're getting close to being able to
run a buildbot that has modules enabled for all tests, which would nicely solve
the testing problem).

llvm-svn: 186275

11 years agoUse SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
Craig Topper [Sun, 14 Jul 2013 04:42:23 +0000 (04:42 +0000)]
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

llvm-svn: 186274

11 years agoRemove a bunch of old SCEVExpander FIXME's for preserving NoWrap.
Andrew Trick [Sun, 14 Jul 2013 03:10:08 +0000 (03:10 +0000)]
Remove a bunch of old SCEVExpander FIXME's for preserving NoWrap.

The great thing about the SCEVAddRec No-Wrap flag (unlike nsw/nuw) is
that is can be preserved while normalizing (reassociating and
factoring).

The bad thing is that is can't be tranfered back to IR, which is one
of the reasons I don't like the concept of SCEVExpander.

Sorry, I can't think of a direct way to test this, which is why these
were FIXMEs for so long. I just think it's a good time to finally
clean it up.

llvm-svn: 186273

11 years agoTeach indvars to generate nsw/nuw flags when widening an induction variable.
Andrew Trick [Sun, 14 Jul 2013 02:50:07 +0000 (02:50 +0000)]
Teach indvars to generate nsw/nuw flags when widening an induction variable.

Fixes PR16600.

llvm-svn: 186272

11 years agoFixup to r186268 and r186269: don't append -LABEL to CHECK-NOT. No functionality...
Stephen Lin [Sun, 14 Jul 2013 02:10:57 +0000 (02:10 +0000)]
Fixup to r186268 and r186269: don't append -LABEL to CHECK-NOT. No functionality change.

llvm-svn: 186271

11 years agoIf an unimported submodule of an imported module contains a declaration of a
Richard Smith [Sun, 14 Jul 2013 02:01:48 +0000 (02:01 +0000)]
If an unimported submodule of an imported module contains a declaration of a
global allocation or deallocation function, that should not cause that global
allocation or deallocation function to become unavailable.

llvm-svn: 186270

11 years agoCatch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugg...
Stephen Lin [Sun, 14 Jul 2013 01:50:49 +0000 (01:50 +0000)]
Catch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugging. No functionality change.

This conversion was done with the following bash script:

  find test/Transforms -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP
      done
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186269

11 years agoUpdate Transforms tests to use CHECK-LABEL for easier debugging. No functionality...
Stephen Lin [Sun, 14 Jul 2013 01:42:54 +0000 (01:42 +0000)]
Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.

This update was done with the following bash script:

  find test/Transforms -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP
      done
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186268

11 years agoModify two Transforms tests to explicitly check for full function names in some cases...
Stephen Lin [Sun, 14 Jul 2013 01:38:19 +0000 (01:38 +0000)]
Modify two Transforms tests to explicitly check for full function names in some cases, rather than just a common prefix. No functionality change.

(This is to avoid confusing a scripted mass update of these tests to use CHECK-LABEL)

llvm-svn: 186267

11 years agoSerialization support for TagDecl::IsCompleteDefinitionRequired
David Blaikie [Sun, 14 Jul 2013 01:07:41 +0000 (01:07 +0000)]
Serialization support for TagDecl::IsCompleteDefinitionRequired

Requested by Richard Smith in post-commit review of r186262

llvm-svn: 186266

11 years agoInitialize the "IsCompleteDefinitionRequired" field in the ASTContext ctor
David Blaikie [Sat, 13 Jul 2013 22:29:32 +0000 (22:29 +0000)]
Initialize the "IsCompleteDefinitionRequired" field in the ASTContext ctor

Introduced in r186262 & found by the hexagon buildbots (but owing to
this being UB, that's random chance - so there's no additional test case
here)

llvm-svn: 186265

11 years agoConvert Windows to Unix line endings, no functionality change.
Stephen Lin [Sat, 13 Jul 2013 22:08:55 +0000 (22:08 +0000)]
Convert Windows to Unix line endings, no functionality change.

llvm-svn: 186264

11 years agoAdd newlines at end of test files, no functionality change
Stephen Lin [Sat, 13 Jul 2013 22:00:58 +0000 (22:00 +0000)]
Add newlines at end of test files, no functionality change

llvm-svn: 186263

11 years agoPR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the...
David Blaikie [Sat, 13 Jul 2013 21:08:14 +0000 (21:08 +0000)]
PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

llvm-svn: 186262

11 years agoCorrectly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT
David Blaikie [Sat, 13 Jul 2013 21:08:08 +0000 (21:08 +0000)]
Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT

Test coverage for non-dependent pack expansions doesn't demonstrate a
failure prior to this patch (a follow-up commit improving debug info
will cover this commit specifically) but covers a related hole in our
test coverage.

Reviewed by Richard Smith & Eli Friedman.

llvm-svn: 186261

11 years agoSimplify getTypeInfoImpl handling of 'non-canonical unless dependent' types.
David Blaikie [Sat, 13 Jul 2013 21:08:03 +0000 (21:08 +0000)]
Simplify getTypeInfoImpl handling of 'non-canonical unless dependent' types.

These types are not dependent in this context, so just look through
the sugar.

Review by Richard Smith & Eli Friedman.

llvm-svn: 186260

11 years agoScopInfo: Add getTupe() method to MemoryAccess
Tobias Grosser [Sat, 13 Jul 2013 20:41:24 +0000 (20:41 +0000)]
ScopInfo: Add getTupe() method to MemoryAccess

We also move the enum to UPPERCASE.

llvm-svn: 186259

11 years agoConvert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No...
Stephen Lin [Sat, 13 Jul 2013 20:38:47 +0000 (20:38 +0000)]
Convert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No functionality change and all tests pass after conversion.

This was done with the following sed invocation to catch label lines demarking function boundaries:
    sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll
which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct.

llvm-svn: 186258

11 years agoRevert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile""
David Blaikie [Sat, 13 Jul 2013 19:23:35 +0000 (19:23 +0000)]
Revert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile""

This reverts commit b18b043a5a37f76803d89467e46bcac286c0ecae.

Reapply with fix for the configure+make build (missing include of
ASTContext.h).

llvm-svn: 186257

11 years agoLoopVectorizer: Disallow reductions whose header phi is used outside the loop
Arnold Schwaighofer [Sat, 13 Jul 2013 19:09:29 +0000 (19:09 +0000)]
LoopVectorizer: Disallow reductions whose header phi is used outside the loop

If an outside loop user of the reduction value uses the header phi node we
cannot just reduce the vectorized phi value in the vector code epilog because
we would loose VF-1 reductions.

lp:
  p = phi (0, lv)
  lv = lv + 1
  ...
  brcond , lp, outside

outside:
  usr = add 0, p

(Say the loop iterates two times, the value of p coming out of the loop is one).

We cannot just transform this to:

vlp:
  p = phi (<0,0>, lv)
  lv = lv + <1,1>
  ..
  brcond , lp, outside

outside:
  p_reduced = p[0] + [1];
  usr = add 0, p_reduced

(Because the original loop iterated two times the vectorized loop would iterate
one time, but p_reduced ends up being zero instead of one).

We would have to execute VF-1 iterations in the scalar remainder loop in such
cases. For now, just disable vectorization.

PR16522

llvm-svn: 186256

11 years agoRevert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"
David Blaikie [Sat, 13 Jul 2013 18:54:56 +0000 (18:54 +0000)]
Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"

This reverts commit r186253.

This is failing to link under Configure+Make on the buildbots for
reasons I don't immediately understand.

llvm-svn: 186255

11 years agoDependences: Add a couple of basic test cases
Tobias Grosser [Sat, 13 Jul 2013 18:31:46 +0000 (18:31 +0000)]
Dependences: Add a couple of basic test cases

llvm-svn: 186254

11 years agoPR16540: ASTVector::insert(Context, Iter, Element) doesn't compile
David Blaikie [Sat, 13 Jul 2013 18:08:59 +0000 (18:08 +0000)]
PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile

Fix some uninstantiable code in ASTVector::insert. I've added a
cheap-and-dirty compile test for this, because I don't have the time to
figure out a nice way to get a real ASTContext to implement executable
tests - but we probably should have them for this ADT.

llvm-svn: 186253

11 years agoReduce large list of macros to the primary platform macros. Distingiush
Joerg Sonnenberger [Sat, 13 Jul 2013 17:59:55 +0000 (17:59 +0000)]
Reduce large list of macros to the primary platform macros. Distingiush
between ELF (Linux, FreeBSD, NetBSD) and OSX as platform for the
assembler dialect.

llvm-svn: 186252

11 years agoDependences: Clarify difference between value and memory based dependences
Tobias Grosser [Sat, 13 Jul 2013 17:37:55 +0000 (17:37 +0000)]
Dependences: Clarify difference between value and memory based dependences

We make the option a clear choice between the two analysis types and add
descriptions about the difference between the two.

llvm-svn: 186251

11 years agoConvert a couple of grep tests to FileCheck.
Benjamin Kramer [Sat, 13 Jul 2013 17:30:25 +0000 (17:30 +0000)]
Convert a couple of grep tests to FileCheck.

llvm-svn: 186250

11 years agoFixes a typo caught by Arthur O'Dwyer
Fariborz Jahanian [Sat, 13 Jul 2013 17:16:41 +0000 (17:16 +0000)]
Fixes a typo caught by Arthur O'Dwyer

llvm-svn: 186249

11 years agoSmall style improvements
Tobias Grosser [Sat, 13 Jul 2013 16:58:07 +0000 (16:58 +0000)]
Small style improvements

llvm-svn: 186248

11 years agoOnly verify the length in archive test, we can't make assumptions on the spacing.
Benjamin Kramer [Sat, 13 Jul 2013 15:21:39 +0000 (15:21 +0000)]
Only verify the length in archive test, we can't make assumptions on the spacing.

And .* did just match about anything anyways.

llvm-svn: 186246

11 years agoAttempt at fixing a mingw bot.
Rafael Espindola [Sat, 13 Jul 2013 12:36:30 +0000 (12:36 +0000)]
Attempt at fixing a mingw bot.

It is failing with

YAMLTest.cpp:38:   instantiated from here
YAMLTraits.h:226: error: 'llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping' is not a valid template argument for type 'void (*)(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' because function 'static void llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' has not external linkage

llvm-svn: 186245

11 years agoRemove unneeded forward declarations.
Craig Topper [Sat, 13 Jul 2013 08:28:45 +0000 (08:28 +0000)]
Remove unneeded forward declarations.

llvm-svn: 186244

11 years agoPass SmallVector by const reference instead of by value.
Craig Topper [Sat, 13 Jul 2013 07:43:40 +0000 (07:43 +0000)]
Pass SmallVector by const reference instead of by value.

llvm-svn: 186243

11 years agoMake the new vectorizer test immune to TTI
Andrew Trick [Sat, 13 Jul 2013 06:40:33 +0000 (06:40 +0000)]
Make the new vectorizer test immune to TTI

llvm-svn: 186242

11 years agoLoopVectorize fix: LoopInfo must be valid when invoking utils like SCEVExpander.
Andrew Trick [Sat, 13 Jul 2013 06:20:06 +0000 (06:20 +0000)]
LoopVectorize fix: LoopInfo must be valid when invoking utils like SCEVExpander.

In general, one should always complete CFG modifications first, update
CFG-based analyses, like Dominatores and LoopInfo, then generate
instruction sequences.

LoopVectorizer was creating a new loop, calling SCEVExpander to
generate checks, then updating LoopInfo. I just changed the order.

llvm-svn: 186241

11 years agoTry to open the file before use data from stat.
Rafael Espindola [Sat, 13 Jul 2013 05:07:22 +0000 (05:07 +0000)]
Try to open the file before use data from stat.

Looks like on mingw we get bogus last modification times on directories.
Should fix the mingw bots.

llvm-svn: 186240

11 years agoRemove unused file. Thanks to Sean Silva for noticing it.
Rafael Espindola [Sat, 13 Jul 2013 04:24:33 +0000 (04:24 +0000)]
Remove unused file. Thanks to Sean Silva for noticing it.

llvm-svn: 186239

11 years agoAdd r186216 back, but make the test tolerant of different uids and gids.
Rafael Espindola [Sat, 13 Jul 2013 04:14:13 +0000 (04:14 +0000)]
Add r186216 back, but make the test tolerant of different uids and gids.

original message:
Fix a off by one error about which members need to use the string table.

llvm-svn: 186238

11 years agoImplement n3584 - Addressing Tuples by Type
Marshall Clow [Sat, 13 Jul 2013 02:54:05 +0000 (02:54 +0000)]
Implement n3584 - Addressing Tuples by Type

llvm-svn: 186237

11 years agoC++ modules: Don't call DeclContext::lookup when half-way through deserializing
Richard Smith [Sat, 13 Jul 2013 02:00:19 +0000 (02:00 +0000)]
C++ modules: Don't call DeclContext::lookup when half-way through deserializing
decls. That can reenter deserialization and explode horribly by trying to merge
a declaration that we've not got very far through deserializing yet.

llvm-svn: 186236

11 years agoAdd a microoptimization for urem.
Nick Lewycky [Sat, 13 Jul 2013 01:16:47 +0000 (01:16 +0000)]
Add a microoptimization for urem.

llvm-svn: 186235

11 years agoRevert commit r186217 -- this is breaking bots:
Chandler Carruth [Sat, 13 Jul 2013 01:00:17 +0000 (01:00 +0000)]
Revert commit r186217 -- this is breaking bots:

  http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328

Original commit log:
  Use the function attributes to pass along the stack protector buffer
  size.

llvm-svn: 186234

11 years ago[ms-cxxabi] Don't consider function templates for name backrefs
Reid Kleckner [Sat, 13 Jul 2013 00:43:39 +0000 (00:43 +0000)]
[ms-cxxabi] Don't consider function templates for name backrefs

They don't seem to be used for back references, presumably because a
function template is unlikely to reoccur, while a class template name
may reoccur as a type.

This fixes a mangling issue for llvm::hash_combine() in Hashing.h.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D1078

llvm-svn: 186233

11 years agoRevert commit r186216 -- it's breaking bots:
Chandler Carruth [Sat, 13 Jul 2013 00:42:56 +0000 (00:42 +0000)]
Revert commit r186216 -- it's breaking bots:

  http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test

Original commit log:
  Fix a off by one error about which members need to use the string
  table.

llvm-svn: 186232

11 years agoObjC migrator: More knobs for migrating
Fariborz Jahanian [Sat, 13 Jul 2013 00:04:20 +0000 (00:04 +0000)]
ObjC migrator: More knobs for migrating
conforming protocols to each class. wip.

llvm-svn: 186231

11 years ago[mips] Remove trailing whitespace.
Akira Hatanaka [Fri, 12 Jul 2013 23:47:38 +0000 (23:47 +0000)]
[mips] Remove trailing whitespace.

llvm-svn: 186230

11 years agoFix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed.
Nick Lewycky [Fri, 12 Jul 2013 23:42:57 +0000 (23:42 +0000)]
Fix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed.
Fixes PR16605.

llvm-svn: 186229

11 years agoModified the expression parser to only try to
Sean Callanan [Fri, 12 Jul 2013 23:35:21 +0000 (23:35 +0000)]
Modified the expression parser to only try to
write to registers if they were modified in the
expression.  This eliminates spurious errors if
the register can't be written to but the
expression didn't write to it anyway.

Also improved error handling for the materializer
to make "couldn't materialize struct" errors more
informative.

<rdar://problem/14322579>

llvm-svn: 186228

11 years ago[mips] Implement MipsTargetMachine::getInstrItineraryData().
Akira Hatanaka [Fri, 12 Jul 2013 23:33:22 +0000 (23:33 +0000)]
[mips] Implement MipsTargetMachine::getInstrItineraryData().

llvm-svn: 186227

11 years agoFix ARM paired GPR COPY lowering
JF Bastien [Fri, 12 Jul 2013 23:33:03 +0000 (23:33 +0000)]
Fix ARM paired GPR COPY lowering

ARM paired GPR COPY was being lowered to two MOVr without CC. This
patch puts the CC back.

My test is a reduction of the case where I encountered the issue,
64-bit atomics use paired GPRs.

The issue only occurs with selectionDAG, FastISel doesn't encounter it
so I didn't bother calling it.

llvm-svn: 186226

11 years agoFixed 80+ violation and added C++ to header.
Michael Gottesman [Fri, 12 Jul 2013 23:09:43 +0000 (23:09 +0000)]
Fixed 80+ violation and added C++ to header.

llvm-svn: 186225

11 years agoFix a crash in EvaluateInDifferentElementOrder where it would generate an
Joey Gouly [Fri, 12 Jul 2013 23:08:06 +0000 (23:08 +0000)]
Fix a crash in EvaluateInDifferentElementOrder where it would generate an
undef vector of the wrong type.

LGTM'd by Nick Lewycky on IRC.

llvm-svn: 186224

11 years agoRevert the ELF core file support until a few things can be worked out:
Greg Clayton [Fri, 12 Jul 2013 22:52:22 +0000 (22:52 +0000)]
Revert the ELF core file support until a few things can be worked out:

RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has:

   ProcessMonitor &GetMonitor();

This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does:

ProcessMonitor &
RegisterContext_x86_64::GetMonitor()
{
   ProcessSP base = CalculateProcess();
   ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
   return process->GetMonitor();
}

ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files.

Suggested cleanups:
- Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file.

llvm-svn: 186223

11 years ago[mips] Add instruction itinerary classes for mult, seb and slt instructions.
Akira Hatanaka [Fri, 12 Jul 2013 22:43:20 +0000 (22:43 +0000)]
[mips] Add instruction itinerary classes for mult, seb and slt instructions.

llvm-svn: 186222

11 years agoMissed a checking that should have been checked in with 186211.
Greg Clayton [Fri, 12 Jul 2013 22:40:04 +0000 (22:40 +0000)]
Missed a checking that should have been checked in with 186211.

llvm-svn: 186221

11 years agoObjC migrator: early work for migrating implicitly conforming
Fariborz Jahanian [Fri, 12 Jul 2013 22:32:19 +0000 (22:32 +0000)]
ObjC migrator: early work for migrating implicitly conforming
protocols to classes. This is wip.

llvm-svn: 186220

11 years agoChanges so that a few tests do not fail when running under guarded malloc.
Argyrios Kyrtzidis [Fri, 12 Jul 2013 22:30:03 +0000 (22:30 +0000)]
Changes so that a few tests do not fail when running under guarded malloc.

Guarded malloc emits some messages at the beginning in stderr when enabled.
These messages caused a few tests to fail.

llvm-svn: 186219

11 years agoUse function attributes to pass along the stack protector buffer size instead of...
Bill Wendling [Fri, 12 Jul 2013 22:26:07 +0000 (22:26 +0000)]
Use function attributes to pass along the stack protector buffer size instead of making it a target option.

llvm-svn: 186218

11 years agoUse the function attributes to pass along the stack protector buffer size.
Bill Wendling [Fri, 12 Jul 2013 22:25:20 +0000 (22:25 +0000)]
Use the function attributes to pass along the stack protector buffer size.

Now that we have robust function attributes, don't use a command line option to
specify the stack protecto buffer size.

llvm-svn: 186217

11 years agoFix a off by one error about which members need to use the string table.
Rafael Espindola [Fri, 12 Jul 2013 22:22:34 +0000 (22:22 +0000)]
Fix a off by one error about which members need to use the string table.

llvm-svn: 186216

11 years agoLFTR improvement to avoid truncation.
Andrew Trick [Fri, 12 Jul 2013 22:08:48 +0000 (22:08 +0000)]
LFTR improvement to avoid truncation.

This is a reimplemntation of the patch originally in r186107.

llvm-svn: 186215

11 years agoCleanup LFTR logic.
Andrew Trick [Fri, 12 Jul 2013 22:08:44 +0000 (22:08 +0000)]
Cleanup LFTR logic.

llvm-svn: 186214

11 years agoCleanup: rename a variable to make the logic easier to follow.
Andrew Trick [Fri, 12 Jul 2013 22:08:41 +0000 (22:08 +0000)]
Cleanup: rename a variable to make the logic easier to follow.

llvm-svn: 186213

11 years agoRemove extraneous braces.
Eric Christopher [Fri, 12 Jul 2013 22:08:24 +0000 (22:08 +0000)]
Remove extraneous braces.

llvm-svn: 186212

11 years agoFixed GetModuleSpecifications() to work better overall:
Greg Clayton [Fri, 12 Jul 2013 22:07:46 +0000 (22:07 +0000)]
Fixed GetModuleSpecifications() to work better overall:
- MachO files now correctly extract the UUID all the time
- More file size and offset verification done for universal mach-o files to watch for truncated files
- ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files)
- lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file
- The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback
- Improved printing for ModuleSpec objects

llvm-svn: 186211

11 years agoCompute 'this' correctly for block in lambda.
Eli Friedman [Fri, 12 Jul 2013 22:05:26 +0000 (22:05 +0000)]
Compute 'this' correctly for block in lambda.

Using CurFuncDecl is both correct and simple compared to crawling
the DeclContexts of the block.

Fixes <rdar://problem/14415072>.

llvm-svn: 186210