Eric Beckmann [Mon, 8 May 2017 02:47:07 +0000 (02:47 +0000)]
Update llvm-readobj -coff-resources to display tree structure.
Summary: Continue making updates to llvm-readobj to display resource sections. This is necessary for testing the up and coming cvtres tool.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32609
llvm-svn: 302399
Craig Topper [Mon, 8 May 2017 02:29:15 +0000 (02:29 +0000)]
[SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases.
llvm-svn: 302398
Eric Beckmann [Mon, 8 May 2017 02:25:03 +0000 (02:25 +0000)]
Revert "Hopefully one last commit to fix this patch, addresses string reference"
Summary:
This reverts commit
56beec1b1cfc6d263e5eddb7efff06117c0724d2.
Revert "Quick fix to D32609, it seems .o files are not transferred in all cases."
This reverts commit
7652eecd29cfdeeab7f76f687586607a99ff4e36.
Revert "Update llvm-readobj -coff-resources to display tree structure."
This reverts commit
422b62c4d302cfc92401418c2acd165056081ed7.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32958
llvm-svn: 302397
Eric Fiselier [Mon, 8 May 2017 02:09:48 +0000 (02:09 +0000)]
Fix Windows locale detection
llvm-svn: 302396
Eric Beckmann [Mon, 8 May 2017 01:48:55 +0000 (01:48 +0000)]
Hopefully one last commit to fix this patch, addresses string reference
issues.
llvm-svn: 302395
Eric Fiselier [Mon, 8 May 2017 01:31:50 +0000 (01:31 +0000)]
Fix shared_mutex dll import errors on Windows
llvm-svn: 302394
Eric Fiselier [Mon, 8 May 2017 01:17:50 +0000 (01:17 +0000)]
[libc++] Implement exception_ptr on Windows
Summary:
This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC.
The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well.
Note there are still 2 outstanding exception_ptr/nested_exception test failures.
* `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time.
* `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion.
This patch also gets most of the `<future>` tests passing as well.
Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D32927
llvm-svn: 302393
Dean Michael Berris [Mon, 8 May 2017 00:38:13 +0000 (00:38 +0000)]
[XRay][compiler-rt] XFAIL on ppc
Follow-up on D32846.
llvm-svn: 302392
Eric Fiselier [Mon, 8 May 2017 00:37:31 +0000 (00:37 +0000)]
Fix DLL import/export on Win32 locale helpers
llvm-svn: 302391
Eric Fiselier [Mon, 8 May 2017 00:29:32 +0000 (00:29 +0000)]
Fix DLL import for __time_get_c_storage member functions.
llvm-svn: 302390
Eric Fiselier [Sun, 7 May 2017 23:37:38 +0000 (23:37 +0000)]
Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"
This reverts commit r302387.
llvm-svn: 302389
Eric Beckmann [Sun, 7 May 2017 23:31:14 +0000 (23:31 +0000)]
Quick fix to D32609, it seems .o files are not transferred in all cases.
Therefore the .o file in question is renamed to .obj.coff.
llvm-svn: 302388
Eric Fiselier [Sun, 7 May 2017 23:19:14 +0000 (23:19 +0000)]
Actually remove the MSVC STL when linking and testing libc++ on Windows
llvm-svn: 302387
Eric Beckmann [Sun, 7 May 2017 22:47:22 +0000 (22:47 +0000)]
Update llvm-readobj -coff-resources to display tree structure.
Summary: Continue making updates to llvm-readobj to display resource sections. This is necessary for testing the up and coming cvtres tool.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32609
llvm-svn: 302386
Craig Topper [Sun, 7 May 2017 22:22:11 +0000 (22:22 +0000)]
[ConstantRange][SimplifyCFG] Add a helper method to allow SimplifyCFG to determine if a ConstantRange has more than 8 elements without requiring an allocation if the ConstantRange is 64-bits wide.
Previously SimplifyCFG used getSetSize which returns an APInt that is 1 bit wider than the ConstantRange's bit width. In the reasonably common case that the ConstantRange is 64-bits wide, this requires returning a 65-bit APInt. APInt's can only store 64-bits without a memory allocation so this is inefficient.
The new method takes the 8 as an input and tells if the range contains more than that many elements without requiring any wider math.
llvm-svn: 302385
Eric Fiselier [Sun, 7 May 2017 22:10:56 +0000 (22:10 +0000)]
Temporarly XFAIL aligned new/delete tests on Windows.
Libc++ doesn't provide its own definitions of new/delete on Windows,
instead using the versions provided by VCRuntime. However VCRuntime
does not yet implement aligned new/delete so these tests fail.
It might be possible for libc++ to provide its own definitions only
for aligned new/delete as long as MSVC doesn't provide it. However
before this can be done libc++ needs to figure out how to implement
std::get_new_handler.
llvm-svn: 302384
Craig Topper [Sun, 7 May 2017 21:48:08 +0000 (21:48 +0000)]
[ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf so that it reads better. NFC
llvm-svn: 302383
Eric Fiselier [Sun, 7 May 2017 21:41:58 +0000 (21:41 +0000)]
Fix Windows test failures caused by identical temp file names.
This patch fixes test failures that occur on Windows because
the tests attempt to generate two distinct temp file names but
get the same name both time.
The fix for this is to create the first temp file before requesting
a second temporary file name. This ensures that the second name
will be unique.
llvm-svn: 302382
Eric Fiselier [Sun, 7 May 2017 21:21:07 +0000 (21:21 +0000)]
Accept Windows specific output in system error tests
llvm-svn: 302381
Eric Fiselier [Sun, 7 May 2017 21:15:28 +0000 (21:15 +0000)]
Fix two test failures caused by Windows mangling of function types.
On Windows the function template `template <class T> void test()` has
the same mangled name when instantiated with the distinct types `void()`
and `void() noexcept`. When this occurs Clang emits an error. This error
was causing two type-traits tests to fail.
However this can be worked around by using class templates instead of
function templates, which is what this patch does to fix the errors.
llvm-svn: 302380
Siddharth Bhat [Sun, 7 May 2017 21:03:46 +0000 (21:03 +0000)]
[Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen
Summary:
When compiling for GPU, one can now choose to compile for OpenCL or CUDA,
with the corresponding polly-gpu-runtime flag (libopencl / libcudart). The
GPURuntime library (GPUJIT) has been extended with the OpenCL Runtime library
for that purpose, correctly choosing the corresponding library calls to the
option chosen when compiling (via different initialization calls).
Additionally, a specific GPU Target architecture can now be chosen with -polly-gpu-arch (only nvptx64 implemented thus far).
Reviewers: grosser, bollu, Meinersbur, etherzhhb, singam-sanjay
Reviewed By: grosser, Meinersbur
Subscribers: singam-sanjay, llvm-commits, pollydev, nemanjai, mgorny, yaxunl, Anastasia
Tags: #polly
Differential Revision: https://reviews.llvm.org/D32431
llvm-svn: 302379
Simon Pilgrim [Sun, 7 May 2017 20:58:55 +0000 (20:58 +0000)]
[X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics.
Account for subvector extraction/insertion, helps prevent the vectorizers from selecting 256-bit vectors that will have to be split anyhow on AVX1 targets.
llvm-svn: 302378
Lang Hames [Sun, 7 May 2017 20:39:46 +0000 (20:39 +0000)]
[Orc] Remove trailing whitespace.
llvm-svn: 302377
Siddharth Bhat [Sun, 7 May 2017 19:53:35 +0000 (19:53 +0000)]
[Polly] [GPUJIT] Adapted argument capitalization to fit standard
Summary: Function argument naming changed to reflect capitalization standards.
Reviewers: grosser, Meinersbur
Reviewed By: grosser
Differential Revision: https://reviews.llvm.org/D32854
llvm-svn: 302376
Siddharth Bhat [Sun, 7 May 2017 18:31:25 +0000 (18:31 +0000)]
[Polly] [GPUJIT] Moved error prints to stderr
Summary: Errors previously printed to stdout now get printed to stderr.
Reviewers: grosser, Meinersbur
Reviewed By: grosser
Differential Revision: https://reviews.llvm.org/D32852
llvm-svn: 302375
Sanjay Patel [Sun, 7 May 2017 18:19:13 +0000 (18:19 +0000)]
[InstSimplify] add tests for PR32949 miscompile; NFC
llvm-svn: 302374
Zvi Rackover [Sun, 7 May 2017 18:16:37 +0000 (18:16 +0000)]
InstructionSimplify: Relanding r301766
Summary:
Re-applying r301766 with a fix to a typo and a regression test.
The log message for r301766 was:
==================================================================================
InstructionSimplify: Canonicalize shuffle operands. NFC-ish.
Summary:
Apply canonicalization rules:
1. Input vectors with no elements selected from can be replaced with undef.
2. If only one input vector is constant it shall be the second one.
This allows constant-folding to cover more ad-hoc simplifications that
were in place and avoid duplication for RHS and LHS checks.
There are more rules we may want to add in the future when we see a
justification. e.g. mask elements that select undef elements can be
replaced with undef.
==================================================================================
Reviewers: spatel, RKSimon
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32863
llvm-svn: 302373
Lang Hames [Sun, 7 May 2017 17:19:53 +0000 (17:19 +0000)]
Make llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.
Currently llvm-rtdyld in -check mode will map sections to back-to-back 4k
aligned slabs starting at 0x1000. Automatically remapping sections by default is
helpful because it quickly exposes relocation bugs due to use of local addresses
rather than load addresses (these would silently pass if the load address was
not remapped). These mappings can be explicitly overridden on a per-section
basis using llvm-rtdlyd's -map-section option. This patch extends this scheme to
also preserve any mappings made by RuntimeDyld itself. Preserving RuntimeDyld's
automatic mappings allows us to write test cases to verify that these automatic
mappings have been applied.
This will allow the fix in https://reviews.llvm.org/D32899 to be tested with
llvm-rtdyld -check.
llvm-svn: 302372
Craig Topper [Sun, 7 May 2017 16:28:17 +0000 (16:28 +0000)]
[SCEV] Use move semantics in ScalarEvolution::setRange
Summary: This makes setRange take ConstantRange by rvalue reference since most callers were passing an unnamed temporary ConstantRange. We can then move that ConstantRange into the DenseMap caches. For the callers that weren't passing a temporary, I've added std::move to to the local variable being passed.
Reviewers: sanjoy, mzolotukhin, efriedma
Reviewed By: sanjoy
Subscribers: takuto.ikuta, llvm-commits
Differential Revision: https://reviews.llvm.org/D32943
llvm-svn: 302371
Sanjay Patel [Sun, 7 May 2017 15:11:40 +0000 (15:11 +0000)]
[InstSimplify] use ConstantRange to simplify or-of-icmps
We can simplify (or (icmp X, C1), (icmp X, C2)) to 'true' or one of the icmps in many cases.
I had to check some of these with Alive to prove to myself it's right, but everything seems
to check out. Eg, the deleted code in instcombine was completely ignoring predicates with
mismatched signedness.
This is a follow-up to:
https://reviews.llvm.org/rL301260
https://reviews.llvm.org/D32143
llvm-svn: 302370
Peter Szecsi [Sun, 7 May 2017 11:00:01 +0000 (11:00 +0000)]
[Kaleidoscope] toy.cpp use after move fix
The variable Proto is moved at the beginning of the codegen() function.
According to the comment above, the pointed object should be used due the
reference P.
Differential Revision: https://reviews.llvm.org/D32939
llvm-svn: 302369
Sanjoy Das [Sun, 7 May 2017 05:29:36 +0000 (05:29 +0000)]
Remove unnecessary const_cast
llvm-svn: 302368
Sanjoy Das [Sun, 7 May 2017 05:29:34 +0000 (05:29 +0000)]
Use array_pod_sort instead of std::sort
llvm-svn: 302367
Lang Hames [Sun, 7 May 2017 03:54:53 +0000 (03:54 +0000)]
Fix comment.
llvm-svn: 302366
Saleem Abdulrasool [Sat, 6 May 2017 23:48:02 +0000 (23:48 +0000)]
COFF: add ARM64 relocation types
Add the ARM64 COFF relocation types. This will be needed to add support
for the AArch64 Windows object file emission support.
llvm-svn: 302365
Eric Fiselier [Sat, 6 May 2017 23:26:04 +0000 (23:26 +0000)]
Update LanguageExtensions doc to refer to C++14 instead of C++1y
llvm-svn: 302364
Eric Fiselier [Sat, 6 May 2017 22:10:14 +0000 (22:10 +0000)]
Fix undefined pthread references when building against libc++
llvm-svn: 302363
Dimitry Andric [Sat, 6 May 2017 20:58:50 +0000 (20:58 +0000)]
Ensure showbase does not overflow do_put buffers
Summary:
In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
std::showbase with ostreams can cause truncation of unsigned long long
when output format is octal. In fact, this can even happen with
unsigned int and unsigned long.
To ensure this does not happen, add one additional character to the
do_put buffers if std::showbase is on. Also add a test case.
Reviewers: EricWF, mclow.lists
Reviewed By: EricWF
Subscribers: cfe-commits, emaste
Differential Revision: https://reviews.llvm.org/D32670
llvm-svn: 302362
Simon Pilgrim [Sat, 6 May 2017 20:53:52 +0000 (20:53 +0000)]
[X86][AVX512] Relax assertion and just exit combine for unsupported types (PR32907)
llvm-svn: 302361
Tobias Grosser [Sat, 6 May 2017 19:18:19 +0000 (19:18 +0000)]
Really disable test as intended in the previous commit
llvm-svn: 302360
Simon Pilgrim [Sat, 6 May 2017 19:11:59 +0000 (19:11 +0000)]
[X86][AVX512] Move v2i64/v4i64 VPABS lowering to tablegen
Extend NoVLX targets to use the 512-bit versions
llvm-svn: 302359
Tobias Grosser [Sat, 6 May 2017 18:50:28 +0000 (18:50 +0000)]
Disable test to avoid buildbot noise
This test was introduced in r302339. It works on my system, but breaks on the
buildbots.
llvm-svn: 302358
Simon Pilgrim [Sat, 6 May 2017 18:17:56 +0000 (18:17 +0000)]
[X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI.
llvm-svn: 302357
Simon Pilgrim [Sat, 6 May 2017 17:42:09 +0000 (17:42 +0000)]
[NVPTX] Add support for ISD::ABS lowering
Use the ISD::ABS opcode directly
Differential Revision: https://reviews.llvm.org/D32944
llvm-svn: 302356
Simon Pilgrim [Sat, 6 May 2017 17:30:39 +0000 (17:30 +0000)]
[X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41
rL294581 broke unnecessary register dependencies on partial v16i8/v8i16 BUILD_VECTORs, but on SSE41 we (currently) use insertion for full BUILD_VECTORs as well. By allowing full insertion to occur on SSE41 targets we can break register dependencies here as well.
llvm-svn: 302355
Brian Gesiak [Sat, 6 May 2017 16:22:53 +0000 (16:22 +0000)]
[Analysis] Print out unreachable loops
Summary:
When writing a loop pass I made a mistake and hit the assertion
"Unreachable block in loop". Later, I hit an assertion when I called
`BasicBlock::eraseFromParent()` incorrectly: "Use still stuck around
after Def is destroyed". This latter assertion, however, printed out
exactly which value is being deleted and what uses remain, which helped
me debug the issue.
To help people debugging their loop passes in the future, print out
exactly which basic block is unreachable in a loop.
Reviewers: sanjoy, hfinkel, mehdi_amini
Reviewed By: mehdi_amini
Subscribers: mzolotukhin
Differential Revision: https://reviews.llvm.org/D32878
llvm-svn: 302354
Martell Malone [Sat, 6 May 2017 15:13:17 +0000 (15:13 +0000)]
[builtins] Fixup emulated TLS for mingw.
Enabled emulated TLS on WOA for mingw
Fix <windows.h> include for mingw
Reviewed By: chapuni, mstorsjo
Subscribers: compnerd, llvm-commits
Differential Revision: https://reviews.llvm.org/D32681
llvm-svn: 302340
Michael Kruse [Sat, 6 May 2017 14:03:58 +0000 (14:03 +0000)]
[DeLICM] Known knowledge.
Extend the Knowledge class to store information about the contents
of array elements and which values are written. Two knowledges do
not conflict the known content is the same. The content information
if computed from writes to and loads from the array elements, and
represented by "ValInst": isl spaces that compare equal if the value
represented is the same.
Differential Revision: https://reviews.llvm.org/D31247
llvm-svn: 302339
Simon Pilgrim [Sat, 6 May 2017 13:46:09 +0000 (13:46 +0000)]
[X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions
Many more to come...
llvm-svn: 302338
Simon Pilgrim [Sat, 6 May 2017 13:44:42 +0000 (13:44 +0000)]
[DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing first.
Remove an extra canonicalization step if ISD::ABS is going to be used anyway.
Updated x86 abs combine to check that we are lowering from both canonicalizations.
llvm-svn: 302337
Michael Kruse [Sat, 6 May 2017 13:42:15 +0000 (13:42 +0000)]
[CMake] Introduce POLLY_BUNDLED_JSONCPP.
Allow using a system's install jsoncpp library instead of the bundled
one with the setting POLLY_BUNDLED_JSONCPP=OFF.
This fixes llvm.org/PR32929
Differential Revision: https://reviews.llvm.org/D32922
llvm-svn: 302336
Craig Topper [Sat, 6 May 2017 06:03:07 +0000 (06:03 +0000)]
[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.
llvm-svn: 302335
Craig Topper [Sat, 6 May 2017 05:22:56 +0000 (05:22 +0000)]
[SCEV] Use std::move to avoid some APInt copies.
llvm-svn: 302334
Craig Topper [Sat, 6 May 2017 05:15:11 +0000 (05:15 +0000)]
[SCEV] Use APInt's uint64_t operations instead of creating a temporary APInt to hold 1.
llvm-svn: 302333
Craig Topper [Sat, 6 May 2017 05:15:09 +0000 (05:15 +0000)]
[SCEV] Avoid a couple APInt copies by capturing by reference since the method returns a reference.
llvm-svn: 302332
Craig Topper [Sat, 6 May 2017 03:35:15 +0000 (03:35 +0000)]
[LazyValueInfo] Avoid unnecessary copies of ConstantRanges
Summary:
ConstantRange contains two APInts which can allocate memory if their width is larger than 64-bits. So we shouldn't copy it when we can avoid it.
This changes LVILatticeVal::getConstantRange() to return its internal ConstantRange by reference. This allows many places that just need a ConstantRange reference to avoid making a copy.
Several places now capture the return value of getConstantRange() by reference so they can call methods on it that don't need a new object.
Lastly it adds std::move in one place to capture to move a local ConstantRange into an LVILatticeVal.
Reviewers: reames, dberlin, sanjoy, anna
Reviewed By: reames
Subscribers: grandinj, llvm-commits
Differential Revision: https://reviews.llvm.org/D32884
llvm-svn: 302331
Eric Fiselier [Sat, 6 May 2017 02:58:43 +0000 (02:58 +0000)]
Fix lgamma_r linking errors on Windows. It appears the normal lgamma function is thread safe anyway
llvm-svn: 302330
Kamil Rytarowski [Sat, 6 May 2017 02:45:42 +0000 (02:45 +0000)]
Note addition of NetBSD support in googletest
Recreated patch for __NetBSD__ has been pushed upstream to Google.
llvm-svn: 302329
Jim Ingham [Sat, 6 May 2017 01:15:47 +0000 (01:15 +0000)]
Be a little more permissive in DynamicLoaderMacOS::CanLoadImage
If we can't find the "is dyld locked" symbol, assume it is safe
to load the image unless we only have 1 image loaded - in which case
we are in _dyld_start and it is definitely NOT safe.
Also add a little better errors to that function, and better logging
in SBProcess.cpp.
<rdar://problem/
30174817>
llvm-svn: 302327
Rui Ueyama [Fri, 5 May 2017 23:52:24 +0000 (23:52 +0000)]
Use the same terminology as ELF.
This patch do s/color/class/g.
llvm-svn: 302326
Stephan T. Lavavej [Fri, 5 May 2017 23:51:39 +0000 (23:51 +0000)]
[libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.
Fixes D32926.
llvm-svn: 302325
Rui Ueyama [Fri, 5 May 2017 23:44:26 +0000 (23:44 +0000)]
Remove dead file.
llvm-svn: 302324
Jim Ingham [Fri, 5 May 2017 23:38:26 +0000 (23:38 +0000)]
Added "info threads", "thread 1" and "apropos".
llvm-svn: 302323
Stephan T. Lavavej [Fri, 5 May 2017 23:38:24 +0000 (23:38 +0000)]
[libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value.
Fixes D32924.
llvm-svn: 302322
Kostya Serebryany [Fri, 5 May 2017 23:28:47 +0000 (23:28 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. compiler-rt part (test only).
llvm-svn: 302321
Kostya Serebryany [Fri, 5 May 2017 23:28:18 +0000 (23:28 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. clang part.
llvm-svn: 302320
Kostya Serebryany [Fri, 5 May 2017 23:14:40 +0000 (23:14 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. llvm part.
llvm-svn: 302319
Stephan T. Lavavej [Fri, 5 May 2017 23:01:38 +0000 (23:01 +0000)]
[libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance shouldn't be mandated".
In C++17, these iterators are allowed but not required
to inherit from the deprecated std::iterator base class.
Fixes D32727.
llvm-svn: 302318
Jakub Kuderski [Fri, 5 May 2017 23:00:37 +0000 (23:00 +0000)]
[clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace
Summary: Use the cxxStdInitializerListExp matcher from ASTMatchers.h instead of a local one.
Reviewers: aaron.ballman, alexfh, Prazek
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32923
llvm-svn: 302317
Quentin Colombet [Fri, 5 May 2017 22:48:22 +0000 (22:48 +0000)]
[RegisterBankInfo] Uniquely allocate instruction mapping.
This is a step toward having statically allocated instruciton mapping.
We are going to tablegen them eventually, so let us reflect that in
the API.
NFC.
llvm-svn: 302316
Craig Topper [Fri, 5 May 2017 22:46:40 +0000 (22:46 +0000)]
[BitVector] Improve the description of the BitVector::clear to say it removes the bits rather than clearing since clearing could be interpreted as just zeroing. NFC
llvm-svn: 302315
Lang Hames [Fri, 5 May 2017 22:42:13 +0000 (22:42 +0000)]
Add DidStartExecuting/WillFinishExecuting methods to Expression.
These methods can be used by the derived expression types to perform expression
specific and/or language specific actions before and after the expression runs.
(ThreadPlanCallUserExpression is modified to call these methods on the
expression immediately before/after execution of the expression).
The immediate motivation is allowing Swift expressions to notify the swift
runtime that exclusivity enforcement should be suspended while the expression
runs (we want LLDB expressions to be able to access variables even when they're
considered exclusively owned by someone else in the original program).
Reviewed in https://reviews.llvm.org/D32889
llvm-svn: 302314
Tim Northover [Fri, 5 May 2017 22:36:06 +0000 (22:36 +0000)]
AArch64: fix weird edge case in ABI.
It turns out there are some sort-of-but-not-quite empty structs that break all
the rules. For example:
struct SuperEmpty { int arr[0]; };
struct SortOfEmpty { struct SuperEmpty e; };
Both of these have sizeof == 0, even in C++ mode, for GCC compatibility. The
first one also doesn't occupy a register when passed by value in GNU C++ mode,
unlike everything else.
On Darwin, we want to ignore the lot (and especially don't want to try to use
an i0 as we were).
llvm-svn: 302313
Richard Smith [Fri, 5 May 2017 22:34:07 +0000 (22:34 +0000)]
Permit keywords in module names in #pragma clang module *.
This is necessary to be able to build a libc++ module from preprocessed source
(due to the submodule std.new).
llvm-svn: 302312
Craig Topper [Fri, 5 May 2017 22:31:11 +0000 (22:31 +0000)]
Fix spelling error in command line option description. NFC
llvm-svn: 302311
Eugene Zelenko [Fri, 5 May 2017 22:30:37 +0000 (22:30 +0000)]
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
llvm-svn: 302310
Richard Smith [Fri, 5 May 2017 22:18:51 +0000 (22:18 +0000)]
Add support for building modules from preprocessed source.
To support this, an optional marker "#pragma clang module contents" is
recognized in module map files, and the rest of the module map file from that
point onwards is treated as the source of the module. Preprocessing a module
map produces the input module followed by the marker and then the preprocessed
contents of the module.
Ignoring line markers, a preprocessed module might look like this:
module A {
header "a.h"
}
#pragma clang module contents
#pragma clang module begin A
// ... a.h ...
#pragma clang module end
The preprocessed output generates line markers, which are not accepted by the
module map parser, so -x c++-module-map-cpp-output should be used to compile
such outputs.
A couple of major parts do not work yet:
1) The files that are listed in the module map must exist on disk, in order to
build the on-disk header -> module lookup table in the PCM file. To fix
this, we need the preprocessed output to track the file size and other stat
information we might use to build the lookup table.
2) Declaration ownership semantics don't work properly yet, since mapping from
a source location to a module relies on mapping from FileIDs to modules,
which we can't do if module transitions can occur in the middle of a file.
llvm-svn: 302309
Easwaran Raman [Fri, 5 May 2017 22:15:09 +0000 (22:15 +0000)]
Override invalidate of ProfileSummaryInfo to return false.
Differential revision: https://reviews.llvm.org/D32775
llvm-svn: 302308
Krzysztof Parzyszek [Fri, 5 May 2017 22:13:57 +0000 (22:13 +0000)]
[Hexagon] Disable predicated calls by default
llvm-svn: 302307
Krzysztof Parzyszek [Fri, 5 May 2017 22:12:12 +0000 (22:12 +0000)]
[Hexagon] Remove C6 and C7 as separate registers
These are M0 and M1. Removing duplicated registers reduces the number
of explicit register aliasing.
llvm-svn: 302306
Krzysztof Parzyszek [Fri, 5 May 2017 22:10:32 +0000 (22:10 +0000)]
[RDF] Remove covered parts of reached uses for phi and use in same block
llvm-svn: 302305
Zachary Turner [Fri, 5 May 2017 22:06:06 +0000 (22:06 +0000)]
lld Fixups for TypeDatabase changes.
llvm-svn: 302304
Matthias Braun [Fri, 5 May 2017 22:04:05 +0000 (22:04 +0000)]
ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates
MaxCallFrameSize and calls it after instruction selection in the ARM
target.
This avoids
ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame()
giving different answers in early/late phases of codegen.
The testcase shows a particular nasty example result of that where we
would fail to properly align an alloca.
Differential Revision: https://reviews.llvm.org/D32622
llvm-svn: 302303
Zachary Turner [Fri, 5 May 2017 22:02:37 +0000 (22:02 +0000)]
[CodeView] Reserve TypeDatabase records up front.
Most of the time we know exactly how many type records we
have in a list, and we want to use the visitor to deserialize
them into actual records in a database. Previously we were
just using push_back() every time without reserving the space
up front in the vector. This is obviously terrible from a
performance standpoint, and it's not uncommon to have PDB
files with half a million type records, where the performance
degredation was quite noticeable.
llvm-svn: 302302
Matthias Braun [Fri, 5 May 2017 21:50:26 +0000 (21:50 +0000)]
Add missing target triple to test
llvm-svn: 302301
Kostya Kortchinsky [Fri, 5 May 2017 21:38:22 +0000 (21:38 +0000)]
[scudo] Add Android support
Summary:
This change adds Android support to the allocator (but doesn't yet enable it in
the cmake config), and should be the last fragment of the rewritten change
D31947.
Android has more memory constraints than other platforms, so the idea of a
unique context per thread would not have worked. The alternative chosen is to
allocate a set of contexts based on the number of cores on the machine, and
share those contexts within the threads. Contexts can be dynamically reassigned
to threads to prevent contention, based on a scheme suggested by @dvyuokv in
the initial review.
Additionally, given that Android doesn't support ELF TLS (only emutls for now),
we use the TSan TLS slot to make things faster: Scudo is mutually exclusive
with other sanitizers so this shouldn't cause any problem.
An additional change made here, is replacing `thread_local` by `THREADLOCAL`
and using the initial-exec thread model in the non-Android version to prevent
extraneous weak definition and checks on the relevant variables.
Reviewers: kcc, dvyukov, alekseyshl
Reviewed By: alekseyshl
Subscribers: srhines, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D32649
llvm-svn: 302300
Rafael Espindola [Fri, 5 May 2017 21:34:26 +0000 (21:34 +0000)]
Delete LinkerScript::getSectionIndex.
We can set SectionIndex tentatively as we process the linker script
instead of looking it repeatedly.
In general we should try to have as few name lookups as possible.
llvm-svn: 302299
Eric Fiselier [Fri, 5 May 2017 21:32:37 +0000 (21:32 +0000)]
Mark test using <sys/time.h> as UNSUPPORTED on Windows
llvm-svn: 302298
Eric Fiselier [Fri, 5 May 2017 21:31:22 +0000 (21:31 +0000)]
Fix condition_variable::wait_until and wait_for on Windows.
The ERROR_TIMEDOUT returned by the Windows API does not
have the same value as ETIMEDOUT. This caused condition_variable
to return timeouts as unknown errors.
llvm-svn: 302297
Jonathan Roelofs [Fri, 5 May 2017 21:30:13 +0000 (21:30 +0000)]
Multilib: add dump methods
llvm-svn: 302296
Rui Ueyama [Fri, 5 May 2017 21:27:30 +0000 (21:27 +0000)]
Fix build breakage on Linux.
llvm-svn: 302295
Zachary Turner [Fri, 5 May 2017 21:25:31 +0000 (21:25 +0000)]
Fix -Wreorder warning.
llvm-svn: 302294
Zachary Turner [Fri, 5 May 2017 21:18:26 +0000 (21:18 +0000)]
Fix another incorrectly cased header include.
llvm-svn: 302293
Zachary Turner [Fri, 5 May 2017 21:15:31 +0000 (21:15 +0000)]
[StreamArray] Pipe the Offset through the constructor.
When randomly accessing an element by offset, we weren't passing
the offset through so if you called .offset() it would return a
value of 0.
llvm-svn: 302292
Zachary Turner [Fri, 5 May 2017 21:14:55 +0000 (21:14 +0000)]
Fix #include case sensitivity problem.
llvm-svn: 302291
Kannan Narayanan [Fri, 5 May 2017 21:10:17 +0000 (21:10 +0000)]
[AMDGPU] In the new waitcnt insertion pass, use getHeader
instead of getTopBlock to find the loop header.
Differential Revision: https://reviews.llvm.org/D32831
llvm-svn: 302290
Matthias Braun [Fri, 5 May 2017 21:09:30 +0000 (21:09 +0000)]
MIParser/MIRPrinter: Compute block successors if not explicitely specified
- MIParser: If the successor list is not specified successors will be
added based on basic block operands in the block and possible
fallthrough.
- MIRPrinter: Adds a new `simplify-mir` option, with that option set:
Skip printing of block successor lists in cases where the
parser is guaranteed to reconstruct it. This means we still print the
list if some successor cannot be determined (happens for example for
jump tables), if the successor order changes or branch probabilities
being unequal.
Differential Revision: https://reviews.llvm.org/D31262
llvm-svn: 302289
Zachary Turner [Fri, 5 May 2017 21:09:26 +0000 (21:09 +0000)]
Split up Parallel and LLVM'ize naming conventions.
This is one step in preparation of raising this up to
LLVM. This hides all of the Executor stuff in a private
implementation file, leaving only the core algorithms and
the TaskGroup class exposed. In doing so, fix up all the
variable names to conform to LLVM style.
Differential Revision: https://reviews.llvm.org/D32890
llvm-svn: 302288
Jakub Kuderski [Fri, 5 May 2017 21:01:12 +0000 (21:01 +0000)]
Add cxxStdInitializerListExpr AST matcher
Summary:
This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions.
The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]).
Reviewers: alexfh, Prazek, aaron.ballman
Reviewed By: alexfh, aaron.ballman
Subscribers: malcolm.parsons, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D32810
llvm-svn: 302287
Simon Pilgrim [Fri, 5 May 2017 20:53:52 +0000 (20:53 +0000)]
[X86] Use SDValue::getConstantOperandVal helper. NFCI.
llvm-svn: 302286