Commit Graph

299763 Commits

Author SHA1 Message Date
Lang Hames f1c96490d4 Re-reapply r343129 with more fixes.
Fixes order-of-operand-evaluation bugs in the ThreadSafeModule unit tests.

llvm-svn: 343162
2018-09-27 02:09:37 +00:00
Lang Hames 5ad09de9f3 Revert "Re-revert r343129."
This reverts commit 4e2557dbc76704beb8c4cf1191cb786e719db5d3.

llvm-svn: 343161
2018-09-27 02:09:36 +00:00
George Karpenkov 27ec210fbd [analyzer] [NFC] Move the code for dumping the program point to ProgramPoint
So we can dump them outside of viewing the exploded grpah.

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

llvm-svn: 343160
2018-09-27 01:46:18 +00:00
George Karpenkov 4b9bb7cebb [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue
Differential Revision: https://reviews.llvm.org/D52519

llvm-svn: 343159
2018-09-27 01:45:57 +00:00
George Karpenkov 47e5493b1d [analyzer] [testing] Pass through an extra argument for specifying extra analyzer options
Differential Revision: https://reviews.llvm.org/D52585

llvm-svn: 343158
2018-09-27 01:10:59 +00:00
Sam Clegg 4aad12ce0b [WebAssembly] Update Config member to match command line option
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

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

llvm-svn: 343157
2018-09-27 00:46:54 +00:00
Sam Clegg bd37e09355 Revert "[WebAssembly] Update docs"
This change reverts rL343155.  It broke the builtbot, even though
it works for me locally:
http://lab.llvm.org:8011/builders/lld-sphinx-docs/builds/26336

Must be a sphinx version issue I guess.

llvm-svn: 343156
2018-09-27 00:42:49 +00:00
Sam Clegg 77ab7c1b30 [WebAssembly] Update docs
Differential Revision: https://reviews.llvm.org/D52048

llvm-svn: 343155
2018-09-27 00:22:24 +00:00
Yury Delendik b3857e4d35 [WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass
Summary:
The OneUseDominatesOtherUses in the WebAssemblyRegStackify not properly validates register use using hasOneUse. Since we added/modified DBG_VALUE the assert started catching valid cases.

See also https://reviews.llvm.org/D49034#1247200

Fix verified by running the wasm waterfall.

Reviewed By: dschuff

Tags: #debug-info

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

llvm-svn: 343154
2018-09-26 23:49:21 +00:00
Evgeniy Stepanov f42aa29b68 [sanitizer] AndroidGetApiLevel for static executables.
A version of AndroidGetApiLevel for static executables that is
completely compile-time.

The generic version uses dl_iterate_phdr which, even though it works
in static executables, crashes if called before libc is initialized.

llvm-svn: 343153
2018-09-26 23:48:13 +00:00
Fangrui Song 0dae636988 Remove trailing space in rC343150
llvm-svn: 343152
2018-09-26 23:47:00 +00:00
Lang Hames 533863a350 Re-revert r343129.
Apparently the fixes in r343149 did not cover all the issues. Re-reverting
while I investigate.

llvm-svn: 343151
2018-09-26 23:32:53 +00:00
Vitaly Buka 5d08581d19 Init LookupResult::AmbiguityKind
We don't expect useful value there unless it's "ambiguous".
However we use read it for copying and moving, so we need either init the field
add login to avoid reading invalid values. Such reads trigger ubsan errors.

llvm-svn: 343150
2018-09-26 22:58:53 +00:00
Lang Hames 9fdfb66780 Reapply r343129 with fix.
Explicitly defines ThreadSafeModule's move-assignment operator to move fields in
reverse order. This is required to ensure that the context field outlives the
module field.

llvm-svn: 343149
2018-09-26 22:34:33 +00:00
Hsiangkai Wang 705121aaae [DebugInfo] Generate debug information for labels.
Generate DILabel metadata and call llvm.dbg.label after label
statement to associate the metadata with the label.

After fixing PR37395.
After fixing problems in LiveDebugVariables.
After fixing NULL symbol problems in AddressPool when enabling
split-dwarf-file.

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

llvm-svn: 343148
2018-09-26 22:18:45 +00:00
Fangrui Song 55fab260ca llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: rsmith, #clang, dblaikie

Reviewed By: rsmith, #clang

Subscribers: mgrang, arphaman, kadircet, cfe-commits

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

llvm-svn: 343147
2018-09-26 22:16:28 +00:00
Fangrui Song dbaeec6892 [ELF] llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102.

Reviewers: ruiu, espindola

Subscribers: emaste, arichardson, mgrang, llvm-commits

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

llvm-svn: 343146
2018-09-26 20:54:42 +00:00
Ryan Prichard ed5bb932a2 Allow later -z name=<int> args to override earlier args
Summary:
lld already gives later -z options precedence in getZFlag().

This matches the behavior of ld.bfd and ld.gold, where later options
override earlier ones. (I tested with -z max-page-size and -z stack-size.)

Reviewers: ruiu, espindola, grimar

Reviewed By: ruiu, grimar

Subscribers: grimar, emaste, arichardson, llvm-commits

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

llvm-svn: 343145
2018-09-26 20:50:39 +00:00
Ryan Prichard b7c8d2d405 [AArch64] Fix range check of R_AARCH64_TLSLE_ADD_TPREL_HI12
Summary:
An AArch64 LE relocation is a positive ("variant 1") offset. This
relocation is used to write the upper 12 bits of a 24-bit offset into an
add instruction:

    add x0, x0, :tprel_hi12:v1

The comment in the ARM docs for R_AARCH64_TLSLE_ADD_TPREL_HI12 is:

"Set an ADD immediate field to bits [23:12] of X; check 0 <= X < 2^24."

Reviewers: javed.absar, espindola, ruiu, peter.smith, zatrazz

Reviewed By: ruiu

Subscribers: emaste, arichardson, kristof.beyls, llvm-commits

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

llvm-svn: 343144
2018-09-26 20:50:38 +00:00
Jonathan Peyton 83e360a427 [OpenMP] Add missing __kmpc_critical_with_hint to dllexports
This patch puts the __kmpc_critical_with_hint function in dllexports
and also replaces some OMP_45_ENABLED to OMP_50_ENABLED

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

llvm-svn: 343143
2018-09-26 20:47:25 +00:00
Jonathan Peyton e525f0d4e2 [OpenMP] Fix balanced affinity so thread's private affinity mask is updated
Balanced affinity only updated the thread's affinity with the operating system.
This change also has the thread's private mask reflect that change as well so
that any API that probes the thread's affinity mask will report the correct
mask value.

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

llvm-svn: 343142
2018-09-26 20:43:23 +00:00
Tatyana Krasnukha f929e2b073 Fix ProcessKDP after r343130
llvm-svn: 343141
2018-09-26 20:31:39 +00:00
Sanjay Patel 150afce75a [InstCombine] add tests that show undef propagation failures from D52548; NFC
Differential Revision: https://reviews.llvm.org/D52556

llvm-svn: 343140
2018-09-26 20:30:47 +00:00
Jonathan Peyton 985f152f25 [OpenMP] Update ittnotify sources
This patch updates the ittnotify sources to the latest
corresponding with Intel(R) VTune(TM) Amplifier 2018

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

llvm-svn: 343139
2018-09-26 20:30:00 +00:00
Jonathan Peyton cf27e31bdd [OpenMP] Fix performance issue from 376.kdtree
This change improves the performance of 376.kdtree by giving the compiler an
opportunity to do inlining and other optimizations for the call path,
__kmpc_omp_task_complete_if0()->__kmp_task_finish(), which is one of the hot
paths in the program; some functions in kmp_taskdeps.cpp were moved to the new
header file, kmp_taskdeps.h to achieve this.

Patch by Hansang Bae

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

llvm-svn: 343138
2018-09-26 20:24:39 +00:00
Jonathan Peyton 60eec6fecb [OpenMP][OMPT] A few improvements
This change includes miscellaneous improvements as follows:
1) Added ompt_get_proc_id() implementation for Windows
2) Added parser and print tool for omp-tool-var, just in case it needs
   to be printed (OMP_DISPLAY_ENV)
