platform/upstream/llvm.git
9 years agoRemove the need to cache the subtarget in the ARM TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 05:12:31 +0000 (05:12 +0000)]
Remove the need to cache the subtarget in the ARM TargetRegisterInfo
classes. Replace the frame pointer initialization with a static function
that'll look it up via the subtarget on the MachineFunction.

llvm-svn: 232010

9 years agodocs: Fix a typo in my previous commit
Justin Bogner [Thu, 12 Mar 2015 04:43:01 +0000 (04:43 +0000)]
docs: Fix a typo in my previous commit

llvm-svn: 232009

9 years agoFix PATH_MAX definition after remarks in r231917 (MI)
Ilia K [Thu, 12 Mar 2015 04:18:47 +0000 (04:18 +0000)]
Fix PATH_MAX definition after remarks in r231917 (MI)

llvm-svn: 232008

9 years agodocs: Document the llvm-cov show and report commands
Justin Bogner [Thu, 12 Mar 2015 04:18:21 +0000 (04:18 +0000)]
docs: Document the llvm-cov show and report commands

Add a basic synopsis of how to work with instrprof based coverage
using the llvm-cov tools.

llvm-svn: 232007

9 years agoRemove the need to cache the subtarget in the AArch64 TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 02:04:46 +0000 (02:04 +0000)]
Remove the need to cache the subtarget in the AArch64 TargetRegisterInfo
classes. Replace it with a cache to the Triple and use that
where applicable at the moment.

llvm-svn: 232005

9 years ago[NVPTXAsmPrinter] do not print .align on function headers
Jingyue Wu [Thu, 12 Mar 2015 01:50:30 +0000 (01:50 +0000)]
[NVPTXAsmPrinter] do not print .align on function headers

Summary:
PTX does not allow .align directives on function headers.

Fixes PR21551.

Test Plan: test/Codegen/NVPTX/function-align.ll

Reviewers: eliben, jholewinski

Reviewed By: eliben, jholewinski

Subscribers: llvm-commits, eliben, jpienaar, jholewinski

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

llvm-svn: 232004

9 years agoMake llvm.eh.actions an intrinsic and add docs for it
Reid Kleckner [Thu, 12 Mar 2015 01:45:37 +0000 (01:45 +0000)]
Make llvm.eh.actions an intrinsic and add docs for it

These docs *don't* match the way WinEHPrepare uses them yet, and
verifier support isn't implemented either. The implementation will come
after the documentation text is reviewed and agreed upon.

llvm-svn: 232003

9 years agoRemove the need to cache the subtarget in the PowerPC TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 01:42:51 +0000 (01:42 +0000)]
Remove the need to cache the subtarget in the PowerPC TargetRegisterInfo
classes. Replace it with a cache to the TargetMachine and use that
where applicable at the moment.

llvm-svn: 232002

9 years agodocs: Try to fix a couple of internal links in the llvm-profdata manual
Justin Bogner [Thu, 12 Mar 2015 01:38:50 +0000 (01:38 +0000)]
docs: Try to fix a couple of internal links in the llvm-profdata manual

These links seem broken on llvm.org/docs. Change them to use the
sphinx-recommended style to see if that helps.

llvm-svn: 232001

9 years agoRemove some CHECK-NOT lines in favor of CHECK-NEXT
Reid Kleckner [Thu, 12 Mar 2015 01:38:48 +0000 (01:38 +0000)]
Remove some CHECK-NOT lines in favor of CHECK-NEXT

NFC, this is just shorter.

llvm-svn: 232000

9 years agoUpdate copyright year to 2015.
Tanya Lattner [Thu, 12 Mar 2015 01:36:10 +0000 (01:36 +0000)]
Update copyright year to 2015.

llvm-svn: 231999

9 years agoUpdate for a new year.
Eric Christopher [Thu, 12 Mar 2015 01:25:29 +0000 (01:25 +0000)]
Update for a new year.

Patch by Tanya Lattner.

llvm-svn: 231998

9 years agoDriver: Keep -isysroot flags in crash scripts if we're dumping a VFS
Justin Bogner [Thu, 12 Mar 2015 00:52:56 +0000 (00:52 +0000)]
Driver: Keep -isysroot flags in crash scripts if we're dumping a VFS

For crashes with a VFS (ie, with modules), the -isysroot flag is often
necessary to reproduce the crash. This is especially true if some
modules need to be rebuilt, since without the sysroot they'll try to
read headers that are outside of the VFS.

