platform/upstream/llvm.git
10 years agoClean up language and grammar.
Eric Christopher [Tue, 20 May 2014 17:10:39 +0000 (17:10 +0000)]
Clean up language and grammar.

Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209215

10 years agoGo via uintptr_t when casting away constness, otherwise GCC will warn
Joerg Sonnenberger [Tue, 20 May 2014 16:37:07 +0000 (16:37 +0000)]
Go via uintptr_t when casting away constness, otherwise GCC will warn
when using -Wcast-qual.

llvm-svn: 209214

10 years agoFix typos
Alp Toker [Tue, 20 May 2014 16:17:53 +0000 (16:17 +0000)]
Fix typos

llvm-svn: 209213

10 years agoclang/test/SemaCXX/err_init_conversion_failed.cpp: Tweak for i686-msvc.
NAKAMURA Takumi [Tue, 20 May 2014 15:44:42 +0000 (15:44 +0000)]
clang/test/SemaCXX/err_init_conversion_failed.cpp: Tweak for i686-msvc.

For targeting i686-msvc, declarations are seen as thiscall like;

  void (template_test::S::*)(const int &) __attribute__((thiscall))
  void (template_test::S::*)(int) __attribute__((thiscall))

It didn't affect x86_64-msvc.

llvm-svn: 209212

10 years agoTemporarily revert: r209129 - [mips][mips64r6] Sorted *_ENC, *_DESC classes and tests
Daniel Sanders [Tue, 20 May 2014 14:46:24 +0000 (14:46 +0000)]
Temporarily revert: r209129 - [mips][mips64r6] Sorted *_ENC, *_DESC classes and tests

After discussion with Zoran, we have decided to temporarily revert this commit.
It's causing some difficult to resolve conflicts and we are under time pressure
to deliver an initial MIPS64r6 compiler.

We will re-apply an equivalent patch once the time pressure has passed.

llvm-svn: 209211

10 years ago[ASan Win] Simplify and improve the way we forward ASan interface calls from DLLs
Timur Iskhodzhanov [Tue, 20 May 2014 14:26:19 +0000 (14:26 +0000)]
[ASan Win] Simplify and improve the way we forward ASan interface calls from DLLs

Reviewed at http://reviews.llvm.org/D3848

llvm-svn: 209210

10 years agoNone of these attributes require FunctionTemplate to be explicitly listed as part...
Aaron Ballman [Tue, 20 May 2014 14:10:53 +0000 (14:10 +0000)]
None of these attributes require FunctionTemplate to be explicitly listed as part of their subject definition. FunctionTemplateDecls are not what the attribute appertains to in the first place -- it attaches to the underlying FunctionDecl.

The attribute emitter was using FunctionTemplate to map the diagnostic to "functions or methods", but that isn't a particularly clear diagnostic in these cases anyway (since they do not apply to ObjC methods). Updated the attribute emitter to remove custom logic for FunctionTemplateDecl, and updated the test cases for the change in diagnostic wording.

llvm-svn: 209209

10 years ago[ARM64] Port basic-a64-diagnostics.s over to ARM64
Bradley Smith [Tue, 20 May 2014 13:33:41 +0000 (13:33 +0000)]
[ARM64] Port basic-a64-diagnostics.s over to ARM64

llvm-svn: 209207

10 years agoTableGen: permit non-leaf ComplexPattern uses
Tim Northover [Tue, 20 May 2014 11:52:46 +0000 (11:52 +0000)]
TableGen: permit non-leaf ComplexPattern uses

This allows the results of a ComplexPattern check to be distributed to separate
named Operands, instead of the current system where all results must apply (and
match perfectly) with a single Operand.

For example, if "some_addrmode" is a ComplexPattern producing two results, you
can write:

   def : Pat<(load (some_addrmode GPR64:$base, imm:$offset)),
             (INST GPR64:$base, imm:$offset)>;

This should allow neater instruction definitions in TableGen that don't put all
possible aspects of addressing into a single operand, but are still usable with
relatively simple C++ CodeGen idioms.

llvm-svn: 209206

10 years agoclang-format: [JS] Understand top-level function literals properly.
Daniel Jasper [Tue, 20 May 2014 11:14:57 +0000 (11:14 +0000)]
clang-format: [JS] Understand top-level function literals properly.

llvm-svn: 209205

10 years agoAdd parentheses to suppress the gcc warning '-Wparentheses'.
Simon Atanasyan [Tue, 20 May 2014 10:23:04 +0000 (10:23 +0000)]
Add parentheses to suppress the gcc warning '-Wparentheses'.

No functional changes.

llvm-svn: 209203

10 years agoLegalizer: Make bswap promotion safe for vectors.
Benjamin Kramer [Tue, 20 May 2014 09:42:31 +0000 (09:42 +0000)]
Legalizer: Make bswap promotion safe for vectors.

