platform/upstream/llvm.git
9 years agomath: Add ldexp implementation
Tom Stellard [Wed, 6 May 2015 20:53:32 +0000 (20:53 +0000)]
math: Add ldexp implementation

Signed-off-by: Aaron Watry <awatry@gmail.com>
Tom Stellard:
  - Add denormal handling.
  - Share vectorization code with r600 implementation.

Patch By: Aaron Watry

llvm-svn: 236639

9 years agoImplement ldexp for R600/SI
Tom Stellard [Wed, 6 May 2015 20:53:29 +0000 (20:53 +0000)]
Implement ldexp for R600/SI

llvm-svn: 236638

9 years ago[sanitizer] Extend sancov.py to show which PCs are missing from coverage.
Sergey Matveev [Wed, 6 May 2015 20:48:29 +0000 (20:48 +0000)]
[sanitizer] Extend sancov.py to show which PCs are missing from coverage.

Example usage:

sancov.py print a.out.1234.sancov | sancov.py missing a.out

llvm-svn: 236637

9 years agoSkip additional lldb-mi tests that failed on FreeBSD
Ed Maste [Wed, 6 May 2015 20:42:03 +0000 (20:42 +0000)]
Skip additional lldb-mi tests that failed on FreeBSD

llvm-svn: 236636

9 years agoCodeGen: move over-zealous assert into actual if statement.
Tim Northover [Wed, 6 May 2015 20:07:38 +0000 (20:07 +0000)]
CodeGen: move over-zealous assert into actual if statement.

It's quite possible to encounter an insertvalue instruction that's more deeply
nested than the value we're looking for, but when that happens we really
mustn't compare beyond the end of the index array.

Since I couldn't see any guarantees about what comparisons std::equal makes, we
probably need to directly check the size beforehand. In practice, I suspect
most std::equal implementations would probably bail early, which would be OK.
But just in case...

rdar://20834485

llvm-svn: 236635

9 years agoD7631: added regression tests for hinted locks - to be integrated into testsuite.
Andrey Churbanov [Wed, 6 May 2015 19:40:54 +0000 (19:40 +0000)]
D7631: added regression tests for hinted locks - to be integrated into testsuite.

llvm-svn: 236632

9 years agoD9302.partial2: cleanup of ittnotify checks, that eliminats redundant notifications...
Andrey Churbanov [Wed, 6 May 2015 19:22:36 +0000 (19:22 +0000)]
D9302.partial2: cleanup of ittnotify checks, that eliminats redundant notifications in case of nested regions.

llvm-svn: 236631

9 years agoclang-format: Don't indent 'signals' as access specifier if it isn't one
Daniel Jasper [Wed, 6 May 2015 19:21:23 +0000 (19:21 +0000)]
clang-format: Don't indent 'signals' as access specifier if it isn't one

Before:
  {
  signals.set(0);
  }

After:
  {
    signals.set(0);
  }

llvm-svn: 236630

9 years agoDwarfDebug: Emit number of bytes in .debug_loc entry directly
Duncan P. N. Exon Smith [Wed, 6 May 2015 19:11:20 +0000 (19:11 +0000)]
DwarfDebug: Emit number of bytes in .debug_loc entry directly