I find it likely that we should keep some of the other -i flags in
this case as well, but I haven't seen that come up in practice yet so
it seems better to be conservative.

llvm-svn: 231997

9 years agoFix build break introduced in r231992
Krzysztof Parzyszek [Thu, 12 Mar 2015 00:49:13 +0000 (00:49 +0000)]
Fix build break introduced in r231992

llvm-svn: 231996

9 years agoStop calling DwarfEHPrepare from WinEHPrepare
Reid Kleckner [Thu, 12 Mar 2015 00:36:20 +0000 (00:36 +0000)]
Stop calling DwarfEHPrepare from WinEHPrepare

Instead, run both EH preparation passes, and have them both ignore
functions with unrecognized EH personalities. Pass delegation involved
some hacky code for creating an AnalysisResolver that we don't need now.

llvm-svn: 231995

9 years agodocs: Document byte arrays.
Peter Collingbourne [Thu, 12 Mar 2015 00:30:41 +0000 (00:30 +0000)]
docs: Document byte arrays.

llvm-svn: 231994

9 years agoEliminate constant-extender profitability checks from Hexagon isel
Krzysztof Parzyszek [Thu, 12 Mar 2015 00:19:59 +0000 (00:19 +0000)]
Eliminate constant-extender profitability checks from Hexagon isel

llvm-svn: 231992

9 years agoRemove "virtual" and add "override" to all virtual functions.
Greg Clayton [Thu, 12 Mar 2015 00:17:08 +0000 (00:17 +0000)]
Remove "virtual" and add "override" to all virtual functions.

llvm-svn: 231991

9 years agoRemove "virtual" and add "override" to all functions that are overridden to quiet...
Greg Clayton [Thu, 12 Mar 2015 00:16:14 +0000 (00:16 +0000)]
Remove "virtual" and add "override" to all functions that are overridden to quiet warnings.

llvm-svn: 231990

9 years agoDriver: Print the clang version and original command in crash scripts
Justin Bogner [Thu, 12 Mar 2015 00:14:35 +0000 (00:14 +0000)]
Driver: Print the clang version and original command in crash scripts

When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.

llvm-svn: 231989

9 years agoFix FileCheck: substr() expect the length of the string as 2nd arg
Mehdi Amini [Thu, 12 Mar 2015 00:07:29 +0000 (00:07 +0000)]
Fix FileCheck: substr() expect the length of the string as 2nd arg

The code assumed that substr() was taking start,end while it takes
start,length.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231988

9 years agoMove the DataLayout to the generic TargetMachine, making it mandatory.
Mehdi Amini [Thu, 12 Mar 2015 00:07:24 +0000 (00:07 +0000)]
Move the DataLayout to the generic TargetMachine, making it mandatory.

Summary:
I don't know why every singled backend had to redeclare its own DataLayout.
There was a virtual getDataLayout() on the common base TargetMachine, the
default implementation returned nullptr. It was not clear from this that
we could assume at call site that a DataLayout will be available with
each Target.

Now getDataLayout() is no longer virtual and return a pointer to the
DataLayout member of the common base TargetMachine. I plan to turn it into
a reference in a future patch.

The only backend that didn't have a DataLayout previsouly was the CPPBackend.
It now initializes the default DataLayout. This commit is NFC for all the
other backends.

Test Plan: clang+llvm ninja check-all

Reviewers: echristo

Subscribers: jfb, jholewinski, llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231987

9 years agoUnder duress, move check for target support of __builtin_setjmp/
Joerg Sonnenberger [Wed, 11 Mar 2015 23:46:32 +0000 (23:46 +0000)]
Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.

llvm-svn: 231986

9 years agoFix some clang warnings in WinEHPrepare
Reid Kleckner [Wed, 11 Mar 2015 23:39:36 +0000 (23:39 +0000)]
Fix some clang warnings in WinEHPrepare

llvm-svn: 231985

9 years agoHandle big index in getelementptr instruction
Reid Kleckner [Wed, 11 Mar 2015 23:36:10 +0000 (23:36 +0000)]
Handle big index in getelementptr instruction

CodeGen incorrectly ignores (assert from APInt) constant index bigger
than 2^64 in getelementptr instruction. This is a test and fix for that.

Patch by PaweÅ‚ Bylica!

Reviewed By: rnk

Subscribers: majnemer, rnk, mcrosier, resistor, llvm-commits

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