llvm-svn: 209202

10 years ago[Mips] Add more relocation types and MIPS specific e_flags constants.
Simon Atanasyan [Tue, 20 May 2014 09:27:49 +0000 (09:27 +0000)]
[Mips] Add more relocation types and MIPS specific e_flags constants.

llvm-svn: 209201

10 years agoARMEB: Additional test files for ARM fixups
Christian Pirker [Tue, 20 May 2014 09:24:37 +0000 (09:24 +0000)]
ARMEB: Additional test files for ARM fixups

llvm-svn: 209200

10 years agoTableGen: convert InstAlias's Emit bit to an int.
Tim Northover [Tue, 20 May 2014 09:17:16 +0000 (09:17 +0000)]
TableGen: convert InstAlias's Emit bit to an int.

When multiple aliases overlap, the correct string to print can often be
determined purely by considering the InstAlias declarations in some particular
order. This allows the user to specify that order manually when desired,
without resorting to hacking around with the default lexicographical order on
Record instantiation, which is error-prone and ugly.

I was also mistaken about "add w2, w3, w4" being the same as "add w2, w3, w4,
uxtw". That's only true if Rn is the stack pointer.

llvm-svn: 209199

10 years ago[X86] Tune LEA usage for Silvermont
Alexey Volkov [Tue, 20 May 2014 08:55:50 +0000 (08:55 +0000)]
[X86] Tune LEA usage for Silvermont

According to Intel Software Optimization Manual on Silvermont in some cases LEA
is better to be replaced with ADD instructions:
"The rule of thumb for ADDs and LEAs is that it is justified to use LEA
with a valid index and/or displacement for non-destructive destination purposes
(especially useful for stack offset cases), or to use a SCALE.
Otherwise, ADD(s) are preferable."

Differential Revision: http://reviews.llvm.org/D3826

llvm-svn: 209198

10 years ago[LV][REFACTOR] One more tiny fix for printing debug locations in loop vectorizer...
Zinovy Nis [Tue, 20 May 2014 08:26:20 +0000 (08:26 +0000)]
[LV][REFACTOR] One more tiny fix for printing debug locations in loop vectorizer. Now consistent with the remarks emitter.

Differential Revision: http://reviews.llvm.org/D3821

llvm-svn: 209197

10 years agoXCore target: sort typestring enum fields alphabetically
Robert Lytton [Tue, 20 May 2014 07:19:33 +0000 (07:19 +0000)]
XCore target: sort typestring enum fields alphabetically

llvm-svn: 209196

10 years agoSpeculative fix for Windows buildbot after r209138
Ben Langmuir [Tue, 20 May 2014 05:55:04 +0000 (05:55 +0000)]
Speculative fix for Windows buildbot after r209138

It appears that Windows doesn't like renaming over open files, which we
do in clearOutputFiles. The file being compiled should be safe to
removed, but this isn't very satisfying - we don't want to manually
manage the lifetime of files we cannot prove have no references.

llvm-svn: 209195

10 years agollvm-readobj: use range-based for loop
Saleem Abdulrasool [Tue, 20 May 2014 05:18:06 +0000 (05:18 +0000)]
llvm-readobj: use range-based for loop

Convert an additional site to a range based for loop.  NFC.

llvm-svn: 209194

10 years agoTeach isKnownNonNull that a nonnull return is not null. Add a test for this case...
Nick Lewycky [Tue, 20 May 2014 05:13:21 +0000 (05:13 +0000)]
Teach isKnownNonNull that a nonnull return is not null. Add a test for this case as well as the case of a nonnull attribute (already handled but not tested).

llvm-svn: 209193

10 years ago[C++11] Use 'nullptr'. Tooling edition.
Craig Topper [Tue, 20 May 2014 04:51:16 +0000 (04:51 +0000)]
[C++11] Use 'nullptr'. Tooling edition.

llvm-svn: 209192

10 years ago[C++11] Use 'nullptr'. Analysis edition.
Craig Topper [Tue, 20 May 2014 04:30:07 +0000 (04:30 +0000)]
[C++11] Use 'nullptr'. Analysis edition.

llvm-svn: 209191

10 years agoFix diagnostic message for member function pointer mismatches where one of the
Richard Trieu [Tue, 20 May 2014 04:10:24 +0000 (04:10 +0000)]
Fix diagnostic message for member function pointer mismatches where one of the
classes is a template argument.

llvm-svn: 209190

10 years agoDebugInfo: Emit function definitions within their namespace scope.
David Blaikie [Tue, 20 May 2014 03:23:24 +0000 (03:23 +0000)]
DebugInfo: Emit function definitions within their namespace scope.

This workaround (presumably for ancient GDB) doesn't appear to be
required (GDB 7.5 seems to tolerate function definition DIEs in
namespace scope just fine).

llvm-svn: 209189

