Commit Graph

318983 Commits

Author SHA1 Message Date
Alex Langford 347ec0faa7 [NFC] Replace a plugin header with a non-plugin header
llvm-svn: 363338
2019-06-13 23:40:34 +00:00
Richard Smith 0476d069e3 PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type
nullptr_t does not access memory.

We now reuse CK_NullToPointer to represent a conversion from a glvalue
of type nullptr_t to a prvalue of nullptr_t where necessary.

This reinstates r345562, reverted in r346065, now that CodeGen's
handling of non-odr-used variables has been fixed.

llvm-svn: 363337
2019-06-13 23:31:04 +00:00
Seiya Nuta b1027a480a [llvm-objcopy] Fix sparc target endianness
Summary: AFAIK, the "sparc" target is big endian and the target for 32-bit little-endian SPARC is denoted as "sparcel". This patch fixes the endianness of "sparc" target and adds "sparcel" target for 32-bit little-endian SPARC.

Reviewers: espindola, alexshap, rupprecht, jhenderson

Reviewed By: jhenderson

Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 363336
2019-06-13 23:24:12 +00:00
Amy Huang 49275272e3 Use fully qualified name when printing S_CONSTANT records
Summary:
Before it was using the fully qualified name only for static data members.
Now it does for all variable names to match MSVC.

Reviewers: rnk

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 363335
2019-06-13 22:53:43 +00:00
Peter Collingbourne 0feb6e52f1 Symbolize: Remove dead code. NFCI.
The only caller of SymbolizableObjectFile::create passes a non-null
DebugInfoContext and asserts that they do so. Move the assert into
SymbolizableObjectFile::create and remove null checks.

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

llvm-svn: 363334
2019-06-13 22:49:34 +00:00
Thomas Anderson 2ce370c957 [libc++] Fix build with gcc 4.8
gcc 4.8.4 (but not 5.4.0 or 7.3.0) has trouble initializing errc with {}, giving
the error in [1]. This CL switches to explicitly using errc(0), which gcc 4.8
accepts.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=973723

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

llvm-svn: 363333
2019-06-13 22:27:24 +00:00
Stanislav Mekhanoshin 4336a9496d [AMDGPU] gfx10 documentation update. NFC.
llvm-svn: 363332
2019-06-13 22:18:47 +00:00
Amara Emerson fb0a40f064 [GlobalISel][IRTranslator] Add debug loc with line 0 to constants emitted into the entry block.
Constants, including G_GLOBAL_VALUE, are all emitted into the entry block which
lets us use the vreg def assuming it dominates all other users. However, it can
cause jumpy debug behaviour since the DebugLoc attached to these MIs are from
a user instruction that could be in a different block.

Fixes PR40887.

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

llvm-svn: 363331
2019-06-13 22:15:35 +00:00
Craig Topper cf34a2bd5d [X86Disassembler] Unify the EVEX and VEX code in emitContextTable. Merge the ATTR_VEXL/ATTR_EVEXL bits. NFCI
Merging the two bits shrinks the context table from 16384 bytes to 8192 bytes.

Remove the ATTRIBUTE_BITS macro and just create an enum directly. Then fix the ATTR_max define to be 8192 to reflect the table size so we stop hardcoding it separately.

llvm-svn: 363330
2019-06-13 22:15:25 +00:00
Jinsong Ji 1c88445840 [MachinePiepliner] Don't check boundary node in checkValidNodeOrder
This was exposed by PowerPC target enablement.

In ScheduleDAG, if we haven't seen any uses in this scheduling region,
we will create a dependence edge to ExitSU to model the live-out latency.
This is required for vreg defs with no in-region use, and prefetches with
no vreg def.

When we build NodeOrder in Scheduler, we ignore these boundary nodes.
However, when we check Succs in checkValidNodeOrder, we did not skip
them, so we still assume all the nodes have been sorted and in order in
Indices array. So when we call lower_bound() for ExitSU, it will return
Indices.end(), causing memory issues in following Node access.

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