llvm-svn: 231984

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

llvm-svn: 231983

9 years ago[PowerPC] Remove canFoldAsLoad from instruction definitions
Hal Finkel [Wed, 11 Mar 2015 23:28:38 +0000 (23:28 +0000)]
[PowerPC] Remove canFoldAsLoad from instruction definitions

The PowerPC backend had a number of loads that were marked as canFoldAsLoad
(and I'm partially at fault here for copying around the relevant line of
TableGen definitions without really looking at what it meant). This is not
right; PPC (non-memory) instructions don't support direct memory operands, and
so there is nothing a 'foldable' instruction could be folded into.

Noticed by inspection, no test case.

The one thing we might lose by doing this is ability to fold some loads into
stackmap/patchpoint pseudo-instructions. However, this was untested, and would
not obviously have worked for extending loads, and I'd rather re-add support
for that once it can be tested.

llvm-svn: 231982

9 years agoExtended support for native Windows C++ EH outlining
Andrew Kaylor [Wed, 11 Mar 2015 23:22:06 +0000 (23:22 +0000)]
Extended support for native Windows C++ EH outlining

Differential Review: http://reviews.llvm.org/D7886

llvm-svn: 231981

9 years agoRemove useMachineScheduler and replace it with subtarget options
Eric Christopher [Wed, 11 Mar 2015 22:56:10 +0000 (22:56 +0000)]
Remove useMachineScheduler and replace it with subtarget options
that control, individually, all of the disparate things it was
controlling.

At the same time move a FIXME in the Hexagon port to a new
subtarget function that will enable a user of the machine
scheduler to avoid using the source scheduler for pre-RA-scheduling.
The FIXME would have this removed, but involves either testcase
changes or adding -pre-RA-sched=source to a few testcases.

llvm-svn: 231980

9 years agoHave getCallPreservedMask and getThisCallPreservedMask take a
Eric Christopher [Wed, 11 Mar 2015 22:42:13 +0000 (22:42 +0000)]
Have getCallPreservedMask and getThisCallPreservedMask take a
MachineFunction argument so that we can grab subtarget specific
features off of it.

llvm-svn: 231979

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

llvm-svn: 231978

9 years agoOne more getCalleeSavedRegs prototype with nullptr.
Eric Christopher [Wed, 11 Mar 2015 22:24:37 +0000 (22:24 +0000)]
One more getCalleeSavedRegs prototype with nullptr.

llvm-svn: 231977

9 years agoDon't rely on the elf test suites inputs when testing the driver. We
Chandler Carruth [Wed, 11 Mar 2015 22:12:40 +0000 (22:12 +0000)]
Don't rely on the elf test suites inputs when testing the driver. We
already have a perfectly cromulent test archive in the driver inputs.

llvm-svn: 231976

9 years agoBe nicer to C90 environments and avoid the declaration of variables in for
Joerg Sonnenberger [Wed, 11 Mar 2015 22:06:53 +0000 (22:06 +0000)]
Be nicer to C90 environments and avoid the declaration of variables in for
header.

From Alexander Esilevich.

llvm-svn: 231975

9 years agoAdd the option, -info-plist to llvm-objdump used with -macho to print the
Kevin Enderby [Wed, 11 Mar 2015 22:06:32 +0000 (22:06 +0000)]
Add the option, -info-plist to llvm-objdump used with -macho to print the
Mach-O info plist section as strings.

llvm-svn: 231974

9 years agoMove the 'linker-script-test' binary to the tools directory.
Chandler Carruth [Wed, 11 Mar 2015 22:05:49 +0000 (22:05 +0000)]
Move the 'linker-script-test' binary to the tools directory.

The canonical LLVM directory arrangement places binaries in the 'utils/'
tree when they are used as part of building the project. For example,
the tblgen binaries are built out of 'utils/' trees.

Tools which are not used by any other part of the build, including
testing utilities, are just in the 'tools' directory. For example, in
Clang we have 'c-index-test' which is exactly the same kind of thing as
'linker-script-test'.

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

llvm-svn: 231973

9 years agoAlways include stddef.h to make sure size_t exists.
Joerg Sonnenberger [Wed, 11 Mar 2015 21:58:40 +0000 (21:58 +0000)]
Always include stddef.h to make sure size_t exists.

From Alexander Esilevich.

llvm-svn: 231972

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

llvm-svn: 231971