10 years agoFollow up to 209187, updating a test to use FileCheck. Needed to ignore an extra...
David Blaikie [Tue, 20 May 2014 02:40:34 +0000 (02:40 +0000)]
Follow up to 209187, updating a test to use FileCheck. Needed to ignore an extra DW_TAG_class_type

llvm-svn: 209188

10 years agoUpdate test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll to use FileCheck.
David Blaikie [Tue, 20 May 2014 02:19:15 +0000 (02:19 +0000)]
Update test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll to use FileCheck.

llvm-svn: 209187

10 years agoIgnore void returning overloaded functions fom -Wunused-comparison. PR19791.
Richard Trieu [Tue, 20 May 2014 01:34:43 +0000 (01:34 +0000)]
Ignore void returning overloaded functions fom -Wunused-comparison.  PR19791.

llvm-svn: 209186

10 years agoAdd 'nonnull', a new parameter and return attribute which indicates that the pointer...
Nick Lewycky [Tue, 20 May 2014 01:23:40 +0000 (01:23 +0000)]
Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!

llvm-svn: 209185

10 years agoARCMT/GC-check-warn-nsalloc.m: don't provide a diag group
Alp Toker [Mon, 19 May 2014 23:48:49 +0000 (23:48 +0000)]
ARCMT/GC-check-warn-nsalloc.m: don't provide a diag group

This diagnostic is now controlled solely by -no-ns-alloc-error thus matching
the original intended behaviour.

llvm-svn: 209184

10 years agoLTO: Add a testcase for linking modules with incompatible Debug Info
Adrian Prantl [Mon, 19 May 2014 23:41:25 +0000 (23:41 +0000)]
LTO: Add a testcase for linking modules with incompatible Debug Info
Versions.
rdar://problem/16926122

llvm-svn: 209183

10 years agoDemote the "Debug Info Version" module flag to llvm::Module::Warning
Adrian Prantl [Mon, 19 May 2014 23:40:06 +0000 (23:40 +0000)]
Demote the "Debug Info Version" module flag to llvm::Module::Warning
behavior on mismatch. The AutoUpgrader will drop incompatible debug info
any way and also emit a warning diagnostic for it.

rdar://problem/16926122

llvm-svn: 209182

10 years agoOK, NAKAMURA Takumi beat me to this change. So backing out my addition of
Kevin Enderby [Mon, 19 May 2014 23:26:51 +0000 (23:26 +0000)]
OK, NAKAMURA Takumi beat me to this change.  So backing out my addition of
llvm-size to the list so it only has one.  Sorry for the noise.

llvm-svn: 209181

10 years agoUsing SmallString and correct addr var
Renato Golin [Mon, 19 May 2014 23:25:25 +0000 (23:25 +0000)]
Using SmallString and correct addr var

llvm-svn: 209180

10 years agoDavid Blaikie pointed out that the test added in r209158 fails in the
Kevin Enderby [Mon, 19 May 2014 23:22:58 +0000 (23:22 +0000)]
David Blaikie pointed out that the test added in r209158 fails in the
check-llvm target under CMake.  And the test/CMakeFiles.txt needs to
have llvm-size added to the list.

llvm-svn: 209179

10 years agoDebugInfo: Assume all subprogram DIEs have been created before any abstract subprogra...
David Blaikie [Mon, 19 May 2014 23:16:19 +0000 (23:16 +0000)]
DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed.

Since we visit the whole list of subprograms for each CU at module
start, this is clearly true - don't test for the case, just assert it.

A few old test cases seemed to have incomplete subprogram lists, but any
attempt to reproduce them shows full subprogram lists that even include
entities that have been completely inlined and the out of line
definition removed.

llvm-svn: 209178

10 years ago[CMake] Add llvm-size to check-llvm, to fix build since r209158.
NAKAMURA Takumi [Mon, 19 May 2014 23:12:43 +0000 (23:12 +0000)]
[CMake] Add llvm-size to check-llvm, to fix build since r209158.

llvm-svn: 209177

10 years ago[ARM64] Adds Cortex-A53 scheduling support for vector load/store post.
Chad Rosier [Mon, 19 May 2014 22:59:51 +0000 (22:59 +0000)]
[ARM64] Adds Cortex-A53 scheduling support for vector load/store post.
Patch by Dave Estes<cestes@codeaurora.org>!
PR19761 http://reviews.llvm.org/D3829

llvm-svn: 209176

10 years agoImprove test verification from r209172
Alp Toker [Mon, 19 May 2014 22:56:13 +0000 (22:56 +0000)]
Improve test verification from r209172

llvm-svn: 209175

10 years agoRemove unused method declaration
Matt Arsenault [Mon, 19 May 2014 22:55:35 +0000 (22:55 +0000)]
Remove unused method declaration

llvm-svn: 209174

