platform/upstream/llvm.git
10 years ago[X86] Add support for builtin to read performance monitoring counters.
Andrea Di Biagio [Mon, 30 Jun 2014 17:14:21 +0000 (17:14 +0000)]
[X86] Add support for builtin to read performance monitoring counters.

This patch adds support for a new builtin instruction called
__builtin_ia32_rdpmc.

Builtin '__builtin_ia32_rdpmc' is defined as a 'GCC builtin'; on X86, it can
be used to read performance monitoring counters. It takes as input the index
of the performance counter to read, and returns the value of the specified
performance counter as a 64-bit number.

Calls to this new builtin will map to instruction RDPMC.
The index in input to the builtin call is moved to register %ECX. The result
of the builtin call is the value of the specified performance counter (RDPMC
would return that quantity in registers RDX:RAX).

This patch:
 - Adds builtin int_x86_rdpmc as a GCCBuiltin;
 - Adds a new x86 DAG node called 'RDPMC_DAG';
 - Teaches how to lower this new builtin;
 - Adds an ISel pattern to select instruction RDPMC;
 - Fixes the definition of instruction RDPMC adding %RAX and %RDX as
   implicit definitions, and adding %ECX as implicit use;
 - Adds a LLVM test to verify that the new builtin is correctly selected.

llvm-svn: 212049

10 years ago[OCaml] Documentation improvements.
Peter Zotov [Mon, 30 Jun 2014 16:53:53 +0000 (16:53 +0000)]
[OCaml] Documentation improvements.

llvm-svn: 212048

10 years agoRemoved unused typedef for recursive_directory_iterator
Ben Langmuir [Mon, 30 Jun 2014 16:10:15 +0000 (16:10 +0000)]
Removed unused typedef for recursive_directory_iterator

llvm-svn: 212047

10 years agoFix a typo in the noexcept calculation for __compressed_pair::swap. Thanks to EricWF...
Marshall Clow [Mon, 30 Jun 2014 15:35:09 +0000 (15:35 +0000)]
Fix a typo in the noexcept calculation for __compressed_pair::swap. Thanks to EricWF for the bug report and the fix.

llvm-svn: 212046

10 years ago[AArch64] Unsized types don't specify an alignment.
Chad Rosier [Mon, 30 Jun 2014 15:03:00 +0000 (15:03 +0000)]
[AArch64] Unsized types don't specify an alignment.
PR20109

llvm-svn: 212045

10 years ago[AArch64] Convert mul x, -(pow2 +/- 1) to shift + add/sub.
Chad Rosier [Mon, 30 Jun 2014 14:51:14 +0000 (14:51 +0000)]
[AArch64] Convert mul x, -(pow2 +/- 1) to shift + add/sub.

The combine for mul x, pow2 +/- 1 is unchanged. Test cases for
both combines as well as mul x, pow2 have been added as well.

llvm-svn: 212044

10 years agomacho-dump: add code to print LC_ID_DYLIB load commands.
Tim Northover [Mon, 30 Jun 2014 14:40:57 +0000 (14:40 +0000)]
macho-dump: add code to print LC_ID_DYLIB load commands.

I want to check them in lld.

llvm-svn: 212043

10 years agoInitialize ClangTidyMessage::FileOffset field to avoid unitialized variable access...
Alexander Kornienko [Mon, 30 Jun 2014 14:29:03 +0000 (14:29 +0000)]
Initialize ClangTidyMessage::FileOffset field to avoid unitialized variable access when sorting errors on output.

llvm-svn: 212042

10 years agoclang-format: Support member function reference qualifiers.
Daniel Jasper [Mon, 30 Jun 2014 13:54:27 +0000 (13:54 +0000)]
clang-format: Support member function reference qualifiers.

Before:
  string // break
      operator()() &
  {}

After:
  string // break
  operator()() & {}

llvm-svn: 212041

10 years agoclang-format: Improve expression heuristics.
Daniel Jasper [Mon, 30 Jun 2014 13:44:47 +0000 (13:44 +0000)]
clang-format: Improve expression heuristics.

Upon encountering a binary operator inside parentheses, assume that the
parentheses contain an expression.

Before:
  MACRO('0' <= c&& c <= '9');

After:
  MACRO('0' <= c && c <= '9');

llvm-svn: 212040

10 years agoFixing a few typos in the documentation.
Aaron Ballman [Mon, 30 Jun 2014 13:43:04 +0000 (13:43 +0000)]
Fixing a few typos in the documentation.

llvm-svn: 212039