3) omp_control_tool is exported on Windows

Patch by Hansang Bae

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

llvm-svn: 343137
2018-09-26 20:19:44 +00:00
Martin Storsjo a89731ca71 [asan] [windows] Don't use CheckFailed in dynamic runtime thunk mode
Since SVN r342651, CheckFailed isn't exported from asan-dynamic. See
comments in https://reviews.llvm.org/D52279#1246222 for a longer
discussion on this issue.

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

llvm-svn: 343136
2018-09-26 19:49:35 +00:00
Fangrui Song 5dffc95b26 [ELF][test] Use llvm-readelf's short option -r instead of -relocations and remove ignored --wide
Reviewers: ruiu, sfertile, espindola

Reviewed By: ruiu

Subscribers: jsji, emaste, nemanjai, arichardson, kbarton, llvm-commits

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

llvm-svn: 343135
2018-09-26 19:48:07 +00:00
Tatyana Krasnukha d286886e96 Fix OSX build after r343130
llvm-svn: 343134
2018-09-26 19:41:57 +00:00
Lang Hames 523ffb6fb3 Revert r343129 "[ORC] Change the field order of ThreadSafeModule to ensure the "
It broke several bots.

llvm-svn: 343133
2018-09-26 19:36:30 +00:00
Florian Hahn 6feb637124 [LoopInterchange] Preserve LCSSA.
This patch extends LoopInterchange to move LCSSA to the right place
after interchanging. This is required for LoopInterchange to become a
function pass.

