platform/upstream/llvm.git
9 years agoEscape strings in disassembly comments.
Ilia K [Tue, 12 May 2015 05:55:23 +0000 (05:55 +0000)]
Escape strings in disassembly comments.

Summary: Patch from chuckr@microsoft.com

Reviewers: abidh, ChuckR

Subscribers: paulmaybee, lldb-commits

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

llvm-svn: 237092

9 years agoRe-apply "Driver: Make profiling flags work with -nostdlib on Darwin"
Justin Bogner [Tue, 12 May 2015 05:44:36 +0000 (05:44 +0000)]
Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"

This time without a stray "true" in an argument list.

This reverts r237077, restoring r237074.

llvm-svn: 237091

9 years agoRemove unnecessary variables by folding calls into for loop header. NFC.
Craig Topper [Tue, 12 May 2015 05:25:10 +0000 (05:25 +0000)]
Remove unnecessary variables by folding calls into for loop header. NFC.

llvm-svn: 237090

9 years agoTestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwin
Vince Harron [Tue, 12 May 2015 05:18:06 +0000 (05:18 +0000)]
TestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwin

expectedFailure doesn't work if the failure is in a teardown step.

llvm-svn: 237089

9 years agorevert r237081 -- bad idea (-lcrypt may not be present)
Kostya Serebryany [Tue, 12 May 2015 03:10:42 +0000 (03:10 +0000)]
revert r237081 -- bad idea (-lcrypt may not be present)

llvm-svn: 237086

9 years agoWorking on getting the OSX build green
Vince Harron [Tue, 12 May 2015 02:20:27 +0000 (02:20 +0000)]
Working on getting the OSX build green

Added missing SBLanguageRuntime.h to lldb.xcodeproj, set to Public (fixed compile error in TestPublicAPIHeaders)
Removed reference to (temporarily) missing gtest.xcodeproj
Fixed TestDeadStrip compile error
XFAIL TestPublicAPIHeaders - test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails
XFAIL TestCModules - use of undeclared identifier 'MIN'
XFAIL TestModulesAutoImport - clang: error: unknown argument: '-gmodules'
XFAIL TestObjCNewSyntax - expr -- @((char*)"Hello world" + 6) cannot box a string value because NSString has not been declared

http://reviews.llvm.org/D9643

llvm-svn: 237085

9 years agoApply LLDB_API modifier to SBPlatform and SBPlatformShellCommand.
Oleksiy Vyalov [Tue, 12 May 2015 02:04:26 +0000 (02:04 +0000)]
Apply LLDB_API modifier to SBPlatform and SBPlatformShellCommand.

llvm-svn: 237084

9 years ago[lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan)
Kostya Serebryany [Tue, 12 May 2015 01:58:34 +0000 (01:58 +0000)]
[lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan)

llvm-svn: 237083

9 years ago[lib/Fuzzer] detach the pulse thread instad of joining it
Kostya Serebryany [Tue, 12 May 2015 01:43:20 +0000 (01:43 +0000)]
[lib/Fuzzer] detach the pulse thread instad of joining it

llvm-svn: 237082

9 years agoadd -lcrypto to clang and clang-format fuzzers (lib/Fuzzer will soon require it)
Kostya Serebryany [Tue, 12 May 2015 01:29:04 +0000 (01:29 +0000)]
add -lcrypto to clang and clang-format fuzzers (lib/Fuzzer will soon require it)

llvm-svn: 237081

9 years agoRemove the code that pulled soft float attributes out of the feature
Eric Christopher [Tue, 12 May 2015 01:26:21 +0000 (01:26 +0000)]
Remove the code that pulled soft float attributes out of the feature
strings and remove the setting of TargetOptions::UseSoftFloat to
match the code change in llvm r237079.

llvm-svn: 237080

9 years agoMigrate existing backends that care about software floating point
Eric Christopher [Tue, 12 May 2015 01:26:05 +0000 (01:26 +0000)]
Migrate existing backends that care about software floating point
to use the information in the module rather than TargetOptions.