llvm-svn: 363329
2019-06-13 21:51:12 +00:00
Francis Visoiu Mistrih 6e6e3af55b [Remarks] Refactor optimization remarks setup
* Add a common function to setup opt-remarks
* Rename common options to the same names
* Add error types to distinguish between file errors and regex errors

llvm-svn: 363328
2019-06-13 21:46:57 +00:00
Kostya Serebryany a5b12be60f fix whitespaces
llvm-svn: 363327
2019-06-13 21:17:49 +00:00
Kostya Serebryany 2fa83cb7ee [libFuzzer] simplify the DFT trace collection using the new faster DFSan mode that traces up to 16 labels at a time and never runs out of labels.
llvm-svn: 363326
2019-06-13 21:17:49 +00:00
Vedant Kumar 901d04fc6d [Coverage] Load code coverage data from archives
Support loading code coverage data from regular archives, thin archives,
and from MachO universal binaries which contain archives.

Testing: check-llvm, check-profile (with {A,UB}San enabled)

rdar://51538999

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

llvm-svn: 363325
2019-06-13 20:48:57 +00:00
Nico Weber 9c6806b164 gn build: Merge r363242
llvm-svn: 363324
2019-06-13 20:25:18 +00:00
Stanislav Mekhanoshin ccecd22db9 [AMDGPU] gfx1010 AMDGPUSetCCOp definition
It was missing from D63293 and breaks in a debug tablegen w/o
this part.

llvm-svn: 363323
2019-06-13 20:23:02 +00:00
Lang Hames 2f8c6f9362 [ORC] Rename MaterializationResponsibility resolve and emit methods to
notifyResolved/notifyEmitted.

The 'notify' prefix better describes what these methods do: they update the JIT
symbol states and notify any pending queries that the 'resolved' and 'emitted'
states have been reached (rather than actually performing the resolution or
emission themselves). Since new states are going to be introduced in the near
future (to track symbol registration/initialization) it's worth changing the
convention pre-emptively to avoid further confusion.

llvm-svn: 363322
2019-06-13 20:11:23 +00:00
Kostya Serebryany 6b936d88a4 [dfsan] Introduce dfsan_flush().
Summary:
dfsan_flush() allows to restart tain tracking from scratch in the same process.
The primary purpose right now is to allow more efficient data flow tracing
for DFT fuzzing: https://github.com/google/oss-fuzz/issues/1632

Reviewers: pcc

Reviewed By: pcc

Subscribers: delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 363321
2019-06-13 20:11:06 +00:00
Nikita Popov ad81d427ca [LangRef] Clarify poison semantics
I find the current documentation of poison somewhat confusing,
mainly because its use of "undefined behavior" doesn't seem to
align with our usual interpretation (of immediate UB). Especially
the sentence "any instruction that has a dependence on a poison
value has undefined behavior" is very confusing.

Clarify poison semantics by:

 * Replacing the introductory paragraph with the standard rationale
   for having poison values.
 * Spelling out that instructions depending on poison return poison.
 * Spelling out how we go from a poison value to immediate undefined
   behavior and give the two examples we currently use in ValueTracking.
 * Spelling out that side effects depending on poison are UB.

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

llvm-svn: 363320
2019-06-13 19:45:36 +00:00
Shawn Landden 24f4085811 [SimplifyCFG] NFC, update Switch tests as a baseline.
Also add baseline tests to show effect of later patches.

There were a couple of regressions here that were never caught,
but my patch set that this is a preparation to will fix them.

This is the third attempt to land this patch.

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

llvm-svn: 363319
2019-06-13 19:36:38 +00:00
Philip Reames 038e01dc9a Add a clarifying comment about branching on poison
I recently got this wrong (again), and I'm sure I'm not the only one.  Put a comment in the logical place someone would look to "fix" the obvious "missed optimization" which arrises based on the common misunderstanding.  Hopefully, this will save others time.  :)