10 years agoAdd documentation for llvm-dwarfdump tool
Alexey Samsonov [Mon, 19 May 2014 22:53:29 +0000 (22:53 +0000)]
Add documentation for llvm-dwarfdump tool

llvm-svn: 209173

10 years agoGet ARCMT/GC-check-warn-nsalloc.m working
Alp Toker [Mon, 19 May 2014 22:51:11 +0000 (22:51 +0000)]
Get ARCMT/GC-check-warn-nsalloc.m working

The -no-ns-alloc-error migration option now causes the diagnostic to be ignored
completely. If this isn't desired, the error can be downgraded to a warning
using the usual -Wno-error=arcmt-ns-alloc.

Note that we can't use -verify right now on this test because
VerifyDiagnosticConsumer gets confused by multiple SourceManager instances,
which is presumably the reason it was XFAILed in the first place and why the
regression wasn't detected. We'll grep instead for now.

llvm-svn: 209172

10 years agoFix usage of string when StringRef was needed
Renato Golin [Mon, 19 May 2014 22:36:19 +0000 (22:36 +0000)]
Fix usage of string when StringRef was needed

Also adding a variable to the test, so release bots match %1.
This should also calm the gdb buildbot.

.

llvm-svn: 209171

10 years agoAdded gdb remote protocol tests across all qRegisterInfo responses.
Todd Fiala [Mon, 19 May 2014 22:35:24 +0000 (22:35 +0000)]
Added gdb remote protocol tests across all qRegisterInfo responses.

Added support for gdb remote protocol capture/playback where there is a query/multiple-response
pattern.  The new playback entry supports:

- a general query command (key: next_query or query)
- an optional first-query command if that differs from the subsequent queries (key: first_query)
- an end regex for matching anything that would signify that the query/multi-response
  iteration has come to an end.  An assumption is that the end regex is not a content
  package we care about aside from ending the iteration. (key: end_regex)
- an optional 0-based index appended to the end of the query command
  (key: append_iteration_suffix), default: False.
- a key used to collect responses from the query.  Any response from the gdb remote
  that doesn't match the end-of-iteration regex is captured in the playback context
  dictionary using the key specified.  That key will be an array, where each array
  entry is one of the responses from the query/multi-response iteration. (key: save_key).
- a runaway response value, defaulting to 10k, where if this many responses is captured,
  assume the ending condition regex is invalid, or the debug monitor is doing something
  goofy that is going to blow out memory or time. (key: runaway_response_count, default: 10000)

See the lldbgdbserverutils.MultiResponseGdbRemoteEntry class for details.

A MultiResponseGdbRemoteEntry is added by adding an element to the GdbRemoteTestSequence
(via GdbRemoteTestSequence.add_log_lines), using a dictionary, where the "type" key
is set to "multi_response", and the rest of the keys in the dictionary entry are
set to the keys documented for MultiResponseGdbRemoteEntry.

Added helper functions to add the required entry to grab all qRegisterInfo responses.
Added another helper to parse the qRegisterInfo response packets into an array of
dictionaries, where each key:value in the dictionary comes from the register info
response packet.

Added a test to verify that a generic register exists for the program counter,
frame pointer, stack pointer and cpu flags across all register info responses.

Added a test to verify that at least one register set exists across all register
info responses.

llvm-svn: 209170

10 years ago[modules] Fix ODR violation: there's another clang::TypeLocVisitor elsewhere.
Richard Smith [Mon, 19 May 2014 22:34:38 +0000 (22:34 +0000)]
[modules] Fix ODR violation: there's another clang::TypeLocVisitor elsewhere.

llvm-svn: 209169

10 years ago[module] Remove a header that isn't used and doesn't compile.
Richard Smith [Mon, 19 May 2014 22:20:41 +0000 (22:20 +0000)]
[module] Remove a header that isn't used and doesn't compile.

llvm-svn: 209168

10 years agoImplement the no_split_stack attribute.
Peter Collingbourne [Mon, 19 May 2014 22:14:34 +0000 (22:14 +0000)]
Implement the no_split_stack attribute.

This is a GNU attribute that allows split stacks to be turned off on a
per-function basis.

Differential Revision: http://reviews.llvm.org/D3817

llvm-svn: 209167

10 years agoDebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.
David Blaikie [Mon, 19 May 2014 22:07:16 +0000 (22:07 +0000)]
DebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.

When I refactored this in r208636 I accidentally caused this to be added
multiple times to each abstract subprogram (not accounting for the
deduplicating effect of the InlinedSubprogramDIEs set).

This got better in r208798 when the abstract definitions got the
attribute added to them at construction time, but still had the
redundant copies introduced in r208636.

This commit removes those excess DW_AT_inlines and relies solely on the
insertion in r208798.

llvm-svn: 209166

10 years agoDebugInfo: Fix missing inlined_subroutines caused by r208748.
David Blaikie [Mon, 19 May 2014 21:54:31 +0000 (21:54 +0000)]
DebugInfo: Fix missing inlined_subroutines caused by r208748.

