platform/upstream/llvm.git
10 years agotools: explicitly cast to avoid a warning
Saleem Abdulrasool [Sun, 9 Feb 2014 01:12:21 +0000 (01:12 +0000)]
tools: explicitly cast to avoid a warning

llvm-svn: 201032

10 years agoPR16519, PR18009: When checking a partial specialization for uses of its own
Richard Smith [Sun, 9 Feb 2014 00:54:43 +0000 (00:54 +0000)]
PR16519, PR18009: When checking a partial specialization for uses of its own
template parameters, don't look for parameters of outer templates. If a problem
is found in a default template argument, point the diagnostic at the partial
specialization (with a note pointing at the default argument) instead of
pointing it at the default argument and leaving it unclear which partial
specialization os problematic.

llvm-svn: 201031

10 years agotools: handle out-of-line personality 0 decoding
Saleem Abdulrasool [Sat, 8 Feb 2014 23:17:08 +0000 (23:17 +0000)]
tools: handle out-of-line personality 0 decoding

In some cases it is possible to have a personality 0 unwinding opcodes in the
extab (such as when .handlerdata is used in the assembly).  Simply decode the 3
opcodes for that case.

llvm-svn: 201030

10 years agoARM: change attribute tests to use parsed form
Saleem Abdulrasool [Sat, 8 Feb 2014 23:17:02 +0000 (23:17 +0000)]
ARM: change attribute tests to use parsed form

This makes the tests more readable by using the -arm-attributes decoding support
in llvm-readobj since that is now available.  Change the invocation commands to
be similar to other test and use a more precise triple (the tests only require
ARM EABI support).

llvm-svn: 201029

10 years agoLoopVectorizer: Keep track of conditional store basic blocks
Arnold Schwaighofer [Sat, 8 Feb 2014 20:41:13 +0000 (20:41 +0000)]
LoopVectorizer: Keep track of conditional store basic blocks

Before conditional store vectorization/unrolling we had only one
vectorized/unrolled basic block. After adding support for conditional store
vectorization this will not only be one block but multiple basic blocks. The
last block would have the back-edge. I updated the code to use a vector of basic
blocks instead of a single basic block and fixed the users to use the last entry
in this vector. But, I forgot to add the basic blocks to this vector!

Fixes PR18724.

llvm-svn: 201028

10 years agohostname is guarantee to never be null in this branch.
Jean-Daniel Dupas [Sat, 8 Feb 2014 20:29:40 +0000 (20:29 +0000)]
hostname is guarantee to never be null in this branch.

llvm-svn: 201027

10 years agoFix null dereference if address is NULL.
Jean-Daniel Dupas [Sat, 8 Feb 2014 20:22:05 +0000 (20:22 +0000)]
Fix null dereference if address is NULL.

llvm-svn: 201026

10 years agoPass the Mangler by reference.
Rafael Espindola [Sat, 8 Feb 2014 14:53:28 +0000 (14:53 +0000)]
Pass the Mangler by reference.

It is never null and it is not used in casts, so there is no reason to use a
pointer. This matches how we pass TM.

llvm-svn: 201025

10 years agoOnly set EL_PROMPT_ESC when existing - fix typo
Sylvestre Ledru [Sat, 8 Feb 2014 13:26:24 +0000 (13:26 +0000)]
Only set EL_PROMPT_ESC when existing - fix typo

llvm-svn: 201024

10 years agoOnly set EL_PROMPT_ESC when existing
Sylvestre Ledru [Sat, 8 Feb 2014 13:25:47 +0000 (13:25 +0000)]
Only set EL_PROMPT_ESC when existing

llvm-svn: 201023

10 years agoAdd LLVM_OVERRIDE to a few declarations.
Rafael Espindola [Sat, 8 Feb 2014 06:07:27 +0000 (06:07 +0000)]
Add LLVM_OVERRIDE to a few declarations.

llvm-svn: 201022

10 years agoFix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
Marshall Clow [Sat, 8 Feb 2014 04:03:14 +0000 (04:03 +0000)]
Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03

llvm-svn: 201021

10 years agotype_info objects are not unnamed_addr: the ABI requires us to
John McCall [Sat, 8 Feb 2014 03:26:05 +0000 (03:26 +0000)]
type_info objects are not unnamed_addr: the ABI requires us to
unique them and permits the implementation of dynamic_cast (and
anything else which knows it's working with a complete class
type) to compare their addresses directly.

rdar://16005328

llvm-svn: 201020

