platform/upstream/llvm.git
9 years agoRename variables in gc_relocate related functions to follow LLVM's naming conventions.
Sanjoy Das [Mon, 11 May 2015 23:47:27 +0000 (23:47 +0000)]
Rename variables in gc_relocate related functions to follow LLVM's naming conventions.

Summary:
This patch is to rename some variables to CamelCase in gc_relocate
related functions. There is no functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237069

9 years agoTypo fix: s/initialzier/initializer/ in a doc comment.
James Dennett [Mon, 11 May 2015 23:25:54 +0000 (23:25 +0000)]
Typo fix: s/initialzier/initializer/ in a doc comment.

No functional change.

llvm-svn: 237068

9 years ago[lib/Fuzzer] don't record traces when trace collection is off
Kostya Serebryany [Mon, 11 May 2015 23:25:28 +0000 (23:25 +0000)]
[lib/Fuzzer] don't record traces when trace collection is off

llvm-svn: 237067

9 years ago[MemCpyOpt] Look at any dependency -not just source- for memset+memcpy.
Ahmed Bougacha [Mon, 11 May 2015 23:09:46 +0000 (23:09 +0000)]
[MemCpyOpt] Look at any dependency -not just source- for memset+memcpy.

This fixes another miscompile introduced by r235232: when there was a
dependency on the memcpy destination other than the memset, we would
ignore it, because we only looked at the source dependency.

It was a mistake to use SrcDepInfo.  Instead, just use DepInfo.

llvm-svn: 237066

9 years agoSimplify a return expression and an access to an alloca's allocated type
David Blaikie [Mon, 11 May 2015 23:09:25 +0000 (23:09 +0000)]
Simplify a return expression and an access to an alloca's allocated type

llvm-svn: 237065

9 years agoPR20625: Instantiate static constexpr member function of a local struct in a function...
Richard Smith [Mon, 11 May 2015 23:09:06 +0000 (23:09 +0000)]
PR20625: Instantiate static constexpr member function of a local struct in a function template earlier.

This is necessary in order to allow the use of a constexpr member function, or
a member function with deduced return type, of a local class within a
surrounding instantiated function template specialization.

Patch by Michael Park!

This re-commits r236063, which was reverted in r236134, along with a fix for a
delayed template parsing bug that was exposed by this change.

llvm-svn: 237064

9 years ago[WinEH] Handle nested landing pads that return directly to the parent function.
Andrew Kaylor [Mon, 11 May 2015 23:06:02 +0000 (23:06 +0000)]
[WinEH] Handle nested landing pads that return directly to the parent function.

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

llvm-svn: 237063

9 years agoAdd more missing #includes, found by modules build.
Richard Smith [Mon, 11 May 2015 22:41:07 +0000 (22:41 +0000)]
Add more missing #includes, found by modules build.

llvm-svn: 237062

9 years agoAdd missing #include, found by modules build.
Richard Smith [Mon, 11 May 2015 22:32:06 +0000 (22:32 +0000)]
Add missing #include, found by modules build.

llvm-svn: 237061

9 years agoAdd missing #includes, found by modules build.
Richard Smith [Mon, 11 May 2015 22:31:40 +0000 (22:31 +0000)]
Add missing #includes, found by modules build.

llvm-svn: 237060

9 years agoReaddress r236990, use of static members on a non-static variable.
David Blaikie [Mon, 11 May 2015 22:20:48 +0000 (22:20 +0000)]
Readdress r236990, use of static members on a non-static variable.

The TargetRegistry is just a namespace-like class, instantiated in one
place to use a range-based for loop. Instead, expose access to the
registry via a range-based 'targets()' function instead. This makes most
uses a bit awkward/more verbose - but eventually we should just add a
range-based find_if function which will streamline these functions. I'm
happy to mkae them a bit awkward in the interim as encouragement to
improve the algorithms in time.

llvm-svn: 237059

9 years agoFix tablegen's PrintFatalError function to run registered file
James Y Knight [Mon, 11 May 2015 22:17:13 +0000 (22:17 +0000)]
Fix tablegen's PrintFatalError function to run registered file
cleanups.

Also, change code in tablegen which printed a message and then called
"exit(1)" to use PrintFatalError, instead.

This fixes instances where an empty output file was left behind after
a failed tablegen invocation, which would confuse subsequent ninja
runs into not attempting to rebuild.

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

llvm-svn: 237058

9 years agoMove sanitizer parser and group expander from Driver to Basic.
Peter Collingbourne [Mon, 11 May 2015 21:39:20 +0000 (21:39 +0000)]
Move sanitizer parser and group expander from Driver to Basic.

No functional change.

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

llvm-svn: 237056

9 years agoUnify sanitizer kind representation between the driver and the rest of the compiler.
Peter Collingbourne [Mon, 11 May 2015 21:39:14 +0000 (21:39 +0000)]
Unify sanitizer kind representation between the driver and the rest of the compiler.

