Commit Graph

258179 Commits

Author SHA1 Message Date
Rui Ueyama 4995afd943 Rename forEach -> parallelForEach and forLoop -> parallelFor.
"Parallel" is the most important aspect of the functions,
so we shouldn't omit that.

llvm-svn: 298557
2017-03-22 23:03:35 +00:00
Konstantin Zhuravlyov ca0e7f6472 [AMDGPU] Emit kernel code properties as code object metadata
- These are not required for low level runtime

Differential Revision: https://reviews.llvm.org/D29949

llvm-svn: 298556
2017-03-22 22:54:39 +00:00
Eric Christopher fd8510cfec Clean up some Subtarget uses and casts in the X86 backend, removing unnecessary work or calls.
llvm-svn: 298555
2017-03-22 22:44:52 +00:00
Eric Fiselier 9506f141bd [libc++] Work around C1XX bug which breaks poisoned hash tests.
Summary: This is my attempt to work around the C1XX bug described to me by @BillyONeal.

Reviewers: BillyONeal, STL_MSFT, CaseyCarter

Reviewed By: BillyONeal

Subscribers: cfe-commits, BillyONeal

Differential Revision: https://reviews.llvm.org/D31260

llvm-svn: 298554
2017-03-22 22:41:41 +00:00
Sanjay Patel 51e077924d [x86] improve tests, add tests, auto-generate checks; NFC
llvm-svn: 298553
2017-03-22 22:39:17 +00:00
Konstantin Zhuravlyov 7498cd61fb [AMDGPU] Restructure code object metadata creation
- Rename runtime metadata -> code object metadata
  - Make metadata not flow
  - Switch enums to use ScalarEnumerationTraits
  - Cleanup and move AMDGPUCodeObjectMetadata.h to AMDGPU/MCTargetDesc
  - Introduce in-memory representation for attributes
  - Code object metadata streamer
  - Create metadata for isa and printf during EmitStartOfAsmFile
  - Create metadata for kernel during EmitFunctionBodyStart
  - Finalize and emit metadata to .note during EmitEndOfAsmFile
  - Other minor improvements/bug fixes

Differential Revision: https://reviews.llvm.org/D29948

llvm-svn: 298552
2017-03-22 22:32:22 +00:00
Konstantin Zhuravlyov eb685e5f27 [AMDGPU] Fix bug 31610
Differential Revision: https://reviews.llvm.org/D31258

llvm-svn: 298551
2017-03-22 21:48:18 +00:00
Saleem Abdulrasool 1723b8bbbc c++filt: support COFF import thunks
The synthetic thunk for the import is prefixed with __imp_.  Attempt to
undecorate the names when they begin with the __imp_ prefix.

llvm-svn: 298550
2017-03-22 21:15:19 +00:00
Jonathan Roelofs 7121c00966 Actually install scan-build / ccc-analyzer / c++-analyzer on windows
Before, we were only installing the wrappers... oops.

llvm-svn: 298549
2017-03-22 21:13:49 +00:00
Kostya Serebryany 4fc6dd7f8f [libFuzzer] add two experimental flags to make corpus merging more scalable: -save_coverage_summary/-load_coverage_summary. This is still WIP, the documentation will come later if these flags survive
llvm-svn: 298548
2017-03-22 20:32:44 +00:00
Tim Hammerquist 6b2c9ac888 Merge r298536 changes to Xcode
rdar://problem/31202813

llvm-svn: 298547
2017-03-22 20:21:52 +00:00
Michael Kruse 9e4e7b467f [DeLICM] Add const qualifiers. NFC.
llvm-svn: 298546
2017-03-22 20:09:58 +00:00
Reid Kleckner 731bc9d2fe Use lld-link /nopdb to suppress PDB generation when DWARF is required
Fixes cfi/stats.cpp and asan/fuse-lld.cc on Windows.

llvm-svn: 298545
2017-03-22 19:49:29 +00:00
Reid Kleckner 77d3aa476e Add a /nopdb flag to disable PDB generation
This will be used in the sanitizer test suite, which wants to use DWARF
line tables.

At some point we should reconsider how LLD handles the long section
names required by DWARF debug sections.

llvm-svn: 298544
2017-03-22 19:49:12 +00:00
Michael Kruse 174f483990 [Support] Add functions to ISLTools.
Add shiftDim and convertZoneToTimepoints overloads for isl maps.