The check in DwarfDebug::constructScopeDIE was meant to consider inlined
subroutines as any non-top-level scope that was a subprogram. Instead of
checking "not top level scope" it was checking if the /subprogram's/
scope was non-top-level.

Fix this and beef up a test case to demonstrate some of the missing
inlined_subroutines are no longer missing.

In the course of fixing this I also found that r208748 (with this fix)
found one /extra/ inlined_subroutine in concrete_out_of_line.ll due to
two inlined_subroutines having the same inlinedAt location. The previous
implementation was collapsing these into a single inlined subroutine.

I'm not sure what the original code was that created this .ll file so
I'm not sure if this actually happens in practice today. Since we
deliberately include column information to disambiguate two calls on the
same line, that may've addressed this bug in the frontend, but it's good
to know that workaround isn't necessary for this particular case
anymore.

llvm-svn: 209165

10 years agoFix typos.
Eric Christopher [Mon, 19 May 2014 21:18:47 +0000 (21:18 +0000)]
Fix typos.

llvm-svn: 209164

10 years agocmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS
Reid Kleckner [Mon, 19 May 2014 21:13:41 +0000 (21:13 +0000)]
cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS

This silences ~7 warnings on .c files in the LLVM build.

llvm-svn: 209163

10 years ago[ConstantHoisting][X86] Change the cost model to never hoist constants for types...
Juergen Ributzka [Mon, 19 May 2014 21:00:53 +0000 (21:00 +0000)]
[ConstantHoisting][X86] Change the cost model to never hoist constants for types larger than i128.

Currently the X86 backend doesn't support types larger than i128 very well. For
example an i192 multiply will assert in codegen when the 2nd argument is a constant and the constant got hoisted.

This fix changes the cost model to never hoist constants for types larger than
i128. Once the codegen issues have been resolved, the cost model can be updated
to allow also larger types.

This is related to <rdar://problem/16954938>

llvm-svn: 209162

10 years agoIf two sibling modules declare the same entity, and we indirectly pull a
Richard Smith [Mon, 19 May 2014 20:59:20 +0000 (20:59 +0000)]
If two sibling modules declare the same entity, and we indirectly pull a
declaration of that entity in from one of those modules, keep track of the fact
that we've not completed the redeclaration chain yet so that we can pull the
remaining declarations in from the other module if they're needed.

llvm-svn: 209161

10 years agoDon't allow two threads to both be in SBDebugger::Create() due to threading issues...
Greg Clayton [Mon, 19 May 2014 20:42:14 +0000 (20:42 +0000)]
Don't allow two threads to both be in SBDebugger::Create() due to threading issues in FormatManager.

<rdar://problem/16937126>

llvm-svn: 209160

10 years ago[X86] Add ISel patterns to improve the selection of TZCNT and LZCNT.
Andrea Di Biagio [Mon, 19 May 2014 20:38:59 +0000 (20:38 +0000)]
[X86] Add ISel patterns to improve the selection of TZCNT and LZCNT.

Instructions TZCNT (requires BMI1) and LZCNT (requires LZCNT), always
provide the operand size as output if the input operand is zero.

We can take advantage of this knowledge during instruction selection
stage in order to simplify a few corner case.

llvm-svn: 209159

10 years agoImplement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
Kevin Enderby [Mon, 19 May 2014 20:36:02 +0000 (20:36 +0000)]
Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format.  This
allows for rough categorizations for Mach-O sections.  And allows the total of
llvm-size’s Berkeley and System V formats to be the same.

llvm-svn: 209158

10 years agoAllow dllimport on function definitions when they're template instantiations
Hans Wennborg [Mon, 19 May 2014 20:14:13 +0000 (20:14 +0000)]
Allow dllimport on function definitions when they're template instantiations

llvm-svn: 209157

10 years agoAdded more insertps optimizations
Filipe Cabecinhas [Mon, 19 May 2014 19:45:57 +0000 (19:45 +0000)]
Added more insertps optimizations

Summary:
When inserting an element that's coming from a vector load or a broadcast
of a vector (or scalar) load, combine the load into the insertps
instruction.
Added PerformINSERTPSCombine for the case where we need to fix the load
(load of a vector + insertps with a non-zero CountS).
Added patterns for the broadcasts.

Also added tests for SSE4.1, AVX, and AVX2.

Reviewers: delena, nadav, craig.topper

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3581

llvm-svn: 209156

10 years agoFix testers by removing dubious testcase for r209154.
Lang Hames [Mon, 19 May 2014 19:38:48 +0000 (19:38 +0000)]
Fix testers by removing dubious testcase for r209154.

It turns out that not all the world is x86-64. Who knew?

I'll get to work on a more appropriate test case for this patch.

llvm-svn: 209155

