Commit Graph

321466 Commits

Author SHA1 Message Date
Stanislav Mekhanoshin 1e9eae95af [AMDGPU] gfx908 v_pk_fmac_f16 support
Differential Revision: https://reviews.llvm.org/D64433

llvm-svn: 365573
2019-07-09 22:42:24 +00:00
Peter Collingbourne 67a06d9495 gn build: Merge r365536.
llvm-svn: 365572
2019-07-09 22:37:51 +00:00
Peter Collingbourne 3ea053ad50 gn build: Merge r365532.
llvm-svn: 365571
2019-07-09 22:37:41 +00:00
Peter Collingbourne d9f7162d4b gn build: Merge r365541.
llvm-svn: 365570
2019-07-09 22:37:25 +00:00
Peter Collingbourne fa7eea9e4e gn build: Merge r365531.
llvm-svn: 365569
2019-07-09 22:37:09 +00:00
Pavel Labath 9eb4b96be0 Add lldb type unit support to the release notes
Reviewers: JDevlieghere, teemperor

Subscribers: llvm-commits, lldb-commits

Tags: #llvm

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

llvm-svn: 365568
2019-07-09 22:36:43 +00:00
Alex Langford 269b9f940f [lldb] Quick Fix: IRExecutionUnit check pointer before access it
Summary:
Move checking pointer code block before accessing the pointer
This caused lldb to crash when testing on Android

Patch by Wanyi Ye!

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

llvm-svn: 365567
2019-07-09 22:24:54 +00:00
Matt Arsenault 14a4495155 GlobalISel: Combine unmerge of merge with intermediate cast
This eliminates some illegal intermediate vectors when operations are
scalarized.

llvm-svn: 365566
2019-07-09 22:19:13 +00:00
Vedant Kumar d6c15b661a [Profile] Support raw/indexed profiles larger than 4GB
rdar://45955976

llvm-svn: 365565
2019-07-09 22:01:04 +00:00
Yuanfang Chen c5f8aa8bea [llvm-objdump] Keep warning for --disassemble-functions in correct order.
relative to normal output when dumping archive files.

prepare for PR35351.

Reviewers: jhenderson, grimar, MaskRay, rupprecht

Reviewed by: MaskRay, jhenderson

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

llvm-svn: 365564
2019-07-09 21:53:33 +00:00
Stanislav Mekhanoshin 50d7f46460 [AMDGPU] gfx908 mAI instructions, MC part
Differential Revision: https://reviews.llvm.org/D64446

llvm-svn: 365563
2019-07-09 21:43:09 +00:00
Saleem Abdulrasool 97d6fcce4e build: use multiple `install` rather than building up a list
Rather than building up a list to iterate over later, just create multiple
install commands based on the configuration. This makes it easier to see what
is getting installed and allows for the install handling to be centralised. NFC

llvm-svn: 365562
2019-07-09 21:43:01 +00:00
Alex Langford 695f7821e2 [lldb_test_suite] Fix lldb test suite targeting remote Android
Summary:
Fixed `Android.rules` for running test suite on remote android
- the build configuration is not compatible with ndk structure, change it to link to static libc++
- generally clang should be able to use libc++ and will link against the right library, but some libc++ installations require the user manually link libc++abi.
- add flag `-lc++abi` to fix the test binary build failure

Added `skipIfTargetAndroid` `skipUnlessTargetAndroid` for better test support
- the `skipIfPlatform` method will ask `lldbplatformutil.getPlatform()` for platform info which is actually the os type, and //Android// is not os type but environment
- create this function to handle the android target condition

**To Run Test on Remote Android**
1 start lldb-server on your devices
2 run lldb-dotest with following configuration:
`./lldb-dotest --out-of-tree-debugserver --arch aarch64 --platform-name remote-android --platform-url connect://localhost:12345 --platform-working-dir /data/local/tmp/ --compiler your/ndk/clang`

Reviewers: xiaobai, labath

Reviewed By: labath

Subscribers: labath, javed.absar, kristof.beyls, srhines, lldb-commits

Tags: #lldb

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

llvm-svn: 365561
2019-07-09 21:35:58 +00:00
Julian Lettner ba9eb48318 Reland "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8"
Fix compilation errors related to `SANITIZER_GO` `#ifdef`s.

Refine longjmp key management.  For Linux, re-implement key retrieval in
C (instead of assembly).  Removal of `InitializeGuardPtr` and a final
round of cleanups will be done in the next commit.

Reviewed By: dvyukov

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

> llvm-svn: 365513