9 years agoHave getCalleeSavedRegs take a non-null MachineFunction all the
Eric Christopher [Wed, 11 Mar 2015 21:41:28 +0000 (21:41 +0000)]
Have getCalleeSavedRegs take a non-null MachineFunction all the
time. The target independent code was passing in one all the
time and targets weren't checking validity before using. Update
a few calls to pass in a MachineFunction where necessary.

llvm-svn: 231970

9 years agoConstify AArch64CollectLOH.cpp. NFC
Pete Cooper [Wed, 11 Mar 2015 21:40:25 +0000 (21:40 +0000)]
Constify AArch64CollectLOH.cpp.  NFC

llvm-svn: 231969

9 years agoFix a comparison function to actually be a SWO so that it conforms to
Chandler Carruth [Wed, 11 Mar 2015 21:34:33 +0000 (21:34 +0000)]
Fix a comparison function to actually be a SWO so that it conforms to
the spec required by std::sort and friends.

Ordering things this way also dramatically simplifies the code as
short-circuit ensures we can skip all of the negative tests.

I've left one FIXME where we're establishing a fairly arbitrary
ordering. Previously, the function compared all types as equal except
for the ones it explicitly handled, but it didn't delegate correctly to
the atomflags when doing so, and so it would fail to be a SWO. The two
possible fixes are to stop comparing the atom flags entirely, or to
establish some arbitrary ordering of the types.

Since it was pure luck which ordering of unequal types we ended up with
previously (the caller was std::sort, not std::stable_sort) I chose to
make the ordering explicit and guaranteed. This seems like the best
conservative approach as I suspect we would want to switch to
stable_sort otherwise in order to have deterministic output.

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

llvm-svn: 231968

9 years agoRevert "[dsymutil] Gather function ranges during DIE selection."
Frederic Riss [Wed, 11 Mar 2015 21:17:41 +0000 (21:17 +0000)]
Revert "[dsymutil] Gather function ranges during DIE selection."

This reverts commit r231957.

IntervalMap currently doesn't support keys more aligned than host pointers
and I've been using it with uint64_t keys. This asserts on some 32bits
systems.

Revert while I work on an IntervalMap generalization.

llvm-svn: 231967

9 years agoInitialize ProcessGDBRemoteLog for LLGS to fix remote platform logging
Robert Flack [Wed, 11 Mar 2015 21:14:22 +0000 (21:14 +0000)]
Initialize ProcessGDBRemoteLog for LLGS to fix remote platform logging

This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly.

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

llvm-svn: 231966

9 years agoRefactor float to integer conversion to share the same code.
Joerg Sonnenberger [Wed, 11 Mar 2015 21:13:56 +0000 (21:13 +0000)]
Refactor float to integer conversion to share the same code.
80bit Intel/PPC long double is excluded due to lacking support
for the abstraction. Consistently provide saturation logic.
Extend to long double on 128bit IEEE extended platforms.

Initial patch with test cases from GuanHong Liu.
Reviewed by Steve Canon.

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

llvm-svn: 231965

9 years agoReduce the number of components initialized for LLGS further.
Robert Flack [Wed, 11 Mar 2015 20:35:05 +0000 (20:35 +0000)]
Reduce the number of components initialized for LLGS further.

In http://reviews.llvm.org/D7880 the initialization for LLGS was separated out so that LLGS could initialize only the components it needs to. This further reduces the set of components initialized for LLGS.

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

llvm-svn: 231964

9 years ago[mips][microMIPS] Make usage of NOT16 by code generator
Jozef Kolek [Wed, 11 Mar 2015 20:28:31 +0000 (20:28 +0000)]
[mips][microMIPS] Make usage of NOT16 by code generator

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

llvm-svn: 231963

9 years agoadd CHECK-LABELs for better reliability
Sanjay Patel [Wed, 11 Mar 2015 20:12:07 +0000 (20:12 +0000)]
add CHECK-LABELs for better reliability

llvm-svn: 231962

9 years agoPut jump tables in unique sections on COFF.
Rafael Espindola [Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)]
Put jump tables in unique sections on COFF.

If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.

Instead, put the jump table in a unique section that is associated with the
function.

llvm-svn: 231961

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

llvm-svn: 231960

9 years agoARM: simplify and extend byval handling
Tim Northover [Wed, 11 Mar 2015 18:54:22 +0000 (18:54 +0000)]
ARM: simplify and extend byval handling