Add distributeDomain, liftDomains and applyDomainRange functions.

These are going to be used in https://reviews.llvm.org/D31247
(Add known array contents to Knowledge)

llvm-svn: 298543
2017-03-22 19:31:06 +00:00
Anna Thomas e27b39a976 [LVI] Add an LVI printer pass to capture test LVI cache after transformations
Summary:
Adding a printer pass for printing the LVI cache values after transformations
that use LVI.
This will help us in identifying cases where LVI
invariants are violated, or transforms that leave LVI in an incorrect state.
Right now, I have added two test cases to show that the printer pass is working.
I will be adding more test cases in a later change, once this change is
checked in upstream.

Reviewers: reames, dberlin, sanjoy, apilipenko

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30790

llvm-svn: 298542
2017-03-22 19:27:12 +00:00
Zachary Turner 4c103f1f61 Remove dead include from GoASTContext.cpp.
This #include was the cause of a dependency from Symbol ->
DataFormatters.  However, nothing from the header was being
used anyway, so we can just remove it with no adverse effects.

This reduces the overall cycle count from 44 to 43.

llvm-svn: 298541
2017-03-22 19:24:17 +00:00
Luqman Aden 3f807c91dc Preserve nonnull metadata on Loads through SROA & mem2reg.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=31142 :

SROA was dropping the nonnull metadata on loads from allocas that got optimized out. This patch simply preserves nonnull metadata on loads through SROA and mem2reg.

Reviewers: chandlerc, efriedma

Reviewed By: efriedma

Subscribers: hfinkel, spatel, efriedma, arielb1, davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D27114

llvm-svn: 298540
2017-03-22 19:16:39 +00:00
Nico Weber 082f922e9d Make nullability test pass on Windows, which evaluates parameters right-to-left.
llvm-svn: 298539
2017-03-22 19:15:24 +00:00
Hans Wennborg 043f402586 [X86] Implement __readgsqword (and the rest) as builtins (PR32373)
It seems MS headers have started using __readgsqword, and since it's
used in a header that doesn't include intrin.h, we can't implement it as
an inline function anymore.

That was already the case for __readfsdword, which Saleem added support
for in r220859. This patch reuses that codegen to implement all of
__read[fg]s{byte,word,dword,qword}.

Differential Revision: https://reviews.llvm.org/D31248

llvm-svn: 298538
2017-03-22 19:13:13 +00:00
Francis Ricci dc13921fbc Factor lsan allocator cache accesses into a function
Summary:
This patch is the first step towards allows us to move away from using
__thread for the allocator cache on darwin,
which is requiring for building lsan for darwin on ios version 7
and on iossim i386.

This will be followed by patches to move the function into OS-specific files.

Reviewers: kubamracek, kcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29994

llvm-svn: 298537
2017-03-22 18:42:43 +00:00
Zachary Turner 5713a05b5b Move FileSpec from Host -> Utility.
llvm-svn: 298536
2017-03-22 18:40:07 +00:00
Zachary Turner bbd17224d8 [analyze deps] Show incoming and outgoing counts on island members.
llvm-svn: 298535
2017-03-22 18:23:14 +00:00
Peter Collingbourne f7691d8b41 IPO: Const correctness for summaries passed into passes.
Pass const qualified summaries into importers and unqualified summaries into
exporters. This lets us const-qualify the summary argument to thinBackend.

Differential Revision: https://reviews.llvm.org/D31230

llvm-svn: 298534
2017-03-22 18:22:59 +00:00
Rui Ueyama bdc8bc047d Add "(compatible with GNU linkers)" to the -version output.
Previous output:

  $ ld.lld -version
  LLD 5.0.0

New output:

  $ ld.lld -version
  LLD 5.0.0 (compatible with GNU linkers)

Differential Revision: https://reviews.llvm.org/D31199

llvm-svn: 298532
2017-03-22 18:04:57 +00:00
Peter Collingbourne 9a3f97977f IR: Fix a race condition in type id clients of ModuleSummaryIndex.
Add a const version of the getTypeIdSummary accessor that avoids
mutating the TypeIdMap.

Differential Revision: https://reviews.llvm.org/D31226

llvm-svn: 298531
2017-03-22 18:04:39 +00:00
Zachary Turner 84a6218fbe [analyze deps] Also show cycle islands.
We currently display a list of all minimal cycles, but it's
useful to be able to see the big picture impact of these cycles
by merging them all together into groups of interconnected
components.