We've had and clang has used the use-soft-float attribute for some
time now so have the backends set a subtarget feature based on
a particular function now that subtargets are created based on
functions and function attributes.

For the one middle end soft float check go ahead and create
an overloadable TargetLowering::useSoftFloat function that
just checks the TargetSubtargetInfo in all cases.

Also remove the command line option that hard codes whether or
not soft-float is set by using the attribute for all of the
target specific test cases - for the generic just go ahead and
add the attribute in the one case that showed up.

llvm-svn: 237079

9 years agoGet lldb-server building on android-9
Vince Harron [Tue, 12 May 2015 01:10:56 +0000 (01:10 +0000)]
Get lldb-server building on android-9

Build lldb-server with an android-9 sysroot.

llvm-svn: 237078

9 years agoRevert "Driver: Make profiling flags work with -nostdlib on Darwin"
Justin Bogner [Tue, 12 May 2015 01:04:33 +0000 (01:04 +0000)]
Revert "Driver: Make profiling flags work with -nostdlib on Darwin"

This revert r237074. These tests are failing all over the place.

llvm-svn: 237077

9 years agoChange session log filename pattern: test before arch
Vince Harron [Tue, 12 May 2015 00:50:54 +0000 (00:50 +0000)]
Change session log filename pattern: test before arch

This is a very minor change.

Just reshuffle the elements of the log filename so that the test name
comes before the arch/compiler

Before:
Failure-x86_64-clang-TestCModules.CModulesTestCase.test_expr_with_dwarf.log

After:
Failure-TestCModules.CModulesTestCase.test_expr_with_dwarf-x86_64-clang.log

This way, results are grouped by test name, not by arch. I think this
is much more useful.

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

llvm-svn: 237076

9 years agoRemove Triple Vendor check when creating FreeBSD Platform
Ed Maste [Tue, 12 May 2015 00:43:45 +0000 (00:43 +0000)]
Remove Triple Vendor check when creating FreeBSD Platform

This is equivalent to r237052 in PlatformLinux.cpp.

llvm-svn: 237075

9 years agoDriver: Make profiling flags work with -nostdlib on Darwin
Justin Bogner [Tue, 12 May 2015 00:31:33 +0000 (00:31 +0000)]
Driver: Make profiling flags work with -nostdlib on Darwin

Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib
shouldn't prevent it from being linked. This makes Darwin behave like
other toolchains, and link in the profile runtime irrespective of
-nostdlib, since the resulting program can't be run unless you link
this.

I've also added a test to show that other toolchains already behave
like this.

llvm-svn: 237074

9 years agoAllow empty assembly string literal with -fno-gnu-inline-asm
Steven Wu [Tue, 12 May 2015 00:16:37 +0000 (00:16 +0000)]
Allow empty assembly string literal with -fno-gnu-inline-asm

Empty assembly string will not introduce assembly code in the output
binary and it is often used as a trick in the header to disable
optimizations. It doesn't conflict with the purpose of the option so it
is allowed with -fno-gnu-inline-asm flag.

llvm-svn: 237073

9 years agoFixing memory leak
Andrew Kaylor [Tue, 12 May 2015 00:13:51 +0000 (00:13 +0000)]
Fixing memory leak

llvm-svn: 237072

9 years agoUpdate initialization of a class variable and comment.
Eric Christopher [Tue, 12 May 2015 00:04:20 +0000 (00:04 +0000)]
Update initialization of a class variable and comment.

llvm-svn: 237071

9 years agoRefactoring gc_relocate related code in CodeGenPrepare.cpp
Sanjoy Das [Mon, 11 May 2015 23:47:30 +0000 (23:47 +0000)]
Refactoring gc_relocate related code in CodeGenPrepare.cpp

Summary:
The original code inserted new instructions by following a
Create->Remove->ReInsert flow. This patch removes the unnecessary
Remove->ReInsert part by setting up the InsertPoint correctly at the
very beginning. This change does not introduce any functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237070

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