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
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
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
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
Reid Kleckner [Wed, 6 May 2015 18:45:24 +0000 (18:45 +0000)]
[WinEH] Improve fatal error message about failed demotion
llvm-svn: 236626
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
John Thompson [Wed, 6 May 2015 18:39:15 +0000 (18:39 +0000)]
Fixed infinite recursion bug.
llvm-svn: 236624
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
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
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
Adrian McCarthy [Wed, 6 May 2015 18:19:51 +0000 (18:19 +0000)]
Don't attempt DSym tests on Windows.
llvm-svn: 236620
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
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
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
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
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
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
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
Matt Arsenault [Wed, 6 May 2015 17:05:54 +0000 (17:05 +0000)]
Add ChangeTo* to MachineOperand for symbols
llvm-svn: 236612
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
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
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
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
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
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
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
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
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
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
NAKAMURA Takumi [Wed, 6 May 2015 14:03:22 +0000 (14:03 +0000)]
Reformat.
llvm-svn: 236601
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
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
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
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
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
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
Manuel Klimek [Wed, 6 May 2015 12:12:22 +0000 (12:12 +0000)]
Remove deprecated version of reformat.
llvm-svn: 236594
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Daniel Jasper [Wed, 6 May 2015 08:58:57 +0000 (08:58 +0000)]
clang-format: Prevent assertion discovered by fuzzer.
llvm-svn: 236578
Daniel Jasper [Wed, 6 May 2015 08:38:24 +0000 (08:38 +0000)]
clang-format: Prevent exponential runtime in token annotator.
llvm-svn: 236577
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
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
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
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
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
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
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
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
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
Sanjoy Das [Wed, 6 May 2015 02:36:34 +0000 (02:36 +0000)]
[IRBuilder] Fix indentation. NFC.
Whitespace-only change.
llvm-svn: 236567
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
Sanjoy Das [Wed, 6 May 2015 02:36:28 +0000 (02:36 +0000)]
[Statepoint] Clean up Statepoint.h: clang-format.
llvm-svn: 236565
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Kostya Serebryany [Tue, 5 May 2015 21:38:50 +0000 (21:38 +0000)]
[asan] fix IsDeadlySignal
llvm-svn: 236545
Sanjay Patel [Tue, 5 May 2015 21:20:52 +0000 (21:20 +0000)]
use range-based for-loop; NFC
llvm-svn: 236544
Chaoren Lin [Tue, 5 May 2015 20:34:36 +0000 (20:34 +0000)]
Fix typo. platfrom -> platform
llvm-svn: 236543
David Majnemer [Tue, 5 May 2015 20:34:29 +0000 (20:34 +0000)]
Update testcase to match r236539
llvm-svn: 236542
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
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
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
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
Evgeniy Stepanov [Tue, 5 May 2015 20:13:39 +0000 (20:13 +0000)]
Build ASan runtime library with -z global on Android.
llvm-svn: 236537
Peter Collingbourne [Tue, 5 May 2015 20:07:10 +0000 (20:07 +0000)]
Thumb2SizeReduction: Check the correct set of registers for LDMIA.
The register set for LDMIA begins at offset 3, not 4. We were previously
missing the short encoding of this instruction in the case where the base
register was the first register in the register set.
Also clean up some dead code:
- The isARMLowRegister check is redundant with what VerifyLowRegs does;
replace with an assert.
- Remove handling of LDMDB instruction, which has no short encoding (and
does not appear in ReduceTable).
Differential Revision: http://reviews.llvm.org/D9485
llvm-svn: 236535
Andrey Churbanov [Tue, 5 May 2015 20:02:52 +0000 (20:02 +0000)]
Integrate libiomp CMake into LLVM CMake build system.
This patch integrates the libiomp CMake build system into the LLVM CMake build
system so that users can checkout libiomp into the projects directory of llvm
and build llvm,clang, and libiomp all together. These changes specifically
introduce a new install target which will put libraries and headers into the
correct locations when either a standalone build or part of llvm.
The copy_recipe() method has been removed in favor of the POST_BUILD method
to move headers into the exports subdirectory. And lastly, the MicroTests.cmake
file was refactored which led to simpler target dependencies and a new target,
make libiomp-micro-tests, which performs the 5 small tests (test-relo,
test-touch, etc.) when called.
llvm-svn: 236534
Anton Yartsev [Tue, 5 May 2015 19:43:37 +0000 (19:43 +0000)]
[analyzer] This eliminates regression caused by r236423.
Wrap an argument with quotes only if it has spaces.
llvm-svn: 236533
Ulrich Weigand [Tue, 5 May 2015 19:36:42 +0000 (19:36 +0000)]
[SystemZ] Add support for z13 low-level vector builtins
This adds low-level builtins to allow access to all of the z13 vector
instructions. Note that instructions whose semantics can be described
by standard C (including clang extensions) do not get any builtins.
For each instructions whose semantics *cannot* (fully) be described, we
define a builtin named __builtin_s390_<insn> that directly maps to this
instruction. These are intended to be compatible with GCC.
For instructions that also set the condition code, the builtin will take
an extra argument of type "int *" at the end. The integer pointed to by
this argument will be set to the post-instruction CC value.
For many instructions, the low-level builtin is mapped to the corresponding
LLVM IR intrinsic. However, a number of instructions can be represented
in standard LLVM IR without requiring use of a target intrinsic.
Some instructions require immediate integer operands within a certain
range. Those are verified at the Sema level.
Based on a patch by Richard Sandiford.
llvm-svn: 236532
Ulrich Weigand [Tue, 5 May 2015 19:35:52 +0000 (19:35 +0000)]
[SystemZ] Add support for z13 and its vector facility
This patch adds support for the z13 architecture type. For compatibility
with GCC, a pair of options -mvx / -mno-vx can be used to selectively
enable/disable use of the vector facility.
When the vector facility is present, we default to the new vector ABI.
This is characterized by two major differences:
- Vector types are passed/returned in vector registers
(except for unnamed arguments of a variable-argument list function).
- Vector types are at most 8-byte aligned.
The reason for the choice of 8-byte vector alignment is that the hardware
is able to efficiently load vectors at 8-byte alignment, and the ABI only
guarantees 8-byte alignment of the stack pointer, so requiring any higher
alignment for vectors would require dynamic stack re-alignment code.
However, for compatibility with old code that may use vector types, when
*not* using the vector facility, the old alignment rules (vector types
are naturally aligned) remain in use.
These alignment rules are not only implemented at the C language level,
but also at the LLVM IR level. This is done by selecting a different
DataLayout string depending on whether the vector ABI is in effect or not.
Based on a patch by Richard Sandiford.
llvm-svn: 236531
Ulrich Weigand [Tue, 5 May 2015 19:34:10 +0000 (19:34 +0000)]
[DAGCombiner] Account for getVectorIdxTy() when narrowing vector load
This patch makes ReplaceExtractVectorEltOfLoadWithNarrowedLoad convert
the element number from getVectorIdxTy() to PtrTy before doing pointer
arithmetic on it. This is needed on z, where element numbers are i32
but pointers are i64.
Original patch by Richard Sandiford.
llvm-svn: 236530