10 years agoclang-format: [JS] support free-standing functions again.
Daniel Jasper [Mon, 30 Jun 2014 13:24:54 +0000 (13:24 +0000)]
clang-format: [JS] support free-standing functions again.

This worked initially but was broken by r210887.

Before:
  function outer1(a, b) {
    function inner1(a, b) { return a; } inner1(a, b);
  } function outer2(a, b) { function inner2(a, b) { return a; } inner2(a, b); }

After:
  function outer1(a, b) {
    function inner1(a, b) { return a; }
    inner1(a, b);
  }
  function outer2(a, b) {
    function inner2(a, b) { return a; }
    inner2(a, b);
  }

Thanks to Adam Strzelecki for working on this.

llvm-svn: 212038

10 years agoRevert the LSDA change to scan_eh_tab.
Logan Chien [Mon, 30 Jun 2014 12:35:29 +0000 (12:35 +0000)]
Revert the LSDA change to scan_eh_tab.

This commit reverts the LSDA-related change in r211745.

The r211745 adds a new argument to scan_eh_tab(), i.e. lsda.
However, IMO, calling _Unwind_GetLanguageSpecificData() directly in
scan_eh_tab() was more intuitive and reduces several function call
to _Unwind_GetLanguageSpecificData() in __cxx_personality_v0().

llvm-svn: 212037

10 years ago[msan] Limit stack origin chain length.
Evgeniy Stepanov [Mon, 30 Jun 2014 11:22:42 +0000 (11:22 +0000)]
[msan] Limit stack origin chain length.

Stack origins were created with unlimited length by mistake.

llvm-svn: 212036

10 years agoMachO: stop iterating past the end of an array
Tim Northover [Mon, 30 Jun 2014 10:30:00 +0000 (10:30 +0000)]
MachO: stop iterating past the end of an array

When trying to map atom types to sections, we were iterating through an array
until we hit a sentinel value. There's no need for such dances when range-based
for loops are available.

llvm-svn: 212035

10 years ago[OPENMP] Added table with allowed nesting info for OpenMP regions (per request from...
Alexey Bataev [Mon, 30 Jun 2014 10:22:46 +0000 (10:22 +0000)]
[OPENMP] Added table with allowed nesting info for OpenMP regions (per request from Samuel F Antao).

llvm-svn: 212034

10 years agoAdded a comment to document relation of this check to -Wold-style-cast.
Alexander Kornienko [Mon, 30 Jun 2014 09:54:12 +0000 (09:54 +0000)]
Added a comment to document relation of this check to -Wold-style-cast.

llvm-svn: 212033

10 years agoMachO: re-enable writing of compact-unwind sections.
Tim Northover [Mon, 30 Jun 2014 09:49:37 +0000 (09:49 +0000)]
MachO: re-enable writing of compact-unwind sections.

This isn't really the right place to put them in final object files (that would
be __TEXT,__unwind_info), but the format is different between relocatable and
final objects, which means we really need a pass to handle the translation.

For now, re-emitting in __LD,__compact_unwind is harmless (dyld ignores it and
moves straight on to inspecting __TEXT,__eh_frame), and sidesteps an assertion
failure when processing files containing compact-unwind info.

llvm-svn: 212032

10 years agoMachO: align segment virtual addresses to page size.
Tim Northover [Mon, 30 Jun 2014 09:49:33 +0000 (09:49 +0000)]
MachO: align segment virtual addresses to page size.

Segments must occupy a multiple of the page size in memory (4096 currently). We
check for this when emitting files, but the placement algorithm broke down for
the second non-__TEXT segment encountered: the offset wasn't aligned up to 4096
before starting its layout.

llvm-svn: 212031

10 years agoMachO: calculate segment offsets in final MachO files properly.
Tim Northover [Mon, 30 Jun 2014 09:49:30 +0000 (09:49 +0000)]
MachO: calculate segment offsets in final MachO files properly.

Because of how we were calculating fileOffset and fileSize for segments, most
ended up at a single offset in a finalised MachO file. This meant the data
often didn't even get written in the final object, let alone where it would be
useful.

llvm-svn: 212030

10 years agoARM: take care not to set the ThumbFunc bit on TLS data symbols
Scott Douglass [Mon, 30 Jun 2014 09:37:24 +0000 (09:37 +0000)]
ARM: take care not to set the ThumbFunc bit on TLS data symbols

This fixes LNT SingleSource/UnitTests/Threads with -mthumb.

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

llvm-svn: 212029

10 years agoSecond part of fix in CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 09:14:10 +0000 (09:14 +0000)]
Second part of fix in CodeGen/captured-statements-nested.c

llvm-svn: 212028