llvm-svn: 365560
2019-07-09 21:27:37 +00:00
Dave Lee 90148db02a [Docs] Replace SVN revisions with lldb versions
Summary: Replaces references to svn commits with the lldb version number those commits first appeared in. Themotivation is to show that these features are no longer that new and can generally be adopted.

Reviewers: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 365559
2019-07-09 21:21:45 +00:00
Andus Yu fa9b96aeab XFAIL clang/test/Headers/max_align.c on i686
llvm-svn: 365558
2019-07-09 21:06:34 +00:00
Reid Kleckner 9b28d9c331 Use the Itanium C++ ABI for the pipe_builtin.cl test
Certain OpenCL constructs cannot yet be mangled in the MS C++ ABI.
Add a FIXME for it if anyone cares to implement it.

llvm-svn: 365557
2019-07-09 21:02:06 +00:00
Reid Kleckner 8777df5270 De-templatize non-dependent VS macro logic, NFC
These macro definitions don't depend on the template parameter, so they
don't need to be part of the template. Move them to a .cpp file.

llvm-svn: 365556
2019-07-09 20:57:28 +00:00
Paul Robinson 9e04b532df [CXX] Exercise all paths through these tests.
Differential Revision: https://reviews.llvm.org/D63894

llvm-svn: 365555
2019-07-09 20:49:07 +00:00
Julian Lettner c11c43b64f [TSan] Refine longjmp key management on Darwin
NFC.

llvm-svn: 365554
2019-07-09 20:47:37 +00:00
Sam Clegg 9abe8c4805 [lld][WebAssembly] Report undefined symbols during scanRelocations
This puts handling of undefined symbols in a single location.  Its
also more in line with the ELF backend which only reports undefined
symbols based on relocations.

One side effect is that we no longer report undefined symbols that are
only referenced in GC'd sections.

This also fixes a crash reported in the emscripten toolchain:
https://github.com/emscripten-core/emscripten/issues/8930.

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

llvm-svn: 365553
2019-07-09 20:45:20 +00:00
Nikita Popov 5ca39e828c [SLP] Optimize getSpillCost(); NFCI
For a given set of live values, the spill cost will always be the
same for each call. Compute the cost once and multiply it by the
number of calls.