The main issue being fixed here is that APCS targets handling a "byval align N"
parameter with N > 4 were miscounting what objects were where on the stack,
leading to FrameLowering setting the frame pointer incorrectly and clobbering
the stack.

But byval handling had grown over many years, and had multiple layers of cruft
trying to compensate for each other and calculate padding correctly. This only
really needs to be done once, in the HandleByVal function. Elsewhere should
just do what it's told by that call.

I also stripped out unnecessary APCS/AAPCS distinctions (now that Clang emits
byvals with the correct C ABI alignment), which simplified HandleByVal.

rdar://20095672

llvm-svn: 231959

9 years ago[dsymutil] Add missing headers.
Frederic Riss [Wed, 11 Mar 2015 18:46:01 +0000 (18:46 +0000)]
[dsymutil] Add missing headers.

No build failure, found by code inspection.

llvm-svn: 231958

9 years ago[dsymutil] Gather function ranges during DIE selection.
Frederic Riss [Wed, 11 Mar 2015 18:45:59 +0000 (18:45 +0000)]
[dsymutil] Gather function ranges during DIE selection.

Gather the function ranges [low_pc, high_pc) during DIE selection and
store them along with the offset to apply to them to get the linked
addresses.

This is just the data collection part, it comes with no tests. That
information will be used in multiple followup commits to perform the
relocation of line tables and range sections among other things, and
these commits will add tests.

llvm-svn: 231957

9 years ago[dsymutil] Small clang-format patch.
Frederic Riss [Wed, 11 Mar 2015 18:45:57 +0000 (18:45 +0000)]
[dsymutil] Small clang-format patch.

llvm-svn: 231956

9 years ago[dsymutil] Correctly clone address attributes.
Frederic Riss [Wed, 11 Mar 2015 18:45:52 +0000 (18:45 +0000)]
[dsymutil] Correctly clone address attributes.

DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.

llvm-svn: 231955

9 years agoRemove the need to cache the subtarget in the R600 TargetRegisterInfo
Eric Christopher [Wed, 11 Mar 2015 18:43:21 +0000 (18:43 +0000)]
Remove the need to cache the subtarget in the R600 TargetRegisterInfo
classes.

llvm-svn: 231954

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

llvm-svn: 231953

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

llvm-svn: 231952

9 years agoHave getRegPressureSetLimit take a MachineFunction so that a
Eric Christopher [Wed, 11 Mar 2015 18:34:58 +0000 (18:34 +0000)]
Have getRegPressureSetLimit take a MachineFunction so that a
we can inspect the subtarget and function when computing values.

llvm-svn: 231951

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

llvm-svn: 231950

9 years agoPass a process full executable path within "name" response field.
Oleksiy Vyalov [Wed, 11 Mar 2015 18:13:37 +0000 (18:13 +0000)]
Pass a process full executable path within "name" response field.

http://reviews.llvm.org/D8239

llvm-svn: 231949

9 years agoInstCombine: Don't fold call bitcast into args if callee is byval
David Majnemer [Wed, 11 Mar 2015 18:03:05 +0000 (18:03 +0000)]
InstCombine: Don't fold call bitcast into args if callee is byval

This fixes a bug reported here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150309/265341.html

llvm-svn: 231948