Because the cycle discovery algorithm only considers "minimal"
cycles, it discards all information for dependencies which are
not considered part of the minimal cycle.  So all we know is that
the components of each island definitely all depend on each other
but it's still possible that there are hidden dependencies due
to transitive includes.

The cycle list should still be the authoritative reference for
deciding where the easiest places to break cycles are, though.

llvm-svn: 298530
2017-03-22 18:04:20 +00:00
Michael Kruse d07d155ebb [DeLICM] Remove overloaded Knowledge constructor. NFC.
The isl C++ bindings now has implicit conversions from isl::set to
isl::union_set. Therefore the additional overload accepting isl::set
is not required anymore.

llvm-svn: 298529
2017-03-22 18:01:23 +00:00
Adrian Prantl b44c77667a Document the status quo of DIExpression semantics in LangRef.rst
llvm-svn: 298528
2017-03-22 18:01:01 +00:00
George Rokos 01954092d0 [OpenMP] CUDA plugin: More descriptive error messages
Differential Revision: https://reviews.llvm.org/D31206

llvm-svn: 298527
2017-03-22 17:36:22 +00:00
Zachary Turner 8d48cd6009 Resubmit "Delete the remainder of platform specific code in FileSpec."
This was causing a test failure in one of LLDB's tests which
specifically dealt with a limitation in LLVM's implementation
of home_directory() that LLDB's own implementation had worked
around.

This limitation has been addressed in r298513 on the LLVM side,
so the failing test (which is now unnecessary as the limitation
no longer exists) was removed in r298519, allowing this patch to
be re-submitted without modification.

llvm-svn: 298526
2017-03-22 17:33:23 +00:00
Bob Haarman 1012fe8a54 [compiler-rt] build compiler-rt runtimes without LTO
Summary: Currently, we build the compiler-rt runtimes with link-time optimization if LTO is configured for the LLVM project. This will break external programs that don't invoke the linker in such a way that it supports LLVM's LTO. To avoid this, this change causes the compiler-rt runtimes to be compiled with -fno-lto. This also makes the check-profile tests work on systems when doing a lld LTO build on a system where the system linker does not support LLVM LTO.

Reviewers: rnk, davidxl

Reviewed By: davidxl

Subscribers: dberris, mgorny, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D31218

llvm-svn: 298525
2017-03-22 17:25:49 +00:00
Kamil Rytarowski 26b09b27e5 Reuse appropriate Launch and Attach on NetBSD
Summary:
NetBSD ships with NativeProcessNetBSD  inherited from NativeProcessProtocol.

Link Plugins/Process/gdb-remote with lldbPluginProcessNetBSD in order to resolve
correctly the linking to Launch and Attach from the NetBSD plugin.

Sponsored by <The NetBSD Foundation>

Reviewers: kettenis, labath, emaste, joerg

Reviewed By: labath, emaste

Subscribers: mgorny, #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D31231

llvm-svn: 298524
2017-03-22 17:24:37 +00:00
Adrian Prantl a27198853d Rename helper functions in DwarfExpression to be less misleading (NFC)
llvm-svn: 298523
2017-03-22 17:19:55 +00:00
Michael Kruse 29143ec3f7 [DeLICM] Remove AllElements. NFC.
It is not used and will not be used (anymore) in future commits.

llvm-svn: 298522
2017-03-22 17:18:39 +00:00
Adrian Prantl 3eb1ec9767 Fix testcase on windows.
llvm-svn: 298521
2017-03-22 17:15:03 +00:00
Sanjay Patel 2f602cea41 [InstCombine] canonicalize insertelement of scalar constant ahead of insertelement of variable
insertelement (insertelement X, Y, IdxC1), ScalarC, IdxC2 -->
insertelement (insertelement X, ScalarC, IdxC2), Y, IdxC1

As noted in the code comment and seen in the test changes, the motivation is that by pulling
constant insertion up, we may be able to constant fold some insertelement instructions.

Differential Revision: https://reviews.llvm.org/D31196

llvm-svn: 298520
2017-03-22 17:10:44 +00:00
Zachary Turner d0410b6f34 Delete TestLLVM.py
This was added to workaround a limitation in LLVM's implementation
of getting the current user's home directory, since it would
only look at the value of $HOME, but we did not want to rely
on that being set so we would also look in the password database.