Emit the number of bytes in a `.debug_loc` entry directly.  The old code
created temp labels (expensive), emitted the difference between them,
and then emitted one on each side of the relevant bytes.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`
(the optimized version of ld64's `-save-temps` when linking the
`verify-uselistorder` executable in an LTO bootstrap).  I've hacked
`MCContext::Allocate()` to just call `malloc()` instead of using the
`BumpPtrAllocator` so that the heap profile is easier to read.  As far
as peak memory is concerned, `MCContext::Allocate()` is equivalent to a
leak, since it only gets freed at process teardown.

In my heap profile, this patch drops memory usage of
`DwarfDebug::emitDebugLoc()` from 132.56 MB (11.4%) down to 29.86 MB
(2.7%) at peak memory.  Some of that must be noise from `SmallVector`
(or other) allocations -- peak memory only dropped from 1160 MB down to
1100 MB -- but this nevertheless shaves 5% off the top.)

llvm-svn: 236629

9 years ago[asan] Fall back to /proc/$PID/maps on Android L.
Evgeniy Stepanov [Wed, 6 May 2015 18:55:31 +0000 (18:55 +0000)]
[asan] Fall back to /proc/$PID/maps on Android L.

dl_iterate_phdr is somewhat broken in L (see the code for details).
We add runtime OS version detection and fallback to /proc/maps on L or earlier.
This fixes a number of ASan tests on L.

llvm-svn: 236628

9 years agoImplement `createSanitizerCtor`, common helper function for all sanitizers
Ismail Pazarbasi [Wed, 6 May 2015 18:48:22 +0000 (18:48 +0000)]
Implement `createSanitizerCtor`, common helper function for all sanitizers

Summary:
This helper function creates a ctor function, which calls sanitizer's
init function with given arguments. This constructor is then expected
to be added to module's ctors. The patch helps unifying how sanitizer
constructor functions are created, and how init functions are called
across all sanitizers.

Reviewers: kcc, samsonov

Subscribers: llvm-commits

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

llvm-svn: 236627

9 years ago[WinEH] Improve fatal error message about failed demotion
Reid Kleckner [Wed, 6 May 2015 18:45:24 +0000 (18:45 +0000)]
[WinEH] Improve fatal error message about failed demotion

llvm-svn: 236626

9 years agoChanged option processing to implicitly use -x c++ if no other -x option specified...
John Thompson [Wed, 6 May 2015 18:43:01 +0000 (18:43 +0000)]
Changed option processing to implicitly use -x c++ if no other -x option specified.  Added implicit -w option to disable compilation warnings, in particular to avoid warning on pragma once.

llvm-svn: 236625

9 years agoFixed infinite recursion bug.
John Thompson [Wed, 6 May 2015 18:39:15 +0000 (18:39 +0000)]
Fixed infinite recursion bug.

llvm-svn: 236624

9 years agoD9302.partial: bug fix for ittnotify: added missed timing on hierarchical barrier.
Andrey Churbanov [Wed, 6 May 2015 18:34:15 +0000 (18:34 +0000)]
D9302.partial: bug fix for ittnotify: added missed timing on hierarchical barrier.

llvm-svn: 236623

9 years agoAllow the gdb_objc_realized_classes symbol to be
Sean Callanan [Wed, 6 May 2015 18:33:19 +0000 (18:33 +0000)]
Allow the gdb_objc_realized_classes symbol to be
any type of symbol, which is okay since we are
looking only in the Objective-C module.

<rdar://problem/20828139>

llvm-svn: 236622

9 years ago[driver] Cosmetic change to use Input instead of Inputs[0].
Artem Belevich [Wed, 6 May 2015 18:20:23 +0000 (18:20 +0000)]
[driver] Cosmetic change to use Input instead of Inputs[0].

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

llvm-svn: 236621

9 years agoDon't attempt DSym tests on Windows.
Adrian McCarthy [Wed, 6 May 2015 18:19:51 +0000 (18:19 +0000)]
Don't attempt DSym tests on Windows.

llvm-svn: 236620

9 years agoAdded missed symbol omp_in_final into include/module files.
Andrey Churbanov [Wed, 6 May 2015 18:13:52 +0000 (18:13 +0000)]
Added missed symbol omp_in_final into include/module files.

llvm-svn: 236619

9 years ago[SelectionDAG] Delete SelectionDAGBuilder::removeValue. NFC.
Sanjoy Das [Wed, 6 May 2015 18:02:10 +0000 (18:02 +0000)]
[SelectionDAG] Delete SelectionDAGBuilder::removeValue. NFC.

SelectionDAGBuilder::removeValue is dead now, after rL236563.

llvm-svn: 236618

9 years agoAllow 0-weight branches in BranchProbabilityInfo.
Diego Novillo [Wed, 6 May 2015 17:55:11 +0000 (17:55 +0000)]
Allow 0-weight branches in BranchProbabilityInfo.

Summary:
When computing branch weights in BPI, we used to disallow branches with
weight 0. This is a minor nuisance, because a branch with weight 0 is
different to "don't have information". In the context of
instrumentation, it may mean "never executed", in the context of
sampling, it means "never or seldom executed".

In allowing 0 weight branches, I ran into issues with the switch
expansion code in selection DAG. It is currently hardwired to not handle
branches with weight 0. To maintain the current behaviour, I changed it
to use 1 when it finds 0, but perhaps the algorithm needs changes to
tolerate branches with weight zero.

Reviewers: hansw

Subscribers: llvm-commits

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

llvm-svn: 236617

9 years agoittnotify: change default notification mode to 3, which includes parallel regions...
Andrey Churbanov [Wed, 6 May 2015 17:41:58 +0000 (17:41 +0000)]
ittnotify: change default notification mode to 3, which includes parallel regions, barriers + imbalance, loops, single regions reporting.

llvm-svn: 236616

9 years agoAdd missing dereferenceable_or_null getters
Sanjoy Das [Wed, 6 May 2015 17:41:54 +0000 (17:41 +0000)]
Add missing dereferenceable_or_null getters

Summary: Add missing dereferenceable_or_null getters required for
http://reviews.llvm.org/D9253 change. Separated from the D9253 review.

Patch by Artur Pilipenko!

Reviewers: sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 236615

9 years agoRestore TestRegisterVariables failure decorator for older Clang
Ed Maste [Wed, 6 May 2015 17:35:29 +0000 (17:35 +0000)]
Restore TestRegisterVariables failure decorator for older Clang

The @expectedFailureClang decorator was removed in r236447, but it
seems to be fixed only with Clang 3.5+.

llvm-svn: 236614

9 years ago[X86] Disable loop unrolling in loop vectorization pass when VF is 1.
Wei Mi [Wed, 6 May 2015 17:12:25 +0000 (17:12 +0000)]
[X86] Disable loop unrolling in loop vectorization pass when VF is 1.

The patch disabled unrolling in loop vectorization pass when VF==1 on x86 architecture,
by setting MaxInterleaveFactor to 1. Unrolling in loop vectorization pass may introduce
the cost of overflow check, memory boundary check and extra prologue/epilogue code when
regular unroller will unroll the loop another time. Disable it when VF==1 remove the
unnecessary cost on x86. The same can be done for other platforms after verifying
interleaving/memory bound checking to be not perf critical on those platforms.

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

llvm-svn: 236613

9 years agoAdd ChangeTo* to MachineOperand for symbols
Matt Arsenault [Wed, 6 May 2015 17:05:54 +0000 (17:05 +0000)]
Add ChangeTo* to MachineOperand for symbols

llvm-svn: 236612

9 years agoAdd bitcode test to verify functions can be materialized out of order.
Derek Schuff [Wed, 6 May 2015 16:52:35 +0000 (16:52 +0000)]
Add bitcode test to verify functions can be materialized out of order.

Summary:
Adds test to check that when getLazyBitcodeModule is called:
1) Functions are not materailzed by default.
2) Only the requested function gets materialized (if no block addresses
   are used).

Reviewers: jvoung, rafael

Reviewed By: rafael

Subscribers: llvm-commits

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

llvm-svn: 236611

9 years agoReadd the regression test from r236584. Calling convention fixed to linux.
Pawel Bylica [Wed, 6 May 2015 16:43:21 +0000 (16:43 +0000)]
Readd the regression test from r236584. Calling convention fixed to linux.

llvm-svn: 236610

9 years ago[ARM] Fast-Isel was incorrectly selecting <2 x double> adds.
Pete Cooper [Wed, 6 May 2015 16:39:17 +0000 (16:39 +0000)]
[ARM] Fast-Isel was incorrectly selecting <2 x double> adds.

With neon enabled, we reach SelectBinaryFPOp and are able to get registers for a <2 x double> add.

However, we shouldn't actually attempt arithmetic on it as ARMIselLowering says "v2f64 is legal so that QR subregs can be extracted as f64 elements, but neither Neon nor VFP support any arithmetic operations on it."

This commit disables SelectBinaryFPOp for any vector types.  There's already a FIXME to try handle neon.  Doing so would require fixing this conditional which isn't safe for vectors 'VT == MVT::f64 || VT == MVT::i64'

llvm-svn: 236609

9 years agoFix implementation of normalize builtin
Tom Stellard [Wed, 6 May 2015 16:06:31 +0000 (16:06 +0000)]
Fix implementation of normalize builtin

The new implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.

llvm-svn: 236608

9 years agoSimplify FuncUnwinders::GetEHFrameAugmentedUnwindPlan
Pavel Labath [Wed, 6 May 2015 15:54:48 +0000 (15:54 +0000)]
Simplify FuncUnwinders::GetEHFrameAugmentedUnwindPlan

Summary:
GetEHFrameAugmentedUnwindPlan duplicated the work of GetEHFrameUnwindPlan in getting the original
plan from DWARF CFI. This changes the function to call GetEHFrameUnwindPlan instead of doing all
the work itself. A copy constructor is added to UnwindPlan to enable plan copying.

Test Plan: No regressions on linux test suite.

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits

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

llvm-svn: 236607

9 years ago[PPC64LE] Adjust vector splats during VSX swap optimization
Bill Schmidt [Wed, 6 May 2015 15:40:46 +0000 (15:40 +0000)]
[PPC64LE] Adjust vector splats during VSX swap optimization

The initial code drop for VSX swap optimization permitted the
optimization only when all operations in a web of related computation
are lane-insensitive.  For some lane-sensitive operations, we can
still permit the optimization provided that we make adjustments to
those operations.  This patch adds special handling for vector splats
so that their presence doesn't kill the optimization.

Vector splats are lane-sensitive since they identify by number a
vector element to be used as the source of a splat.  When swap
optimizations take place, the desired vector element will move to the
opposite doubleword of the quadword vector.  We thus replace the index
I by (I + N/2) % N, where N is the number of elements in the vector.

A new test case is added to test that swap optimization succeeds when
vector splats are present, and that the proper input element is used
as the source of the splat.

An ancillary change removes SH_BUILDVEC as one of the kinds of special
handling that may be required by VSX swap optimization.  From
experience with GCC, I had expected to need some modifications for
vector build operations, but I did not find that to be the case.

llvm-svn: 236606

9 years ago[AArch64] Advertise that the __sync_*_compare_and_swap_1/2/4/8 builtins work
Reid Kleckner [Wed, 6 May 2015 15:31:46 +0000 (15:31 +0000)]
[AArch64] Advertise that the __sync_*_compare_and_swap_1/2/4/8 builtins work

Fixes PR23428, where std::thread in libstdc++ would go haywire without
these defines.

llvm-svn: 236605

9 years agoclang-format: Merge labels and subsequent semicolons.
Daniel Jasper [Wed, 6 May 2015 15:19:47 +0000 (15:19 +0000)]
clang-format: Merge labels and subsequent semicolons.

E.g.:

  default:;

This can be used to get around restrictions as to what can follow a
label. It fixes llvm.org/PR19648.

llvm-svn: 236604

9 years agoclang-format: Allow ternary expressions inside template parameters if
Daniel Jasper [Wed, 6 May 2015 14:53:50 +0000 (14:53 +0000)]
clang-format: Allow ternary expressions inside template parameters if
the template parameters aren't inside an expression context.

This fixes llvm.org/PR23270.

llvm-svn: 236603

9 years agoclang-format: Consider operator precedence as penalty when breaking
Daniel Jasper [Wed, 6 May 2015 14:23:38 +0000 (14:23 +0000)]
clang-format: Consider operator precedence as penalty when breaking
before operators.

This fixes llvm.org/23382.

llvm-svn: 236602

9 years agoReformat.
NAKAMURA Takumi [Wed, 6 May 2015 14:03:22 +0000 (14:03 +0000)]
Reformat.

llvm-svn: 236601

9 years agoRevert r236546, "propagate IR-level fast-math-flags to DAG nodes (NFC)"
NAKAMURA Takumi [Wed, 6 May 2015 14:03:12 +0000 (14:03 +0000)]
Revert r236546, "propagate IR-level fast-math-flags to DAG nodes (NFC)"

It caused undefined behavior.

llvm-svn: 236600

9 years agoclang-format: Accept slightly more record declarations.
Daniel Jasper [Wed, 6 May 2015 14:03:02 +0000 (14:03 +0000)]
clang-format: Accept slightly more record declarations.

This fixes llvm.org/PR23397.

llvm-svn: 236599

9 years agoclang-format: Fix bad wrapping of ObjC method exprs.
Daniel Jasper [Wed, 6 May 2015 13:13:03 +0000 (13:13 +0000)]
clang-format: Fix bad wrapping of ObjC method exprs.

Before:
  [aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa:
      aaaaaaaa aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa];

After:
  [aaaaaaaaaaaaaaaaaaaaaaaaa
      aaaaaaaaaaaaaaaaa:aaaaaaaa
                    aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa];

Note that this might now violate the column limit and we probably need an
alternative way of indenting these then. However, that is still strictly better
than the messy formatting that clang-format did before.

llvm-svn: 236598

9 years agoclang-format: Properly indent method calls without inputs.
Daniel Jasper [Wed, 6 May 2015 12:48:06 +0000 (12:48 +0000)]
clang-format: Properly indent method calls without inputs.

Before:
  [aaaaaaaaaaa
          aaaaaaa];

After:
  [aaaaaaaaaaa
      aaaaaaa];

llvm-svn: 236597

9 years ago[cmake] Remove two unused include paths
Tobias Grosser [Wed, 6 May 2015 12:28:23 +0000 (12:28 +0000)]
[cmake] Remove two unused include paths

These include paths are leftovers from times when we used GMP or an external
isl installation. They are not longer needed.

llvm-svn: 236596

9 years ago[NativeProcessLinux] Remove the post-stop lambda
Pavel Labath [Wed, 6 May 2015 12:22:37 +0000 (12:22 +0000)]
[NativeProcessLinux] Remove the post-stop lambda

Summary:
The lambda was always calling SetState(eStateStopped) with small variations, so I have inlined
the code. Given that we don't have the TSC anymore, I believe we don't need to be so generic.

The only major change here is the way we choose a stop reason thread when we're interrupting a
program on client request. Previously, we were setting a null stop reason for all threads and
then fixing up the reason for one victim thread in the lambda. Now, I make sure the stop reason
is set for the victim thread correctly in the first place.

I also take the opportunity to rename CallAfter* functions into something more appropriate.

Test Plan: All tests continue to pass.

Reviewers: chaoren, vharron

Subscribers: lldb-commits

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

llvm-svn: 236595

9 years agoRemove deprecated version of reformat.
Manuel Klimek [Wed, 6 May 2015 12:12:22 +0000 (12:12 +0000)]
Remove deprecated version of reformat.

llvm-svn: 236594

9 years agoReplace two naked references of 'std::' with the macro '_VSTD::'. No functionality...
Marshall Clow [Wed, 6 May 2015 12:11:22 +0000 (12:11 +0000)]
Replace two naked references of 'std::' with the macro '_VSTD::'. No functionality change.

llvm-svn: 236593

9 years agoclang-format: Don't allow -i when reading from stdin.
Daniel Jasper [Wed, 6 May 2015 11:56:54 +0000 (11:56 +0000)]
clang-format: Don't allow -i when reading from stdin.

llvm-svn: 236592

9 years agoRemove all computation of structural errors in clang-format's line parser.
Manuel Klimek [Wed, 6 May 2015 11:56:29 +0000 (11:56 +0000)]
Remove all computation of structural errors in clang-format's line parser.

We were already ignoring those already.

llvm-svn: 236591

9 years ago[ARM] generate VMAXNM/VMINNM for a compare followed by a select, in safe math mode too
Artyom Skrobov [Wed, 6 May 2015 11:44:10 +0000 (11:44 +0000)]
[ARM] generate VMAXNM/VMINNM for a compare followed by a select, in safe math mode too

llvm-svn: 236590

9 years agoclang-format: Fix another assertion discovered by the fuzzer.
Daniel Jasper [Wed, 6 May 2015 11:16:43 +0000 (11:16 +0000)]
clang-format: Fix another assertion discovered by the fuzzer.

In the process, fix an old todo that I don't really know how to write
tests for. The problem is that Clang's lexer creates very strange token
sequences for these. However, the new approach seems generally better
and easier to read so I am submitting it nonetheless.

llvm-svn: 236589

9 years agoLiboffload: Patch for MPSS > 3.4.x (provided by Tim Cramer)
Andrey Churbanov [Wed, 6 May 2015 10:58:40 +0000 (10:58 +0000)]
Liboffload: Patch for MPSS > 3.4.x (provided by Tim Cramer)

llvm-svn: 236588

9 years ago[NativeProcessLinux] fold ThreadStateCoordinator into NPL
Pavel Labath [Wed, 6 May 2015 10:46:34 +0000 (10:46 +0000)]
[NativeProcessLinux] fold ThreadStateCoordinator into NPL

Summary:
Since all TSC operations are now executed synchronously, TSC has become a little more than a
messenger between different parts of NativeProcessLinux. Therefore, the reason for its existance
has disappeared.

This commit moves the contents of the TSC into the NPL class. This will enable us to remove all
the boilerplate code in NPL (as it stands now, this is most of the class), which I plan to do in
subsequent commits.

Unfortunately, this also means we will lose the unit tests for the TSC. However, since the size
of the TSC has diminished, the unit tests were not testing much at this point anyway, so it's not
a big loss.

No functional change.

Test Plan: All tests continue to pass.

Reviewers: vharron, chaoren

Subscribers: lldb-commits

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

llvm-svn: 236587

9 years agoRevert regression test from r236584.
Pawel Bylica [Wed, 6 May 2015 10:41:46 +0000 (10:41 +0000)]
Revert regression test from r236584.

Temporary remove a regression test added in r236584. It fails on Windows.

llvm-svn: 236586

9 years agoFix libunwind to build on FreeBSD
Viktor Kutuzov [Wed, 6 May 2015 10:32:28 +0000 (10:32 +0000)]
Fix libunwind to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D9272

llvm-svn: 236585

9 years agoSelectionDAG: Handle out-of-bounds index in extract vector element
Pawel Bylica [Wed, 6 May 2015 10:19:14 +0000 (10:19 +0000)]
SelectionDAG: Handle out-of-bounds index in extract vector element

Summary: This patch correctly handles undef case of EXTRACT_VECTOR_ELT node where the element index is constant and not less than vector size.

Test Plan:
CodeGen for X86 test included.
Also one incorrect regression test fixed.

Reviewers: qcolombet, chandlerc, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

llvm-svn: 236584

9 years agoAdd iterators for the ArrayInfo objects of the scop
Tobias Grosser [Wed, 6 May 2015 10:05:20 +0000 (10:05 +0000)]
Add iterators for the ArrayInfo objects of the scop

This patch also changes the implementation of the ArrayInfoMap to a MapVector
which will ensure that iterating over the list of ArrayInfo objects gives
predictable results. The single loop that currently enumerates the ArrayInfo
objects only frees the individual objectes, hence a possibly changing
iteration order does not affect the outcome. The added robustness is for
future users of this interface.

llvm-svn: 236583

9 years ago[Msan] Fix the mmap_below_shadow.cc test to pass on FreeBSD
Viktor Kutuzov [Wed, 6 May 2015 09:31:33 +0000 (09:31 +0000)]
[Msan] Fix the mmap_below_shadow.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9462

llvm-svn: 236582

9 years ago[Msan] Fix the ioctl_custom.cc test to pass on FreeBSD
Viktor Kutuzov [Wed, 6 May 2015 09:28:48 +0000 (09:28 +0000)]
[Msan] Fix the ioctl_custom.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9459

llvm-svn: 236581

9 years ago[Msan] Fix the initgroups.cc test to build on FreeBSD
Viktor Kutuzov [Wed, 6 May 2015 09:26:35 +0000 (09:26 +0000)]
[Msan] Fix the initgroups.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D9458

llvm-svn: 236580

9 years ago[Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD
Viktor Kutuzov [Wed, 6 May 2015 09:24:02 +0000 (09:24 +0000)]
[Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9457

llvm-svn: 236579

9 years agoclang-format: Prevent assertion discovered by fuzzer.
Daniel Jasper [Wed, 6 May 2015 08:58:57 +0000 (08:58 +0000)]
clang-format: Prevent assertion discovered by fuzzer.

llvm-svn: 236578

9 years agoclang-format: Prevent exponential runtime in token annotator.
Daniel Jasper [Wed, 6 May 2015 08:38:24 +0000 (08:38 +0000)]
clang-format: Prevent exponential runtime in token annotator.

llvm-svn: 236577

9 years ago[ThreadStateCoordinator] Remove Event classes
Pavel Labath [Wed, 6 May 2015 08:23:47 +0000 (08:23 +0000)]
[ThreadStateCoordinator] Remove Event classes

Summary:
This is a cleanup patch for thread state coordinator. After making processing of all events
synchronous, there is no need to have a a separate class for each event. I have moved back
processing of all events back into the TSC class. No functional change.

Test Plan: All tests continue to pass.

Reviewers: chaoren, vharron

Subscribers: lldb-commits

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

llvm-svn: 236576

9 years ago[DomTree] verifyDomTree to unconditionally perform DT verification
Adam Nemet [Wed, 6 May 2015 08:18:41 +0000 (08:18 +0000)]
[DomTree] verifyDomTree to unconditionally perform DT verification

I folded the check for the flag -verify-dom-info into the only caller
where I think it is supposed to be checked: verifyAnalysis.  (The idea
of the flag is to enable this expensive verification in
verifyPreservedAnalysis.)

I'm assuming that when manually scheduling the verification pass
with -passes=verify<domtree>, we do want to perform the verification.

llvm-svn: 236575

9 years ago[OPENMP] Fixed messages about predetermined DSA for loop control variables.
Alexey Bataev [Wed, 6 May 2015 07:25:08 +0000 (07:25 +0000)]
[OPENMP] Fixed messages about predetermined DSA for loop control variables.

llvm-svn: 236574

9 years agoclang-format: Fix bug in multiline comment wrapping.
Daniel Jasper [Wed, 6 May 2015 07:17:22 +0000 (07:17 +0000)]
clang-format: Fix bug in multiline comment wrapping.

Splitting:
  /**
   * multiline block comment
   *
   */

Before:
  /**
   * multiline block
   *comment
   *
   */

After:
  /**
   * multiline block
   * comment
   *
   */

The reason was that the empty line inside the comment (with just the "*") was
confusing the comment breaking logic.

llvm-svn: 236573

9 years ago[ASan][MIPS] Fix null_deref.cc test on MIPS64
Sagar Thakur [Wed, 6 May 2015 06:53:09 +0000 (06:53 +0000)]
[ASan][MIPS] Fix null_deref.cc test on MIPS64

Symbol for pc used in ucontext->uc_mcontext was wrong.

Reviewers: dsanders, kcc, samsonov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential Revision: http://reviews.llvm.org/D9246

llvm-svn: 236572

9 years ago[OPENMP] Fix for http://llvm.org/PR23387: clang fails to compile magick/attribute.c
Alexey Bataev [Wed, 6 May 2015 06:34:55 +0000 (06:34 +0000)]
[OPENMP] Fix for llvm.org/PR23387: clang fails to compile magick/attribute.c

Allow to use variables with 'register' storage class as loop control variables in OpenMP loop based constructs.

llvm-svn: 236571

9 years ago[sanitizer][MIPS] Implement clone for MIPS
Sagar Thakur [Wed, 6 May 2015 05:38:21 +0000 (05:38 +0000)]
[sanitizer][MIPS] Implement clone for MIPS

Reviewers: kcc, samsonov, earthdok
Subscribers: dsanders, jaydeep, Anand.Takale, mohit.bhakkad, llvm-commits
Differential Revision: http://reviews.llvm.org/D8318

llvm-svn: 236570

9 years ago[ARM][FastISel] Use TST #1 instead of CMP #0 for select.
Ahmed Bougacha [Wed, 6 May 2015 04:14:02 +0000 (04:14 +0000)]
[ARM][FastISel] Use TST #1 instead of CMP #0 for select.

Since r234249, i1 are sext instead of zext; because of that, doing
"CMP rN, #0; IT EQ/NE" isn't correct anymore.

"TST #1" is the conservatively correct alternative - the tradeoff being
that it doesn't have a 16-bit encoding -, so use that instead.

llvm-svn: 236569

9 years ago[Statepoints] Remove broken test case.
Sanjoy Das [Wed, 6 May 2015 02:51:46 +0000 (02:51 +0000)]
[Statepoints] Remove broken test case.

statepoint-indirect-return.ll breaks on linux systems.  Delete the test
case to make the bots green while I figure out what the right fix is.

llvm-svn: 236568

9 years ago[IRBuilder] Fix indentation. NFC.
Sanjoy Das [Wed, 6 May 2015 02:36:34 +0000 (02:36 +0000)]
[IRBuilder] Fix indentation.  NFC.

Whitespace-only change.

llvm-svn: 236567

9 years ago[Statepoint] Clean up StatepointLowering: symbolic constants.
Sanjoy Das [Wed, 6 May 2015 02:36:31 +0000 (02:36 +0000)]
[Statepoint] Clean up StatepointLowering: symbolic constants.

For accessors in the `Statepoint` class, use symbolic constants for
offsets into the argument vector instead of literals.  This makes the
code intent clearer and simpler to change.

llvm-svn: 236566

9 years ago[Statepoint] Clean up Statepoint.h: clang-format.
Sanjoy Das [Wed, 6 May 2015 02:36:28 +0000 (02:36 +0000)]
[Statepoint] Clean up Statepoint.h: clang-format.

llvm-svn: 236565

9 years ago[Statepoint] Clean up Statepoint.h: accessor names.
Sanjoy Das [Wed, 6 May 2015 02:36:26 +0000 (02:36 +0000)]
[Statepoint] Clean up Statepoint.h: accessor names.

Use getFoo() as accessors consistently and some other naming changes.

llvm-svn: 236564

9 years ago[StatepointLowering] Don't create temporary instructions. NFCI.
Sanjoy Das [Wed, 6 May 2015 02:36:20 +0000 (02:36 +0000)]
[StatepointLowering] Don't create temporary instructions.  NFCI.

Summary:
Instead of creating a temporary call instruction and lowering that, use
SelectionDAGBuilder::lowerCallOperands.

Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 236563

9 years agoRevert "[analyzer] scan-build: support spaces in compiler path and arguments."
Ahmed Bougacha [Wed, 6 May 2015 02:08:27 +0000 (02:08 +0000)]
Revert "[analyzer] scan-build: support spaces in compiler path and arguments."

This reverts commit r236423 and its followup r236533, as indiscriminate
quoting makes for too much quoting (and clang doesn't like both '"-c"'
and -D"FOO=bar").

llvm-svn: 236562

9 years ago[WinEH] Reset WinEHPrepare::SEHExceptionCodeSlot when we're done.
Ahmed Bougacha [Wed, 6 May 2015 01:28:58 +0000 (01:28 +0000)]
[WinEH] Reset WinEHPrepare::SEHExceptionCodeSlot when we're done.

This caused a use-after-free on test/CodeGen/X86/win32-eh.ll
No functional change intended.

llvm-svn: 236561

9 years agoUpdate gdbremote_testcase to accomodate new adb:// scheme.
Chaoren Lin [Wed, 6 May 2015 01:28:04 +0000 (01:28 +0000)]
Update gdbremote_testcase to accomodate new adb:// scheme.

Reviewers: chying, ovyalov

Reviewed By: chying, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 236560

9 years ago[asan] Fix dynamic-runtime tests.
Evgeniy Stepanov [Wed, 6 May 2015 00:29:57 +0000 (00:29 +0000)]
[asan] Fix dynamic-runtime tests.

They are not part of check-all :(

This change adds sized-delete operators to the version list, and disables the
hack that excluded versioned symbols from the dynamic list - this is not an
issue in this case.

llvm-svn: 236559

9 years agoInstrProf: Strip filename prefixes from the names we display for coverage
Justin Bogner [Tue, 5 May 2015 23:44:48 +0000 (23:44 +0000)]
InstrProf: Strip filename prefixes from the names we display for coverage

For consumers of coverage data, any filename prefixes we store in the
profile data are just noise. Strip this prefix if it exists.

llvm-svn: 236558

9 years ago[X86 fast-isel] Constrain the index reg class to not include SP.
Pete Cooper [Tue, 5 May 2015 23:41:53 +0000 (23:41 +0000)]
[X86 fast-isel] Constrain the index reg class to not include SP.

The index reg on instructions with complex address modes is a GPR64_NOSP.  Constrain it to appease the machine verifier.

llvm-svn: 236557

9 years ago[asan] Fix compiler-rt build.
Evgeniy Stepanov [Tue, 5 May 2015 23:13:50 +0000 (23:13 +0000)]
[asan] Fix compiler-rt build.

i386 runtime library was accidentally using the x86_64 version script without a dependency.

llvm-svn: 236556

9 years ago[SelectionDAG] Make an argument optional in RFV::getCopyToRegs. NFC.
Sanjoy Das [Tue, 5 May 2015 23:06:57 +0000 (23:06 +0000)]
[SelectionDAG] Make an argument optional in RFV::getCopyToRegs.  NFC.

Summary:
We default the value argument to nullptr.  The only use of the value is
in diagnosePossiblyInvalidConstraint and that seems to be resilient to
it being nullptr.

Reviewers: atrick, reames

Subscribers: llvm-commits

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

llvm-svn: 236555

9 years ago[SelectionDAG] Move RegsForValue into SelectionDAGBuilder.h. NFC.
Sanjoy Das [Tue, 5 May 2015 23:06:54 +0000 (23:06 +0000)]
[SelectionDAG] Move RegsForValue into SelectionDAGBuilder.h. NFC.

Summary:
The exported class will be used in later change, in
StatepointLowering.cpp.  It is still internal to SelectionDAG (not
exported via include/).

Reviewers: reames, atrick

Subscribers: llvm-commits

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

llvm-svn: 236554

9 years ago[SelectionDAG] Pass explicit type to lowerCallOperands. NFC.
Sanjoy Das [Tue, 5 May 2015 23:06:52 +0000 (23:06 +0000)]
[SelectionDAG] Pass explicit type to lowerCallOperands. NFC.

Summary:
Currently this does not change anything, but change will be used in a
later change to StatepointLowering.cpp

Reviewers: reames, atrick

Subscribers: llvm-commits

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

llvm-svn: 236553

9 years ago[StatepointLowering] Rename variable, NFC.
Sanjoy Das [Tue, 5 May 2015 23:06:49 +0000 (23:06 +0000)]
[StatepointLowering] Rename variable, NFC.

Rename LoweredArgs to LoweredMetaArgs to clarify intent.

llvm-svn: 236552

9 years ago[asan] Use a version script to limit the symbols exported by the ASan shared runtime...
Evgeniy Stepanov [Tue, 5 May 2015 22:51:35 +0000 (22:51 +0000)]
[asan] Use a version script to limit the symbols exported by the ASan shared runtime library.

llvm-svn: 236551

9 years agoFix IfConverter to handle regmask machine operands.
Pete Cooper [Tue, 5 May 2015 22:09:41 +0000 (22:09 +0000)]
Fix IfConverter to handle regmask machine operands.

Note, this is a recommit of r236515 after fixing an error in r236514.  The buildbot ran fast enough that it picked up r236514 prior to r236515 and threw an error.  r236515 itself ran 'make check' without errors.

Original commit message follows:

A regmask (typically seen on a call) clobbers the set of registers it lists.  The IfConverter, in UpdatePredRedefs, was handling register defs, but not regmasks.

These are slightly different to a def in that we need to add both an implicit use and def to appease the machine verifier.  Otherwise, uses after the if converted call could think they are reading an undefined register.

Reviewed by Matthias Braun and Quentin Colombet.

llvm-svn: 236550

9 years agoMark TestMultithreaded.test_sb_api_listener_resume as XFAIL with gcc 4.8 and higher.
Oleksiy Vyalov [Tue, 5 May 2015 22:02:56 +0000 (22:02 +0000)]
Mark TestMultithreaded.test_sb_api_listener_resume as XFAIL with gcc 4.8 and higher.

llvm-svn: 236549

9 years ago[lib/Fuzzer] on crash print the contents of the crashy input as base64
Kostya Serebryany [Tue, 5 May 2015 21:59:51 +0000 (21:59 +0000)]
[lib/Fuzzer] on crash print the contents of the crashy input as base64

llvm-svn: 236548

9 years agoInstrProf: Don't start or end coverage regions inside of system macros
Justin Bogner [Tue, 5 May 2015 21:46:14 +0000 (21:46 +0000)]
InstrProf: Don't start or end coverage regions inside of system macros

It doesn't make much sense to try to show coverage inside system
macros, and source locations in builtins confuses the coverage
mapping. Just avoid doing this.

Fixes an assert that fired when a __block storage specifier starts a
region.

llvm-svn: 236547

9 years agopropagate IR-level fast-math-flags to DAG nodes (NFC)
Sanjay Patel [Tue, 5 May 2015 21:40:38 +0000 (21:40 +0000)]
propagate IR-level fast-math-flags to DAG nodes (NFC)

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.

There are 2 structural changes here:

1. The main diff is that we're preparing to extend the optimization
flags to affect more than just binary SDNodes. Eg, IR intrinsics
( https://llvm.org/bugs/show_bug.cgi?id=21290 ) or non-binop nodes
that don't even exist in IR such as FMA, FNEG, etc.

2. The other change is that we're actually copying the FP fast-math-flags
from the IR instructions to SDNodes.

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

llvm-svn: 236546

9 years ago[asan] fix IsDeadlySignal
Kostya Serebryany [Tue, 5 May 2015 21:38:50 +0000 (21:38 +0000)]
[asan] fix IsDeadlySignal

llvm-svn: 236545

9 years agouse range-based for-loop; NFC
Sanjay Patel [Tue, 5 May 2015 21:20:52 +0000 (21:20 +0000)]
use range-based for-loop; NFC

llvm-svn: 236544

9 years agoFix typo. platfrom -> platform
Chaoren Lin [Tue, 5 May 2015 20:34:36 +0000 (20:34 +0000)]
Fix typo. platfrom -> platform

llvm-svn: 236543

9 years agoUpdate testcase to match r236539
David Majnemer [Tue, 5 May 2015 20:34:29 +0000 (20:34 +0000)]
Update testcase to match r236539

llvm-svn: 236542

9 years agoMake sure that the following paths say they are equal:
Greg Clayton [Tue, 5 May 2015 20:26:58 +0000 (20:26 +0000)]
Make sure that the following paths say they are equal:

/private/tmp/main.cpp
/private/tmp/..//tmp/main.cpp

We saw paths like this in makefile generate binaries when someone left an extra '/' on the end of a makefile variable.

<rdar://problem/18945972>

llvm-svn: 236541

9 years agoAdded Andrey Churbanov as the owner of the OpenMP runtime library code
Andrey Churbanov [Tue, 5 May 2015 20:17:53 +0000 (20:17 +0000)]
Added Andrey Churbanov as the owner of the OpenMP runtime library code

llvm-svn: 236540

9 years ago[Inliner] Discard empty COMDAT groups
David Majnemer [Tue, 5 May 2015 20:14:22 +0000 (20:14 +0000)]
[Inliner] Discard empty COMDAT groups

COMDAT groups which have become rendered unused because of inline are
discardable if we can prove that we've made the group empty.

This fixes PR22285.

llvm-svn: 236539

9 years agoRefactor UpdatePredRedefs and StepForward to avoid duplication. NFC
Pete Cooper [Tue, 5 May 2015 20:14:22 +0000 (20:14 +0000)]
Refactor UpdatePredRedefs and StepForward to avoid duplication.  NFC

Note, this is a reapplication of r236515 with a fix to not assert on non-register operands, but instead only handle them until the subsequent commit.  Original commit message follows.

The code was basically the same here already.  Just added an out parameter for a vector of seen defs so that UpdatePredRedefs can call StepForward first, then do its own post processing on the seen defs.

Will be used in the next commit to also handle regmasks.

llvm-svn: 236538