(I'm not sure this spill cost modeling makes sense if there are
multiple calls, as the spill cost will likely be shared across
calls in that case. But that's how it currently works.)

llvm-svn: 365552
2019-07-09 20:24:44 +00:00
Peter Collingbourne 1366262b74 hwasan: Improve precision of checks using short granule tags.
A short granule is a granule of size between 1 and `TG-1` bytes. The size
of a short granule is stored at the location in shadow memory where the
granule's tag is normally stored, while the granule's actual tag is stored
in the last byte of the granule. This means that in order to verify that a
pointer tag matches a memory tag, HWASAN must check for two possibilities:

* the pointer tag is equal to the memory tag in shadow memory, or
* the shadow memory tag is actually a short granule size, the value being loaded
  is in bounds of the granule and the pointer tag is equal to the last byte of
  the granule.

Pointer tags between 1 to `TG-1` are possible and are as likely as any other
tag. This means that these tags in memory have two interpretations: the full
tag interpretation (where the pointer tag is between 1 and `TG-1` and the
last byte of the granule is ordinary data) and the short tag interpretation
(where the pointer tag is stored in the granule).

When HWASAN detects an error near a memory tag between 1 and `TG-1`, it
will show both the memory tag and the last byte of the granule. Currently,
it is up to the user to disambiguate the two possibilities.

Because this functionality obsoletes the right aligned heap feature of
the HWASAN memory allocator (and because we can no longer easily test
it), the feature is removed.

Also update the documentation to cover both short granule tags and
outlined checks.

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

llvm-svn: 365551
2019-07-09 20:22:36 +00:00
Philip Reames a6548d0437 [PoisonChecking] Flesh out complete todo list for full coverage
Note: I don't actually plan to implement all of the cases at the moment, I'm just documenting them for completeness.  There's a couple of cases left which are practically useful for me in debugging loop transforms, and I'll probably stop there for the moment.
llvm-svn: 365550
2019-07-09 19:59:39 +00:00
Craig Topper 84a1f07363 [X86][AMDGPU][DAGCombiner] Move call to allowsMemoryAccess into isLoadBitCastBeneficial/isStoreBitCastBeneficial to allow X86 to bypass it
Basically the problem is that X86 doesn't set the Fast flag from
allowsMemoryAccess on certain CPUs due to slow unaligned memory
subtarget features. This prevents bitcasts from being folded into
loads and stores. But all vector loads and stores of the same width
are the same cost on X86.

This patch merges the allowsMemoryAccess call into isLoadBitCastBeneficial to allow X86 to skip it.

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

llvm-svn: 365549
2019-07-09 19:55:28 +00:00
Reid Kleckner c236eeaf7d Fix build error for VC STL, use llvm::make_unique
llvm-svn: 365548
2019-07-09 19:51:58 +00:00
Sam Clegg 51c2b99eff [lld][WebAssembly] Fix name of data section in PIC mode
This should always have been ".data".  Without this we treat the
section as a user-defined section in other places (such as the
generation of __start/__stop symbols).

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

llvm-svn: 365547
2019-07-09 19:47:32 +00:00
Stanislav Mekhanoshin 9e77d0c6df [AMDGPU] gfx908 register file changes
Differential Revision: https://reviews.llvm.org/D64438

llvm-svn: 365546
2019-07-09 19:41:51 +00:00
Fangrui Song 3fbd8fda9a [OpenMP] Simplify getFloatTypeSemantics
When the float point representations are the same on the host and on the target device,
(`&Target->getLongDoubleFormat() == &AuxTarget->getLongDoubleFormat()`),
we can just use `AuxTarget->getLongDoubleFormat()`.

Reviewed By: ABataev

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

llvm-svn: 365545
2019-07-09 19:36:22 +00:00
Max Moroz 2d73994046 [libFuzzer] Include FuzzedDataProvider.h in the test without "utils" subdir.
Summary:
This way the test would better match the intended usage of the header,
plus it makes some additional testing (e.g. in CI) a bit easier to set up.

Reviewers: morehouse

Reviewed By: morehouse

Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 365544
2019-07-09 19:28:14 +00:00
Philip Reames 3dbd7e98d8 [PoisonCheker] Support for out of bounds operands on shifts + insert/extractelement
These are sources of poison which don't come from flags, but are clearly documented in the LangRef.  Left off support for scalable vectors for the moment, but should be easy to add if anyone is interested.  

llvm-svn: 365543
2019-07-09 19:26:12 +00:00
Sean Fertile f09d54ed2a Boilerplate for producing XCOFF object files from the PowerPC backend.
Stubs out a number of the classes needed to produce a new object file format
(XCOFF) for the powerpc-aix target. For testing input is an empty module which
produces an object file with just a file header.

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

llvm-svn: 365541
2019-07-09 19:21:01 +00:00
Simon Pilgrim 294f37561a [X86] LowerToHorizontalOp - use count_if to count non-UNDEF ops. NFCI.
llvm-svn: 365540
2019-07-09 19:19:17 +00:00
Philip Reames 3b38b92541 [PoisonChecking] Add validation rules for "exact" on sdiv/udiv
As directly stated in the LangRef, no ambiguity here...

llvm-svn: 365538
2019-07-09 18:56:41 +00:00
Bob Haarman 6a4c2e4f0a [ThinLTO] only emit used or referenced CFI records to index
Summary: We emit CFI_FUNCTION_DEFS and CFI_FUNCTION_DECLS to
distributed ThinLTO indices to implement indirect function call
checking.  This change causes us to only emit entries for functions
that are either defined or used by the module we're writing the index
for (instead of all functions in the combined index), which can make
the indices substantially smaller.

Fixes PR42378.

Reviewers: pcc, vitalybuka, eugenis

Subscribers: mehdi_amini, hiraditya, dexonsmith, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 365537
2019-07-09 18:50:55 +00:00
Philip Reames f47a313e71 Add a transform pass to make the executable semantics of poison explicit in the IR
Implements a transform pass which instruments IR such that poison semantics are made explicit. That is, it provides a (possibly partial) executable semantics for every instruction w.r.t. poison as specified in the LLVM LangRef. There are obvious parallels to the sanitizer tools, but this pass is focused purely on the semantics of LLVM IR, not any particular source language.

The target audience for this tool is developers working on or targetting LLVM from a frontend. The idea is to be able to take arbitrary IR (with the assumption of known inputs), and evaluate it concretely after having made poison semantics explicit to detect cases where either a) the original code executes UB, or b) a transform pass introduces UB which didn't exist in the original program.

At the moment, this is mostly the framework and still needs to be fleshed out. By reusing existing code we have decent coverage, but there's a lot of cases not yet handled. What's here is good enough to handle interesting cases though; for instance, one of the recent LFTR bugs involved UB being triggered by integer induction variables with nsw/nuw flags would be reported by the current code.

(See comment in PoisonChecking.cpp for full explanation and context)

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