llvm-svn: 363318
2019-06-13 19:27:56 +00:00
Cameron McInally 79ec1a2957 Revert "[NFC][CodeGen] Add unary fneg tests to fp-fast.ll fp-fold.ll fp-in-intregs.ll fp-stack-compare-cmov.ll fp-stack-compare.ll fsxor-alignment.ll"
This reverts commit 1d85a7518c.

llvm-svn: 363317
2019-06-13 19:25:16 +00:00
Cameron McInally 07514a1b16 Revert "[NFC][CodeGen] Add unary fneg tests to fmul-combines.ll fnabs.ll"
This reverts commit 5c01140581.

llvm-svn: 363316
2019-06-13 19:25:12 +00:00
Cameron McInally 8984dbc27c Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.ll"
This reverts commit f1b8c6ac4f.

llvm-svn: 363315
2019-06-13 19:25:09 +00:00
Cameron McInally 5d9271802b Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.ll"
This reverts commit 06de52674d.

llvm-svn: 363314
2019-06-13 19:25:06 +00:00
Cameron McInally d331e71bdb Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.ll"
This reverts commit f288a0685f.

llvm-svn: 363313
2019-06-13 19:25:03 +00:00
Cameron McInally 31da4f80d5 Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll"
This reverts commit 3d2ee0053a.

llvm-svn: 363312
2019-06-13 19:25:00 +00:00
Cameron McInally d3eaa332e4 Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.ll"
This reverts commit 169fc2b020.

llvm-svn: 363311
2019-06-13 19:24:57 +00:00
Cameron McInally 2aff82bfa6 Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.ll"
This reverts commit 66f286845c.

llvm-svn: 363310
2019-06-13 19:24:54 +00:00
Cameron McInally 0a3fe05047 Revert "[NFC][CodeGen] Add unary FNeg tests to some X86/ and XCore/ tests."
This reverts commit 4f3cf3853e.

llvm-svn: 363309
2019-06-13 19:24:51 +00:00
Cameron McInally a0d06a626f Revert "[NFC][CodeGen] Add unary FNeg tests to X86/fma-intrinsics-canonical.ll"
This reverts commit ee5881a88c.

llvm-svn: 363308
2019-06-13 19:24:47 +00:00
Cameron McInally a37d925d3d Revert "[NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll"
This reverts commit 5f39a3096f.

llvm-svn: 363307
2019-06-13 19:24:44 +00:00
Cameron McInally e00198f7a8 Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-fneg-combine.ll"
This reverts commit 10c0855542.

llvm-svn: 363306
2019-06-13 19:24:41 +00:00
Cameron McInally ea28a063fd Revert "[NFC][CodeGen] Add unary FNeg tests to X86/combine-fcopysign.ll X86/dag-fmf-cse.ll X86/fast-isel-fneg.ll X86/fdiv.ll"
This reverts commit e04c4b6af8.

llvm-svn: 363305
2019-06-13 19:24:38 +00:00
Cameron McInally 4890457196 Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll X86/combine-fabs.ll"
This reverts commit 6fe46ec25d.

llvm-svn: 363304
2019-06-13 19:24:34 +00:00
Cameron McInally 21a29a9e65 Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"
This reverts commit 2aa5ada267.

llvm-svn: 363303
2019-06-13 19:24:31 +00:00
Cameron McInally 7d4e7efd2e Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"
This reverts commit 27a5db9de5.

llvm-svn: 363302
2019-06-13 19:24:28 +00:00
Cameron McInally 8608afa964 Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"
This reverts commit 41e0b9f280.

llvm-svn: 363301
2019-06-13 19:24:24 +00:00
Cameron McInally 675be5db46 Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"
This reverts commit aeb89f8b33.

llvm-svn: 363300
2019-06-13 19:24:21 +00:00
Stanislav Mekhanoshin 8bcc9bb595 [AMDGPU] gfx1010 base changes for wave32
Differential Revision: https://reviews.llvm.org/D63293