10 years agoMachO: support atomization of dylibs.
Tim Northover [Mon, 30 Jun 2014 09:11:38 +0000 (09:11 +0000)]
MachO: support atomization of dylibs.

For .dylib files, we refrain from actually creating any atoms until they're
requested via the "exports" method.

llvm-svn: 212027

10 years agoTest fix
Alexey Bataev [Mon, 30 Jun 2014 09:05:08 +0000 (09:05 +0000)]
Test fix

llvm-svn: 212026

10 years agoFixed incompatibility in CodeGen/captured-statements-nested.c with MSVC
Alexey Bataev [Mon, 30 Jun 2014 08:37:48 +0000 (08:37 +0000)]
Fixed incompatibility in CodeGen/captured-statements-nested.c with MSVC

llvm-svn: 212025

10 years agoFixed CodeGen/captured-statements-nested.c test
Alexey Bataev [Mon, 30 Jun 2014 08:17:11 +0000 (08:17 +0000)]
Fixed CodeGen/captured-statements-nested.c test

llvm-svn: 212024

10 years ago[Driver][Mips] Fix test cases - make ABI name and target triple consistent.
Simon Atanasyan [Mon, 30 Jun 2014 08:10:01 +0000 (08:10 +0000)]
[Driver][Mips] Fix test cases - make ABI name and target triple consistent.

No functional changes.

llvm-svn: 212023

10 years ago[Driver][Mips] Check rejecting of invalid MIPS ABI names in the test.
Simon Atanasyan [Mon, 30 Jun 2014 08:09:54 +0000 (08:09 +0000)]
[Driver][Mips] Check rejecting of invalid MIPS ABI names in the test.

No functional changes.

llvm-svn: 212022

10 years agoundo test commit (whitespace only)
Scott Douglass [Mon, 30 Jun 2014 08:09:35 +0000 (08:09 +0000)]
undo test commit (whitespace only)

llvm-svn: 212021

10 years agotest commit (whitespace only)
Scott Douglass [Mon, 30 Jun 2014 08:07:32 +0000 (08:07 +0000)]
test commit (whitespace only)

llvm-svn: 212020

10 years agotest commit: add a comment line in GVN test file
Erik Eckstein [Mon, 30 Jun 2014 07:19:02 +0000 (07:19 +0000)]
test commit: add a comment line in GVN test file

llvm-svn: 212019

10 years agoDisable CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 05:07:42 +0000 (05:07 +0000)]
Disable CodeGen/captured-statements-nested.c

llvm-svn: 212018

10 years agoAdd checking for the complexity guarantees in the standard
Marshall Clow [Mon, 30 Jun 2014 05:04:20 +0000 (05:04 +0000)]
Add checking for the complexity guarantees in the standard

llvm-svn: 212017

10 years agoFixed CodeGen/captured-statements-nested.c test
Alexey Bataev [Mon, 30 Jun 2014 05:02:50 +0000 (05:02 +0000)]
Fixed CodeGen/captured-statements-nested.c test

llvm-svn: 212016

10 years agoFactored out Linux proc file reading into separate class.
Todd Fiala [Mon, 30 Jun 2014 04:14:13 +0000 (04:14 +0000)]
Factored out Linux proc file reading into separate class.

Both NativeProcessLinux (in llgs branch) and Linux Host.cpp had similar code to handle /proc
file reading.  I factored that out into a new Linux-specific ProcFileReader class and added a method
that the llgs branch will use for line-by-line parsing.

This change also adds numerous Linux-specific files to Xcode that were missing from the Xcode
project files.

Related to https://github.com/tfiala/lldb/issues/27

llvm-svn: 212015

10 years agoDisable CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 03:30:41 +0000 (03:30 +0000)]
Disable CodeGen/captured-statements-nested.c

llvm-svn: 212014

10 years agoTemp XFAIL CodeGen/captured-statements-nested.c to fix the test
Alexey Bataev [Mon, 30 Jun 2014 03:14:43 +0000 (03:14 +0000)]
Temp XFAIL CodeGen/captured-statements-nested.c to fix the test

llvm-svn: 212013

10 years agoX86: fix comment
Saleem Abdulrasool [Mon, 30 Jun 2014 03:11:18 +0000 (03:11 +0000)]
X86: fix comment

Fix a comment typo `DbgLocLImport` instead of `DLLImport`.

llvm-svn: 212012

10 years agoARM: use symbolic name for constant
Saleem Abdulrasool [Mon, 30 Jun 2014 03:11:14 +0000 (03:11 +0000)]
ARM: use symbolic name for constant

This just changes the constant value to the symbolic name corresponding to it.
NFC.