10 years agoMove the -fms-compatibility using decl check after real access checking
Reid Kleckner [Sat, 8 Feb 2014 02:40:20 +0000 (02:40 +0000)]
Move the -fms-compatibility using decl check after real access checking

Summary:
This avoids false positives from -Wmicrosoft when name lookup would
normally succeed in standard C++.  This triggered on a common CRTP
pattern in clang, where a derived class would have a private using decl
to pull in members of a dependent base:

class Verifier : InstVisitor<Verifier> {
private:
  using InstVisitor<Verifier>::visit;
  ...
  void anything() {
    visit(); // warned here
  }
};

Real access checks pass here because we're in the context of the
Verifier, but the -Wmicrosoft extension was just looking for the private
access specifier.

Reviewers: rsmith

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

llvm-svn: 201019

10 years agoPR18581: Attempt to complete the type in a VLA declaration before checking
Richard Smith [Sat, 8 Feb 2014 02:30:49 +0000 (02:30 +0000)]
PR18581: Attempt to complete the type in a VLA declaration before checking
whether it's POD.

llvm-svn: 201018

10 years agoclang-cl: Alias /Zi and /Z7 to -gline-tables-only
Reid Kleckner [Sat, 8 Feb 2014 01:43:16 +0000 (01:43 +0000)]
clang-cl: Alias /Zi and /Z7 to -gline-tables-only

LLVM only knows how to emit Z7-style line tables on -win32, so there's
no reason for clang to emit anything other than line info.

llvm-svn: 201017

10 years agoAdd throw() specifiers to more redeclarations of operator delete and operator delete[].
Nick Lewycky [Sat, 8 Feb 2014 01:42:08 +0000 (01:42 +0000)]
Add throw() specifiers to more redeclarations of operator delete and operator delete[].

llvm-svn: 201016

10 years agoStick to C++98 for this.
Nick Lewycky [Sat, 8 Feb 2014 01:36:21 +0000 (01:36 +0000)]
Stick to C++98 for this.

llvm-svn: 201015

10 years agoUpdate these declarations of operator delete (and delete[]) to have noexcept,
Nick Lewycky [Sat, 8 Feb 2014 01:29:07 +0000 (01:29 +0000)]
Update these declarations of operator delete (and delete[]) to have noexcept,
as required per core issue 1552 and warned about with
-Wimplicit-exception-spec-mismatch.

llvm-svn: 201014

10 years agoMS ABI: Use the most recent decl to check the inheritance model
Reid Kleckner [Sat, 8 Feb 2014 01:15:37 +0000 (01:15 +0000)]
MS ABI: Use the most recent decl to check the inheritance model

This was crashing compilation of DeclContext::buildLookupImpl<>.

llvm-svn: 201013

10 years agoFix lifetime issue causing buildbot failures.
Richard Smith [Sat, 8 Feb 2014 00:42:45 +0000 (00:42 +0000)]
Fix lifetime issue causing buildbot failures.

llvm-svn: 201012

10 years agoRemove the -fhidden-weak-vtables -cc1 option. It was dead,
John McCall [Sat, 8 Feb 2014 00:41:16 +0000 (00:41 +0000)]
Remove the -fhidden-weak-vtables -cc1 option.  It was dead,
gross, and increasingly replaced through other mechanisms.

llvm-svn: 201011

10 years agoASTUnit: remove dead code in remapping files
Dmitri Gribenko [Sat, 8 Feb 2014 00:38:15 +0000 (00:38 +0000)]
ASTUnit: remove dead code in remapping files

ASTUnit contains code to remap files to other files on disk.  This code is not
used.  We only remap files to MemoryBuffers.

llvm-svn: 201010

10 years ago[Constant Hoisting] Fix insertion point for constant materialization.
Juergen Ributzka [Sat, 8 Feb 2014 00:20:49 +0000 (00:20 +0000)]
[Constant Hoisting] Fix insertion point for constant materialization.

The bitcast instruction during constant materialization was not placed correcly
in the presence of phi nodes. This commit fixes the insertion point to be in the
idom instead.

This fixes PR18768

llvm-svn: 201009

10 years ago[Constant Hoisting] Don't update the use list while traversing it - DOH!
Juergen Ributzka [Sat, 8 Feb 2014 00:20:45 +0000 (00:20 +0000)]
[Constant Hoisting] Don't update the use list while traversing it - DOH!

This fix first traverses the whole use list of the constant expression and
keeps track of the instructions that need to be updated. Then perform the
fixup afterwards.

llvm-svn: 201008

