Alexey Bataev [Tue, 19 Apr 2016 16:36:01 +0000 (16:36 +0000)]
Revert "[OPENMP] Codegen for untied tasks."
This reverts commit r266754.
llvm-svn: 266755
Alexey Bataev [Tue, 19 Apr 2016 16:27:55 +0000 (16:27 +0000)]
[OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.
llvm-svn: 266754
Andrey Turetskiy [Tue, 19 Apr 2016 16:25:30 +0000 (16:25 +0000)]
Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
llvm-svn: 266753
Mehdi Amini [Tue, 19 Apr 2016 16:21:37 +0000 (16:21 +0000)]
Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as "external_weak")
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266752
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:17:48 +0000 (16:17 +0000)]
IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFC
llvm-svn: 266751
Mehdi Amini [Tue, 19 Apr 2016 16:11:05 +0000 (16:11 +0000)]
ModuleLinker: Do not import linkonce/weak as "external_weak"
Summary:
There is no reason to have a weak reference because the external
definition will be weak.
Reviewers: rafael
Subscribers: llvm-commits, tejohnson
Differential Revision: http://reviews.llvm.org/D19267
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266750
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:06:50 +0000 (16:06 +0000)]
IR: Use Optional instead of unique_ptr for debug info ODR type map, NFC
Save a level of malloc indirection.
llvm-svn: 266749
Samuel Benzaquen [Tue, 19 Apr 2016 15:52:56 +0000 (15:52 +0000)]
[ASTMatchers] Do not try to memoize nodes we can't compare.
Summary:
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some time ago to avoid this problem.
I'm applying the same fix to hasAncestor: if any object in the Builder map is
not comparable, skip the cache.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D19231
llvm-svn: 266748
Andrey Turetskiy [Tue, 19 Apr 2016 15:50:57 +0000 (15:50 +0000)]
Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
* Sets IAMCU triple
* Sets IAMCU ABI
* Enforces static compilation
Differential Revision: http://reviews.llvm.org/D18398
llvm-svn: 266747
Teresa Johnson [Tue, 19 Apr 2016 15:48:30 +0000 (15:48 +0000)]
Enable ODR uniquing of DITypes in more places
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.
Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via
libLTO, similar to the way r266549 enabled this for ThinLTO backend
threads launched from gold-plugin.
Also enable enableDebugTypeODRUniquing in opt, similar to the way
r266549 enabled this for llvm-link (on by default, can be disabled with
new -disable-debug-info-type-map option), since we may perform ThinLTO
importing from opt.
Reviewers: dexonsmith, joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19263
llvm-svn: 266746
Michael Zuckerman [Tue, 19 Apr 2016 15:18:23 +0000 (15:18 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I|F} instruction set
Differential Revision: http://reviews.llvm.org/D19097
llvm-svn: 266745
Martin Probst [Tue, 19 Apr 2016 14:59:16 +0000 (14:59 +0000)]
Summary:
clang-format: [JS] unit tests for type aliases.
Also adds a test for "foo as bar" casts.
Spec:
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.10
These are already handled correctly.
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D19206
llvm-svn: 266744
Martin Probst [Tue, 19 Apr 2016 14:55:37 +0000 (14:55 +0000)]
clang-format: [JS] simplify import/export.
Summary:
Change `import` and `export` parsing to special case the renaming
syntax (`import x, {y as bar} ...`, `export {x}`) and otherwise just
parse a regular structural element.
This simplifies the code a bit and should be more correct - it's easier
to recognise the specific import syntax than to recognise arbitrary
expressions and declarations.
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D19242
llvm-svn: 266743
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:55:09 +0000 (14:55 +0000)]
IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFC
Lift the API for debug info ODR type uniquing up a layer. Instead of
clients managing the map directly on the LLVMContext, add a static
method to DICompositeType called getODRType and handle the map in the
background. Also adds DICompositeType::getODRTypeIfExists, so far just
for convenience in the unit tests.
This simplifies the logic in LLParser and BitcodeReader. Because of
argument spam there are actually a few more lines of code now; I'll see
if I come up with a reasonable way to clean that up.
llvm-svn: 266742
Johannes Doerfert [Tue, 19 Apr 2016 14:53:13 +0000 (14:53 +0000)]
Relate domains to statements during construction [NFC]
Instead of the Scop::getPwAff() function we now use the ScopStmt::getPwAff()
function during the statements domain construction.
llvm-svn: 266741
Johannes Doerfert [Tue, 19 Apr 2016 14:49:42 +0000 (14:49 +0000)]
Add user assumptions after domain generation [NFC]
llvm-svn: 266740
Johannes Doerfert [Tue, 19 Apr 2016 14:49:05 +0000 (14:49 +0000)]
Do not build domains for out of SCoP blocks [NFC]
llvm-svn: 266739
Johannes Doerfert [Tue, 19 Apr 2016 14:48:22 +0000 (14:48 +0000)]
Mark Scop::getDomainConditions as const [NFC]
llvm-svn: 266738
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:42:55 +0000 (14:42 +0000)]
IR: Require DICompositeType for ODR uniquing type map
Tighten up the API for debug info ODR type uniquing in LLVMContext. The
only reason to allow other DIType subclasses is to make the unit tests
prettier :/.
llvm-svn: 266737
Pavel Labath [Tue, 19 Apr 2016 14:03:43 +0000 (14:03 +0000)]
Revert "LLDB: Fixed two race conditions when stopping private state thread"
This reverts commit r266733 as it causes a number of failures on linux buildbots.
llvm-svn: 266736
Daniel Jasper [Tue, 19 Apr 2016 13:48:39 +0000 (13:48 +0000)]
Initial version of misc-unused-using-decl check.
llvm-svn: 266735
Gabor Horvath [Tue, 19 Apr 2016 13:29:05 +0000 (13:29 +0000)]
[clang-tidy] readability-container-size-empty fixes
Summary: This patch fixes PR27410 and adds std::basic_string support.
Reviewers: Eugene.Zelenko, hokein
Subscribers: cfe-commits, o.gyorgy
Differential Revision: http://reviews.llvm.org/D19262
llvm-svn: 266734
Marianne Mailhot-Sarrasin [Tue, 19 Apr 2016 13:21:46 +0000 (13:21 +0000)]
LLDB: Fixed two race conditions when stopping private state thread
When stopping the private state thread, there was a race condition between the time the thread exits (resetting the HostThread object) and the time a Join was attempted, especially in the case of a timeout.
The previous workaround of copying the HostThread object is not enough, since on a Reset the internal thread stuff gets nulled out regardless of which HostThread object actually has Reset called on it, resulting in an attempt to dereference a null pointer on the subsequent call to Join from the copy as well.
Additionally, there was a race between the detach (called when stopping the process) and the stop itself, causing the stop to time out because it was waiting for the private state thread to see the stop state, but it had exited immediately after entering the detached state.
Patch by cameron314
Differential Revision: http://reviews.llvm.org/D19122
llvm-svn: 266733
Simon Pilgrim [Tue, 19 Apr 2016 12:59:52 +0000 (12:59 +0000)]
[InstCombine][X86] Added extra tests introduced for D17490
llvm-svn: 266732
Simon Pilgrim [Tue, 19 Apr 2016 12:56:46 +0000 (12:56 +0000)]
[InstCombine][X86] Regenerate SSE combine tests as part of setup for D17490
Regenerated with utils/update_test_checks.py
llvm-svn: 266731
Ben Craig [Tue, 19 Apr 2016 12:49:05 +0000 (12:49 +0000)]
Framework to allow testing of static libc++abi
These changes make linking against static libraries more explicit. Instead
of using -lc++ and -lc++abi in the tests, an absolute path to the library is
provided instead.
The choices of shared vs. static, and the choices of library paths for both
libcxx and libcxxabi needed to be exchanged for this to work. In other words,
libcxx tests need to know the library path of libcxxabi, and whether libcxxabi
is a static or shared library.
Some Mac specific logic for testing against libc++abi had to be moved from
libcxxabi's config.py, as it was overriding choices made in libcxx's config.py.
That logic is now in libcxx's target_info.py.
Testing a static libcxx on Linux will now automatically link in librt most of
the time. Previously, lots of pthread tests would fail because of an
unresolved clock_gettime.
http://reviews.llvm.org/D16544
llvm-svn: 266730
Ben Craig [Tue, 19 Apr 2016 12:47:38 +0000 (12:47 +0000)]
Enable testing for static libc++abi
This change leverages framework changes made in libcxx. See those changes for
more details. (http://reviews.llvm.org/D16544)
Some Mac specific logic for testing against libc++abi had to be moved from
libcxxabi's config.py, as it was overriding choices made in libcxx's config.py.
That logic is now in libcxx's target_info.py.
http://reviews.llvm.org/D16545
llvm-svn: 266729
Simon Pilgrim [Tue, 19 Apr 2016 12:26:40 +0000 (12:26 +0000)]
[X86][AVX2] Prefer VPERMQ/VPERMPD over VINSERTI128/VINSERTF128 for unary shuffles
Using VPERMQ/VPERMPD allows memory folding of the (repeated) input where VINSERTI128/VINSERTF128 can not.
Differential Revision: http://reviews.llvm.org/D19228
llvm-svn: 266728
George Rimar [Tue, 19 Apr 2016 12:09:25 +0000 (12:09 +0000)]
Updated comment. NFC.
llvm-svn: 266727
Laszlo Nagy [Tue, 19 Apr 2016 12:03:03 +0000 (12:03 +0000)]
D17487: [analyzer][scan-build-py] flag filter modification for compilation database creation
llvm-svn: 266726
Pavel Labath [Tue, 19 Apr 2016 09:31:14 +0000 (09:31 +0000)]
Fix typo in TestSourceManager.py
llvm-svn: 266725
Alexey Bataev [Tue, 19 Apr 2016 09:27:38 +0000 (09:27 +0000)]
Revert "[OPENMP] Codegen for untied tasks."
This reverts commit 266722.
llvm-svn: 266724
Mehdi Amini [Tue, 19 Apr 2016 09:21:30 +0000 (09:21 +0000)]
Minor improvement to debug output for Function Importer (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266723
Alexey Bataev [Tue, 19 Apr 2016 09:10:27 +0000 (09:10 +0000)]
[OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the team can resume the task region after a suspension. Patch adds proper codegen for untied tasks.
llvm-svn: 266722
Sanjoy Das [Tue, 19 Apr 2016 06:25:02 +0000 (06:25 +0000)]
Add a description for the PatchableFunction pass; NFC
llvm-svn: 266721
Sanjoy Das [Tue, 19 Apr 2016 06:24:58 +0000 (06:24 +0000)]
Disable the PatchableFunction pass for NVPTX & Wasm
PatchableFunction requires AllVRegsAllocated that these targets don't
provide.
llvm-svn: 266720
Serge Pavlov [Tue, 19 Apr 2016 06:19:52 +0000 (06:19 +0000)]
Warn if function or variable cannot be implicitly instantiated
With this patch compiler emits warning if it tries to make implicit instantiation
of a template but cannot find the template definition. The warning can be suppressed
by explicit instantiation declaration or by command line options
-Wundefined-var-template and -Wundefined-func-template. The implementation follows
the discussion of http://reviews.llvm.org/D12326.
Differential Revision: http://reviews.llvm.org/D16396
llvm-svn: 266719
Daniel Berlin [Tue, 19 Apr 2016 06:13:28 +0000 (06:13 +0000)]
Correct IDF calculator for ReverseIDF
Summary:
Need to use predecessors for reverse graph, successors for forward graph.
succ_iterator/pred_iterator are not compatible, this patch is all the work necessary to work around that (which is what everywhere else does). Not sure if there is a better way, so cc'ing some random folks to take a gander :)
Reviewers: dblaikie, qcolombet, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18796
llvm-svn: 266718
Lang Hames [Tue, 19 Apr 2016 06:01:51 +0000 (06:01 +0000)]
[Orc] Disable RPC callST unit test until the S390 failures encountered during
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3459 can be
debugged/fixed.
llvm-svn: 266717
Sagar Thakur [Tue, 19 Apr 2016 06:00:35 +0000 (06:00 +0000)]
[LSAN] Fix test swapcontext.cc on MIPS
Summary: There is no frame validity check in the slow unwinder like there is in the fast unwinder due to which lsan reports a leak even for heap allocated coroutine in the test swapcontext.cc. Since mips/linux uses slow unwindwer instead of fast unwinder, the test fails for mips/linux. Therefore adding the checks before unwinding fixes the test for mips/linux.
Reviewers: samsonov, earthdok, kcc
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential: http://reviews.llvm.org/D18690
llvm-svn: 266716
Sanjoy Das [Tue, 19 Apr 2016 05:24:47 +0000 (05:24 +0000)]
Introduce a "patchable-function" function attribute
Summary:
The `"patchable-function"` attribute can be used by an LLVM client to
influence LLVM's code generation in ways that makes the generated code
easily patchable at runtime (for instance, to redirect control).
Right now only one patchability scheme is supported,
`"prologue-short-redirect"`, but this can be expanded in the future.
Reviewers: joker.eph, rnk, echristo, dberris
Subscribers: joker.eph, echristo, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19046
llvm-svn: 266715
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 04:57:40 +0000 (04:57 +0000)]
LTO: Adapt to LLVM API changes in r266713
llvm-svn: 266714
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 04:55:25 +0000 (04:55 +0000)]
IR: Rename API for enabling ODR uniquing of DITypes, NFC
As per David's review, rename everything in the new API for ODR type
uniquing of debug info.
ensureDITypeMap => enableDebugTypeODRUniquing
destroyDITypeMap => disableDebugTypeODRUniquing
hasDITypeMap => isODRUniquingDebugTypes
llvm-svn: 266713
Lang Hames [Tue, 19 Apr 2016 04:44:21 +0000 (04:44 +0000)]
[ORC] Whitespace.
llvm-svn: 266712
Lang Hames [Tue, 19 Apr 2016 04:43:09 +0000 (04:43 +0000)]
[Orc] Tidy up some of the RPC primitives, add a unit-test for the callST
(synchronous call) primitive.
llvm-svn: 266711
Todd Fiala [Tue, 19 Apr 2016 04:20:35 +0000 (04:20 +0000)]
test infra cleanup: convert test_runner lib into package
Also does the following:
* adopts PEP8 naming convention for OptionalWith class (now
optional_with).
* moves test_runner/lldb_utils.py to lldbsuite/support/optional_with.py.
* packages tests in a subpackage of test_runner per recommendations in
http://the-hitchhikers-guide-to-packaging.readthedocs.org/en/latest/creation.html
Tests can be run from within pacakges/Python/lldbsuite/test via this
command:
python -m unittest discover test_runner
The primary cleanup this allows is avoiding the need to muck with the
PYTHONPATH variable from within the source files. This also aids some
of the static code checkers as they don't need to run code to determine
the proper python path.
llvm-svn: 266710
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 03:46:51 +0000 (03:46 +0000)]
BitcodeWriter: Break recursion when enumerating Metadata, almost NFC
Use a worklist instead of recursing through MDNode operands in
ValueEnumerator. The actual record output order has changed slightly,
but otherwise there's no functionality change.
I had to update test/Bitcode/metadata-function-blocks.ll. I renumbered
nodes so they continue to match the implicit record ids.
llvm-svn: 266709
Justin Lebar [Tue, 19 Apr 2016 02:27:11 +0000 (02:27 +0000)]
[CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.
Reviewers: tra
Subscribers: cfe-commits, jhen
Differential Revision: http://reviews.llvm.org/D19251
llvm-svn: 266708
Justin Lebar [Tue, 19 Apr 2016 02:27:07 +0000 (02:27 +0000)]
[CUDA] Add --cuda-compile-host-device, which overrides --cuda-host-only and --cuda-device-only.
Summary:
This completes the flag's tristate, letting you override it at will on
the command line.
Reviewers: tra
Subscribers: cfe-commits, jhen
Differential Revision: http://reviews.llvm.org/D19248
llvm-svn: 266707
Akira Hatanaka [Tue, 19 Apr 2016 02:21:47 +0000 (02:21 +0000)]
Add a test case to check a member's default constructor is also run.
This is a follow-up to r266645.
llvm-svn: 266706
Saleem Abdulrasool [Tue, 19 Apr 2016 02:04:01 +0000 (02:04 +0000)]
vim: add swiftcc keyword
Update the syntax highlighting for SVN r265480.
llvm-svn: 266705
Rui Ueyama [Tue, 19 Apr 2016 01:21:58 +0000 (01:21 +0000)]
COFF: Support /manifestinput command line option.
Manifest file is a separate or embedded XML file having metadata
of an executable. As it is XML, it can contain various types of
information. Probably the most popular one is to request escalated
priviledges.
Usually the linker creates an XML file and embed that file into
an executable. However, there's a way to supply an XML file from
command line. /manifestniput is it.
Apparently it is over-designed here, but if you supply two or more
manifest files, then the linker needs to merge the files into a
single XML file. A good news is that we don't need to do that ourselves.
MT.exe command can do that, so we call the command from the linker
in this patch.
llvm-svn: 266704
Eric Fiselier [Tue, 19 Apr 2016 01:19:25 +0000 (01:19 +0000)]
Make tuples constructors conditionally EXPLICIT. See N4387
llvm-svn: 266703
Chaoren Lin [Tue, 19 Apr 2016 01:09:37 +0000 (01:09 +0000)]
Fix Windows build.
llvm-svn: 266702
Jacques Pienaar [Tue, 19 Apr 2016 00:26:42 +0000 (00:26 +0000)]
[lanai] Set boolean contentss to ZeroOrOneBooleanContent.
llvm-svn: 266701
Mehdi Amini [Tue, 19 Apr 2016 00:17:55 +0000 (00:17 +0000)]
Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)
This remove totally any malloc from this function on my
profile (from 155k before).
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266700
Michael Kuperstein [Mon, 18 Apr 2016 23:55:01 +0000 (23:55 +0000)]
Port DemandedBits to the new pass manager.
Differential Revision: http://reviews.llvm.org/D18679
llvm-svn: 266699
Adrian Prantl [Mon, 18 Apr 2016 23:48:16 +0000 (23:48 +0000)]
[ObjC++] Fix crash when emitting debug info for a block member capturing this.
rdar://problem/
23871824
llvm-svn: 266698
Richard Smith [Mon, 18 Apr 2016 23:27:25 +0000 (23:27 +0000)]
Add missing #include, found by modules selfhost.
llvm-svn: 266697
Richard Smith [Mon, 18 Apr 2016 23:24:39 +0000 (23:24 +0000)]
Add missing header, found by modules selfhost.
llvm-svn: 266696
Richard Smith [Mon, 18 Apr 2016 23:12:59 +0000 (23:12 +0000)]
Mark -Xclang as being a compilation-only option so that the clang driver
doesn't warn if it's passed to a link action. This matches the behavior for
most other compilation-only options (including things like -f flags), and is
necessary to suppress warnings on systems like cmake that always pass all
compile flags to the linker.
llvm-svn: 266695
Kostya Serebryany [Mon, 18 Apr 2016 22:50:39 +0000 (22:50 +0000)]
[libFuzzer] try to print correct time in seconds when reporting a timeout. Don't report timeouts while still loading the corpus.
llvm-svn: 266693
Paul Robinson [Mon, 18 Apr 2016 22:41:41 +0000 (22:41 +0000)]
[DWARF] Force a linkage_name on an inlined subprogram's abstract origin.
When we suppress linkage names, for a non-inlined subprogram the name
can still be found in the object-file symbol table, because we have
the code address of the subprogram. This is not necessarily the case
for an inlined subprogram, so we still want to emit the linkage name
in the DWARF. Put this on the abstract-origin DIE because it's common
to all inlined instances.
Differential Revision: http://reviews.llvm.org/D18706
llvm-svn: 266692
Reid Kleckner [Mon, 18 Apr 2016 22:38:52 +0000 (22:38 +0000)]
Remove old DIBuilder::createFunction overload used only by dragonegg, which does not currently build
NFC
llvm-svn: 266691
Marcin Koscielnicki [Mon, 18 Apr 2016 22:21:02 +0000 (22:21 +0000)]
[msan] Don't hardcode 4kiB page size in msan_test.cc.
This breaks the valloc test on PowerPC, which has 64kiB pages. Since
getting page size portably is nontrivial, and there's already a function
for that in __sanitizer, just use it. Unfortunately, sanitizer_common.h
conflicts with the interface headers inclucded by msan_test.cc (and a few
of its own macros), so we have to declare it manually.
Differential Revision: http://reviews.llvm.org/D19227
llvm-svn: 266688
Richard Smith [Mon, 18 Apr 2016 21:54:58 +0000 (21:54 +0000)]
[modules] Remove some more unnecessary forwarding functions.
llvm-svn: 266687
Mehdi Amini [Mon, 18 Apr 2016 21:54:00 +0000 (21:54 +0000)]
Add debugging to the cache pruning
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266686
Mehdi Amini [Mon, 18 Apr 2016 21:53:55 +0000 (21:53 +0000)]
CachePruning: fix typo, we accumulate file size here, not time
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266685
Tim Northover [Mon, 18 Apr 2016 21:48:55 +0000 (21:48 +0000)]
ARM: use a pseudo-instruction for cmpxchg at -O0.
The fast register-allocator cannot cope with inter-block dependencies without
spilling. This is fine for ldrex/strex loops coming from atomicrmw instructions
where any value produced within a block is dead by the end, but not for
cmpxchg. So we lower a cmpxchg at -O0 via a pseudo-inst that gets expanded
after regalloc.
Fortunately this is at -O0 so we don't have to care about performance. This
simplifies the various axes of expansion considerably: we assume a strong
seq_cst operation and ensure ordering via the always-present DMB instructions
rather than v8 acquire/release instructions.
Should fix the 32-bit part of PR25526.
llvm-svn: 266679
Jonathan Peyton [Mon, 18 Apr 2016 21:38:29 +0000 (21:38 +0000)]
Fix trip count calculation for parallel loops in runtime
The trip count calculation was incorrect for loops with large bounds. For example,
for(int i=-2,000,000,000; i < 2,000,000,000; i+=
50000000), the trip count
calculation had overflow (trying to calculate 2,000,000,000 + 2,000,000,000 with
signed integers) and wasn't giving the right value. This patch fixes this error
in the runtime by using unsigned integers instead. There is still a bug in the
clang compiler component because it warns that there is overflow in the
test case file when there isn't. This error isn't there for the Intel Compiler.
So for now, the test case is designated as XFAIL.
Differential Revision: http://reviews.llvm.org/D19078
llvm-svn: 266677
Kostya Serebryany [Mon, 18 Apr 2016 21:36:34 +0000 (21:36 +0000)]
Additional test for use-after-scope
Summary: Test that asan detects access to the dead variable captured by lambda.
Reviewers: aizatsky, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19238
llvm-svn: 266676
Jonathan Peyton [Mon, 18 Apr 2016 21:35:14 +0000 (21:35 +0000)]
Runtime support for untied tasks
Introduced a counter of parts of an untied task submitted for execution. The
counter controls whether all parts of the task are already finished. The
compiler should generate re-submission of partially executed untied task by
itself before exiting of each task part except for the lexical last part.
Differential Revision: http://reviews.llvm.org/D19026
llvm-svn: 266675
Jonathan Peyton [Mon, 18 Apr 2016 21:33:01 +0000 (21:33 +0000)]
Fix for pthread_setspecific (TLS and shutdown) problem
Some codes that use TLS fail intermittently because one thread tries to write
TLS values after the TLS key has been destroyed by another thread. This happens
when one thread executes library shutdown (and destroys TLS keys), while another
thread starts to execute the TLS key destructor routine. Before this change, the
kmp_init_runtime flag was checked before calling pthread_* TLS functions, but
this flag is set to FALSE later than the destruction of the TLS keys, which
leads to failure. The fix is to check kmp_init_gtid instead, as this flag is
unset *before* the destruction of TLS keys.
Differential Revision: http://reviews.llvm.org/D19022
llvm-svn: 266674
Kostya Serebryany [Mon, 18 Apr 2016 21:30:17 +0000 (21:30 +0000)]
[sanitizer-coverage] make sure coverage flags are not passed to clang if the driver thinks they are unused
llvm-svn: 266673
Kostya Serebryany [Mon, 18 Apr 2016 21:28:37 +0000 (21:28 +0000)]
[sanitizer-coverage] better docs for -fsanitize-coverage=trace-bb
llvm-svn: 266672
Krzysztof Parzyszek [Mon, 18 Apr 2016 21:27:59 +0000 (21:27 +0000)]
[Hexagon] V60/HVX builtin definitions for clang
The builtins already exist in LLVM, but are not exposed to the C/C++
programmers. This patch adds all the information about the builtins
needed for clang, as well as a test for all available intrinsics.
llvm-svn: 266671
Kostya Serebryany [Mon, 18 Apr 2016 21:14:11 +0000 (21:14 +0000)]
[libFuzzer] warn if the corpus is empty
llvm-svn: 266670
Simon Pilgrim [Mon, 18 Apr 2016 21:07:49 +0000 (21:07 +0000)]
[X86][SSE] Test case for PR2585
llvm-svn: 266669
Rui Ueyama [Mon, 18 Apr 2016 21:00:45 +0000 (21:00 +0000)]
Rename LocationNode -> SectionsCommand.
They are called sections-command in the doc, so it is nice to keep
it consistent with it.
https://sourceware.org/binutils/docs/ld/SECTIONS.html#SECTIONS
llvm-svn: 266668
Rui Ueyama [Mon, 18 Apr 2016 21:00:43 +0000 (21:00 +0000)]
Remove redundant curly braces.
llvm-svn: 266667
Rui Ueyama [Mon, 18 Apr 2016 21:00:40 +0000 (21:00 +0000)]
Refactor LinkerScript::assignAddresses. NFC.
llvm-svn: 266666
Lang Hames [Mon, 18 Apr 2016 20:56:22 +0000 (20:56 +0000)]
[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
copy-assignment operator.
MSVC is trying to synthesize these and failing. Hopefully explicitly deleting
them will help.
llvm-svn: 266665
Todd Fiala [Mon, 18 Apr 2016 20:26:56 +0000 (20:26 +0000)]
ensure lldbinline remembers .py extension
This ensure lldbinline.test_file paths are tracked as .py
files rather than .pyc files.
Also, this change adds an assert to the test infrastructure
if a filename that is not ending in .py is attempted to be
added to the test events infrastructure where we track test
results.
See:
http://reviews.llvm.org/D19215
Earlier revision reviewed by:
Pavel Labath
llvm-svn: 266664
Lang Hames [Mon, 18 Apr 2016 19:55:43 +0000 (19:55 +0000)]
[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.
Fixes:
(1) Removes constexpr (unsupported in MSVC)
(2) Move constructors (remove explicitly defaulted ones)
(3) <future> - Add warning suppression for MSVC.
llvm-svn: 266663
Simon Pilgrim [Mon, 18 Apr 2016 19:48:16 +0000 (19:48 +0000)]
[X86][AVX] Added extra memory folding tests for D19228
llvm-svn: 266662
Sanjay Patel [Mon, 18 Apr 2016 19:11:57 +0000 (19:11 +0000)]
try to make comments more meaningful; NFC
Retry r266541 without the range-based-for-loop-change that was wrong.
llvm-svn: 266658
Chad Rosier [Mon, 18 Apr 2016 19:11:45 +0000 (19:11 +0000)]
[ValueTracking] Correct lit test comments. NFC.
llvm-svn: 266657
Marcin Koscielnicki [Mon, 18 Apr 2016 19:04:19 +0000 (19:04 +0000)]
Fix shared build of LLVMPasses.
It's missing a dependency on Instrumentation (needed for
llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&))
llvm-svn: 266656
Rafael Espindola [Mon, 18 Apr 2016 19:03:36 +0000 (19:03 +0000)]
Add missing dependency.
llvm-svn: 266655
Sanjoy Das [Mon, 18 Apr 2016 19:01:28 +0000 (19:01 +0000)]
[BPI] Consider deoptimize calls as "unreachable"
Summary:
Calls to @llvm.experimental.deoptimize are expected to "never execute",
so optimize them as such.
Reviewers: chandlerc
Subscribers: junbuml, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19095
llvm-svn: 266654
Mehdi Amini [Mon, 18 Apr 2016 18:52:39 +0000 (18:52 +0000)]
lli: avoid global variables, use a local unique_ptr instead
There was issue with order of destruction in some cases.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266652
Kostya Serebryany [Mon, 18 Apr 2016 18:41:25 +0000 (18:41 +0000)]
[libFuzzer] add fresh openssl trophies
llvm-svn: 266649
Manman Ren [Mon, 18 Apr 2016 18:40:51 +0000 (18:40 +0000)]
Block: Fix a crash when we have type attributes or qualifiers with omitted
return type.
Emit a warning instead of crashing in IR generation.
rdar://
22762981
Differential Revision: http://reviews.llvm.org/D18567
llvm-svn: 266648
Krzysztof Parzyszek [Mon, 18 Apr 2016 18:38:11 +0000 (18:38 +0000)]
[Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate
llvm-svn: 266647
Marcin Koscielnicki [Mon, 18 Apr 2016 18:21:41 +0000 (18:21 +0000)]
[MSan] [PowerPC] Add loadable library name for testing.
Differential Revision: http://reviews.llvm.org/D19217
llvm-svn: 266646
Akira Hatanaka [Mon, 18 Apr 2016 18:19:45 +0000 (18:19 +0000)]
[Parser][ObjC] Make sure c++11 in-class initialization is done when the
constructor's definition is in an implementation block.
Without this commit, ptr doesn't get initialized to null in the
following code:
struct S {
S();
void *ptr = nullptr;
};
@implementation I
S::S() {}
@end
rdar://problem/
25693624
llvm-svn: 266645
Aaron Ballman [Mon, 18 Apr 2016 18:10:53 +0000 (18:10 +0000)]
Clarifying the wording of this diagnostic; it confused parameter and argument.
llvm-svn: 266644
JF Bastien [Mon, 18 Apr 2016 18:01:49 +0000 (18:01 +0000)]
NFC: unify clang / LLVM atomic ordering
This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433
This re-applies r266574 which I had reverted in r266575.
Depends on http://reviews.llvm.org/D18875
Original review: http://reviews.llvm.org/D18876
llvm-svn: 266641
JF Bastien [Mon, 18 Apr 2016 18:01:43 +0000 (18:01 +0000)]
NFC: unify clang / LLVM atomic ordering
This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433
This re-applies r266573 which I had reverted in r266576.
Original review: http://reviews.llvm.org/D18875
llvm-svn: 266640
Xinliang David Li [Mon, 18 Apr 2016 17:54:25 +0000 (17:54 +0000)]
Add missing new file for r266637
llvm-svn: 266639