An alternative to the manual moving of the PHIs, we could also re-form
the LCSSA phis for a set of interchanged loops, but that's more
expensive.

Reviewers: efriedma, mcrosier, davide

Reviewed By: efriedma

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

llvm-svn: 343132
2018-09-26 19:34:25 +00:00
Richard Smith 79c88c3105 P1008R1 Classes with user-declared constructors are never aggregates in
C++20.

llvm-svn: 343131
2018-09-26 19:00:16 +00:00
Tatyana Krasnukha 8fe53c490a Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm::ArrayRef
Differential Revision: https://reviews.llvm.org/D49017

llvm-svn: 343130
2018-09-26 18:50:19 +00:00
Lang Hames bcdfcbcb1d [ORC] Change the field order of ThreadSafeModule to ensure the Module is
destroyed before its ThreadSharedContext.

Destroying the context first is an error if this ThreadSafeModule is the only
owner of its underlying context.

Add a unit test for ThreadSafeModule/ThreadSafeContext to catch this and other
basic usage issues.

llvm-svn: 343129
2018-09-26 18:50:01 +00:00
Sanjay Patel d938d0d4f5 [InstCombine] add tests for vector insert/extract; NFC
Preliminary step for D52439.

llvm-svn: 343128
2018-09-26 17:57:38 +00:00
Craig Topper e4c96f4a48 [X86] Update tzcnt fast-isel tests to match clang r343126.
We now generate cttz with the zero_undef flag set to false. This allows -O0 to avoid the zero check.