10 years ago[analyzer] Objective-C object literals are always non-nil.
Jordan Rose [Sat, 8 Feb 2014 00:04:14 +0000 (00:04 +0000)]
[analyzer] Objective-C object literals are always non-nil.

<rdar://problem/15999214>

llvm-svn: 201007

10 years agoRemove dead code.
Rafael Espindola [Fri, 7 Feb 2014 23:32:41 +0000 (23:32 +0000)]
Remove dead code.

llvm-svn: 201006

10 years agoAdded a test case for variables in registers, with
Sean Callanan [Fri, 7 Feb 2014 23:04:57 +0000 (23:04 +0000)]
Added a test case for variables in registers, with
clang -O1.

<rdar://problem/15767528>

llvm-svn: 201005

10 years agoImprove existing visualizers by:
Nikola Smiljanic [Fri, 7 Feb 2014 22:57:20 +0000 (22:57 +0000)]
Improve existing visualizers by:

- Properly displaying non null terminated StringRef.
- Auto expanding pointer types.
- Displaying real type names for PointerUnions.
- Using "size" and "capacity" across all containers.
- Simplifying code where possible.

llvm-svn: 201004

10 years agoModified ObjectFile::SetLoadAddress() to now be:
Greg Clayton [Fri, 7 Feb 2014 22:54:47 +0000 (22:54 +0000)]
Modified ObjectFile::SetLoadAddress() to now be:

ObjectFile::SetLoadAddress (Target &target,
                            lldb::addr_t value,
                            bool value_is_offset);

Now "value" is a slide if "value_is_offset" is true, and "value" is an image base address otherwise. All previous usage of this API was using slides.

Updated the ObjectFileELF and ObjectFileMachO SetLoadAddress methods to do the right thing.

Also updated the ObjectFileMachO::SetLoadAddress() function to not load __LINKEDIT when it isn't needed and to only load sections that belong to the executable object file.

llvm-svn: 201003

10 years agoPR16638, DR1552: the exception specification on an implicitly-declared
Richard Smith [Fri, 7 Feb 2014 22:51:16 +0000 (22:51 +0000)]
PR16638, DR1552: the exception specification on an implicitly-declared
'operator delete' or 'operator delete[]' is an explicit exception
specification. Therefore we should diagnose 'void operator delete(void*)'
instead of 'void operator delete(void*) noexcept'.

This diagnostic remains an ExtWarn, since in practice people don't always
include the exception specification in such a declaration.

llvm-svn: 201002

10 years ago Comment cleanup. Don't repeat the function name in the comment.
Rafael Espindola [Fri, 7 Feb 2014 22:45:13 +0000 (22:45 +0000)]
 Comment cleanup. Don't repeat the function name in the comment.

llvm-svn: 201001

10 years agoFold together two repeated identical 'if's.
Richard Smith [Fri, 7 Feb 2014 22:39:53 +0000 (22:39 +0000)]
Fold together two repeated identical 'if's.

llvm-svn: 201000

10 years agoComment cleanup. Don't repeat the function name in the comment.
Rafael Espindola [Fri, 7 Feb 2014 22:39:17 +0000 (22:39 +0000)]
Comment cleanup. Don't repeat the function name in the comment.

llvm-svn: 200999

10 years agoRemove training whitespace.
Rafael Espindola [Fri, 7 Feb 2014 22:33:56 +0000 (22:33 +0000)]
Remove training whitespace.

llvm-svn: 200998

10 years agoNow that the command interpreter runs in a separate thread in Xcode, we need to lock...
Greg Clayton [Fri, 7 Feb 2014 22:31:20 +0000 (22:31 +0000)]
Now that the command interpreter runs in a separate thread in Xcode, we need to lock the target API lock instead of trying to lock it.

What was happening was:
1 - Xcode ran and stopped and was doing work on thread 2
2 - Users would type something in Xcode console on thread 1
3 - thread 3 would be running command interpreter thread and try to execute command but get "failed to get API lock" error for any command that wanted the target API lock (like "expression")

<rdar://problem/15775016>

llvm-svn: 200997

10 years ago<rdar://problem/12857181>
Enrico Granata [Fri, 7 Feb 2014 22:12:55 +0000 (22:12 +0000)]
<rdar://problem/12857181>

When a user says

type formatter add ... unsigned int

he most probably means to deal with the "unsigned int" type. However, given how the LLDB command parser works, that command will try to add the formatter to the TWO types 'unsigned' AND 'int'

Since this is unlikely to be what the user wants, warn about it, and suggest they can use quotes to override the debugger's understanding