llvm-svn: 212011

10 years agoUsing of variable length arrays in captured statements and OpenMP constructs.
Alexey Bataev [Mon, 30 Jun 2014 02:55:54 +0000 (02:55 +0000)]
Using of variable length arrays in captured statements and OpenMP constructs.
Differential Revision: http://reviews.llvm.org/D4067

llvm-svn: 212010

10 years agotest: move test from CodeGen to Sema
Saleem Abdulrasool [Mon, 30 Jun 2014 02:14:37 +0000 (02:14 +0000)]
test: move test from CodeGen to Sema

Move test from CodeGen to Sema to more accurately reflect what is being tested
as pointed out by Alp.

llvm-svn: 212009

10 years agoRemove some incorrect test suppressions
Alp Toker [Mon, 30 Jun 2014 01:34:09 +0000 (01:34 +0000)]
Remove some incorrect test suppressions

These don't actually require any registered backend to run.

This commit tests the water with a handful of fixes for what is a more
widespread problem.

llvm-svn: 212008

10 years agoCodeGenAction::ExecuteAction(): check for invalid LLVM source locations
Alp Toker [Mon, 30 Jun 2014 01:33:59 +0000 (01:33 +0000)]
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations

Add sign checks to deal with the fact that IR parser line/column pairs are
signed integers and sometimes invalid.

The crash path is potentially triggered by corrupt '.bc' files in practice,
though I don't have a binary input test case that can be checked-in right now.

(Unfortunately the backend itself crashes on various ill-formed '.bc' inputs so
this bandage isn't as helpful as it appears yet.)

llvm-svn: 212007

10 years agoExtract an isReservedName() function
Alp Toker [Mon, 30 Jun 2014 01:33:53 +0000 (01:33 +0000)]
Extract an isReservedName() function

We'll want to share the implementation if anything else decides to check
for reserved names in future, so make this little snippet of code more
discoverable.

Also remove the __va_list_tag and __builtin_va_list special-case
checks. They're leftovers from before when the reserved name logic was
added.

No change in functionality.

llvm-svn: 212006

10 years agoPull ProcessInfo and ProcessLaunchInfo out of Target/Process.
Todd Fiala [Mon, 30 Jun 2014 00:30:53 +0000 (00:30 +0000)]
Pull ProcessInfo and ProcessLaunchInfo out of Target/Process.

Elevate ProcessInfo and ProcessLaunchInfo into their own headers.
llgs will be using ProcessLaunchInfo but doesn't need to pull in
the rest of Process.h.

This also moves a bunch of implementation details from the header
declarations into ProcessInfo.cpp and ProcessLaunchInfo.cpp.

Tested on Ubuntu 14.04 Cmake and MacOSX Xcode.

Related to https://github.com/tfiala/lldb/issues/26.

llvm-svn: 212005

10 years agoBasic: correct the va_list type on Windows on ARM
Saleem Abdulrasool [Sun, 29 Jun 2014 23:05:41 +0000 (23:05 +0000)]
Basic: correct the va_list type on Windows on ARM

Windows on ARM defines va_list as a typedef for char *.  Although the semantics
of argument passing for variadic functions matches AAPCS VFP, the wrapped
struct __va_list type is unused.  This makes the intrinsic definition for
va_list match that of Visual Studio.

llvm-svn: 212004

10 years agoFix a stray semi-colon. (Found by a pedantic warning)
Chandler Carruth [Sun, 29 Jun 2014 22:42:51 +0000 (22:42 +0000)]
Fix a stray semi-colon. (Found by a pedantic warning)

llvm-svn: 212003

10 years agoAnother attempt to add a clang-tidy check for flagging C-style casts.
Alexander Kornienko [Sun, 29 Jun 2014 22:19:53 +0000 (22:19 +0000)]
Another attempt to add a clang-tidy check for flagging C-style casts.

Summary:
The first version failed the SubstNonTypeTempateParmExpr-related test
on some buildbots. This one uses the new substNonTypeTempateParmExpr matcher to
filter out implicit C-style casts.

This patch depends on D4327.

Reviewers: djasper

Reviewed By: djasper

Subscribers: aemerson, cfe-commits

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

llvm-svn: 212002

10 years agoAdd a matcher for SubstNonTypeTemplateParmExpr.
Alexander Kornienko [Sun, 29 Jun 2014 22:18:53 +0000 (22:18 +0000)]
Add a matcher for SubstNonTypeTemplateParmExpr.

Reviewers: klimek, djasper

Reviewed By: djasper

Subscribers: klimek, aemerson, cfe-commits

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

llvm-svn: 212001

10 years agoCodeGen: rename Win64 ExceptionHandling to WinEH
Saleem Abdulrasool [Sun, 29 Jun 2014 21:43:47 +0000 (21:43 +0000)]
CodeGen: rename Win64 ExceptionHandling to WinEH

This exception format is not specific to Windows x64.  A similar approach is
taken on nearly all architectures.  Generalise the name to reflect reality.
This will eventually be used for Windows on ARM data emission as well.

Switch the enum and namespace into an enum class.

llvm-svn: 212000

10 years ago[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
Simon Atanasyan [Sun, 29 Jun 2014 16:51:16 +0000 (16:51 +0000)]
[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
and Clang drivers but internally LLVM/Clang use the name "n64".

llvm-svn: 211999

10 years agoRevert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolc...
NAKAMURA Takumi [Sun, 29 Jun 2014 16:00:11 +0000 (16:00 +0000)]
Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32.

It reverts commits as follows:
  r211866: "Driver: use GNU::Link for the Generic_GCC toolchain"
  r211895: "Replace GetProgramPath("ld") with GetLinkerPath()."
  r211995: "Driver: add a cygwin linker tool"

llvm-svn: 211998

10 years agoLibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:07:48 +0000 (11:07 +0000)]
LibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.

llvm-svn: 211997

10 years agoclang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:03:28 +0000 (11:03 +0000)]
clang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.

llvm-svn: 211996

10 years agoDriver: add a cygwin linker tool
Saleem Abdulrasool [Sun, 29 Jun 2014 06:11:14 +0000 (06:11 +0000)]
Driver: add a cygwin linker tool

This adds a linker tool for the Windows cygwin environment.  This linker
invocation is significantly different from the generic ld invocation.  It
requires additional parameters as well as does not accept some normal
parameters.  This should fix self-hosting on Cygwin.

llvm-svn: 211995

10 years agoMC: rename EmitWin64EH routines
Saleem Abdulrasool [Sun, 29 Jun 2014 01:52:01 +0000 (01:52 +0000)]
MC: rename EmitWin64EH routines

Rename the routines to reflect the reality that they are more related to call
frame information than to Win64 EH. Although EH is implemented in an intertwined
manner by augmenting with an exception handler and an associated parameter, the
majority of these routines emit information required to unwind the frames. This
also helps identify that these routines are generic for most windows platforms
(they apply equally to nearly all architectures except x86) although the
encoding of the information is architecture dependent.

Unwinding data is emitted via EmitWinCFI* and exception handling information via
EmitWinEH*.

llvm-svn: 211994

10 years agoAdd ops() method to SDNode that returns an ArrayRef<SDUse>. Use it to simplify some...
Craig Topper [Sun, 29 Jun 2014 00:40:57 +0000 (00:40 +0000)]
Add ops() method to SDNode that returns an ArrayRef<SDUse>. Use it to simplify some code.

llvm-svn: 211993

10 years agotest: add a test for windows itanium exceptions
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:15 +0000 (23:34 +0000)]
test: add a test for windows itanium exceptions