10 years ago[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.
Lang Hames [Mon, 19 May 2014 19:21:25 +0000 (19:21 +0000)]
[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.

For GOT relocations the addend should modify the offset to the
GOT entry, not the value of the entry itself. Teach RuntimeDyldMachO
to do The Right Thing here.

Fixes <rdar://problem/16961886>.

llvm-svn: 209154

10 years ago[Mips] Show warning if the linker cannot find a pair for a R_MIPS_HI16
Simon Atanasyan [Mon, 19 May 2014 18:48:57 +0000 (18:48 +0000)]
[Mips] Show warning if the linker cannot find a pair for a R_MIPS_HI16
relocation. In fact this case violates ABI but sometimes compilers might
produce such code.

llvm-svn: 209153

10 years agoKill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.
Alexey Samsonov [Mon, 19 May 2014 18:45:32 +0000 (18:45 +0000)]
Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.

llvm-svn: 209152

10 years agoRevert r209142.
Todd Fiala [Mon, 19 May 2014 18:30:48 +0000 (18:30 +0000)]
Revert r209142.

Need to spend a little more time with suppressing the debugserver 64-to-32 bit warnings.
Will re-submit after I get the warnings properly suppressed.

llvm-svn: 209151

10 years agoCheck the alwaysinline attribute on the call as well as on the caller.
Peter Collingbourne [Mon, 19 May 2014 18:25:54 +0000 (18:25 +0000)]
Check the alwaysinline attribute on the call as well as on the caller.

Differential Revision: http://reviews.llvm.org/D3815

llvm-svn: 209150

10 years agoNon-allocatable Global Named Register
Renato Golin [Mon, 19 May 2014 18:15:42 +0000 (18:15 +0000)]
Non-allocatable Global Named Register

This patch implements global named registers in Clang, lowering to the just
created intrinsics in LLVM (@llvm.read/write_register). A new type of LValue
had to be created (Register), which just adds support to carry the metadata
node containing the name of the register. Two new methods to emit loads and
stores interoperate with another to emit the named metadata node.

No guarantees are being made and only non-allocatable global variable named
registers are being supported. Local named register support is unchanged.

llvm-svn: 209149

10 years agoRemoving an XFAIL which shouldn't apply. We no longer care about MSVC 9, and this...
Aaron Ballman [Mon, 19 May 2014 17:58:28 +0000 (17:58 +0000)]
Removing an XFAIL which shouldn't apply. We no longer care about MSVC 9, and this test probably should not have been XFAILed everywhere regardless. The test passes on Windows with MSVC 12.

llvm-svn: 209148

10 years agoUse range for
Matt Arsenault [Mon, 19 May 2014 17:52:48 +0000 (17:52 +0000)]
Use range for

llvm-svn: 209147

10 years agoAdded a comment
Alexander Kornienko [Mon, 19 May 2014 17:46:28 +0000 (17:46 +0000)]
Added a comment

llvm-svn: 209146

10 years agotest/CodeGenCXX/dllexport.cpp: -O2 and -disable-llvm-optzns aren't nedded
Hans Wennborg [Mon, 19 May 2014 17:23:01 +0000 (17:23 +0000)]
test/CodeGenCXX/dllexport.cpp: -O2 and -disable-llvm-optzns aren't nedded

We only need them on the dllimport.cpp test to make sure that we emit code
for available_externaly functions, and don't inline the IR.

llvm-svn: 209145

10 years agoDon't refresh stat() info for pcm files
Ben Langmuir [Mon, 19 May 2014 17:04:28 +0000 (17:04 +0000)]
Don't refresh stat() info for pcm files

Follow-up fix for 209138.  Actually, since we already have this file
open, we don't want to refresh the stat() info, since that might be
newer than what we have open (bad!).

llvm-svn: 209143

10 years agoUpdate Xcode settings for Xcode 5.1 (5B130a) to remove workspace warning.
Todd Fiala [Mon, 19 May 2014 16:58:52 +0000 (16:58 +0000)]
Update Xcode settings for Xcode 5.1 (5B130a) to remove workspace warning.

llvm-svn: 209142

10 years agoImproved llvm-namespace-comment check.
Alexander Kornienko [Mon, 19 May 2014 16:39:08 +0000 (16:39 +0000)]
Improved llvm-namespace-comment check.

Summary:
Handle various forms of existing namespace closing comments, fix
existing comments with wrong namespace name, ignore short namespaces.

The state of this check now seems to be enough to enable it by default to gather
user feedback ;)

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3825

llvm-svn: 209141

10 years agoThis test doesn't need to be XFAILed anywhere; it just needed to be updated to the...
Aaron Ballman [Mon, 19 May 2014 16:35:00 +0000 (16:35 +0000)]
This test doesn't need to be XFAILed anywhere; it just needed to be updated to the appropriate diagnostic wording.

llvm-svn: 209140

10 years agoreverting r209132
Jyotsna Verma [Mon, 19 May 2014 16:22:11 +0000 (16:22 +0000)]
reverting r209132

llvm-svn: 209139

10 years agoFix use-after-free and spurious error during module load
Ben Langmuir [Mon, 19 May 2014 16:13:45 +0000 (16:13 +0000)]
Fix use-after-free and spurious error during module load

FileManager::invalidateCache is not safe to call when there may be
existing references to the file. What module load failure needs is
to refresh so stale stat() info isn't stored.

This may be the last user of invalidateCache; I'll take a look and
remove it if possible in a future commit.

This caused a use-after-free error as well as a spurious error message
that a module was "found in both 'X.pcm' and 'X.pcm'" in some cases.

llvm-svn: 209138

10 years agoMemoryBuffer: Use GetNativeSystemInfo()
Alp Toker [Mon, 19 May 2014 16:13:28 +0000 (16:13 +0000)]
MemoryBuffer: Use GetNativeSystemInfo()

Removes old 4096 byte workaround. This functionality has been available since
Windows XP.

llvm-svn: 209137

10 years ago[sanitizer] Fix go build following r209121.
Sergey Matveev [Mon, 19 May 2014 16:08:53 +0000 (16:08 +0000)]
[sanitizer] Fix go build following r209121.

llvm-svn: 209136

10 years agoRevert "Patch for function cloning to inline all blocks whose address is taken"
Eric Christopher [Mon, 19 May 2014 16:04:10 +0000 (16:04 +0000)]
Revert "Patch for function cloning to inline all blocks whose address is taken"
as it was causing build failures in ruby.

This reverts commit r207713.

llvm-svn: 209135

10 years ago[ARM64] Split tbz/tbnz into W/X register variant
Bradley Smith [Mon, 19 May 2014 15:58:15 +0000 (15:58 +0000)]
[ARM64] Split tbz/tbnz into W/X register variant

llvm-svn: 209134

10 years agoRevert use of 128bit support on 32bit PPC, it breaks build at least with
Joerg Sonnenberger [Mon, 19 May 2014 15:48:46 +0000 (15:48 +0000)]
Revert use of 128bit support on 32bit PPC, it breaks build at least with
GCC and that doesn't expose any *ti* functions either.

llvm-svn: 209133

10 years agoHexagon: Add encoding bits to the mpy instructions.
Jyotsna Verma [Mon, 19 May 2014 15:32:07 +0000 (15:32 +0000)]
Hexagon: Add encoding bits to the mpy instructions.

llvm-svn: 209132

10 years ago[analyzer] Alpha and implicit checker lists, expand/collapse feature.
Anton Yartsev [Mon, 19 May 2014 15:04:55 +0000 (15:04 +0000)]
[analyzer] Alpha and implicit checker lists, expand/collapse feature.

The list of alpha and the list of implicit checkers added. An ability to expand/collapse long texts added. Markup fixed.

http://reviews.llvm.org/D3457

llvm-svn: 209131

10 years agoThis test is XFAILed on Windows, but I cannot see a reason as to why it should be...
Aaron Ballman [Mon, 19 May 2014 15:02:10 +0000 (15:02 +0000)]
This test is XFAILed on Windows, but I cannot see a reason as to why it should be failing. The original commit which XFAILed this was r111581, which suggested something was wrong with file remapping, but that may have been subsequently fixed.

Removing the XFAIL, but will watch the build bots to see if any go red because of this. Local testing on Windows succeeds.

llvm-svn: 209130

10 years ago[mips][mips64r6] Sorted *_ENC, *_DESC classes and tests
Zoran Jovanovic [Mon, 19 May 2014 14:57:46 +0000 (14:57 +0000)]
[mips][mips64r6] Sorted *_ENC, *_DESC classes and tests

Differential Revision: http://reviews.llvm.org/D3808

llvm-svn: 209129

10 years agoFixing some comments in this test. No functional changes.
Aaron Ballman [Mon, 19 May 2014 14:52:09 +0000 (14:52 +0000)]
Fixing some comments in this test. No functional changes.

llvm-svn: 209128

10 years ago[OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0.
Joey Gouly [Mon, 19 May 2014 14:41:38 +0000 (14:41 +0000)]
[OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0.

Patch by Pedro Ferreira!

llvm-svn: 209127

10 years agoResolving MSVC warnings about switch statements with a default label, but no case...
Aaron Ballman [Mon, 19 May 2014 14:29:04 +0000 (14:29 +0000)]
Resolving MSVC warnings about switch statements with a default label, but no case labels. No functional changes intended.

llvm-svn: 209126

10 years agoFlip on vectorization of bswap intrinsics.
Benjamin Kramer [Mon, 19 May 2014 13:48:08 +0000 (13:48 +0000)]
Flip on vectorization of bswap intrinsics.

The cost model conservatively assumes that it will always get scalarized and
that's about as good as we can get with the generic TTI; reasoning whether a
shuffle with an efficient lowering is available is hard. We can override that
conservative estimate for some targets in the future.

llvm-svn: 209125

10 years agoPass -gdwarf-N options to integrated assembler
Oliver Stannard [Mon, 19 May 2014 13:39:13 +0000 (13:39 +0000)]
Pass -gdwarf-N options to integrated assembler

llvm-svn: 209124

10 years agoSDAG: Legalize vector BSWAP into a shuffle if the shuffle is legal but the bswap...
Benjamin Kramer [Mon, 19 May 2014 13:12:38 +0000 (13:12 +0000)]
SDAG: Legalize vector BSWAP into a shuffle if the shuffle is legal but the bswap not.

- On ARM/ARM64 we get a vrev because the shuffle matching code is really smart. We still unroll anything that's not v4i32 though.
- On X86 we get a pshufb with SSSE3. Required more cleverness in isShuffleMaskLegal.
- On PPC we get a vperm for v8i16 and v4i32. v2i64 is unrolled.

llvm-svn: 209123

10 years agoARM: PCS non-compliance when struct is padded to avoid register/stack split, and...
Oliver Stannard [Mon, 19 May 2014 13:10:05 +0000 (13:10 +0000)]
ARM: PCS non-compliance when struct is padded to avoid register/stack split, and requires internal padding

When we were padding a struct to avoid splitting it between registers and
the stack, we were throwing away the type which the argument should be coerced
to.

llvm-svn: 209122

10 years ago[sanitizer] Support sandboxing in sanitizer coverage.
Sergey Matveev [Mon, 19 May 2014 12:53:03 +0000 (12:53 +0000)]
[sanitizer] Support sandboxing in sanitizer coverage.

Summary:
Sandboxed code may now pass additional arguments to
__sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a
single file (the default is one file per module). The user may supply a file or
socket to write to. The latter option can be used to broker out the file writing
functionality. If -1  is passed, we pre-open a file.

llvm-svn: 209121

10 years agoMake the ARCMT tests self-contained.
Manuel Klimek [Mon, 19 May 2014 11:51:44 +0000 (11:51 +0000)]
Make the ARCMT tests self-contained.

This is necessary to reduce staging times on parallel build systems.

llvm-svn: 209120

10 years ago[asan] Make the coverage tests clean up after themselves.
Sergey Matveev [Mon, 19 May 2014 11:34:35 +0000 (11:34 +0000)]
[asan] Make the coverage tests clean up after themselves.

llvm-svn: 209119

10 years agoBuild lldb-mi with autotools on Linux.
Hafiz Abid Qadeer [Mon, 19 May 2014 09:12:15 +0000 (09:12 +0000)]
Build lldb-mi with autotools on Linux.
THe lldb-mi stuff was not being built on Linux with autotools.
I only added Linux now as I have tested that it build fine on Linux.

llvm-svn: 209117

10 years ago[asan] update asan_symbolize.py to use the new llvm-symbolizer flag syntax
Kostya Serebryany [Mon, 19 May 2014 08:30:51 +0000 (08:30 +0000)]
[asan] update asan_symbolize.py to use the new llvm-symbolizer flag syntax

llvm-svn: 209116

10 years ago[Sanitizer tests] Don't need to use -lstdc++ thanks to --driver-mode=g++
Timur Iskhodzhanov [Mon, 19 May 2014 08:19:38 +0000 (08:19 +0000)]
[Sanitizer tests] Don't need to use -lstdc++ thanks to --driver-mode=g++

Reviewed at http://reviews.llvm.org/D3796

llvm-svn: 209115

10 years agoclang-format: Don't force line breaks in ObjC calls with ColumnLimit 0.
Daniel Jasper [Mon, 19 May 2014 08:06:34 +0000 (08:06 +0000)]
clang-format: Don't force line breaks in ObjC calls with ColumnLimit 0.

Before:
  [self.x a:b c:d];

Got reformatted toi (with ColumnLimit set to 0):
  [self.x a:b
          c:d];

llvm-svn: 209114

10 years agoclang-format: [JS] Support ES6 destructuring assignments.
Daniel Jasper [Mon, 19 May 2014 07:37:07 +0000 (07:37 +0000)]
clang-format: [JS] Support ES6 destructuring assignments.

Before:
  var[a, b, c] = [1, 2, 3];

After:
  var [a, b, c] = [1, 2, 3];

llvm-svn: 209113

10 years agoclang-format: [JS] Support for EC6 arrow functions.
Daniel Jasper [Mon, 19 May 2014 07:27:02 +0000 (07:27 +0000)]
clang-format: [JS] Support for EC6 arrow functions.

Before:
  var b = a.map((x) = > x + 1);

After:
  var b = a.map((x) => x + 1);

llvm-svn: 209112