llvm-svn: 200996

10 years agoAdd conditional breakpoints to our cheat sheet
Enrico Granata [Fri, 7 Feb 2014 21:30:02 +0000 (21:30 +0000)]
Add conditional breakpoints to our cheat sheet

llvm-svn: 200995

10 years agoAlways create a temporary symbol to use with the cfi frame.
Rafael Espindola [Fri, 7 Feb 2014 21:23:18 +0000 (21:23 +0000)]
Always create a temporary symbol to use with the cfi frame.

This is a small simplification and a small step in fixing pr18743 since
private functions on MachO should be using a 'l' prefix.

llvm-svn: 200994

10 years agoAvoid signed vs unsigned compare warnings. From Dimitry Andric.
Joerg Sonnenberger [Fri, 7 Feb 2014 21:14:29 +0000 (21:14 +0000)]
Avoid signed vs unsigned compare warnings. From Dimitry Andric.

llvm-svn: 200993

10 years agoUse FileCheck variables to simplify this test.
Rafael Espindola [Fri, 7 Feb 2014 21:11:33 +0000 (21:11 +0000)]
Use FileCheck variables to simplify this test.

llvm-svn: 200992

10 years agoWhen writing data back into a register, accept
Sean Callanan [Fri, 7 Feb 2014 20:42:44 +0000 (20:42 +0000)]
When writing data back into a register, accept
values whose size differs from the register's
size.

llvm-svn: 200991

10 years agoFix Darwin bots from EHABI change
Renato Golin [Fri, 7 Feb 2014 20:32:32 +0000 (20:32 +0000)]
Fix Darwin bots from EHABI change

llvm-svn: 200990

10 years agoR600/SI: Add failing test for 3 x i64 vectors.
Matt Arsenault [Fri, 7 Feb 2014 20:29:40 +0000 (20:29 +0000)]
R600/SI: Add failing test for 3 x i64 vectors.

Stores of <4 x i64> do work (although they do expand to 4 stores
instead of 2), but 3 x i64 vectors fail to select.

llvm-svn: 200989

10 years agoRemove -arm-disable-ehabi option
Renato Golin [Fri, 7 Feb 2014 20:12:49 +0000 (20:12 +0000)]
Remove -arm-disable-ehabi option

llvm-svn: 200988

10 years agoFix test from r200979 on Windows
Ben Langmuir [Fri, 7 Feb 2014 19:39:50 +0000 (19:39 +0000)]
Fix test from r200979 on Windows

Hopefully the last tweak needed to get this test working everywhere.

Remove matching of the prefix of sys_header.h, which was never the point
of the test anyway.  This avoids dealing with path separators.

llvm-svn: 200987

10 years agoObjective-C. Revert patch r193003 for further
Fariborz Jahanian [Fri, 7 Feb 2014 19:25:10 +0000 (19:25 +0000)]
Objective-C. Revert patch r193003 for further
internal discussions. // rdar://16006401

llvm-svn: 200986

10 years agoFix a bug where we will crash if we have a class "B" that is contained inside a class...
Greg Clayton [Fri, 7 Feb 2014 19:21:56 +0000 (19:21 +0000)]
Fix a bug where we will crash if we have a class "B" that is contained inside a class "A" in the DWARF where "A" is a forward declaration.

<rdar://problem/14673945>
<rdar://problem/15682781>

llvm-svn: 200985

10 years agordar://15648942
Enrico Granata [Fri, 7 Feb 2014 19:21:09 +0000 (19:21 +0000)]
rdar://15648942

Provide a filter for libc++ std::atomic<T>
This just hides some implementation clutter and promotes the actual content to only child status

llvm-svn: 200984

10 years agoDon't internalize linkonce_odr non constant variables.
Rafael Espindola [Fri, 7 Feb 2014 19:04:43 +0000 (19:04 +0000)]
Don't internalize linkonce_odr non constant variables.

llvm-svn: 200983

10 years agoFix test from r200979 on non-Darwin systems
Ben Langmuir [Fri, 7 Feb 2014 17:56:29 +0000 (17:56 +0000)]
Fix test from r200979 on non-Darwin systems

Add a darwin triple to get the behaviour from isysroot that the test
expects.

llvm-svn: 200982

10 years agoFix an invalid check for duplicate option categories.
Alexander Kornienko [Fri, 7 Feb 2014 17:42:30 +0000 (17:42 +0000)]
Fix an invalid check for duplicate option categories.