No functional change.

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

llvm-svn: 237055

9 years ago[lib/Fuzzer] when running multiple fuzzing processes, print something every 10 minute...
Kostya Serebryany [Mon, 11 May 2015 21:31:51 +0000 (21:31 +0000)]
[lib/Fuzzer] when running multiple fuzzing processes, print something every 10 minutes to avoid buildbot timeouts

llvm-svn: 237054

9 years agoFix selecting the Platform in TargetList::CreateTargetInternal()
Ted Woodward [Mon, 11 May 2015 21:23:31 +0000 (21:23 +0000)]
Fix selecting the Platform in TargetList::CreateTargetInternal()

Summary:
TargetList::CreateTargetInternal() will only select the current Platform. A previous patch always sets platform_sp to the current Platform, so a check later to see if platform_sp was not defined always failed, and the current Platform was used. This patch removes that check, so if the current Platform is not compatible with the target architecture, CreateTargetInternal() will call Platform::GetPlatformForArchitecture() to select a compatible Platform.

Vince, remote linux tests (Ubuntu -> remote Ubuntu) pass the same with and without this patch.

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: jingham, lldb-commits

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

llvm-svn: 237053

9 years agoRemove Triple Vendor check when creating Linux Platform
Ted Woodward [Mon, 11 May 2015 21:21:21 +0000 (21:21 +0000)]
Remove Triple Vendor check when creating Linux Platform

Summary: The Linux Platform shouldn't care about the Vendor field in the Triple. Currently it allows a value of "PC", or "unknown" if LLDB was built on Linux. This patch removes that check, so the Vendor field isn't touched. This will allow the Linux Platform to be created when using a Triple of *-*-Linux.

Reviewers: vharron, clayborg, sas, tberghammer

Reviewed By: clayborg, sas, tberghammer

Subscribers: tberghammer, sas, lldb-commits

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

llvm-svn: 237052

9 years agoFix input validation issues in llvm-as/llvm-dis
Alexey Samsonov [Mon, 11 May 2015 21:20:20 +0000 (21:20 +0000)]
Fix input validation issues in llvm-as/llvm-dis

Summary:
1. llvm-as/llvm-dis tools do not check for input filename length.
2. llvm-dis does not verify the `Streamer` variable against `nullptr` properly, so the `M` variable could be uninitialized (e.g. if the input file does not exist) leading to null dref.

Patch by Lenar Safin!

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: samsonov, llvm-commits

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

llvm-svn: 237051

9 years ago[lib/Fuzzer] rename FuzzerDFSan.cpp to FuzzerTraceState.cpp; update comments. NFC...
Kostya Serebryany [Mon, 11 May 2015 21:16:27 +0000 (21:16 +0000)]
[lib/Fuzzer] rename FuzzerDFSan.cpp to FuzzerTraceState.cpp; update comments. NFC expected

llvm-svn: 237050

9 years ago[asan] Disable coverage-missing test failing on the bots.
Evgeniy Stepanov [Mon, 11 May 2015 21:16:18 +0000 (21:16 +0000)]
[asan] Disable coverage-missing test failing on the bots.

llvm-svn: 237049

9 years agoAllow AsmLabel with -fno-gnu-inline-asm
Steven Wu [Mon, 11 May 2015 21:14:09 +0000 (21:14 +0000)]
Allow AsmLabel with -fno-gnu-inline-asm

Summary:
AsmLabel is heavily used in system level and firmware to redirect
function and access platform specific labels. They are also extensively
used in system headers which makes this option unusable for many
users. Since AsmLabel doesn't introduce any assembly code into the
output binary, it shouldn't be considered as inline-asm.

Reviewers: bob.wilson, rnk

Reviewed By: rnk

Subscribers: cfe-commits

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

llvm-svn: 237048

9 years agoAdd Hexagon packet support to ThreadPlanStepRange
Ted Woodward [Mon, 11 May 2015 21:12:33 +0000 (21:12 +0000)]
Add Hexagon packet support to ThreadPlanStepRange

Summary:
Hexagon is a VLIW processor. It can execute multiple instructions at once, called a packet. Breakpoints need to be alone in a packet. This patch will make sure that temporary breakpoints used for stepping are set at the start of a packet, which will put the breakpoint in a packet by itself.

Patch by Deepak Panickal of CodePlay and Ted Woodward of Qualcomm.

Reviewers: deepak2427, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 237047

9 years agopropagate IR-level fast-math-flags to DAG nodes; 2nd try; NFC
Sanjay Patel [Mon, 11 May 2015 21:07:09 +0000 (21:07 +0000)]
propagate IR-level fast-math-flags to DAG nodes; 2nd try; NFC

This is a less ambitious version of:
http://reviews.llvm.org/rL236546