Adding the ability to look in the password database to LLVM was
a straightforward patch that was submitted in r298513, so since
that is done this test is no longer needed.

llvm-svn: 298519
2017-03-22 17:08:25 +00:00
Adrian Prantl 5503077cde Fix PR32298 by adding an early exit to getFrameIndexExprs().
Also add an assertion for the case that there are multiple FI
expressions with a DW_OP_LLVM_fragment; which should violate internal
constraints in DbgVariable.

llvm-svn: 298518
2017-03-22 16:50:16 +00:00
Tim Hammerquist 17e228f309 Merge changes from r298466 into Xcode project
rdar://problem/31197116

llvm-svn: 298517
2017-03-22 16:47:14 +00:00
George Rokos ba7380bf6c [OpenMP] Allow multiple weak symbols to be loaded from the fat binary
For compatibility with Fortran.

Differential Revision: https://reviews.llvm.org/D31205

llvm-svn: 298516
2017-03-22 16:43:40 +00:00
George Rokos f3fe2dd235 [OpenMP] CUDA plugin: add include directory for libelf
Allow the user to manually specify where libelf is installed.

Differential Revision: https://reviews.llvm.org/D31207

llvm-svn: 298515
2017-03-22 16:41:46 +00:00
Zachary Turner d8350cf3fc Make the home_directory test a little more resilient.
It's possible (albeit strange) for $HOME to intentionally
point somewhere other than the user's home directory as
reported by the password database.  Our test shouldn't fail
in this case.  This patch updates the test to pull directly
from the password database before unsetting $HOME, rather
than comparing the return value of home_directory() to the
original value of the environment variable.

llvm-svn: 298514
2017-03-22 16:30:06 +00:00
Zachary Turner a3cf70bfa0 Make home_directory look in the password database in addition to $HOME.
This is something of an edge case, but when the $HOME environment
variable is not set, we can still look in the password database
to get the current user's home directory.

Added a test for this by getting the value of $HOME, then unsetting
it, then calling home_directory() and verifying that it succeeds
and that the value is the same as what we originally read from
the environment.

llvm-svn: 298513
2017-03-22 15:24:59 +00:00
Artyom Skrobov 50a066b313 [ARM] t2_so_imm_neg had a subtle bug in the conversion, and could trigger UB by negating (int)-2147483648. By pure luck, none of the pre-existing tests triggered this; so I'm adding one.
Summary: Thanks to Vitaly Buka for helping catch this.

Reviewers: rengolin, jmolloy, efriedma, vitalybuka

Subscribers: llvm-commits, aemerson

Differential Revision: https://reviews.llvm.org/D31242

llvm-svn: 298512
2017-03-22 15:09:30 +00:00
Simon Pilgrim 0f3a52b8c9 [X86][MMX] Add tests for _mm_set*_* intrinsics
llvm-svn: 298511
2017-03-22 14:55:43 +00:00
Roman Gareev cdfb57dc46 Introduce another level of metadata to distinguish non-aliasing accesses
Introduce another level of alias metadata to distinguish the individual
non-aliasing accesses that have inter iteration alias-free base pointers
marked with "Inter iteration alias-free" mark nodes. It can be used to,
for example, distinguish different stores (loads) produced by unrolling of
the innermost loops and, subsequently, sink (hoist) them by LICM.

Reviewed-by: Tobias Grosser <tobias@grosser.es>

Differential Revision: https://reviews.llvm.org/D30606

llvm-svn: 298510
2017-03-22 14:25:24 +00:00
Pavel Labath ed00beba12 Revert "Delete the remainder of platform specific code in FileSpec."
This reverts commit r298465 as it breaks
TestLLVM.TestHomeDirectory.test_tilde_home_directory.

llvm-svn: 298509
2017-03-22 14:04:43 +00:00
Rafael Espindola 72dc254532 Add default typo to .tbss.*
This matches gas behavior and is part of pr31888.

llvm-svn: 298508
2017-03-22 14:04:19 +00:00
Roman Gareev 23df27682a Map the new load to the base pointer of the invariant load hoisted load
Map the new load to the base pointer of the invariant load hoisted load
to be able to find the alias information for it.

Reviewed-by: Tobias Grosser <tobias@grosser.es>

Differential Revision: https://reviews.llvm.org/D30605

llvm-svn: 298507
2017-03-22 13:57:53 +00:00