An intermediate solution until the problems with analyzer plugins linking with
llvm/Support and causing assertions due to duplicate GeneralCategory are solved.

llvm-svn: 200981

10 years ago[analyzer] Just silence all warnings coming out of std::basic_string.
Jordan Rose [Fri, 7 Feb 2014 17:35:04 +0000 (17:35 +0000)]
[analyzer] Just silence all warnings coming out of std::basic_string.

This means always walking the whole call stack for the end path node, but
we'll assume that's always fairly tractable.

<rdar://problem/15952973>

llvm-svn: 200980

10 years agoStat system dependencies when using -verify-pch
Ben Langmuir [Fri, 7 Feb 2014 17:31:11 +0000 (17:31 +0000)]
Stat system dependencies when using -verify-pch

We don't stat the system headers to check for stalenes during regular
PCH loading for performance reasons.  When explicitly saying
-verify-pch, we want to check all the dependencies - user or system.

llvm-svn: 200979

10 years ago[mips] Forbid the use of registers t6, t7 and t8 if the target is NaCl.
Sasa Stankovic [Fri, 7 Feb 2014 17:16:40 +0000 (17:16 +0000)]
[mips] Forbid the use of registers t6, t7 and t8 if the target is NaCl.

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

llvm-svn: 200978

10 years agoFix a bug with .weak_def_can_be_hidden: Mutable variables cannot use it.
Rafael Espindola [Fri, 7 Feb 2014 16:21:30 +0000 (16:21 +0000)]
Fix a bug with .weak_def_can_be_hidden: Mutable variables cannot use it.

Thanks to John McCall for noticing it.

llvm-svn: 200977

10 years agoRefactor logic into a function predicate.
Rafael Espindola [Fri, 7 Feb 2014 16:07:11 +0000 (16:07 +0000)]
Refactor logic into a function predicate.

No functionality change.

llvm-svn: 200976

10 years agoASTUnit: ArrayRef'ize RemappedFiles
Dmitri Gribenko [Fri, 7 Feb 2014 15:00:22 +0000 (15:00 +0000)]
ASTUnit: ArrayRef'ize RemappedFiles

llvm-svn: 200975

10 years agoclang-format: Fix column limit violation for merged lines in macros.
Daniel Jasper [Fri, 7 Feb 2014 13:45:27 +0000 (13:45 +0000)]
clang-format: Fix column limit violation for merged lines in macros.

Before (81 columns):
  #define A                                                                       \
    void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { return aaaaaaaa; } \
    int i;

After:
  #define A                                                    \
    void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { \
      return aaaaaaaa;                                         \
    }                                                          \
    int i;

llvm-svn: 200974

10 years agoTry to unbreak the mingw32 build.
Benjamin Kramer [Fri, 7 Feb 2014 12:05:36 +0000 (12:05 +0000)]
Try to unbreak the mingw32 build.

llvm-svn: 200973

10 years agotsan: improve the test
Dmitry Vyukov [Fri, 7 Feb 2014 11:48:06 +0000 (11:48 +0000)]
tsan: improve the test
remove TSAN_OPTIONS from the test, so that it runs in the presubmit script
add a CHECK, so that it can run with FileCheck as well

llvm-svn: 200972

10 years agoFix AAPCS compliance for HFAs containing doubles and long doubles
Oliver Stannard [Fri, 7 Feb 2014 11:25:57 +0000 (11:25 +0000)]
Fix AAPCS compliance for HFAs containing doubles and long doubles

An HFA is defined as a struct containing floating point values of the
same machine type. In the 32-bit ABI, double and long double have the
same machine type, so a struct with a mixture of these types must be an
HFA (assuming it meets the other criteria).

llvm-svn: 200971

10 years agoLLVM-1163: AAPCS-VFP violation when CPRC allocated to stack
Oliver Stannard [Fri, 7 Feb 2014 11:19:53 +0000 (11:19 +0000)]
LLVM-1163: AAPCS-VFP violation when CPRC allocated to stack

According to the AAPCS, when a CPRC is allocated to the stack, all other
VFP registers should be marked as unavailable.

I have also modified the rules for allocating non-CPRCs to the stack, to make
it more explicit that all GPRs must be made unavailable. I cannot think of a
case where the old version would produce incorrect answers, so there is no test
for this.

llvm-svn: 200970

10 years agoChanged comment.
Sasa Stankovic [Fri, 7 Feb 2014 11:16:02 +0000 (11:16 +0000)]
Changed comment.

llvm-svn: 200969