because that was reverted in:
http://reviews.llvm.org/rL236600

because it caused memory corruption that wasn't related to FMF
but was actually due to making nodes with 2 operands derive from a
plain SDNode rather than a BinarySDNode.

This patch adds the minimum plumbing necessary to use IR-level
fast-math-flags (FMF) in the backend without actually using
them for anything yet. This is a follow-on to:
http://reviews.llvm.org/rL235997

...which split the existing nsw / nuw / exact flags and FMF
into their own struct.

llvm-svn: 237046

9 years ago[UBSan] Add missing header that defines SANITIZER_CAN_USE_PREINIT_ARRAY
Alexey Samsonov [Mon, 11 May 2015 21:06:49 +0000 (21:06 +0000)]
[UBSan] Add missing header that defines SANITIZER_CAN_USE_PREINIT_ARRAY

Otherwise this compile definition was undefined, and .preinit_array
was never used on the platforms that support it.

llvm-svn: 237045

9 years ago[LoopIdiomRecognize] Transform backedge-taken count check into an assertion.
Davide Italiano [Mon, 11 May 2015 21:02:34 +0000 (21:02 +0000)]
[LoopIdiomRecognize] Transform backedge-taken count check into an assertion.

runOnCountable() allowed the caller to call on a loop without a
predictable backedge-taken count. Change the code so that only loops
with computable backdge-count can call this function, in order to catch
abuses.

llvm-svn: 237044

9 years ago[lib/Fuzzer] add a trace-based mutatation logic. Same idea as with DFSan-based mutato...
Kostya Serebryany [Mon, 11 May 2015 20:51:19 +0000 (20:51 +0000)]
[lib/Fuzzer] add a trace-based mutatation logic. Same idea as with DFSan-based mutator, but instead of relying on taint  tracking, try to find the data directly in the input. More (logic and comments) to go.

llvm-svn: 237043

9 years agoFixing build warnings
Andrew Kaylor [Mon, 11 May 2015 20:45:11 +0000 (20:45 +0000)]
Fixing build warnings

llvm-svn: 237042

9 years agoDoc talks about Platform_RunCommand while we actually use Platform_shell.
Chaoren Lin [Mon, 11 May 2015 19:48:37 +0000 (19:48 +0000)]
Doc talks about Platform_RunCommand while we actually use Platform_shell.

llvm-svn: 237016

9 years ago[WinEH] Update exception numbering to give handlers their own base state.
Andrew Kaylor [Mon, 11 May 2015 19:41:19 +0000 (19:41 +0000)]
[WinEH] Update exception numbering to give handlers their own base state.

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

llvm-svn: 237014

9 years agogroup getNode() variants by purpose and add comments; NFC
Sanjay Patel [Mon, 11 May 2015 19:34:10 +0000 (19:34 +0000)]
group getNode() variants by purpose and add comments; NFC

llvm-svn: 237013

9 years ago["watch set" tests] Use default test case executable names.
Siva Chandra [Mon, 11 May 2015 18:49:59 +0000 (18:49 +0000)]
["watch set" tests] Use default test case executable names.

Summary: This change similar to r236783.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 237010