llvm-svn: 365536
2019-07-09 18:49:29 +00:00
Sean Fertile 210314ae8c Try to appease the Windows build bots.
Several of the conditonal operators commited in llvm-svn: 365524 fail to compile
on the windows buildbots. Converting to an if and early return to try to fix.

llvm-svn: 365535
2019-07-09 18:44:28 +00:00
Julian Lettner 95176d72c7 Revert "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8"
This reverts commit 521f77e635.

llvm-svn: 365534
2019-07-09 18:42:01 +00:00
Stella Stamenova 20ecec6116 [lldb, windows] Include WindowsError instead of ErrorHandling in ThreadLauncher
ErrorHandling.h does not include WindowsError.h which is needed for mapWindowsError

llvm-svn: 365533
2019-07-09 18:41:31 +00:00
Yonghong Song a1b2a27a38 [BPF] Fix a typo in the file name
Fixed the file name from BPFAbstrctMemberAccess.cpp to
BPFAbstractMemberAccess.cpp.

Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 365532
2019-07-09 18:35:46 +00:00
Sam McCall 2f760c44e6 [clangd] Rewrite of logic to rebuild the background index serving structures.
Summary:
Previously it was rebuilding every 5s by default, which was much too frequent
in the long run - the goal was to provide an early build. There were also some
bugs. There were also some bugs, and a dedicated thread was used in production
but not tested.

 - rebuilds are triggered by #TUs built, rather than time. This should scale
   more sensibly to fast vs slow machines.
 - there are two separate indexed-TU thresholds to trigger index build: 5 TUs
   for the first build, 100 for subsequent rebuilds.
 - rebuild is always done on the regular indexing threads, and is affected by
   blockUntilIdle. This means unit/lit tests run the production configuration.
 - fixed a bug where we'd rebuild after attempting to load shards, even if there
   were no shards.
 - the BackgroundIndexTests don't really test the subtleties of the rebuild
   policy (for determinism, we call blockUntilIdle, so rebuild-on-idle is enough
   to pass the tests). Instead, we expose the rebuilder as a separate class and
   have fine-grained tests for it.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 365531
2019-07-09 18:30:49 +00:00
Peter Collingbourne 3ce33947d4 gn build: Merge r365503.
llvm-svn: 365530
2019-07-09 18:30:38 +00:00
Michael Liao 9cf71d10f8 [unittest] Add the missing bogus machine register info initialization.
llvm-svn: 365529
2019-07-09 18:22:48 +00:00
Stanislav Mekhanoshin 0cfd75a07d [AMDGPU] gfx908 clang target
Differential Revision: https://reviews.llvm.org/D64430

llvm-svn: 365528
2019-07-09 18:19:00 +00:00
Stella Stamenova 2ea514c566 [lldb-suite] Skip TestMachCore on Windows
This test was originally marked as expected failure on Windows, but it is timing out instead of outright failing now. The expectedFailure attribute does not correctly track timeouts (as in, they don't count as failures), so now this is causing the test suite to fail.

llvm-svn: 365527
2019-07-09 18:18:02 +00:00
Stella Stamenova 631b5f7dc0 [lldb, windows] Update two more locations that use LaunchThread to the new function signature
llvm-svn: 365526
2019-07-09 18:10:36 +00:00
Stanislav Mekhanoshin 22b2c3d651 [AMDGPU] gfx908 target
Differential Revision: https://reviews.llvm.org/D64429

llvm-svn: 365525
2019-07-09 18:10:06 +00:00
Sean Fertile 837ae69f8b [Object][XCOFF] Add support for 64-bit file header and section header dumping.
Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend
support for the file-header dumping to include 64-bit object files. Also
refactors the binary file parsing to be done in a helper function in an attempt
to cleanup error handeling.

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

llvm-svn: 365524
2019-07-09 18:09:11 +00:00
Sanjay Patel 5f4d7c9d4f [InstCombine] add tests for trunc(load); NFC
I'm not sure if transforming any of these is valid as
a target-independent fold, but we might as well have
a few tests here to confirm or deny our position.

llvm-svn: 365523
2019-07-09 18:06:16 +00:00
Sam McCall 5a458d6ada [clangd] Show documentation in hover, and fetch docs from index if needed.
Summary:
I assume showing docs is going to be part of structured hover rendering, but
it's unclear whether that's going to make clangd 9 so this is low-hanging fruit.

(Also fixes a bug uncovered in FormattedString's plain text output: need blank
lines when text follows codeblocks)

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 365522
2019-07-09 17:59:50 +00:00