10 years agoclang-format: Fix range-based for-loop formatting.
Daniel Jasper [Fri, 7 Feb 2014 10:09:46 +0000 (10:09 +0000)]
clang-format: Fix range-based for-loop formatting.

Before:
  for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaa.aaaaaaaaaaaa()
           .aaaaaaaaa()
           .a()) {
  }

After:
  for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa :
       aaaaaaaaaaaa.aaaaaaaaaaaa().aaaaaaaaa().a()) {
  }

llvm-svn: 200968

10 years agoDocument return value for FileManager::getNoncachedStatValue()
Dmitri Gribenko [Fri, 7 Feb 2014 09:31:00 +0000 (09:31 +0000)]
Document return value for FileManager::getNoncachedStatValue()

llvm-svn: 200967

10 years agotsan: run user OnInitialize callback later
Dmitry Vyukov [Fri, 7 Feb 2014 09:28:57 +0000 (09:28 +0000)]
tsan: run user OnInitialize callback later
when global and thread state are initialized,
this allows to do more things in the callback.

llvm-svn: 200966

10 years ago[Sparc] Add support for parsing synthetic instruction 'mov'.
Venkatraman Govindaraju [Fri, 7 Feb 2014 09:06:52 +0000 (09:06 +0000)]
[Sparc] Add support for parsing synthetic instruction 'mov'.

llvm-svn: 200965

10 years agoRevert r194097: "With this patch -Wwrite-strings is still implemented with the terrible
Argyrios Kyrtzidis [Fri, 7 Feb 2014 08:33:28 +0000 (08:33 +0000)]
Revert r194097: "With this patch -Wwrite-strings is still implemented with the terrible
    hack of passing -fconst-strings to -cc1"

Passing or not a language option based on diagnostic settings is a bad idea, it breaks
using a PCH that was compiled with different diagnostic settings.

Also add a test case to make sure we don't regress.

llvm-svn: 200964

10 years ago[Sparc] Emit correct encoding for atomic instructions. Also, add support for parsing...
Venkatraman Govindaraju [Fri, 7 Feb 2014 07:34:49 +0000 (07:34 +0000)]
[Sparc] Emit correct encoding for atomic instructions. Also, add support for parsing CAS instructions to test the CAS encoding.

llvm-svn: 200963

10 years ago[Sparc] Emit relocations for Thread Local Storage (TLS) when integrated assembler...
Venkatraman Govindaraju [Fri, 7 Feb 2014 05:54:20 +0000 (05:54 +0000)]
[Sparc] Emit relocations for Thread Local Storage (TLS) when integrated assembler is used.

llvm-svn: 200962

10 years ago[Sparc] Emit correct relocations for PIC code when integrated assembler is used.
Venkatraman Govindaraju [Fri, 7 Feb 2014 04:24:35 +0000 (04:24 +0000)]
[Sparc] Emit correct relocations for PIC code when integrated assembler is used.

llvm-svn: 200961

10 years ago[Sparc] Use SparcMCExpr::VariantKind itself as MachineOperand's target flags.
Venkatraman Govindaraju [Fri, 7 Feb 2014 02:36:06 +0000 (02:36 +0000)]
[Sparc] Use SparcMCExpr::VariantKind itself as MachineOperand's target flags.

llvm-svn: 200960

10 years agoMS ABI: Don't be so hasty to judge an inheritance model
David Majnemer [Fri, 7 Feb 2014 00:43:07 +0000 (00:43 +0000)]
MS ABI: Don't be so hasty to judge an inheritance model

If we are in the middle of defining the class, don't attempt to
validate previously annotated declarations.  We may not have seen base
specifiers or virtual method declarations yet.

llvm-svn: 200959

10 years agoPGO branch weight: fix PR18752.
Manman Ren [Fri, 7 Feb 2014 00:38:56 +0000 (00:38 +0000)]
PGO branch weight: fix PR18752.

Fix a bug triggered in IfConverterTriangle when CvtBB has multiple predecessors
by getting the weights before removing a successor.

llvm-svn: 200958

10 years agoX86: Resolve a long standing FIXME and properly isel pextr[bw].
Jim Grosbach [Fri, 7 Feb 2014 00:16:33 +0000 (00:16 +0000)]
X86: Resolve a long standing FIXME and properly isel pextr[bw].

Generalize the AArch64 .td nodes for AssertZext and AssertSext. Use
them to match the relevant pextr store instructions.

The test widen_load-2.ll requires a slight change because with the
stores gone, the remaining instructions are scheduled in a different
order.