llvm-svn: 363299
2019-06-13 19:18:29 +00:00
Don Hinton ed9c7ec73d [lit] Disable test on darwin when building shared libs.
Summary:
This test fails to link shared libraries because tries to run
a copied version of clang-check to see if the mock version of libcxx
in the same directory can be loaded dynamically.  Since the test is
specifically designed not to look in the default just-built lib
directory, it must be disabled when building with
BUILD_SHARED_LIBS=ON.

Currently only disabling it on Darwin and basing it on the
enable_shared flag.

Reviewed By: ilya-biryukov

Tags: #clang, #llvm

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

llvm-svn: 363298
2019-06-13 19:08:49 +00:00
Stanislav Mekhanoshin 335f9883f0 [AMDGPU] gfx1010: small test change for wave32. NFC
llvm-svn: 363297
2019-06-13 19:05:04 +00:00
Yitzhak Mandelbaum 67d4a6d48c [clang-tidy] Make ClangTidyCheck::OptionsView public.
Summary: The `OptionsView` class is currently protected. This constraint prevents tidies from passing the OptionsView to, for example, a helper function. Similarly, TransformerClangTidyCheck cannot pass the `OptionsView` object to functions that generate `tooling::RewriteRule`s.  The latter is needed to allow the definition of such rules to depend on the clang-tidy options, as demonstrated in the child revision.

Reviewers: gribozavr

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 363296
2019-06-13 19:05:02 +00:00
Richard Smith 17965d42f4 C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.
Summary:
When a variable is named in a context where we can't directly emit a
reference to it (because we don't know for sure that it's going to be
defined, or it's from an enclosing function and not captured, or the
reference might not "work" for some reason), we emit a copy of the
variable as a global and use that for the known-to-be-read-only access.

Reviewers: rjmccall

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 363295
2019-06-13 19:00:16 +00:00
Jordan Rupprecht 4244dd5e3f [docs] Fix TableGen/LangRef typos
This fixes:
 - `Pred` -> `Prep`
 - `IfDef` -> `Ifdef` (rst is case sensitive here)

llvm-svn: 363294
2019-06-13 18:42:30 +00:00
Philip Reames c37be29634 [LFTR] Rename variable to minimize confusion [NFC]
As pointed out by Nikita in D62625, BackedgeTakenCount is generally used to refer to the backedge taken count of the loop.  A conditional backedge taken count - one which only applies if a particular exit is taken - is called a ExitCount in SCEV code, so be consistent here.

llvm-svn: 363293
2019-06-13 18:40:15 +00:00
Philip Reames 42a3fc133d [LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC]
llvm-svn: 363292
2019-06-13 18:32:55 +00:00
Sanjay Patel 5bf7f81aa8 [InstCombine] add test for failed libfunction prototype matching; NFC
llvm-svn: 363291
2019-06-13 18:26:10 +00:00
Louis Dionne 64c1d456c1 [libc++] Add missing #include in <cwchar> tests
Thanks to Mikhail Maltsev for the patch.
Differential Revision: https://reviews.llvm.org/D63289

llvm-svn: 363290
2019-06-13 18:24:28 +00:00
Philip Reames eb88badff9 Fix a bug w/inbounds invalidation in LFTR
This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV.

The basic scheme used is to prove that using the given IV (pre or post increment forms) would have to already trigger UB on the path to the test we're modifying.  As such, our potential UB triggering use does not change the semantics of the original program.

As was pointed out in the review thread by Nikita, this is defending against a separate issue from the hasConcreteDef case. This is about poison, that's about undef. Unfortunately, the two are different, see Nikita's comment for a fuller explanation, he explains it well.

(Note: I'm going to address Nikita's last style comment in a separate commit just to minimize chance of subtle bugs being introduced due to typos.)

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

llvm-svn: 363289
2019-06-13 18:23:13 +00:00