9 years ago[RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector...
Sanjoy Das [Mon, 11 May 2015 18:49:34 +0000 (18:49 +0000)]
[RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers

Summary:
In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for
each relocated pointer, and the gc_relocate has the same type with the
pointer. During the creation of gc_relocate intrinsic, llvm requires to
mangle its type. However, llvm does not support mangling of all possible
types. RewriteStatepointsForGC will hit an assertion failure when it
tries to create a gc_relocate for pointer to vector of pointers because
mangling for vector of pointers is not supported.

This patch changes the way RewriteStatepointsForGC pass creates
gc_relocate. For each relocated pointer, we erase the type of pointers
and create an unified gc_relocate of type i8 addrspace(1)*. Then a
bitcast is inserted to convert the gc_relocate to the correct type. In
this way, gc_relocate does not need to deal with different types of
pointers and the unsupported type mangling is no longer a problem. This
change would also ease further merge when LLVM erases types of pointers
and introduces an unified pointer type.

Some minor changes are also introduced to gc_relocate related part in
InstCombineCalls, CodeGenPrepare, and Verifier accordingly.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237009

9 years agoLiveRangeCalc: Improve error messages on malformed IR
Matthias Braun [Mon, 11 May 2015 18:47:47 +0000 (18:47 +0000)]
LiveRangeCalc: Improve error messages on malformed IR

llvm-svn: 237008

9 years ago[cuda] Fixed test case failure on s390x
Artem Belevich [Mon, 11 May 2015 18:35:58 +0000 (18:35 +0000)]
[cuda] Fixed test case failure on s390x

llvm-svn: 237007

9 years agoos.path.join does not always work for paths on remote platforms.
Chaoren Lin [Mon, 11 May 2015 17:53:39 +0000 (17:53 +0000)]
os.path.join does not always work for paths on remote platforms.

Summary:
Since we don't yet have remote windows debugging, it should be safe to assume
that the remote target uses unix path separators.

Reviewers: ovyalov, zturner, clayborg, vharron

Reviewed By: vharron

Subscribers: lldb-commits

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

llvm-svn: 237006

9 years agoCodeGen: Make MachineInstr::untieRegOperand() a public function
Tom Stellard [Mon, 11 May 2015 17:40:54 +0000 (17:40 +0000)]
CodeGen: Make MachineInstr::untieRegOperand() a public function

This makes it easier to update in place instructions with tied operands.

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

llvm-svn: 237005

9 years ago[X86] Updates to X86 backend for f16 promotion
Pirama Arumuga Nainar [Mon, 11 May 2015 17:14:39 +0000 (17:14 +0000)]
[X86] Updates to X86 backend for f16 promotion

Summary:
r235215 adds support for f16 to be considered as a load/store type and
promote f16 operations to f32.

This patch has miscellaneous fixes for the X86 backend so all f16
operations are handled:
1. Set loadextaction for f16 vectors to expand.
2. Handle FP_EXTEND in a switch statement when handling v2f32
3. Do not fold (FP_TO_SINT (load f16)) into FP_TO_INT*_IN_MEM or
(store (SINT_TO_FP )) to a FILD.

Tests included.

Reviewers: ab, srhines, delena

Subscribers: llvm-commits

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

llvm-svn: 237004

9 years agoRevert "Allow -target= and --target options"
Richard Barton [Mon, 11 May 2015 17:05:05 +0000 (17:05 +0000)]
Revert "Allow -target= and --target options"

After mailing list discussion on 11-13 March we would prefer to stick to a
single spelling of the long option.

This reverts commit 30035fe1a7c759c89ee62eb46efce6b3790fcc08.

llvm-svn: 237003

9 years agounwind: permit building against libstdc++
Saleem Abdulrasool [Mon, 11 May 2015 16:35:13 +0000 (16:35 +0000)]
unwind: permit building against libstdc++

Include algorithm early as otherwise you get a number of particularly unhelpful
messages about failed static assertions.  This fixes compilation on Linux with
gcc.

llvm-svn: 237002

9 years ago[Sparc] Add support for 'sparcel' to clang.
Douglas Katzman [Mon, 11 May 2015 15:21:44 +0000 (15:21 +0000)]
[Sparc] Add support for 'sparcel' to clang.

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

llvm-svn: 237001

9 years agoclang-format: Support aligning ObjC string literals.
Daniel Jasper [Mon, 11 May 2015 15:15:48 +0000 (15:15 +0000)]
clang-format: Support aligning ObjC string literals.

Before:
  NSString s = @"aaaa"
      @"bbbb";

After:
  NSString s = @"aaaa"
               @"bbbb";

llvm-svn: 237000

9 years ago[Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Viktor Kutuzov [Mon, 11 May 2015 14:46:16 +0000 (14:46 +0000)]
[Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9456

llvm-svn: 236999

9 years agoRip min/max pattern matching out of InstCombine and into
James Molloy [Mon, 11 May 2015 14:42:20 +0000 (14:42 +0000)]
Rip min/max pattern matching out of InstCombine and into
 ValueTracking.

This matching functionality is useful in more than just InstCombine, so
make it available in ValueTracking.

NFC.

llvm-svn: 236998

9 years agoNew test for llvm.org/pr23478
Tamas Berghammer [Mon, 11 May 2015 14:42:09 +0000 (14:42 +0000)]
New test for llvm.org/pr23478

When there is two brekapoint on two consecutive instruction then
the second breakpoint is ignored by lldb. This test check for the
correct behaviour in this scenario.

Differential revision: http://reviews.llvm.org/D9661

llvm-svn: 236997

9 years agoDisable __has_cpp_attribute when not compiling in C++ mode. As this feature test...
Aaron Ballman [Mon, 11 May 2015 14:09:50 +0000 (14:09 +0000)]
Disable __has_cpp_attribute when not compiling in C++ mode. As this feature test macro only supports C++ style attributes, it doesn't apply to code compiled as C code, and can lead to diagnostics when given a scoped attribute.

This addresses PR23435.

llvm-svn: 236996

9 years agoclang-format: Appease the buildbots by including climits.
Daniel Jasper [Mon, 11 May 2015 13:52:13 +0000 (13:52 +0000)]
clang-format: Appease the buildbots by including climits.

llvm-svn: 236995

9 years agoRevert "Adjust formatting to latest clang-format change"
Tobias Grosser [Mon, 11 May 2015 13:43:04 +0000 (13:43 +0000)]
Revert "Adjust formatting to latest clang-format change"

This reverts commit 236875. Daniel fixed the clang-format bug that introduced
the changed formatting.

llvm-svn: 236994

9 years agoXFAIL a test that fails on FreeBSD 11 (local and buildbot)
Ed Maste [Mon, 11 May 2015 13:38:59 +0000 (13:38 +0000)]
XFAIL a test that fails on FreeBSD 11 (local and buildbot)

For some reason this happens only when running the full test suite
(e.g., via ninja check-lldb), but not when running the
TestStaticVariables.py tests in isolation. XFAIL for now while
investigating, in an attempt to bring the bot to green and reduce noise.

llvm.org/pr20550

llvm-svn: 236993

9 years agoclang-format: Improve column layout.
Daniel Jasper [Mon, 11 May 2015 13:35:40 +0000 (13:35 +0000)]
clang-format: Improve column layout.

Specifically, calculate the deviation between the shortest and longest
element (which is used to prevent excessive whitespace) per column, not
overall. This automatically handles the corner cases of a single column
and a single row so that the actualy implementation becomes simpler.

Before:
  vector<int> x = {1,
                   aaaaaaaaaaaaaaaaaaaaaa,
                   2,
                   bbbbbbbbbbbbbbbbbbbbbb,
                   3,
                   cccccccccccccccccccccc};

After:
  vector<int> x = {1, aaaaaaaaaaaaaaaaaaaaaa,
                   2, bbbbbbbbbbbbbbbbbbbbbb,
                   3, cccccccccccccccccccccc};

llvm-svn: 236992

9 years agoAmends r236990, because I failed at hitting "save" before commit.
Aaron Ballman [Mon, 11 May 2015 13:11:38 +0000 (13:11 +0000)]
Amends r236990, because I failed at hitting "save" before commit.

llvm-svn: 236991

9 years agoReplacing a range-based for loop with an old-style for loop. This code was previously...
Aaron Ballman [Mon, 11 May 2015 13:10:17 +0000 (13:10 +0000)]
Replacing a range-based for loop with an old-style for loop. This code was previously causing a warning with MSVC about a compiler-generated local variable because TargetRegistry::begin() and end() are static member functions. NFC.

llvm-svn: 236990

9 years agoFix thumb condition extraction in ARM instrcution emulator
Tamas Berghammer [Mon, 11 May 2015 12:50:56 +0000 (12:50 +0000)]
Fix thumb condition extraction in ARM instrcution emulator

llvm-svn: 236988

9 years agoSilencing an MSVC warning: '<<' : result of 32-bit shift implicitly converted to...
Aaron Ballman [Mon, 11 May 2015 12:45:53 +0000 (12:45 +0000)]
Silencing an MSVC warning: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?); NFC

llvm-svn: 236987

9 years agoSkip and XFAIL TestThreadStepOut as it times out on the Linux build bot
Tamas Berghammer [Mon, 11 May 2015 12:42:56 +0000 (12:42 +0000)]
Skip and XFAIL TestThreadStepOut as it times out on the Linux build bot

llvm-svn: 236986

9 years agoclang-format: Don't merge subsequent lines into _asm blocks.
Daniel Jasper [Mon, 11 May 2015 11:59:46 +0000 (11:59 +0000)]
clang-format: Don't merge subsequent lines into _asm blocks.

Before:
  _asm {
  } int i;

After:
  _asm {
  }
  int i;

llvm-svn: 236985

9 years agoSkip and XFAIL test occasionally timing out on the Linux build bot
Tamas Berghammer [Mon, 11 May 2015 10:32:16 +0000 (10:32 +0000)]
Skip and XFAIL test occasionally timing out on the Linux build bot

llvm-svn: 236984

9 years ago[NativeProcessLinux] Remove double thread state accounting
Pavel Labath [Mon, 11 May 2015 10:03:10 +0000 (10:03 +0000)]
[NativeProcessLinux] Remove double thread state accounting

Summary:
Now that all thread events are processed synchronously, there is no need to have separate records
of whether a thread is running. This changes the (ever-dwindling) remains of the TSC to use
NativeThreadLinux as the authoritative source of the state of threads. The rest of the
ThreadContext we need has been moved to a member of NTL.

Test Plan: ninja check-lldb continues to pass

Reviewers: chaoren, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 236983

9 years agoclang-format: [JS] Clean up export declaration parsing.
Daniel Jasper [Mon, 11 May 2015 09:14:50 +0000 (09:14 +0000)]
clang-format: [JS] Clean up export declaration parsing.

NFC intended.

llvm-svn: 236982

9 years ago[Testsuite] Renumber metadata in ScopedNoAliasAA test to match CHECK lines
Adam Nemet [Mon, 11 May 2015 09:10:14 +0000 (09:10 +0000)]
[Testsuite] Renumber metadata in ScopedNoAliasAA test to match CHECK lines

Summary:
Now it's much easier to follow what's happening in this test.

Also removed some unused metadata entries.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

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

llvm-svn: 236981

9 years agoAVX-512: Changed CC parameter in "cmp" intrinsic
Elena Demikhovsky [Mon, 11 May 2015 09:03:41 +0000 (09:03 +0000)]
AVX-512: Changed CC parameter in "cmp" intrinsic
from i8 to i32 according to the Intel Spec

llvm-svn: 236980

9 years agoAVX-512: Changed CC parameter in "cmp" intrinsic
Elena Demikhovsky [Mon, 11 May 2015 09:03:14 +0000 (09:03 +0000)]
AVX-512: Changed CC parameter in "cmp" intrinsic
from i8 to i32 according to the Intel Spec

by Igor Breger (igor.breger@intel.com)

llvm-svn: 236979

9 years agoclang-format: [JS] Parse exported functions as free-standing.
Daniel Jasper [Mon, 11 May 2015 09:03:10 +0000 (09:03 +0000)]
clang-format: [JS] Parse exported functions as free-standing.

Before:
  export function foo() {} export function bar() {}

After:
  export function foo() {
  }
  export function bar() {
  }

llvm-svn: 236978

9 years ago[Docs] Fix scoped noalias example
Adam Nemet [Mon, 11 May 2015 08:30:28 +0000 (08:30 +0000)]
[Docs] Fix scoped noalias example

Summary:
As far as I understand the entire point of this example is to show that
if noalias is not a superset/equal to the alias.scope list on a scope
domain then load could reference locations that the store is not known
to not-alias i.e may alias.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

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

llvm-svn: 236977

9 years agoRefactor MacroInfo so range for loops can be used to iterate its tokens.
Daniel Marjamaki [Mon, 11 May 2015 08:26:25 +0000 (08:26 +0000)]
Refactor MacroInfo so range for loops can be used to iterate its tokens.

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

llvm-svn: 236976

9 years agoRefactor MacroInfo so range for loops can be used to iterate its tokens.
Daniel Marjamaki [Mon, 11 May 2015 08:25:54 +0000 (08:25 +0000)]
Refactor MacroInfo so range for loops can be used to iterate its tokens.

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

llvm-svn: 236975

9 years agoRefactor the formatter of clang-format.
Manuel Klimek [Mon, 11 May 2015 08:21:35 +0000 (08:21 +0000)]
Refactor the formatter of clang-format.

Pull various parts of the UnwrappedLineFormatter into their own
abstractions. NFC.

There are two things left for subsequent changes (to keep this
reasonably small)
- the UnwrappedLineFormatter now has a bad name
- the UnwrappedLineFormatter::format function is still too large

llvm-svn: 236974

9 years ago[InstCombine/PowerPC] Fix single-precision QPX load/store replacement
Hal Finkel [Mon, 11 May 2015 06:37:03 +0000 (06:37 +0000)]
[InstCombine/PowerPC] Fix single-precision QPX load/store replacement

The QPX single-precision load/store intrinsics have implied
truncation/extension from/to the declared value type of <4 x double> to the
memory type of <4 x float>. When we can prove the alignment of the pointer
argument, and thus replace the intrinsic with a regular load or store, we need
to load or store the correct data type (<4 x float>) instead of (<4 x double>).

llvm-svn: 236973

9 years agoFixed compilation warning, NFC.
Elena Demikhovsky [Mon, 11 May 2015 06:23:41 +0000 (06:23 +0000)]
Fixed compilation warning, NFC.

llvm-svn: 236972

9 years agoAVX-512: Added SKX instructions and intrinsics:
Elena Demikhovsky [Mon, 11 May 2015 06:05:05 +0000 (06:05 +0000)]
AVX-512: Added SKX instructions and intrinsics:
{add/sub/mul/div/} x {ps/pd} x {128/256} 2. max/min with sae

By Asaf Badouh (asaf.badouh@intel.com)

llvm-svn: 236971

9 years agoMake buildbots happy
David Majnemer [Mon, 11 May 2015 05:33:27 +0000 (05:33 +0000)]
Make buildbots happy

llvm-svn: 236970

9 years ago[InstCombine] Canonicalize single element array store
David Majnemer [Mon, 11 May 2015 05:04:27 +0000 (05:04 +0000)]
[InstCombine] Canonicalize single element array store

Use the element type instead of the aggregate type.

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

llvm-svn: 236969

9 years ago[InstCombine] Canonicalize single element array load
David Majnemer [Mon, 11 May 2015 05:04:22 +0000 (05:04 +0000)]
[InstCombine] Canonicalize single element array load

Use the element type instead of the aggregate type.

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

llvm-svn: 236968

9 years agoGive isCompatibleWithMSVC a better interface
David Majnemer [Mon, 11 May 2015 03:57:49 +0000 (03:57 +0000)]
Give isCompatibleWithMSVC a better interface

We now use an enum which maps the marketing name (almost always a year)
to the major version number.

llvm-svn: 236967

9 years ago[MS ABI] Import move assignment operators
David Majnemer [Mon, 11 May 2015 03:00:22 +0000 (03:00 +0000)]
[MS ABI] Import move assignment operators

MSVC 2015 changed behavior from 2013; it imports move assignment
operators.

llvm-svn: 236966

9 years agoFix indentation problem introduced in r236964. NFC
Jonathan Roelofs [Mon, 11 May 2015 02:13:24 +0000 (02:13 +0000)]
Fix indentation problem introduced in r236964. NFC

llvm-svn: 236965

9 years agoFix formatting of a few code blocks. NFC
Jonathan Roelofs [Mon, 11 May 2015 02:05:20 +0000 (02:05 +0000)]
Fix formatting of a few code blocks. NFC

llvm-svn: 236964

9 years agoFixed lldb-mi test failures introduced by r236956
Vince Harron [Sun, 10 May 2015 22:01:59 +0000 (22:01 +0000)]
Fixed lldb-mi test failures introduced by r236956

Move enable/disableLogForCurrentTest from lldbtest.TestBase to
lldbtest.Base so they're accessible to Mi tests

llvm-svn: 236963

9 years ago[MS ABI] Form member pointers from virtual funcs overriding vbases
David Majnemer [Sun, 10 May 2015 21:48:08 +0000 (21:48 +0000)]
[MS ABI] Form member pointers from virtual funcs overriding vbases

We didn't supporting taking the address of virtual member functions
which overrode a method in a virtual base.  We simply need to encode the
virtual base index in the member pointer.

This fixes PR23452.

N.B.  There is no data member pointer side to this change because taking
the address of a virtual bases' data member gives you a member pointer
whose type is derived from the virtual bases' type, not the most derived
type.

llvm-svn: 236962

9 years ago[MS ABI] Update EH emission for MSVC 2015 compatibility
David Majnemer [Sun, 10 May 2015 21:38:26 +0000 (21:38 +0000)]
[MS ABI] Update EH emission for MSVC 2015 compatibility

MSVC 2015 renamed the symbol found by name lookup for 'std::terminate'
so we cannot rely on using '?terminate@@YAXXZ'.  Furthermore, it seems
that 2015 will be the first release of MSVC which permits inlining a
function which is noexcept into a function which isn't.  This is
implemented by creating a cleanup for the invoker which jumps to
__std_terminate.  Clang's implementation of this aspect of the MSVC
scheme is slightly less efficient in this respect because we use a
catch handler configured as a catch-all handler instead.

llvm-svn: 236961

9 years agoclang-format: Improve wrapping of << operators.
Daniel Jasper [Sun, 10 May 2015 21:15:07 +0000 (21:15 +0000)]
clang-format: Improve wrapping of << operators.

Before:
  llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaa)
               << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

Also, cleanup and simplify the operator wrapping logic.

llvm-svn: 236960

9 years agoDe-virtualize some const versions of getCanonicalDecl by redirecting to the non-const...
Craig Topper [Sun, 10 May 2015 18:40:12 +0000 (18:40 +0000)]
De-virtualize some const versions of getCanonicalDecl by redirecting to the non-const version. Most of the Decl hierarchy already did it this way this just makes the rest consistent.

llvm-svn: 236959

9 years agoRemove unsupported lldb-server parameters from test
Vince Harron [Sun, 10 May 2015 18:02:53 +0000 (18:02 +0000)]
Remove unsupported lldb-server parameters from test

llvm-svn: 236958

9 years agoWe can't use sys.path[0] to determine the script directory because it doesn't work...
Vince Harron [Sun, 10 May 2015 15:24:12 +0000 (15:24 +0000)]
We can't use sys.path[0] to determine the script directory because it doesn't work under a debugger

Test Plan: run tests with/without python debugger
Tested on OSX & Linux with PyCharm

Reviewers: chying, clayborg

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

llvm-svn: 236957

9 years agoAdd support for ./dotest.py --channel and --log-success
Vince Harron [Sun, 10 May 2015 15:22:09 +0000 (15:22 +0000)]
Add support for ./dotest.py --channel and --log-success

Summary:
New dotest options that allow arbitrary log channels and
categories to be enabled.  Also enables logging for locally run
debug servers.

Log messages are separated into separate files per test case.
(this makes it possible to log in dosep runs)

These new log files are stored side-by-side with trace files in the
session directory.

These files are deleted by default if the test run is successful.

If --log-success is specified, even successful logs are retained.

--log-success is useful for creating reference log files.

Test Plan:
add '--channel "lldb all" --channel "gdb-remote packets" --log-success'
to your dotest options

Tested on OSX and Linux

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

llvm-svn: 236956

9 years agoAVX-512: fixed UINT_TO_FP operation for 512-bit types.
Elena Demikhovsky [Sun, 10 May 2015 14:23:52 +0000 (14:23 +0000)]
AVX-512: fixed UINT_TO_FP operation for 512-bit types.

llvm-svn: 236955

9 years ago[SelectionDAG] Fixed constant folding issue when legalised types are smaller then...
Simon Pilgrim [Sun, 10 May 2015 14:14:51 +0000 (14:14 +0000)]
[SelectionDAG] Fixed constant folding issue when legalised types are smaller then the folded type.

Found when testing with llvm-stress on i686 targets.

llvm-svn: 236954

9 years agoFix for LWG Issue 2415: Inconsistency between unique_ptr and shared_ptr
Marshall Clow [Sun, 10 May 2015 13:59:45 +0000 (13:59 +0000)]
Fix for LWG Issue 2415: Inconsistency between unique_ptr and shared_ptr

llvm-svn: 236953

9 years agoFix for LWG Issue 2369: constexpr max(initializer_list) vs max_element
Marshall Clow [Sun, 10 May 2015 13:53:31 +0000 (13:53 +0000)]
Fix for LWG Issue 2369: constexpr max(initializer_list) vs max_element

llvm-svn: 236952

9 years agoSanitizerCoverage: Use `createSanitizerCtor` to create ctor and call init
Ismail Pazarbasi [Sun, 10 May 2015 13:45:05 +0000 (13:45 +0000)]
SanitizerCoverage: Use `createSanitizerCtor` to create ctor and call init

Second attempt; instead of using a named local variable, passing
arguments directly to `createSanitizerCtorAndInitFunctions` worked
on Windows.

Reviewers: kcc, samsonov

Subscribers: llvm-commits

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

llvm-svn: 236951

9 years agoFix for LWG Issue 2059: C++0x ambiguity problem with map::erase
Marshall Clow [Sun, 10 May 2015 13:35:00 +0000 (13:35 +0000)]
Fix for LWG Issue 2059: C++0x ambiguity problem with map::erase

llvm-svn: 236950

9 years agoRemove some debugging printout lines. No functionality change.
Marshall Clow [Sun, 10 May 2015 13:26:57 +0000 (13:26 +0000)]
Remove some debugging printout lines. No functionality change.

llvm-svn: 236949

9 years agoFix for LWG2454: Add raw_storage_iterator::base() member
Marshall Clow [Sun, 10 May 2015 13:14:08 +0000 (13:14 +0000)]
Fix for LWG2454: Add raw_storage_iterator::base() member

llvm-svn: 236948

9 years agoAVX-512: fixed a bug in i1 vectors lowering
Elena Demikhovsky [Sun, 10 May 2015 10:33:32 +0000 (10:33 +0000)]
AVX-512: fixed a bug in i1 vectors lowering

llvm-svn: 236947

9 years agoclang-format: Preserve line break before } in __asm { ... }.
Daniel Jasper [Sun, 10 May 2015 08:42:04 +0000 (08:42 +0000)]
clang-format: Preserve line break before } in __asm { ... }.