Add test cases for SSE4 and AVX variants.

Resolves rdar://13414672.

Patch by Adam Nemet <anemet@apple.com>.

llvm-svn: 200957

10 years ago[mach-o] use new way to copy StringRefs
Nick Kledzik [Thu, 6 Feb 2014 23:48:52 +0000 (23:48 +0000)]
[mach-o] use new way to copy StringRefs

llvm-svn: 200956

10 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 6 Feb 2014 23:35:22 +0000 (23:35 +0000)]
Convert test to FileCheck.

llvm-svn: 200955

10 years agoTemporary fix for PR18473: Don't try to evaluate the initializer for a
Richard Smith [Thu, 6 Feb 2014 23:35:16 +0000 (23:35 +0000)]
Temporary fix for PR18473: Don't try to evaluate the initializer for a
type-dependent variable, even if the initializer isn't value-dependent. This
happens for ParenListExprs composed of non-value-dependent subexpressions, for
instance.

We should really give ParenListExprs (and InitListExprs) the type of the
initialized entity if they're used to represent a dependent initialization (and
if so, set them to be type-, value- and instantiation-dependent).

llvm-svn: 200954

10 years agoFixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing on
Richard Trieu [Thu, 6 Feb 2014 23:26:23 +0000 (23:26 +0000)]
Fixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing on
certain receiver types.

llvm-svn: 200953

10 years agoThe diagnostic printer expects the LangOptions to still be alive. Give it one that...
Nick Lewycky [Thu, 6 Feb 2014 22:57:16 +0000 (22:57 +0000)]
The diagnostic printer expects the LangOptions to still be alive. Give it one that lives at least as long as all the uses of it. This is still wrong though, we should be passing in the correct LangOpts for a given source file.

llvm-svn: 200952

10 years agoLock the JIT before using it.
Sean Callanan [Thu, 6 Feb 2014 22:25:20 +0000 (22:25 +0000)]
Lock the JIT before using it.

<rdar://problem/15958296>

llvm-svn: 200951

10 years agoRemoved spurious lookup of the $__lldb_expr
Sean Callanan [Thu, 6 Feb 2014 22:24:11 +0000 (22:24 +0000)]
Removed spurious lookup of the $__lldb_expr
selector when compiling an expression in an
Objective-C context.

<rdar://problem/15797390>

llvm-svn: 200950

10 years agoAdd isListInitialization matcher.
Peter Collingbourne [Thu, 6 Feb 2014 21:52:24 +0000 (21:52 +0000)]
Add isListInitialization matcher.

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

llvm-svn: 200949

10 years agoPR18128: a lambda capture-default is not permitted for a non-local lambda
Richard Smith [Thu, 6 Feb 2014 21:49:08 +0000 (21:49 +0000)]
PR18128: a lambda capture-default is not permitted for a non-local lambda
expression.

llvm-svn: 200948

10 years ago[CodeGenPrepare] Move away sign extensions that get in the way of addressing
Quentin Colombet [Thu, 6 Feb 2014 21:44:56 +0000 (21:44 +0000)]
[CodeGenPrepare] Move away sign extensions that get in the way of addressing
mode.

Basically the idea is to transform code like this:
%idx = add nsw i32 %a, 1
%sextidx = sext i32 %idx to i64
%gep = gep i8* %myArray, i64 %sextidx
load i8* %gep

Into:
%sexta = sext i32 %a to i64
%idx = add nsw i64 %sexta, 1
%gep = gep i8* %myArray, i64 %idx
load i8* %gep

That way the computation can be folded into the addressing mode.

This transformation is done as part of the addressing mode matcher.
If the matching fails (not profitable, addressing mode not legal, etc.), the
matcher will revert the related promotions.

<rdar://problem/15519855>

llvm-svn: 200947

10 years agoUse correct ld emulation for EABI hardware float triple on NetBSD.
Joerg Sonnenberger [Thu, 6 Feb 2014 21:04:32 +0000 (21:04 +0000)]
Use correct ld emulation for EABI hardware float triple on NetBSD.

llvm-svn: 200946

10 years ago[sanitizer] Intercept if_indextoname() and if_nametoindex().
Sergey Matveev [Thu, 6 Feb 2014 20:39:33 +0000 (20:39 +0000)]
[sanitizer] Intercept if_indextoname() and if_nametoindex().

llvm-svn: 200945

10 years agoFix indentation of a code example in LibTooling's documentation.
James Dennett [Thu, 6 Feb 2014 20:16:05 +0000 (20:16 +0000)]
Fix indentation of a code example in LibTooling's documentation.