9 years ago[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed...
Timur Iskhodzhanov [Wed, 11 Mar 2015 17:47:10 +0000 (17:47 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to QueueUserWorkItem

llvm-svn: 231947

9 years agoUpdated with list of possible improvements we are tracking internally
Kit Barton [Wed, 11 Mar 2015 17:43:43 +0000 (17:43 +0000)]
Updated with list of possible improvements we are tracking internally

llvm-svn: 231946

9 years agoAdd the "vbroadcasti128" instruction back.
Juergen Ributzka [Wed, 11 Mar 2015 17:29:03 +0000 (17:29 +0000)]
Add the "vbroadcasti128" instruction back.

This is a follow-up to r231182. This adds the "vbroadcasti128" instruction
back, but without the intrinsic mapping. Also add a test to check the
instriction encoding.

This is related to rdar://problem/18742778.

llvm-svn: 231945

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

llvm-svn: 231942

9 years ago[clang-tidy] Static Analyzer checker configuration options pass-through.
Gabor Horvath [Wed, 11 Mar 2015 17:25:22 +0000 (17:25 +0000)]
[clang-tidy] Static Analyzer checker configuration options pass-through.

Reviewed by: Alexander Kornienko

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

llvm-svn: 231941

9 years agoFix ctype_byname<wchar_t>::do_is() mask checking.... again
Jonathan Roelofs [Wed, 11 Mar 2015 17:00:28 +0000 (17:00 +0000)]
Fix ctype_byname<wchar_t>::do_is() mask checking.... again

This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.

http://reviews.llvm.org/D8237

llvm-svn: 231940

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

llvm-svn: 231939

9 years ago[clang-tidy] Clean up misc-use-override warning. NFC
Alexander Kornienko [Wed, 11 Mar 2015 16:47:27 +0000 (16:47 +0000)]
[clang-tidy] Clean up misc-use-override warning. NFC

llvm-svn: 231938

9 years agoDisable cat*() on CloudABI. Also make tiny cleanups.
Ed Schouten [Wed, 11 Mar 2015 16:39:36 +0000 (16:39 +0000)]
Disable cat*() on CloudABI. Also make tiny cleanups.

On a new platform that I am working on
(https://github.com/NuxiNL/cloudlibc) I am not implementing the
cat{open,close,gets}() API, just like Android, Newlib, etc.

Instead of adding yet another operating system name to the #ifs,
introduce _LIBCPP_HAS_CATOPEN in include/__config. Also adjust the code
to only pull in nl_types.h when _LIBCPP_HAS_CATOPEN is set. We only
needed this header for the cat*() API.

Differential Revision: http://reviews.llvm.org/D8163
Reviewed by: marshall

llvm-svn: 231937

9 years agoAdd a CODE_OWNERS.txt file to LLDB.
Zachary Turner [Wed, 11 Mar 2015 16:26:46 +0000 (16:26 +0000)]
Add a CODE_OWNERS.txt file to LLDB.

llvm-svn: 231936

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

llvm-svn: 231935

9 years agoMake NaCl's use of .init_array for static constructors match Linux
Derek Schuff [Wed, 11 Mar 2015 16:16:09 +0000 (16:16 +0000)]
Make NaCl's use of .init_array for static constructors match Linux

Summary:
The generic ELF TargetObjectFile defaults to .ctors, but Linux's
defaults to .init_array by calling InitializeELF with the value of
UseInitArray from TargetMachine. Make NaCl's behavior match.

Reviewers: jvoung
Differential Revision: http://reviews.llvm.org/D8240

llvm-svn: 231934

9 years agoWrap in __MINGW32__ to avoid warnings from msvc.
Benjamin Kramer [Wed, 11 Mar 2015 16:09:02 +0000 (16:09 +0000)]
Wrap in __MINGW32__ to avoid warnings from msvc.

llvm-svn: 231933

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

llvm-svn: 231932

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

Phabricator review: http://reviews.llvm.org/D8041

llvm-svn: 231931

9 years agoAdd missing namespace specifier for MSVC.
Benjamin Kramer [Wed, 11 Mar 2015 15:53:24 +0000 (15:53 +0000)]
Add missing namespace specifier for MSVC.

llvm-svn: 231930

9 years agoRtlCaptureContext is absent from the mingw32 headers, provide a prototype.
Benjamin Kramer [Wed, 11 Mar 2015 15:41:15 +0000 (15:41 +0000)]
RtlCaptureContext is absent from the mingw32 headers, provide a prototype.

llvm-svn: 231929

9 years agoLinkerScript: Add parsing of the MEMORY command
Meador Inge [Wed, 11 Mar 2015 15:34:44 +0000 (15:34 +0000)]
LinkerScript: Add parsing of the MEMORY command

This patch implements parsing of the GNU ld MEMORY command [1].
The command and the memory block definitions are parsed as
specified (including the slightly strange "o" and "l" keywords).
Evaluation will be added at a later point in time.

[1] https://sourceware.org/binutils/docs-2.25/ld/MEMORY.html

llvm-svn: 231928

9 years agoInliner should not add callgraph edges for intrinsic calls (PR22857)
Sanjay Patel [Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)]
Inliner should not add callgraph edges for intrinsic calls (PR22857)

The CallGraphNode function "addCalledFunction()" asserts that edges are not to intrinsics.

This patch makes sure that the Inliner does not add such an edge to the callgraph.

Fix for clang crash by assertion: https://llvm.org/bugs/show_bug.cgi?id=22857

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

llvm-svn: 231927

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

llvm-svn: 231926

9 years agoRevert "[CMake] Don't pass in MSVC warning flags as definitions"
Greg Bedwell [Wed, 11 Mar 2015 14:57:48 +0000 (14:57 +0000)]
Revert "[CMake] Don't pass in MSVC warning flags as definitions"

reverting while I investigate why it broke the sanitizer-windows build.
This reverts commit r231924.

llvm-svn: 231925

9 years ago[CMake] Don't pass in MSVC warning flags as definitions
Greg Bedwell [Wed, 11 Mar 2015 14:26:29 +0000 (14:26 +0000)]
[CMake] Don't pass in MSVC warning flags as definitions

NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.

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

llvm-svn: 231924

9 years agoPrefer pipes over temporary files in a feeble attempt to stabilize this test on windows.
Benjamin Kramer [Wed, 11 Mar 2015 13:55:41 +0000 (13:55 +0000)]
Prefer pipes over temporary files in a feeble attempt to stabilize this test on windows.

llvm-svn: 231923

9 years agoRefactor GdbRemote test cases to support remote platforms
Tamas Berghammer [Wed, 11 Mar 2015 13:51:07 +0000 (13:51 +0000)]
Refactor GdbRemote test cases to support remote platforms

Previously these test cases execute lldb-server on the host and run the
tests against it even if a remote platform was specified. With this CL
these tests always test the communication with an lldb-server instance
running on the target.

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

llvm-svn: 231922

9 years agoFix too short title underline reported by build-bot.
Dan Liew [Wed, 11 Mar 2015 13:34:49 +0000 (13:34 +0000)]
Fix too short title underline reported by build-bot.

llvm-svn: 231921

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

llvm-svn: 231920

9 years agoRelax CHECK to match mips syntax.
Rafael Espindola [Wed, 11 Mar 2015 12:48:24 +0000 (12:48 +0000)]
Relax CHECK to match mips syntax.

llvm-svn: 231919

9 years agoMove MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)
Ilia K [Wed, 11 Mar 2015 12:28:48 +0000 (12:28 +0000)]
Move MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)

llvm-svn: 231918

9 years agoFix build on Windows (PATH_MAX was undefined) after r231858
Ilia K [Wed, 11 Mar 2015 11:24:10 +0000 (11:24 +0000)]
Fix build on Windows (PATH_MAX was undefined) after r231858

llvm-svn: 231917

9 years agoAVX-512: Added SKX forms of shift instructions.
Elena Demikhovsky [Wed, 11 Mar 2015 10:25:42 +0000 (10:25 +0000)]
AVX-512: Added SKX forms of shift instructions.
Added rotation instructions, encoding only.
Added encoding tests for all these forms.

llvm-svn: 231916

9 years agoFix bug in ProcessGDBRemote
Pavel Labath [Wed, 11 Mar 2015 09:53:42 +0000 (09:53 +0000)]
Fix bug in ProcessGDBRemote

Summary:
ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main
thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to
StopAsyncThread, after the join.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 231915

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

llvm-svn: 231914

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

llvm-svn: 231913

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

llvm-svn: 231912

9 years agoNow that r231902's test is executed, make it actually pass
Justin Bogner [Wed, 11 Mar 2015 08:17:25 +0000 (08:17 +0000)]
Now that r231902's test is executed, make it actually pass

As of r231908, the test I added in r231902 actually gets run - but I'd
checked in a stale version of the input so it didn't pass. Fix the
input and un-xfail the test.

llvm-svn: 231911

9 years agoFix another verifier crash where a GC intrinsic would look at the internals of anothe...
Owen Anderson [Wed, 11 Mar 2015 06:57:30 +0000 (06:57 +0000)]
Fix another verifier crash where a GC intrinsic would look at the internals of another intrinsic in order to verify itself.

This causes a crash if the referenced intrinsic was malformed.  In this case, we
would already have reported an error on the referenced intrinsic, but then
crashed on the second one when it tried to introspect the first without
error checking.

llvm-svn: 231910

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

llvm-svn: 231909

9 years agoMake test added in r231902 actually be executed.
Daniel Jasper [Wed, 11 Mar 2015 06:44:51 +0000 (06:44 +0000)]
Make test added in r231902 actually be executed.

There were also errors in the CHECK line which I fixed and the test
doesn't actually pass as the "100" is in the wrong line. Not sure
whether this is a test failure or a coverage failure so making the test
XFAIL for now.

llvm-svn: 231908

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

llvm-svn: 231907