Some compilers ignore everything after a semicolon in such inline asm
blocks and thus, the closing brace must not be moved to the previous
line.

llvm-svn: 236946

9 years agoFixed minor compile warnings
Vince Harron [Sun, 10 May 2015 08:33:58 +0000 (08:33 +0000)]
Fixed minor compile warnings

llvm-svn: 236945

9 years agoclang-format: Fix bug in escaped newline calculation.
Daniel Jasper [Sun, 10 May 2015 08:00:25 +0000 (08:00 +0000)]
clang-format: Fix bug in escaped newline calculation.

This prevents clang-format from inadvertently joining stuff into macro
definitions as reported in llvm.org/PR23466.

llvm-svn: 236944

9 years agoReapply r236854 and fixed r236867.
Daniel Jasper [Sun, 10 May 2015 07:47:19 +0000 (07:47 +0000)]
Reapply r236854 and fixed r236867.

Makes emacs show a different message when clang-format encountered a
syntax error.

llvm-svn: 236943

9 years agoSystemZ: silence a GCC warning
Saleem Abdulrasool [Sun, 10 May 2015 00:53:41 +0000 (00:53 +0000)]
SystemZ: silence a GCC warning

warning: enumeral and non-enumeral type in conditional expression

Cast the 0 to the appropriate type.  NFC.  Identified by GCC 4.9.2

llvm-svn: 236942

9 years agomath: limit half_sqrt to single precision
Jan Vesely [Sat, 9 May 2015 22:31:03 +0000 (22:31 +0000)]
math: limit half_sqrt to single precision

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 236941

9 years agogeometric: Limit fast_{distance,length} functions to single precision
Jan Vesely [Sat, 9 May 2015 22:31:01 +0000 (22:31 +0000)]
geometric: Limit fast_{distance,length} functions to single precision

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 236940