llvm-svn: 200944

10 years agoImplement ObjectFileMachO::SetLoadAddress().
Greg Clayton [Thu, 6 Feb 2014 20:10:16 +0000 (20:10 +0000)]
Implement ObjectFileMachO::SetLoadAddress().

llvm-svn: 200943

10 years ago[sanitizer] Fix build.
Sergey Matveev [Thu, 6 Feb 2014 19:36:10 +0000 (19:36 +0000)]
[sanitizer] Fix build.

llvm-svn: 200942

10 years agoTrack register pressure a bit more carefully (weird corner case).
Andrew Trick [Thu, 6 Feb 2014 19:20:41 +0000 (19:20 +0000)]
Track register pressure a bit more carefully (weird corner case).

This solves a problem where a def machine operand has no uses but has
not been marked dead. In this case, the initial RP analysis was being
extra precise and determining from LiveIntervals the the register was
actually dead. This caused us to omit the register from the RP
tracker's block live out. That's all good, but the per-instruction
summary still accounted for it as a valid def. This could cause an
assertion in the tracker later when we underflow pressure.

This is from a bug report on an out-of-tree target. It is not
reproducible on well-behaved targets. I'm just making an obvious fix
without unit test.

llvm-svn: 200941

10 years agoSilence build-bots from the fallout of r200921
David Majnemer [Thu, 6 Feb 2014 19:14:16 +0000 (19:14 +0000)]
Silence build-bots from the fallout of r200921

llvm-svn: 200940

10 years agoFactor some methods that were in DynamicLoaderPOSIXDYLD.
Steve Pucci [Thu, 6 Feb 2014 19:02:19 +0000 (19:02 +0000)]
Factor some methods that were in DynamicLoaderPOSIXDYLD.

Move some code that was in DynamicLoaderPOSIXDLYD into the
base class DynamicLoader.  In the case of UpdateLoadedSections(),
the test to see whether a file is loadable (its address is zero)
is not generally applicable so that test is changed to a more
universally applicable check for the SHF_ALLOC flag on the section.

Also make it explicit that the reading of the module_id in
DynamicLoaderPOSIXDYLD::GetThreadLocalData() is using a hardcoded
size (of module_id) of 4, which might not be appropriate on
big-endian 64-bit systems, leaving a FIXME comment in place.

llvm-svn: 200939

10 years agoMove -verify-pch to use VerifyJobAction
Ben Langmuir [Thu, 6 Feb 2014 18:53:25 +0000 (18:53 +0000)]
Move -verify-pch to use VerifyJobAction

Use the verify hook rather than the compile hook to represent the
-verify-pch action, and move the exising --verify-debug-info action
into its own subclass of VerifyJobAction.  Incidentally change the name
printed by -ccc-print-phases for --verify-debug-info.

llvm-svn: 200938

10 years agoRevert r200095 and r200152. It turns out when compiling with -arch armv7 -mcpu=cortex...
Evan Cheng [Thu, 6 Feb 2014 18:51:34 +0000 (18:51 +0000)]
Revert r200095 and r200152. It turns out when compiling with -arch armv7 -mcpu=cortex-m3, the triple would still set iOS as the OS so the hack is still needed. rdar://15984891

llvm-svn: 200937

10 years ago[sanitizer] One does not simply intercept getifaddrs().
Sergey Matveev [Thu, 6 Feb 2014 18:48:23 +0000 (18:48 +0000)]
[sanitizer] One does not simply intercept getifaddrs().

Upgrade the interceptor, and attempt to fix the Android build.

llvm-svn: 200936

10 years agoR600/SI: Add a MUBUF store pattern for Reg+Imm offsets
Tom Stellard [Thu, 6 Feb 2014 18:36:41 +0000 (18:36 +0000)]
R600/SI: Add a MUBUF store pattern for Reg+Imm offsets

llvm-svn: 200935

10 years agoR600/SI: Add a MUBUF store pattern for Imm offsets
Tom Stellard [Thu, 6 Feb 2014 18:36:39 +0000 (18:36 +0000)]
R600/SI: Add a MUBUF store pattern for Imm offsets

llvm-svn: 200934

10 years agoR600/SI: Add a MUBUF load pattern for Reg+Imm offsets
Tom Stellard [Thu, 6 Feb 2014 18:36:38 +0000 (18:36 +0000)]
R600/SI: Add a MUBUF load pattern for Reg+Imm offsets

llvm-svn: 200933