llvm-svn: 343127
2018-09-26 17:19:28 +00:00
Craig Topper fb5d9f2849 [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.
Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction.

By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction.

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

llvm-svn: 343126
2018-09-26 17:01:44 +00:00
Tom Stellard 344475fce5 AMDGPU/SI: Change predicate to isCIOnly for 32-bit imm s_buffer_load* patterns
Summary:
This is essentially NFC, because the complex pattern used for these patterns
will fail on non-CI, but this makes the pattern consistent with other CI
smrd patterns.  It is also a performance improvement, because the pattern
will now fail earlier on non-CI.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 343125
2018-09-26 16:53:36 +00:00
Steven Wu 6562bd9ee0 [libLTO] Expose LLVMCreateDisasmCPUFeatures from libLTO
The export file of libLTO should has all the interfaces declared in
llvm-c/lto.h and llvm-c/Disassembler.h but LLVMCreateDisasmCPUFeatures
is missing from the list. Export the C API to be consistant.

llvm-svn: 343124
2018-09-26 16:47:35 +00:00
David Major e705624cff [winasan] Pin the ASan DLL to prevent unloading
Differential Revision: https://reviews.llvm.org/D52505

llvm-svn: 343123
2018-09-26 16:28:39 +00:00
Lang Hames f0a3fd885d Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF.
Modifies lit to add a 'thread_support' feature that can be used in lit test
REQUIRES clauses. The thread_support flag is set if -DLLVM_ENABLE_THREADS=ON
and unset if -DLLVM_ENABLE_THREADS=OFF. The lit flag is used to disable the
multiple-compile-threads-basic.ll testcase when threading is disabled.

llvm-svn: 343122
2018-09-26 16:26:59 +00:00
Simon Pilgrim b0189289bf [DAG] SelectionDAGLegalize::ExpandLegalINT_TO_FP - use getFPExtendOrRound helper. NFCI.
Handles SrcVT == DstVT as well.

llvm-svn: 343121
2018-09-26 16:24:07 +00:00
Oliver Stannard 2905937435 [AArch64] Extend single-operand FP insns to match Arm ARM (NFCI)
The Armv8.3-A reference manual defines floating-point data-processing
instructions with one source operand to have an opcode of 6 bits
[20:15]. The current class in tablegen, BaseSingleOperandFPData, only
allows [18:15]. This was ok because [20:19] could only be '00', with
other encodings unallocated. Armv8.5-A brings in the FRINT group of
instructions which use other values for these bits.

This patch refactors the existing class a bit to allow using the full 6
bits of the opcode, as defined in the Arm ARM.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52474

llvm-svn: 343120
2018-09-26 15:42:47 +00:00
Michael Kruse 3b4d331d8c [doc] Fix HowToManuallyUseTheIndividualPiecesOfPolly
Also remove compiled binaries.

llvm-svn: 343119
2018-09-26 15:22:39 +00:00
Michael Kruse fe7bd34b79 Move www/experiments to docs/experiments
llvm-svn: 343118
2018-09-26 15:21:43 +00:00
Kirill Bobyrev ea4f20c6be [clangd] Fix bugs with incorrect memory estimate report
* With the current implementation, `sizeof(std::vector<Chunk>)` is added
twice to the `Dex` memory estimate which is incorrect
* `Dex` logs memory usage estimation before `BackingDataSize` is set and
hence the log report excludes size of the external `SymbolSlab` which is
coupled with `Dex` instance

Reviewed By: ioeric

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

llvm-svn: 343117
2018-09-26 15:06:23 +00:00
Kirill Bobyrev 0cdf629394 [docs] Update PostingList string representation format
Because `PostingList` objects are compressed, it is now impossible to
see elements other than the current one and the documentation doesn't
match implementation anymore.

Reviewed By: ioeric

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

llvm-svn: 343116
2018-09-26 14:59:49 +00:00
Tom Stellard 863f2b4c8c lit: Make sure the builtin_commands directory is packaged by setup.py
Summary: This directory was missing from the lit package on pypi.org.

Reviewers: ddunbar

Subscribers: delcypher, llvm-commits

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

llvm-svn: 343115
2018-09-26 14:56:11 +00:00
Luke Cheeseman 77aaa22081 Revert r343112 as CallFrameString API change has broken lldb builds
llvm-svn: 343114
2018-09-26 14:48:03 +00:00
Oliver Stannard c5d192b611 [AArch64] Refactor instructions that write PSTATE (NFCI)
Reuse some code in preparation for the v8.5A XAFlag/AXFlag instructions,
which shares part of the encoding of the MSR-immediate.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52472

llvm-svn: 343113
2018-09-26 14:42:59 +00:00