Some time ago, I noticed that try would get resolved incorrectly for Windows
Itanium targets.  Add an explicit test to exsure that exceptions are handled
correctly for Windows Itanium environments.

llvm-svn: 211992

10 years agoBasic: fix handling for Windows Itanium environment
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:11 +0000 (23:34 +0000)]
Basic: fix handling for Windows Itanium environment

This corrects the handling for i686-windows-itanium.  This environment is nearly
identical to Windows MSVC, except it uses the itanium ABI for C++.

llvm-svn: 211991

10 years agoBasic: whitespace cleanup
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:07 +0000 (23:34 +0000)]
Basic: whitespace cleanup

Remove unnecessary separation of anonymous namespace.  NFC.

llvm-svn: 211990

10 years agoExtend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
Richard Trieu [Sat, 28 Jun 2014 23:25:37 +0000 (23:25 +0000)]
Extend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
trigger on taking the address of a reference that is returned from a function
call.

llvm-svn: 211989

10 years agoImport MutableArrayRef into clang namespace.
Craig Topper [Sat, 28 Jun 2014 23:22:33 +0000 (23:22 +0000)]
Import MutableArrayRef into clang namespace.

llvm-svn: 211988

10 years agoRemove llvm:: from uses of ArrayRef.
Craig Topper [Sat, 28 Jun 2014 23:22:23 +0000 (23:22 +0000)]
Remove llvm:: from uses of ArrayRef.

llvm-svn: 211987

