platform/upstream/llvm.git
11 years agoFix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.
Craig Topper [Thu, 18 Jul 2013 07:16:44 +0000 (07:16 +0000)]
Fix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.

llvm-svn: 186566

11 years agoReapply r186316 with a fix for one bug where the code could walk off the
Chandler Carruth [Thu, 18 Jul 2013 07:15:00 +0000 (07:15 +0000)]
Reapply r186316 with a fix for one bug where the code could walk off the
end of a vector. This was found with ASan. I've had one other report of
a crasher, but thus far been unable to reproduce the crash. It may well
be fixed with this version, and if not I'd like to get more information
from the build bots about what is happening.

See r186316 for the full commit log for the new implementation of the
SROA algorithm.

llvm-svn: 186565

11 years agoFix volatile _Complex alignment test on platforms where 64-bit floating point isn...
JF Bastien [Thu, 18 Jul 2013 06:11:45 +0000 (06:11 +0000)]
Fix volatile _Complex alignment test on platforms where 64-bit floating point isn't 64-bit aligned

Add x86-64 triple, and check its datalayout. Also add some comments, and use the new CHECK-LABEL.

llvm-svn: 186564

11 years agoSLPVectorizer: Speedup isConsecutive (that checks if two addresses are consecutive...
Nadav Rotem [Thu, 18 Jul 2013 04:33:20 +0000 (04:33 +0000)]
SLPVectorizer: Speedup isConsecutive (that checks if two addresses are consecutive in memory) by checking for additional patterns that don't need to go through SCEV.

llvm-svn: 186563

11 years agoPPC: Support dynamic allocas with large alignment
Hal Finkel [Thu, 18 Jul 2013 04:28:21 +0000 (04:28 +0000)]
PPC: Support dynamic allocas with large alignment

Support for dynamic stack alignments in the PPC backend has been unfinished, in
part because it depends on dynamic stack realignment (which I only just
recently implemented fully). Now we can also support dynamic allocas with
higher than the default target stack alignment (16 bytes).

In order to round-up the requested size to the maximum requested alignment, we
need an additional register to hold the rounded-up size. We're already using one
scavenged register to hold the previous stack-pointer value (which needs to be
stored with the signal-safe stdux update), and so when we have dynamic allocas
and a large alignment, we allocate two emergency spill slots for the scavenger.

llvm-svn: 186562

11 years agoRemove dead code.
Rafael Espindola [Thu, 18 Jul 2013 03:29:51 +0000 (03:29 +0000)]
Remove dead code.

llvm-svn: 186561

11 years agoConvert two uses if fstat with sys::fs::status.
Rafael Espindola [Thu, 18 Jul 2013 03:04:20 +0000 (03:04 +0000)]
Convert two uses if fstat with sys::fs::status.

llvm-svn: 186560

11 years agoFix a regression I introduced back in r178147.
Rafael Espindola [Thu, 18 Jul 2013 02:42:40 +0000 (02:42 +0000)]
Fix a regression I introduced back in r178147.

We don't want cast and dyn_cast to work on temporaries. They don't extend
lifetime like a direct bind to a reference would, so they can introduce
hard to find bugs.

I added tests to make sure we don't regress this. Thanks to Eli Friedman for
noticing this and for his suggestions on how to test it.

llvm-svn: 186559

11 years agoGive 'hasPath' a longer but clearer name 'isPotentiallyReachable'. Also expand
Nick Lewycky [Thu, 18 Jul 2013 02:34:51 +0000 (02:34 +0000)]
Give 'hasPath' a longer but clearer name 'isPotentiallyReachable'. Also expand
the comment. No functionality change. This change broken out of
http://llvm-reviews.chandlerc.com/D996 .

llvm-svn: 186558

11 years agos/BuiltinLocation/ArtificialLocation/
Adrian Prantl [Thu, 18 Jul 2013 01:36:04 +0000 (01:36 +0000)]
s/BuiltinLocation/ArtificialLocation/

llvm-svn: 186557

11 years agoInstead of checking against some version of "isType()" go ahead and
Eric Christopher [Thu, 18 Jul 2013 00:52:50 +0000 (00:52 +0000)]
Instead of checking against some version of "isType()" go ahead and
use the conversion to bool to check if we've managed to get a type
that isn't default constructed - as we meant to in the first place.

llvm-svn: 186556

11 years agoFix a compile error caught by bb-chapuni.
Adrian Prantl [Thu, 18 Jul 2013 00:47:12 +0000 (00:47 +0000)]
Fix a compile error caught by bb-chapuni.

llvm-svn: 186555

11 years agoFix a compile error caught by bb-chapuni.
Adrian Prantl [Thu, 18 Jul 2013 00:43:29 +0000 (00:43 +0000)]
Fix a compile error caught by bb-chapuni.

llvm-svn: 186554

11 years agoDon't generate bogus line table entries for __copy_helper_block_ and
Adrian Prantl [Thu, 18 Jul 2013 00:28:05 +0000 (00:28 +0000)]
Don't generate bogus line table entries for __copy_helper_block_ and
__destroy_helper_block_, but do generate scope information.

llvm-svn: 186553

11 years agoReplace llvm::DIBuilder::DisableDebugLocations() with two RAII interfaces
Adrian Prantl [Thu, 18 Jul 2013 00:28:02 +0000 (00:28 +0000)]
Replace llvm::DIBuilder::DisableDebugLocations() with two RAII interfaces
inspired by CodegenFunction::LexicalScope.
- NoLocation temporarily turns off debug locations altogether.
  This is useful for emitting instructions that should be
  counted towards the function prologue.
- BuiltinLocation temporarily switches to an artificial debug location
  that has a valid scope, but no line information. This is useful when
  emitting compiler-generated helper functions that have no source
  location associated with them.

llvm-svn: 186552

11 years agoClarified documentation.
Adrian Prantl [Thu, 18 Jul 2013 00:27:59 +0000 (00:27 +0000)]
Clarified documentation.

llvm-svn: 186551

11 years agoSimplify logic by using the appropriate function.
Adrian Prantl [Thu, 18 Jul 2013 00:27:56 +0000 (00:27 +0000)]
Simplify logic by using the appropriate function.

llvm-svn: 186550

11 years agoGet rid of the Dis/EnableDebugLocations() API.
Adrian Prantl [Thu, 18 Jul 2013 00:27:46 +0000 (00:27 +0000)]
Get rid of the Dis/EnableDebugLocations() API.
I'm moving this functionality into clang instead.

llvm-svn: 186549

11 years agoUpdate comment slightly.
Eric Christopher [Thu, 18 Jul 2013 00:23:50 +0000 (00:23 +0000)]
Update comment slightly.

llvm-svn: 186548

11 years agoAdd condition expression result to if and elif callbacks.
John Thompson [Thu, 18 Jul 2013 00:00:36 +0000 (00:00 +0000)]
Add condition expression result to if and elif callbacks.

llvm-svn: 186547

11 years agoReinstate r186040, with additional fixes and more test coverage (reverted in
Richard Smith [Wed, 17 Jul 2013 23:53:16 +0000 (23:53 +0000)]
Reinstate r186040, with additional fixes and more test coverage (reverted in
r186331).

Original commit log:
  If we friend a declaration twice, that should not make it visible to
  name lookup in the surrounding context. Slightly rework how we handle
  friend declarations to inherit the visibility of the prior
  declaration, rather than setting a friend declaration to be visible
  whenever there was a prior declaration.

llvm-svn: 186546

11 years agoPPC: Add base-pointer support to builtin setjmp/longjmp
Hal Finkel [Wed, 17 Jul 2013 23:50:51 +0000 (23:50 +0000)]
PPC: Add base-pointer support to builtin setjmp/longjmp

First, this changes the base-pointer implementation to remove an unnecessary
complication (and one that is incompatible with how builtin SjLj is
implemented): instead of using r31 as the base pointer when it is not needed as
a frame pointer, now the base pointer will always be r30 when needed.

Second, we introduce another pseudo register, BP, which is used just like the FP
pseudo register to refer to the base register before we know for certain what
register it will be.

Third, we now save BP into the jmp_buf, and restore r30 from that slot in
longjmp.  If the function that called setjmp did not use a base pointer, then
r30 will be overwritten by the setjmp-calling-function's restore code. FP
restoration (which is restored into r31) works the same way.

llvm-svn: 186545

11 years agoAdd comparison operators for DIDescriptors to fix c++98 fallout
Eric Christopher [Wed, 17 Jul 2013 23:25:22 +0000 (23:25 +0000)]
Add comparison operators for DIDescriptors to fix c++98 fallout
of operator bool change.

Also convert a variable in DebugIR.

llvm-svn: 186544

11 years agoAdd an explicit operator bool conversion to DIDescriptor to make
Eric Christopher [Wed, 17 Jul 2013 22:53:05 +0000 (22:53 +0000)]
Add an explicit operator bool conversion to DIDescriptor to make
it clear what we want to do. Unfortunately the conversion to
pointer operator fires now instead and chasing down all of the
conversions and making them explicit and handled is a large task
so add a FIXME with it.

llvm-svn: 186543

11 years ago80-column fixes.
Eric Christopher [Wed, 17 Jul 2013 22:52:53 +0000 (22:52 +0000)]
80-column fixes.

llvm-svn: 186542

11 years agoFix a comment.
Nadav Rotem [Wed, 17 Jul 2013 22:41:16 +0000 (22:41 +0000)]
Fix a comment.

llvm-svn: 186541

11 years agoHandle '.' correctly in hex float literal parsing.
Eli Friedman [Wed, 17 Jul 2013 22:17:29 +0000 (22:17 +0000)]
Handle '.' correctly in hex float literal parsing.

There were a couple of different loops that were not handling
'.' correctly in APFloat::convertFromHexadecimalString; these mistakes
could lead to assertion failures and incorrect rounding for overlong
hex float literals.

Fixes PR16643.

llvm-svn: 186539

11 years agoAdd some uncovered attribute tests
Tobias Grosser [Wed, 17 Jul 2013 22:13:44 +0000 (22:13 +0000)]
Add some uncovered attribute tests

llvm-svn: 186538

11 years agoEven more code conformance.
Robert Wilhelm [Wed, 17 Jul 2013 21:14:35 +0000 (21:14 +0000)]
Even more code conformance.

llvm-svn: 186537

11 years agoMS wide bitfield error check in Sema
Reid Kleckner [Wed, 17 Jul 2013 20:46:03 +0000 (20:46 +0000)]
MS wide bitfield error check in Sema

cl.exe treats wide bitfields as an error. This patch causes them to be
an error if IsMsStruct is true, as it is in straight C.

Patch by Warren Hunt!

Reviewers: eli.friedman

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

llvm-svn: 186536

11 years agoclang-format: Add space in corner case.
Daniel Jasper [Wed, 17 Jul 2013 20:25:02 +0000 (20:25 +0000)]
clang-format: Add space in corner case.

Before:
  SomeType s __attribute__((unused))(InitValue);
After:
  SomeType s __attribute__((unused)) (InitValue);

llvm-svn: 186535

11 years agoelf-core: Support FreeBSD at compile-time
Ed Maste [Wed, 17 Jul 2013 20:13:39 +0000 (20:13 +0000)]
elf-core: Support FreeBSD at compile-time

Compile-time #ifdef-ery isn't right, but this makes core debugging work on
FreeBSD and highlights the parts that will need to be changed for runtime
arch support.

llvm-svn: 186534

11 years agoRestore r181216, which was partially reverted in r182499.
Stephen Lin [Wed, 17 Jul 2013 20:06:03 +0000 (20:06 +0000)]
Restore r181216, which was partially reverted in r182499.

llvm-svn: 186533

11 years agoFix a funny typo. Thanks to Aaron Ballman for noticing.
Rafael Espindola [Wed, 17 Jul 2013 19:58:28 +0000 (19:58 +0000)]
Fix a funny typo. Thanks to Aaron Ballman for noticing.

llvm-svn: 186532

11 years agoAdd a micro optimization to catch cases where the PtrA equals PtrB.
Nadav Rotem [Wed, 17 Jul 2013 19:52:25 +0000 (19:52 +0000)]
Add a micro optimization to catch cases where the PtrA equals PtrB.

llvm-svn: 186531

11 years agoAdd FILE_SHARE_WRITE to openFileForRead.
Rafael Espindola [Wed, 17 Jul 2013 19:44:07 +0000 (19:44 +0000)]
Add FILE_SHARE_WRITE to openFileForRead.

This should fix the windows bots. It looks like the failing tests are of the
form

prog1 > file
prog2 file

and prog2 fails trying to read the file. The best fix would probably be to close
stdout/stderr in prog1, but it was not the intention of 186511 to change this,
so just restore the old behavior for now.

llvm-svn: 186530

11 years agoSilencing an MSVC warning about signed vs unsigned comparison mismatches.
Aaron Ballman [Wed, 17 Jul 2013 19:43:13 +0000 (19:43 +0000)]
Silencing an MSVC warning about signed vs unsigned comparison mismatches.

llvm-svn: 186529

11 years ago[mips] Use "foreach" loop to make register definitions more concise.
Akira Hatanaka [Wed, 17 Jul 2013 19:09:27 +0000 (19:09 +0000)]
[mips] Use "foreach" loop to make register definitions more concise.

llvm-svn: 186528

11 years agoAdd -*- C++ -*- to InstrEmitter.h.
Michael Gottesman [Wed, 17 Jul 2013 18:53:29 +0000 (18:53 +0000)]
Add -*- C++ -*- to InstrEmitter.h.

llvm-svn: 186527

11 years agoConstify Replacements parameter to applyAllReplacements.
David Blaikie [Wed, 17 Jul 2013 18:29:58 +0000 (18:29 +0000)]
Constify Replacements parameter to applyAllReplacements.

http://llvm-reviews.chandlerc.com/D1169

Patch by Guillaume Papin.

llvm-svn: 186526

11 years agoMake std::get constexpr
Marshall Clow [Wed, 17 Jul 2013 18:25:36 +0000 (18:25 +0000)]
Make std::get constexpr

llvm-svn: 186525

11 years agoImprove idiomatic-parentheses by checking method family instead of relying on the...
Jean-Daniel Dupas [Wed, 17 Jul 2013 18:17:14 +0000 (18:17 +0000)]
Improve idiomatic-parentheses by checking method family instead of relying on the selector name.

llvm-svn: 186524

11 years agoSemaDeclCXX.cpp: Dissolve a ligature "fi" in comment.
NAKAMURA Takumi [Wed, 17 Jul 2013 17:57:52 +0000 (17:57 +0000)]
SemaDeclCXX.cpp: Dissolve a ligature "fi" in comment.

llvm-svn: 186523

11 years agoFixed source range of C++03 access declarations.
Enea Zaffanella [Wed, 17 Jul 2013 17:28:56 +0000 (17:28 +0000)]
Fixed source range of C++03 access declarations.

llvm-svn: 186522

11 years ago[analyzer] Handle C++11 member initializer expressions.
Jordan Rose [Wed, 17 Jul 2013 17:16:42 +0000 (17:16 +0000)]
[analyzer] Handle C++11 member initializer expressions.

Previously, we would simply abort the path when we saw a default member
initialization; now, we actually attempt to evaluate it. Like default
arguments, the contents of these expressions are not actually part of the
current function, so we fall back to constant evaluation.

llvm-svn: 186521

11 years ago[analyzer] Handle C string default values for const char * arguments.
Jordan Rose [Wed, 17 Jul 2013 17:16:38 +0000 (17:16 +0000)]
[analyzer] Handle C string default values for const char * arguments.

Previously, SValBuilder knew how to evaluate StringLiterals, but couldn't
handle an array-to-pointer decay for constant values. Additionally,
RegionStore was being too strict about loading from an array, refusing to
return a 'char' value from a 'const char' array. Both of these have been
fixed.

llvm-svn: 186520

11 years ago[analyzer] Treat std::initializer_list as opaque rather than aborting.
Jordan Rose [Wed, 17 Jul 2013 17:16:33 +0000 (17:16 +0000)]
[analyzer] Treat std::initializer_list as opaque rather than aborting.

Previously, the use of a std::initializer_list (actually, a
CXXStdInitializerListExpr) would cause the analyzer to give up on the rest
of the path. Now, it just uses an opaque symbolic value for the
initializer_list and continues on.

At some point in the future we can add proper support for initializer_list,
with access to the elements in the InitListExpr.

<rdar://problem/14340207>

llvm-svn: 186519

11 years agoOption parsing tables: remove some unnecessary #defines
Hans Wennborg [Wed, 17 Jul 2013 16:54:06 +0000 (16:54 +0000)]
Option parsing tables: remove some unnecessary #defines

Also make some strings static and add missing #undef's

llvm-svn: 186518

11 years agoOptParser.td: typo
Hans Wennborg [Wed, 17 Jul 2013 16:26:38 +0000 (16:26 +0000)]
OptParser.td: typo

llvm-svn: 186517

11 years agoRe-introduces ELF core file support for Linux x86-64
Ashok Thirumurthi [Wed, 17 Jul 2013 16:06:12 +0000 (16:06 +0000)]
Re-introduces ELF core file support for Linux x86-64
  Usage: 'lldb a.out -c core'.
  TODO: FreeBSD support.
  TODO: Support for AVX registers.
  TODO: Refactor so that RegisterContextCore* don't inherit from classes that use ProcessMonitor
  to fix the build on OS/X.

llvm-svn: 186516

11 years agoImprove line breaking before multi-line strings.
Daniel Jasper [Wed, 17 Jul 2013 15:38:19 +0000 (15:38 +0000)]
Improve line breaking before multi-line strings.

The AlwaysBreakBeforeMultilineStrings rule does not really make sense
if it does not a column gain.

Before (in Google style):
  f(
      "aaaa"
      "bbbb");

After:
  f("aaaa"
    "bbbb");

llvm-svn: 186515

11 years agoAdd TemplateArgument related matchers to the registry.
Samuel Benzaquen [Wed, 17 Jul 2013 15:11:30 +0000 (15:11 +0000)]
Add TemplateArgument related matchers to the registry.

Summary:
Continue adding more matchers to the dynamic registry.
This time, we add TemplateArgument matchers.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1166

llvm-svn: 186514

11 years ago[Sanitizer] Always provide --default-arch argument to llvm-symbolizer
Alexey Samsonov [Wed, 17 Jul 2013 15:02:43 +0000 (15:02 +0000)]
[Sanitizer] Always provide --default-arch argument to llvm-symbolizer

llvm-svn: 186513

11 years agoThis patch checks for valid mnemonics at the beginning of parseInstruction method...
Vladimir Medic [Wed, 17 Jul 2013 15:00:42 +0000 (15:00 +0000)]
This patch checks for valid mnemonics at the beginning of parseInstruction method, thus giving the user the right error message for non-existing instructions.

llvm-svn: 186512

11 years agoSplit openFileForRead into Windows and Unix versions.
Rafael Espindola [Wed, 17 Jul 2013 14:58:25 +0000 (14:58 +0000)]
Split openFileForRead into Windows and Unix versions.

This has some advantages:

* Lets us use native, utf16 windows functions.
* Easy to produce good errors on windows about trying to use a
directory when we want a file.
* Simplifies the unix version a bit.

llvm-svn: 186511

11 years agoFix comparisons of alloca alignment in inliner merging
Hal Finkel [Wed, 17 Jul 2013 14:32:41 +0000 (14:32 +0000)]
Fix comparisons of alloca alignment in inliner merging

Duncan pointed out a mistake in my fix in r186425 when only one of the allocas
being compared had the target-default alignment. This is essentially his
suggested solution. Thanks!

llvm-svn: 186510

11 years agoCorrect comment to match class name
Ed Maste [Wed, 17 Jul 2013 14:30:26 +0000 (14:30 +0000)]
Correct comment to match class name

llvm-svn: 186509

11 years agoAdd CXXCtorInitializer related matchers to the dynamic matcher registry.
Samuel Benzaquen [Wed, 17 Jul 2013 14:28:00 +0000 (14:28 +0000)]
Add CXXCtorInitializer related matchers to the dynamic matcher registry.

Summary: Now that CXXCtorInitializer is already supported in ASTNodeKind, add CXXCtorInitializer matchers to the dynamic matcher registry.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1158

llvm-svn: 186508

11 years agoImplement eret and deret(return from exception) instructions for Mips. Test examples...
Vladimir Medic [Wed, 17 Jul 2013 14:05:19 +0000 (14:05 +0000)]
Implement eret and deret(return from exception) instructions for Mips. Test examples are given.

llvm-svn: 186507

11 years agoAdd the tests that I forgot to 'svn add' with my previous commit (r186504).
Joey Gouly [Wed, 17 Jul 2013 14:03:49 +0000 (14:03 +0000)]
Add the tests that I forgot to 'svn add' with my previous commit (r186504).

llvm-svn: 186506

11 years agoFreeBSD: Replace GetSignalInfo with GetLwpInfo
Ed Maste [Wed, 17 Jul 2013 14:02:20 +0000 (14:02 +0000)]
FreeBSD: Replace GetSignalInfo with GetLwpInfo

For thread support we are going to need other members of struct
ptrace_lwpinfo.

llvm-svn: 186505

11 years ago[ARMv8] Add support for the NEON instructions vmaxnm/vminnm.
Joey Gouly [Wed, 17 Jul 2013 13:59:38 +0000 (13:59 +0000)]
[ARMv8] Add support for the NEON instructions vmaxnm/vminnm.

This adds a new class for non-predicable NEON instructions and a
new DecoderNamespace for v8 NEON instructions.

llvm-svn: 186504

11 years agollvm-ar: doExtract(): Write extracted files with F_Binary. It should fix llvm/test...
NAKAMURA Takumi [Wed, 17 Jul 2013 12:31:50 +0000 (12:31 +0000)]
llvm-ar: doExtract(): Write extracted files with F_Binary. It should fix llvm/test/Object/extract.ll

llvm-svn: 186503

11 years agoReplace TEST* with CHECK-DAG in vbtable tests
Timur Iskhodzhanov [Wed, 17 Jul 2013 12:23:51 +0000 (12:23 +0000)]
Replace TEST* with CHECK-DAG in vbtable tests

llvm-svn: 186502

11 years agoEnsure sys::getProcessTriple always uses a normalized triple. Patch by
Duncan Sands [Wed, 17 Jul 2013 11:01:05 +0000 (11:01 +0000)]
Ensure sys::getProcessTriple always uses a normalized triple.  Patch by
Thomas B. Jablin, from PR16636.

llvm-svn: 186501

11 years ago[XCore] Ensure implicit operands aren't lost on the return instruction.
Richard Osborne [Wed, 17 Jul 2013 10:58:37 +0000 (10:58 +0000)]
[XCore] Ensure implicit operands aren't lost on the return instruction.

Patch by Robert Lytton.

llvm-svn: 186500

11 years agoTweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
Duncan Sands [Wed, 17 Jul 2013 09:34:51 +0000 (09:34 +0000)]
Tweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
The issue is that CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_ENABLE_ASSERTIONS=ON was
not building with assertions enabled.  (I was unable to find what in the LLVM
source tree was adding -DNDEBUG to the build line in this case, so decided that
it must be cmake itself that was adding it - this may depend on the cmake
version).  The fix treats any mode that is not Debug as being the same as
Release for this purpose (previously it was being assumed that cmake would only
add -DNDEBUG for Release and not for RelWithDebInfo or MinSizeRel).  If other
versions of cmake don't add -DNDEBUG for RelWithDebInfo then that's OK: with
this change you just get a useless but harmless -UNDEBUG or -DNDEBUG.

llvm-svn: 186499

11 years ago[analyzer] Add very limited support for temporary destructors
Pavel Labath [Wed, 17 Jul 2013 08:33:58 +0000 (08:33 +0000)]
[analyzer] Add very limited support for temporary destructors

Summary:
This patch enables ExprEndgine to reason about temporary object destructors.
However, these destructor calls are never inlined, since this feature is still
broken. Still, this is sufficient to properly handle noreturn temporary
destructors and close bug #15599. I have also enabled the cfg-temporary-dtors
analyzer option by default.

Reviewers: jordan_rose

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

llvm-svn: 186498

11 years agotsan: disable one more interceptor that causes recursion
Dmitry Vyukov [Wed, 17 Jul 2013 07:10:47 +0000 (07:10 +0000)]
tsan: disable one more interceptor that causes recursion

llvm-svn: 186497

11 years agoTeach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.
Craig Topper [Wed, 17 Jul 2013 06:58:23 +0000 (06:58 +0000)]
Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.

llvm-svn: 186496

11 years agotsan: fix unitialized read warning under newer gcc (it does not have visibility into...
Dmitry Vyukov [Wed, 17 Jul 2013 06:56:47 +0000 (06:56 +0000)]
tsan: fix unitialized read warning under newer gcc (it does not have visibility into asm)

llvm-svn: 186495

11 years agoLLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.
NAKAMURA Takumi [Wed, 17 Jul 2013 06:53:51 +0000 (06:53 +0000)]
LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.

llvm-svn: 186494

11 years agollvm-symbolizer: be more careful with colons in file names
Alexey Samsonov [Wed, 17 Jul 2013 06:45:36 +0000 (06:45 +0000)]
llvm-symbolizer: be more careful with colons in file names

llvm-svn: 186493

11 years agoclang/test/CodeGen/volatile-complex.c: Loosen CHECKs for -Asserts.
NAKAMURA Takumi [Wed, 17 Jul 2013 06:39:40 +0000 (06:39 +0000)]
clang/test/CodeGen/volatile-complex.c: Loosen CHECKs for -Asserts.

llvm-svn: 186492

11 years agoMake x86 fast-isel correctly choose between aligned and unaligned operations for...
Craig Topper [Wed, 17 Jul 2013 05:57:45 +0000 (05:57 +0000)]
Make x86 fast-isel correctly choose between aligned and unaligned operations for vector stores. Fixes PR16640.

llvm-svn: 186491

11 years agoPropagate alignment for _Complex
JF Bastien [Wed, 17 Jul 2013 05:57:42 +0000 (05:57 +0000)]
Propagate alignment for _Complex

_Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex.

Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part).

llvm-svn: 186490

11 years agoFix ARMFastISel::ARMEmitIntExt shift emission
JF Bastien [Wed, 17 Jul 2013 05:46:46 +0000 (05:46 +0000)]
Fix ARMFastISel::ARMEmitIntExt shift emission

My patch 'r183551 - ARM FastISel integer sext/zext improvements' was incorrect when emitting ARM register-immediate ASR, LSL, LSR instructions: they are pseudo-instructions in ARMInstrInfo.td and I should have used MOVsi instead.

This is not an issue when code is generated through a .s file, but is an issue when generated straight to a .o (-filetype=obj).

llvm-svn: 186489

11 years agoPPC: Add CTR-register clobber to builtin setjmp
Hal Finkel [Wed, 17 Jul 2013 05:35:44 +0000 (05:35 +0000)]
PPC: Add CTR-register clobber to builtin setjmp

Because the builtin longjmp implementation uses a CTR-based indirect jump, when
the control flow arrives at the builtin setjmp call, the CTR register has
necessarily been clobbered. Correspondingly, this adds CTR to the list of
implicit definitions of the builtin setjmp pseudo instruction.

We don't need to add CTR to the implicit definitions of builtin longjmp
because, even though it does clobber the CTR register, the control flow cannot
return to inside the loop unless there is also a builtin setjmp call.

llvm-svn: 186488

11 years agoUse the simpler is_directory.
Rafael Espindola [Wed, 17 Jul 2013 04:23:07 +0000 (04:23 +0000)]
Use the simpler is_directory.

llvm-svn: 186487

11 years agoAdd simpler version of is_directory. It will be used in clang.
Rafael Espindola [Wed, 17 Jul 2013 04:20:49 +0000 (04:20 +0000)]
Add simpler version of is_directory. It will be used in clang.

llvm-svn: 186486

11 years agoMark a method 'const' and another 'static'.
Craig Topper [Wed, 17 Jul 2013 03:54:53 +0000 (03:54 +0000)]
Mark a method 'const' and another 'static'.

llvm-svn: 186485

11 years agoMake a few more static string pointers constant.
Craig Topper [Wed, 17 Jul 2013 03:43:10 +0000 (03:43 +0000)]
Make a few more static string pointers constant.

llvm-svn: 186484

11 years agoDon't fallback to copy + delete in rename.
Rafael Espindola [Wed, 17 Jul 2013 03:33:41 +0000 (03:33 +0000)]
Don't fallback to copy + delete in rename.

Rename's documentation says "Files are renamed as if by POSIX rename()". and it
is used for atomically updating output files from a temporary. Having rename
fallback to a non atomic copy has the potential to hide bugs, like using
a temporary file in /tmp instead of a unique name next to the final destination.

llvm-svn: 186483

11 years agoMake constant string pointer into an array to remove a pointer lookup for every access.
Craig Topper [Wed, 17 Jul 2013 03:11:32 +0000 (03:11 +0000)]
Make constant string pointer into an array to remove a pointer lookup for every access.

llvm-svn: 186482

11 years agoraw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would...
NAKAMURA Takumi [Wed, 17 Jul 2013 02:21:10 +0000 (02:21 +0000)]
raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.

llvm/test/Object/check_binary_output.ll is expected to pass on win32.

llvm-svn: 186480

11 years agoSLPVectorizer: Accelerate the isConsecutive check by replacing the subtraction of...
Nadav Rotem [Wed, 17 Jul 2013 00:48:31 +0000 (00:48 +0000)]
SLPVectorizer: Accelerate the isConsecutive check by replacing the subtraction of the two values with a simple SCEV expression that adds the offset to one of the pointers that we compare.

llvm-svn: 186479

11 years agoPPC: Implement base pointer and stack realignment
Hal Finkel [Wed, 17 Jul 2013 00:45:52 +0000 (00:45 +0000)]
PPC: Implement base pointer and stack realignment

This builds on some frame-lowering code that has existed since 2005 (r24224)
but was disabled in 2008 (r48188) because it needed base pointer support to
function correctly. This implementation follows the strategy suggested by Dale
Johannesen in r48188 where the following comment was added:

  This does not currently work, because the delta between old and new stack
  pointers is added to offsets that reference incoming parameters after the
  prolog is generated, and the code that does that doesn't handle a variable
  delta.  You don't want to do that anyway; a better approach is to reserve
  another register that retains to the incoming stack pointer, and reference
  parameters relative to that.

And now we do exactly that. If we don't need a frame pointer, then we use r31
as a base pointer. If we do need a frame pointer, then we use r30 as a base
pointer. The base pointer retains the value of the stack pointer before it was
decremented in the prologue. We then use the base pointer to resolve all
negative frame indicies. The basic scheme follows that for base pointers in the
X86 backend.

We use a base pointer when we need to dynamically realign the incoming stack
pointer. This currently applies only to static objects (dynamic allocas with
large alignments, and base-pointer support in SjLj lowering will come in future
commits).

llvm-svn: 186478

11 years agollvm/test/CodeGen/X86/vec_setcc.ll: Add explicit -mtriple=x86_64-unknown-unknown...
NAKAMURA Takumi [Wed, 17 Jul 2013 00:42:37 +0000 (00:42 +0000)]
llvm/test/CodeGen/X86/vec_setcc.ll: Add explicit -mtriple=x86_64-unknown-unknown to satisfy win32-targeted configuration.

llvm-svn: 186477

11 years agoMove string pointer from being a static class member to just a static global in the...
Craig Topper [Wed, 17 Jul 2013 00:31:35 +0000 (00:31 +0000)]
Move string pointer from being a static class member to just a static global in the one file its needed in.

llvm-svn: 186476

11 years agosimple plugin now works with Linux fix assert in SetPluginInfo implement Linux ePathT...
Michael Sartain [Wed, 17 Jul 2013 00:26:30 +0000 (00:26 +0000)]
simple plugin now works with Linux fix assert in SetPluginInfo implement Linux ePathTypeLLDBSystemPlugins and ePathTypeLLDBUserPlugins implement Linux Host::Backtrace and Host::GetEnvironment add .gnu_debugdata comment

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

llvm-svn: 186475

11 years agoMore code conformance.
Fariborz Jahanian [Wed, 17 Jul 2013 00:05:08 +0000 (00:05 +0000)]
More code conformance.

llvm-svn: 186474

11 years agoObjectiveC migrator: When adding conforming protocol,
Fariborz Jahanian [Wed, 17 Jul 2013 00:02:22 +0000 (00:02 +0000)]
ObjectiveC migrator: When adding conforming protocol,
only add outer-most conforming protocols as adding
others are redundant.

llvm-svn: 186473

11 years agoAdd pointer format test for Windows.
Howard Hinnant [Tue, 16 Jul 2013 23:50:06 +0000 (23:50 +0000)]
Add pointer format test for Windows.

llvm-svn: 186472

11 years agoAvoid breaking non-trailing block comments.
Alexander Kornienko [Tue, 16 Jul 2013 23:47:22 +0000 (23:47 +0000)]
Avoid breaking non-trailing block comments.

Motivating example:
// column limit ------------------->
void ffffffffffff(int aaaaaa /* test */);

Formatting before the patch:
void ffffffffffff(int aaaaaa /* test
                              */);

Formatting after the patch:
void
ffffffffffff(int aaaaaa /* test */);

llvm-svn: 186471

11 years agoAdd getModuleFlag(StringRef Key) to query a module flag given Key.
Manman Ren [Tue, 16 Jul 2013 23:21:16 +0000 (23:21 +0000)]
Add getModuleFlag(StringRef Key) to query a module flag given Key.

No functionality change.

llvm-svn: 186470

11 years agollvm/test/Object/ar-create.test: Relax a CHECK line to satisfy localized message...
NAKAMURA Takumi [Tue, 16 Jul 2013 23:17:22 +0000 (23:17 +0000)]
llvm/test/Object/ar-create.test: Relax a CHECK line to satisfy localized message catalogue.

For example, 'No such file or directory' cannot be seen on Japanese version of msvcrt.

llvm-svn: 186469

11 years agollvm/test/Object/check_binary_output.ll: Mark it as XFAIL on Windows. Investigating.
NAKAMURA Takumi [Tue, 16 Jul 2013 23:16:57 +0000 (23:16 +0000)]
llvm/test/Object/check_binary_output.ll: Mark it as XFAIL on Windows. Investigating.

llvm-svn: 186468

11 years agoFollow coding convention in argument decl.
Fariborz Jahanian [Tue, 16 Jul 2013 23:01:33 +0000 (23:01 +0000)]
Follow coding convention in argument decl.

llvm-svn: 186467

11 years agoflip the scev minus direction to simplify the code.
Nadav Rotem [Tue, 16 Jul 2013 22:57:06 +0000 (22:57 +0000)]
flip the scev minus direction to simplify the code.

llvm-svn: 186466

11 years agoSLPVectorizer: Improve the compile time of isConsecutive by adding a simple constant...
Nadav Rotem [Tue, 16 Jul 2013 22:51:07 +0000 (22:51 +0000)]
SLPVectorizer: Improve the compile time of isConsecutive by adding a simple constant-gep check before using SCEV.
This check does not always work because not all of the GEPs use a constant offset, but it happens often enough to reduce the number of times we use SCEV.

llvm-svn: 186465