10 years agoUse a range loop. No functionality change.
Rafael Espindola [Sat, 28 Jun 2014 18:44:59 +0000 (18:44 +0000)]
Use a range loop. No functionality change.

llvm-svn: 211986

10 years agoSimplify code a bit, no functionality change.
Rafael Espindola [Sat, 28 Jun 2014 17:46:19 +0000 (17:46 +0000)]
Simplify code a bit, no functionality change.

llvm-svn: 211985

10 years ago[Driver][Mips] Fix else-after-return.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:08 +0000 (15:56 +0000)]
[Driver][Mips] Fix else-after-return.

No functional changes.

llvm-svn: 211984

10 years ago[Driver][Mips] Remove redundant brackets.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:03 +0000 (15:56 +0000)]
[Driver][Mips] Remove redundant brackets.

No functional changes.

llvm-svn: 211983

10 years ago[Driver][Mips] Remove redundant abstract/override function.
Simon Atanasyan [Sat, 28 Jun 2014 15:55:55 +0000 (15:55 +0000)]
[Driver][Mips] Remove redundant abstract/override function.

No functional changes.

llvm-svn: 211982

10 years ago[C++11] Use more range based fors
Tobias Grosser [Sat, 28 Jun 2014 08:59:45 +0000 (08:59 +0000)]
[C++11] Use more range based fors

llvm-svn: 211981

10 years agoRemove redundant code and use C++ range fors
Tobias Grosser [Sat, 28 Jun 2014 08:59:38 +0000 (08:59 +0000)]
Remove redundant code and use C++ range fors

llvm-svn: 211980

10 years agoGet arm_acle tests from r211962 working
Alp Toker [Sat, 28 Jun 2014 06:51:27 +0000 (06:51 +0000)]
Get arm_acle tests from r211962 working

llvm-svn: 211979

10 years agoFix build following r211956
Alp Toker [Sat, 28 Jun 2014 06:31:47 +0000 (06:31 +0000)]
Fix build following r211956

RuntimeDyld now uses MCInst::dump_pretty() which introduces a dependency on
'MC'.

llvm-svn: 211978

10 years agoVerifier: Update assert message to reflect LangRef
David Majnemer [Sat, 28 Jun 2014 06:24:49 +0000 (06:24 +0000)]
Verifier: Update assert message to reflect LangRef

No functionality change, just correcting the assertion message.

llvm-svn: 211977

10 years ago[x86] Fix a bug in the v8i16 shuffling exposed by the new splat-like
Chandler Carruth [Sat, 28 Jun 2014 05:46:28 +0000 (05:46 +0000)]
[x86] Fix a bug in the v8i16 shuffling exposed by the new splat-like
lowering for v16i8.

ASan and some bots caught this bug with existing test cases. Fixing it
even fixed a miscompile with one of the test cases. I'm still a bit
suspicious of this test case as I've not taken a proper amount of time
to think about it, but the fix here is strict goodness.

llvm-svn: 211976

10 years agoFix this test to not write to the source tree, and instead to write to
Chandler Carruth [Sat, 28 Jun 2014 05:18:49 +0000 (05:18 +0000)]
Fix this test to not write to the source tree, and instead to write to
a temporary file. This fixes the test in cases where the source tree is
mounted read-only.

llvm-svn: 211975

10 years ago[x86] Add handling for splat-like widenings of v16i8 shuffles.
Chandler Carruth [Sat, 28 Jun 2014 05:16:40 +0000 (05:16 +0000)]
[x86] Add handling for splat-like widenings of v16i8 shuffles.

These show up really frequently, not the least with actual splats. =] We
lowered these quite badly before. The new code path tries to widen i8
shuffles to i16 shuffles in a splat-like way. There are still some
inefficiencies in our i16 splat logic though, so we aren't really done
here.

Also, for certain patterns (bit of a gather-and-splat) we still
generate pretty silly code, and I've left a fixme for addressing it.
However, I'm not actually worried about this code pattern as much. The
old shuffle lowering generates a 29 instruction monstrosity for it that
should execute much more slowly.

llvm-svn: 211974

10 years agoThis file wasn't supposed to be checked in
David Majnemer [Sat, 28 Jun 2014 01:56:50 +0000 (01:56 +0000)]
This file wasn't supposed to be checked in

This was generated while trying to debug a test, it shouldn't have been
checked in.

Thanks to Alexander Kornienko for spotting this.

llvm-svn: 211973

10 years agoExtend -Wdynamic-class-memaccess to records containing dynamic classes
Reid Kleckner [Fri, 27 Jun 2014 23:58:21 +0000 (23:58 +0000)]
Extend -Wdynamic-class-memaccess to records containing dynamic classes

Reviewers: rtrieu

Subscribers: cfe-commits

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

llvm-svn: 211972

10 years ago[RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targets
Lang Hames [Fri, 27 Jun 2014 23:29:18 +0000 (23:29 +0000)]
[RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targets
that have been enabled.

Without this, testers will fail when llvm-rtdyld is invoked with triples for
unsupported targets.

llvm-svn: 211969

10 years agoDon't truncate the target triple when initializing clang.
Zachary Turner [Fri, 27 Jun 2014 23:19:42 +0000 (23:19 +0000)]
Don't truncate the target triple when initializing clang.

Reviewed by: Sean Callanan

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

llvm-svn: 211968

10 years agoRevert "Temporary hack to try cleaning extra .s file from bots."
Matt Arsenault [Fri, 27 Jun 2014 23:11:26 +0000 (23:11 +0000)]
Revert "Temporary hack to try cleaning extra .s file from bots."

llvm-svn: 211967

10 years agotsan: fix and re-enable a test
Dmitry Vyukov [Fri, 27 Jun 2014 22:27:02 +0000 (22:27 +0000)]
tsan: fix and re-enable a test

llvm-svn: 211966

10 years agoImplemented gdb-remote protocol tests for vCont;s and vCont;s:{thread}
Todd Fiala [Fri, 27 Jun 2014 22:11:56 +0000 (22:11 +0000)]
Implemented gdb-remote protocol tests for vCont;s and vCont;s:{thread}

Also added tests for presence of vCont;c, vCont;C, vCont;s, vCont;S as
returned by vCont? query.

Broke out single step functionality from TestLldbGdbServer into base class.
Used by new TestGdbRemoteSingleStep (using $s) and TestGdbRemote_vCont.

Also part of llgs wrap-up, see:
https://github.com/tfiala/lldb/issues/12

llvm-svn: 211965

10 years ago[Fix] Deleted renamed test after r211957
Johannes Doerfert [Fri, 27 Jun 2014 21:48:42 +0000 (21:48 +0000)]
[Fix] Deleted renamed test after r211957

llvm-svn: 211964

10 years agoTemporary hack to try cleaning extra .s file from bots.
Matt Arsenault [Fri, 27 Jun 2014 21:43:50 +0000 (21:43 +0000)]
Temporary hack to try cleaning extra .s file from bots.

llvm-svn: 211963

10 years agoIntroduce arm_acle.h supporting existing LLVM builtin intrinsics
Yi Kong [Fri, 27 Jun 2014 21:25:42 +0000 (21:25 +0000)]
Introduce arm_acle.h supporting existing LLVM builtin intrinsics

Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64.

Reviewers: t.p.northover, compnerd, rengolin

Reviewed By: compnerd, rengolin

Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits

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

llvm-svn: 211962

10 years ago[RuntimeDyld] Use a raw_ostream and llvm::format for int-to-string conversions.
Lang Hames [Fri, 27 Jun 2014 21:07:00 +0000 (21:07 +0000)]
[RuntimeDyld] Use a raw_ostream and llvm::format for int-to-string conversions.

Some users' C++11 standard libraries don't support std::to_string yet.

llvm-svn: 211961

10 years ago[AArch64] Fix memset ICE when memset value is f128.
Chad Rosier [Fri, 27 Jun 2014 21:05:09 +0000 (21:05 +0000)]
[AArch64] Fix memset ICE when memset value is f128.

llvm-svn: 211960

10 years agollvm-cov: Support specifying multiple source files
Justin Bogner [Fri, 27 Jun 2014 20:41:25 +0000 (20:41 +0000)]
llvm-cov: Support specifying multiple source files

Make llvm-cov compatible with gcov for cases where multiple files are
specified on the command line. That is, loop over each one and report
coverage, and report errors on stderr only rather than via return
code.

llvm-svn: 211959

10 years ago[RuntimeDyld] #include <cctype> header in RuntimeDyldChecker.cpp.
Lang Hames [Fri, 27 Jun 2014 20:37:39 +0000 (20:37 +0000)]
[RuntimeDyld] #include <cctype> header in RuntimeDyldChecker.cpp.

Hopefully this will unbreak the windows bots.

llvm-svn: 211958

10 years agoAllow multiple reductions per statement
Johannes Doerfert [Fri, 27 Jun 2014 20:31:28 +0000 (20:31 +0000)]
Allow multiple reductions per statement

  Iterate over all store memory accesses and check for valid binary reduction
  candidate loads by following the operands of the stored value.  For each
  candidate pair we check if they have the same base address and there are no
  other accesses which may overlap with them. This ensures that no intermediate
  value can escape into other memory locations or is overwritten at some point.

  + 17 test cases for reduction detection and reduction dependency modeling

llvm-svn: 211957

10 years ago[RuntimeDyld] Add a framework for testing relocation logic in RuntimeDyld.
Lang Hames [Fri, 27 Jun 2014 20:20:57 +0000 (20:20 +0000)]
[RuntimeDyld] Add a framework for testing relocation logic in RuntimeDyld.

This patch adds a "-verify" mode to the llvm-rtdyld utility. In verify mode,
llvm-rtdyld will test supplied expressions against the linked program images
that it creates in memory. This scheme can be used to verify the correctness
of the relocation logic applied by RuntimeDyld.

The expressions to test will be read out of files passed via the -check option
(there may be more than one of these). Expressions to check are extracted from
lines of the form:
# rtdyld-check: <expression>

This system is designed to fit the llvm-lit regression test workflow. It is
format and target agnostic, and supports verification of images linked for
remote targets. The expression language is defined in
llvm/include/llvm/RuntimeDyldChecker.h . Examples can be found in
test/ExecutionEngine/RuntimeDyld.

llvm-svn: 211956

10 years ago[x86] Fix another bug hit when bootstrapping with the new shuffle
Chandler Carruth [Fri, 27 Jun 2014 20:07:40 +0000 (20:07 +0000)]
[x86] Fix another bug hit when bootstrapping with the new shuffle
lowering.

For maximum irony, I had already discovered this bug, diagnosed it, and
left FIXMEs about it in the test cases. =[ I just failed to go back over
those until after i had reduced a bootstrap miscompile down to a single
TU, stared at the assembly for an hour, and figured out the bug. Again.

Oh well.

llvm-svn: 211955

10 years agoUpdated ObjectFileELF tests to include more varaints.
Todd Fiala [Fri, 27 Jun 2014 20:07:03 +0000 (20:07 +0000)]
Updated ObjectFileELF tests to include more varaints.

Removed the distribution EXEs from FreeBSD and Ubuntu.
Added a hello-world .cpp file, and compiled it for
several platform/compiler variants:

Ubuntu 14.04 x86_64, clang 3.5 (the ubuntu1 3.5 pre variant)
Ubuntu 14.04 x86_64, gcc 4.8.2
FreeBSD 10.0 x86_64, clang 3.3
FreeBSD 10.0 x86_64, gcc 4.7.3
NetBSD 6.1 x86_64, gcc 4.5.3

I also added the NetBSD expected architecture and triple.
Note I have NetBSD not appending the version info to the
OS name, in contrast to FreeBSD.

llvm-svn: 211954

10 years agoReverting r211950 -- it did not help resolve the -Wcomment warnings triggered in...
Aaron Ballman [Fri, 27 Jun 2014 19:52:34 +0000 (19:52 +0000)]
Reverting r211950 -- it did not help resolve the -Wcomment warnings triggered in GCC.

llvm-svn: 211953

10 years ago[NVPTX] Use GreatestCommonDivisor64 from MathExtras instead of using our own. Thanks...
Justin Holewinski [Fri, 27 Jun 2014 19:36:25 +0000 (19:36 +0000)]
[NVPTX] Use GreatestCommonDivisor64 from MathExtras instead of using our own.  Thanks Hal!

llvm-svn: 211952

10 years ago[mach-o] fix struct initialization to work with Windows compiler
Nick Kledzik [Fri, 27 Jun 2014 19:08:56 +0000 (19:08 +0000)]
[mach-o] fix struct initialization to work with Windows compiler

llvm-svn: 211951

10 years agoAdding some trailing whitespace after a comment previously ending with \ to ensure...
Aaron Ballman [Fri, 27 Jun 2014 19:05:17 +0000 (19:05 +0000)]
Adding some trailing whitespace after a comment previously ending with \ to ensure that it isn't lexed as a multiline comment. This silences some -Wcomment warnings.

llvm-svn: 211950

10 years agoInclude <tuple> to make buildbots happy
David Majnemer [Fri, 27 Jun 2014 18:38:12 +0000 (18:38 +0000)]
Include <tuple> to make buildbots happy

llvm-svn: 211949

10 years ago[NVPTX] Add reflect intrinsic (better than matching by function name)
Justin Holewinski [Fri, 27 Jun 2014 18:36:11 +0000 (18:36 +0000)]
[NVPTX] Add reflect intrinsic (better than matching by function name)

Also clean up some of the logic in NVVMReflect.cpp while we're messing around in there.

llvm-svn: 211948