Nico Weber [Fri, 6 Jul 2018 17:37:24 +0000 (17:37 +0000)]
Revert 336426 (and follow-ups 428, 440), it very likely caused PR38084.
llvm-svn: 336453
Vedant Kumar [Fri, 6 Jul 2018 17:32:40 +0000 (17:32 +0000)]
[Debugify] Allow unsigned values narrower than their variables
Suppress the diagnostic for mis-sized dbg.values when a value operand is
narrower than the unsigned variable it describes. Assume that a debugger
would implicitly zero-extend these values.
llvm-svn: 336452
Vedant Kumar [Fri, 6 Jul 2018 17:32:39 +0000 (17:32 +0000)]
[Local] replaceAllDbgUsesWith: Update debug values before RAUW
The replaceAllDbgUsesWith utility helps passes preserve debug info when
replacing one value with another.
This improves upon the existing insertReplacementDbgValues API by:
- Updating debug intrinsics in-place, while preventing use-before-def of
the replacement value.
- Falling back to salvageDebugInfo when a replacement can't be made.
- Moving the responsibiliy for rewriting llvm.dbg.* DIExpressions into
common utility code.
Along with the API change, this teaches replaceAllDbgUsesWith how to
create DIExpressions for three basic integer and pointer conversions:
- The no-op conversion. Applies when the values have the same width, or
have bit-for-bit compatible pointer representations.
- Truncation. Applies when the new value is wider than the old one.
- Zero/sign extension. Applies when the new value is narrower than the
old one.
Testing:
- check-llvm, check-clang, a stage2 `-g -O3` build of clang,
regression/unit testing.
- This resolves a number of mis-sized dbg.value diagnostics from
Debugify.
Differential Revision: https://reviews.llvm.org/D48676
llvm-svn: 336451
Sanjay Patel [Fri, 6 Jul 2018 17:24:32 +0000 (17:24 +0000)]
[InstCombine] add more tests with poison and undef; NFC
As discussed in D48987 and D48893, there are many different
ways to go wrong depending on the binop (and as shown here
we already do go wrong in some cases).
llvm-svn: 336450
Yvan Roux [Fri, 6 Jul 2018 17:22:02 +0000 (17:22 +0000)]
Recommit "[CMake] Run libFuzzer tests with check-all."
Since problematic tests on AArch64 were disabled at r336446.
llvm-svn: 336449
Tom Stellard [Fri, 6 Jul 2018 17:16:17 +0000 (17:16 +0000)]
AMDGPU: Fix UBSan error caused by r335942
Summary: Fixes PR38071.
Reviewers: arsenm, dstenb
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D48979
llvm-svn: 336448
Matt Morehouse [Fri, 6 Jul 2018 17:10:51 +0000 (17:10 +0000)]
[MSan] Add functions to enable/disable interceptor checks.
Summary:
The motivation for this change is to make libFuzzer+MSan possible
without instrumenting libFuzzer.
See https://github.com/google/sanitizers/issues/958.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D48890
llvm-svn: 336447
Yvan Roux [Fri, 6 Jul 2018 17:06:01 +0000 (17:06 +0000)]
[libFuzzer] Disable hanging tests on AArch64
Disable problematic tests which broke AArch64 bots.
Details available in Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=38034
Differential Revision: https://reviews.llvm.org/D49011
llvm-svn: 336446
Kostya Kortchinsky [Fri, 6 Jul 2018 16:50:12 +0000 (16:50 +0000)]
[scudo] Add some logs for Android
Summary:
Namely, set the abort message, and allow to write the message to syslog if the
option is enabled.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D48902
llvm-svn: 336445
Sanjay Patel [Fri, 6 Jul 2018 15:18:58 +0000 (15:18 +0000)]
[Constants] extend getBinOpIdentity(); NFC
The enhanced version will be used in D48893 and related patches
and an almost identical (fadd is different) version is proposed
in D28907, so adding this as a preliminary step.
llvm-svn: 336444
George Rimar [Fri, 6 Jul 2018 15:03:53 +0000 (15:03 +0000)]
[ELF] - Add test for empty version in a symbol name.
This covers the following line which was untested:
https://github.com/llvm-mirror/lld/blob/master/ELF/Symbols.cpp#L170
llvm-svn: 336443
Sanjay Patel [Fri, 6 Jul 2018 14:52:36 +0000 (14:52 +0000)]
[Constant] add undef element query for vector constants; NFC
This is likely to be used in D48987 and similar patches,
so adding it as an NFC preliminary step.
llvm-svn: 336442
Sjoerd Meijer [Fri, 6 Jul 2018 14:47:09 +0000 (14:47 +0000)]
[ARM] ParallelDSP: added statistics, NFC.
Added statistics for the number of SMLAD instructions created, and
als renamed the pass name to -arm-parallel-dsp.
Differential Revision: https://reviews.llvm.org/D48971
llvm-svn: 336441
Diogo N. Sampaio [Fri, 6 Jul 2018 14:41:09 +0000 (14:41 +0000)]
Commit rL336426 cause buildbot failures
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/50537/testReport/junit/LLVM/CodeGen_AArch64/FoldRedundantShiftedMasking_ll/
This removes the comments of the function label causing this error.
llvm-svn: 336440
Benjamin Kramer [Fri, 6 Jul 2018 14:20:58 +0000 (14:20 +0000)]
[LoopSink] Make the enforcement of determinism deterministic.
LoopBlockNumber is a DenseMap<BasicBlock*, int>, comparing the result of
find() will compare a pair<BasicBlock*, int>. That's of course depending
on pointer ordering which varies from run to run. Reverse iteration
doesn't find this because we're copying to a vector first.
This bug has been there since 2016 but only recently showed up on clang
selfhost with FDO and ThinLTO, which is also why I didn't manage to get
a reasonable test case for this. Add an assert that would've caught
this.
llvm-svn: 336439
Kelvin Li [Fri, 6 Jul 2018 14:15:59 +0000 (14:15 +0000)]
Define the __STDC_FORMAT_MACROS to avoid test failure on some platforms.
ompt/misc/api_calls_from_other_thread.cpp
ompt/misc/interoperability.cpp
Differential Revision: https://reviews.llvm.org/D48984
llvm-svn: 336438
Andrea Di Biagio [Fri, 6 Jul 2018 13:46:10 +0000 (13:46 +0000)]
[llvm-mca] A write latency cannot be a negative value. NFC
llvm-svn: 336437
George Rimar [Fri, 6 Jul 2018 13:30:50 +0000 (13:30 +0000)]
[ELF] - Remove dead code #2.
'Pos' is never can be 0 here.
llvm-svn: 336436
George Rimar [Fri, 6 Jul 2018 13:23:49 +0000 (13:23 +0000)]
[ELF] - Remove dead code. NFC.
'Pos' can never be 0.
llvm-svn: 336435
Sjoerd Meijer [Fri, 6 Jul 2018 13:00:16 +0000 (13:00 +0000)]
[AArch64] Armv8.4-A: TLB support
This adds:
- outer shareable TLB Maintenance instructions, and
- TLB range maintenance instructions.
llvm-svn: 336434
Jonas Devlieghere [Fri, 6 Jul 2018 12:49:54 +0000 (12:49 +0000)]
[dsymutil] Emit label at the begin of a CU
When emitting a CU, store the MCSymbol pointing to the beginning of the
CU. We'll need this information later when emitting the .debug_names
section (DWARF5 accelerator table).
llvm-svn: 336433
Sjoerd Meijer [Fri, 6 Jul 2018 12:32:33 +0000 (12:32 +0000)]
Recommit: [AArch64] Armv8.4-A: Flag manipulation instructions
Now with the asm operand definition included.
llvm-svn: 336432
Sam McCall [Fri, 6 Jul 2018 11:50:49 +0000 (11:50 +0000)]
[clangd] Make SymbolOrigin an enum class, rather than a plain enum.
I never intended to define namespace pollution like clangd::AST, clangd::Unknown
etc. Oops!
llvm-svn: 336431
Philip Pfaffe [Fri, 6 Jul 2018 11:33:35 +0000 (11:33 +0000)]
Add a file that was missing in r336425
llvm-svn: 336430
Florian Hahn [Fri, 6 Jul 2018 10:49:59 +0000 (10:49 +0000)]
[Driver,AArch64] Add support for -mcpu=native.
This patches adds support for passing -mcpu=native for AArch64. It will
get turned into the host CPU name, before we get the target features.
CPU = native is handled in a similar fashion in
getAArch64MicroArchFetauresFromMtune and getAArch64TargetCPU already.
Having a good test case for this is hard, as it depends on the host CPU
of the machine running the test. But we can check that native has been
replaced with something else.
When cross-compiling, we will get a CPU name from the host architecture
and get ` the clang compiler does not support '-mcpu=native'` as error
message, which seems reasonable to me.
Reviewers: rengolin, peter.smith, dlj, javed.absar, t.p.northover
Reviewed By: peter.smith
Tags: #clang
Differential Revision: https://reviews.llvm.org/D48931
llvm-svn: 336429
Diogo N. Sampaio [Fri, 6 Jul 2018 10:09:04 +0000 (10:09 +0000)]
Added missing semicolon
llvm-svn: 336428
Eric Liu [Fri, 6 Jul 2018 09:43:57 +0000 (09:43 +0000)]
[SemaCodeComplete] Expose a method to create CodeCompletionString for macros.
Summary:
The method only takes PPreprocessor and don't require structures that
might not be available (e.g. Sema and ASTContext) when CodeCompletionString
needs to be generated for macros.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48973
llvm-svn: 336427
Diogo N. Sampaio [Fri, 6 Jul 2018 09:42:25 +0000 (09:42 +0000)]
[SelectionDAG] https://reviews.llvm.org/D48278
D48278
Allow to reduce redundant shift masks.
For example:
x1 = x & 0xAB00
x2 = (x >> 8) & 0xAB
can be reduced to:
x1 = x & 0xAB00
x2 = x1 >> 8
It only allows folding when the masks and shift values are constants.
llvm-svn: 336426
Tobias Grosser [Fri, 6 Jul 2018 09:00:26 +0000 (09:00 +0000)]
Update isl to isl-0.19-224-gce84a511
This is a maintenance update. Besides many minor changes it ships two
functions "isl_*_list_size" and "isl_*_list_get_at" which will allow us
to simplify the iterator implementation in Polly.
llvm-svn: 336425
Hans Wennborg [Fri, 6 Jul 2018 08:44:08 +0000 (08:44 +0000)]
Relax filechecks in r336405 tests
They were failing in Chromium's packaging builds with:
C:\b\rr\tmphqfaff\w\src\third_party\llvm\tools\lld\test\COFF\pdb-globals-dia-vfunc-collision2.test:24:8:
error: expected string not found in input
CHECK: func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl A132()
^
<stdin>:8:11: note: scanning from here
struct S [sizeof = 8] {
^
<stdin>:9:2: note: possible intended match here
func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl S::A132()
^
Maybe due to different DIA versions.
llvm-svn: 336424
Hans Wennborg [Fri, 6 Jul 2018 08:44:04 +0000 (08:44 +0000)]
dos2unix
llvm-svn: 336423
Sjoerd Meijer [Fri, 6 Jul 2018 08:39:43 +0000 (08:39 +0000)]
Revert [AArch64] Armv8.4-A: Flag manipulation instructions
It's causing build errors.
llvm-svn: 336422
Sjoerd Meijer [Fri, 6 Jul 2018 08:12:20 +0000 (08:12 +0000)]
[AArch64] Armv8.4-A: Flag manipulation instructions
These instructions are added to AArch64 only.
Differential Revision: https://reviews.llvm.org/D48926
llvm-svn: 336421
Andrea Di Biagio [Fri, 6 Jul 2018 08:08:30 +0000 (08:08 +0000)]
[llvm-mca] improve the instruction issue logic implemented by the Scheduler.
This patch modifies the Scheduler heuristic used to select the next instruction
to issue to the pipelines.
The motivating example is test X86/BtVer2/add-sequence.s, for which llvm-mca
wrongly reported an estimated IPC of 1.50. According to perf, the actual IPC for
that test should have been ~2.00.
It turns out that an IPC of 2.00 for test add-sequence.s cannot possibly be
predicted by a Scheduler that only prioritizes instructions based on their
"age". A similar issue also affected test X86/BtVer2/dependent-pmuld-paddd.s,
for which llvm-mca wrongly estimated an IPC of 0.84 instead of an IPC of 1.00.
Instructions in the ReadyQueue are now ranked based on two factors:
- The "age" of an instruction.
- The number of unique users of writes associated with an instruction.
The new logic still prioritizes older instructions over younger instructions to
minimize the pressure on the reorder buffer. However, the number of users of an
instruction now also affects the overall rank. This potentially increases the
ability of the Scheduler to extract instruction level parallelism. This patch
fixes the problem with the wrong IPC reported for test add-sequence.s and test
dependent-pmuld-paddd.s.
llvm-svn: 336420
Tim Northover [Fri, 6 Jul 2018 08:04:47 +0000 (08:04 +0000)]
CallGraphSCCPass: iterate over all functions.
Previously we only iterated over functions reachable from the set of
external functions in the module. But since some of the passes under
this (notably the always-inliner and coroutine lowerer) are required for
correctness, they need to run over everything.
This just adds an extra layer of iteration over the CallGraph to keep
track of which functions we've already visited and get the next batch of
SCCs.
Should fix PR38029.
llvm-svn: 336419
Sjoerd Meijer [Fri, 6 Jul 2018 08:03:12 +0000 (08:03 +0000)]
[AArch64][ARM] Armv8.4-A: Trace synchronization barrier instruction
This adds the Armv8.4-A Trace synchronization barrier (TSB) instruction.
Differential Revision: https://reviews.llvm.org/D48918
llvm-svn: 336418
Craig Topper [Fri, 6 Jul 2018 07:14:47 +0000 (07:14 +0000)]
[X86] Implement _builtin_ia32_vfmaddss and _builtin_ia32_vfmaddsd with native IR using llvm.fma intrinsic.
This generates some extra zeroing currently, but we should be able to quickly address that with some isel patterns.
llvm-svn: 336417
Craig Topper [Fri, 6 Jul 2018 07:14:41 +0000 (07:14 +0000)]
[X86] Remove FMA4 scalar intrinsics. Use llvm.fma intrinsic instead.
The intrinsics can be implemented with a f32/f64 llvm.fma intrinsic and an insert into a zero vector.
There are a couple regressions here due to SelectionDAG not being able to pull an fneg through an extract_vector_elt. I'm not super worried about this though as InstCombine should be able to do it before we get to SelectionDAG.
llvm-svn: 336416
Hans Wennborg [Fri, 6 Jul 2018 06:54:16 +0000 (06:54 +0000)]
[ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal
A Chromium developer reported a bug which turned out to be a mangling
collision between these two literals:
char s[] = "foo";
char t[32] = "foo";
They may look the same, but for the initialization of t we will (under
some circumstances) use a literal that's extended with zeros, and
both the length and those zeros should be accounted for by the mangling.
This actually makes the mangling code simpler: where it previously had
special logic for null terminators, which are not part of the
StringLiteral, that is now covered by the general algorithm.
(The problem was reported at https://crbug.com/857442)
Differential Revision: https://reviews.llvm.org/D48928
llvm-svn: 336415
Simon Atanasyan [Fri, 6 Jul 2018 05:50:46 +0000 (05:50 +0000)]
[ELF][MIPS] Simplify `checkFlags` routine and inline `rejectMicroMips64`. NFC
llvm-svn: 336414
Simon Atanasyan [Fri, 6 Jul 2018 05:50:41 +0000 (05:50 +0000)]
[ELF][MIPS] Remove support for linking microMIPS 64-bit code
Remove support for linking microMIPS 64-bit code because this kind of
ISA is rarely used and unsupported by LLVM.
Differential revision: https://reviews.llvm.org/D48949
llvm-svn: 336413
Sam McCall [Fri, 6 Jul 2018 05:45:45 +0000 (05:45 +0000)]
[Support] Make support types more easily printable.
Summary:
Error's new operator<< is the first way to print an error without consuming it.
formatv() can now print objects with an operator<< that works with raw_ostream.
Reviewers: bkramer
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D48966
llvm-svn: 336412
Dave Lee [Fri, 6 Jul 2018 05:11:35 +0000 (05:11 +0000)]
Reapply: "objdump: Support newer ObjC image info flags"
Summary:
Add support for two additional ObjC image info flags: `IS_SIMULATED` and
`HAS_CATEGORY_CLASS_PROPERTIES`.
`IS_SIMULATED` indicates a Mach-O binary built for iOS simulator.
`HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler
that supports class properties in categories.
Reviewers: enderby, compnerd
Reviewed By: compnerd
Subscribers: keith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48568
llvm-svn: 336411
Max Kazantsev [Fri, 6 Jul 2018 04:04:13 +0000 (04:04 +0000)]
Revert "[InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done"
llvm-svn: 336410
Craig Topper [Fri, 6 Jul 2018 03:42:09 +0000 (03:42 +0000)]
[X86] Remove all of the avx512 masked packed fma intrinsics. Use llvm.fma or unmasked 512-bit intrinsics with rounding mode.
This upgrades all of the intrinsics to use fneg instructions to convert fma into fmsub/fnmsub/fnmadd/fmsubadd. And uses a select instruction for masking.
This matches how clang uses the intrinsics these days.
llvm-svn: 336409
Craig Topper [Fri, 6 Jul 2018 03:42:06 +0000 (03:42 +0000)]
[X86] Cleanup some of the avx512 masked fma tests to prepare for removing and autoupgrading.
-Split cases that call 2 intrinsics in the same case.
-Remove testing mask3 and maskz intrinsics with an all ones mask. These won't be interesting after the upgrade.
-Restore test cases for some intrinsics that are marked for deletion, but haven't been deleted yet.
llvm-svn: 336408
Zachary Turner [Fri, 6 Jul 2018 02:59:25 +0000 (02:59 +0000)]
[llvm-pdbutil] Dump more info about globals.
We add an option to dump the entire global / public symbol record
stream. Previously we would dump globals or publics, but not both.
And when we did dump them, we would always dump them in the order
they were referenced by the corresponding hash streams, not in
the order they were serialized in. This patch adds a lower level
mode that just dumps the whole stream in serialization order.
Additionally, when dumping global-extras, we now dump the hash
bitmap as well as the record offset instead of dumping all zeros
for the offsets.
llvm-svn: 336407
Stefan Pintilie [Fri, 6 Jul 2018 02:47:02 +0000 (02:47 +0000)]
[Power9] Add __float128 library call for frem
Power 9 does not have a hardware instruction for frem but we can call fmodf128.
Differential Revision: https://reviews.llvm.org/D48552
llvm-svn: 336406
Zachary Turner [Fri, 6 Jul 2018 02:33:58 +0000 (02:33 +0000)]
[PDB] Sort globals symbols by name in GSI hash buckets.
It seems like the debugger first computes a symbol's bucket,
and then does a binary search of entries in the bucket using the
symbol's name in order to find it. If the bucket entries are not
in sorted order, this obviously won't work. After this patch a
couple of simple test cases show that we generate an exactly
identical GSI hash stream, which is very nice.
llvm-svn: 336405
Easwaran Raman [Fri, 6 Jul 2018 00:31:33 +0000 (00:31 +0000)]
[x86]Add a test case to show missed vfnmadd generation.
llvm-svn: 336404
Jim Ingham [Fri, 6 Jul 2018 00:16:21 +0000 (00:16 +0000)]
Remove a bunch more references to _LIBCPP_INLINE_VISIBILITY
and adjust the tests that needed it to set their breakpoints more robustly.
<rdar://problem/
41867390>
llvm-svn: 336403
Dave Lee [Fri, 6 Jul 2018 00:13:21 +0000 (00:13 +0000)]
Revert "objdump: Support newer ObjC image info flags"
This reverts commit
8c4cc472e7a67bd3b2b20cc4cf32d31af29bc7e9.
llvm-svn: 336402
Mandeep Singh Grang [Thu, 5 Jul 2018 23:41:17 +0000 (23:41 +0000)]
[OpenEmbedded] Add OpenEmbedded vendor
Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots
(like arm-oe-linux-gnueabi). I fix this in a follow-up clang patch. But in
order to add the correct libs I need to detect if the vendor is oe. For this
reason, it is first necessary to teach llvm to detect oe vendor, which is what
this patch does.
Reviewers: chandlerc, compnerd, rengolin, javed.absar
Reviewed By: compnerd
Subscribers: kristof.beyls, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48861
llvm-svn: 336401
Maksim Panchenko [Thu, 5 Jul 2018 23:32:42 +0000 (23:32 +0000)]
[X86][Disassembler] Fix LOCK prefix disassembler support
Summary:
If LOCK prefix is not the first prefix in an instruction, LLVM
disassembler silently drops the prefix.
The fix is to select a proper instruction with a builtin LOCK prefix if
one exists.
Reviewers: craig.topper
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49001
llvm-svn: 336400
Dave Lee [Thu, 5 Jul 2018 23:32:15 +0000 (23:32 +0000)]
objdump: Support newer ObjC image info flags
Summary:
Add support for two additional ObjC image info flags: `IS_SIMULATED` and
`HAS_CATEGORY_CLASS_PROPERTIES`.
`IS_SIMULATED` indicates a Mach-O binary built for iOS simulator.
`HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler
that supports class properties in categories.
Reviewers: enderby, compnerd
Reviewed By: compnerd
Subscribers: keith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48568
llvm-svn: 336399
Jim Ingham [Thu, 5 Jul 2018 23:23:06 +0000 (23:23 +0000)]
Address a few post facto review comments from Adrian.
Thanks, Adrian!
llvm-svn: 336398
Jim Ingham [Thu, 5 Jul 2018 23:11:27 +0000 (23:11 +0000)]
Don't muck with _LIBCPP_INLINE_VISIBILITY just to get predictable line table entries.
This test was trying to stop at a variety of std::vector calls. It looks like the test
was failing because various inlined std functions left no line table entries for the line that
invoked the inlined function. The author worked around that by undefining _LIBCPP_INLINE_VISIBILITY.
That's an internal libcxx macro, we really shouldn't be playing around with it. Better to just force
ourselves to stop where we want using some other non-inlineable statement. printf seems a good candidate...
<rdar://problem/
41867390>
llvm-svn: 336397
Alex Lorenz [Thu, 5 Jul 2018 22:51:11 +0000 (22:51 +0000)]
[Sema] -Wformat-pedantic only for NSInteger/NSUInteger %tu/%td on Darwin
The '%tu'/'%td' as formatting specifiers have been used to print out the
NSInteger/NSUInteger values for a long time. Typically their ABI matches, but that's
not the case on watchOS. The ABI difference boils down to the following:
- Regular 32-bit darwin targets (like armv7) use 'ptrdiff_t' of type 'int',
which matches 'NSInteger'.
- WatchOS arm target (armv7k) uses 'ptrdiff_t' of type 'long', which doesn't
match 'NSInteger' of type 'int'.
Because of this ABI difference these specifiers trigger -Wformat warnings only
for watchOS builds, which is really inconvenient for cross-platform code.
This patch avoids this -Wformat warning for '%tu'/'%td' and NS[U]Integer only,
and instead uses the new -Wformat-pedantic warning that JF introduced in
https://reviews.llvm.org/D47290. This is acceptable because Darwin guarantees that,
despite the watchOS ABI differences, sizeof(ptrdiff_t) == sizeof(NS[U]Integer),
and alignof(ptrdiff_t) == alignof(NS[U]Integer) so the warning is therefore noisy
for pedantic reasons.
I'll update public documentation to ensure that this behaviour is properly
communicated.
rdar://
41739204
Differential Revision: https://reviews.llvm.org/D48852
llvm-svn: 336396
Alex Langford [Thu, 5 Jul 2018 22:16:15 +0000 (22:16 +0000)]
[CMake] Simplify a few framework build rules
llvm-svn: 336395
Michael Zolotukhin [Thu, 5 Jul 2018 22:10:31 +0000 (22:10 +0000)]
Revert r332168: "Reapply "[PR16756] Use SSAUpdaterBulk in JumpThreading.""
There were a couple of issues reported (PR38047, PR37929) - I'll reland
the patch when I figure out and fix the rootcause.
llvm-svn: 336393
Heejin Ahn [Thu, 5 Jul 2018 21:27:09 +0000 (21:27 +0000)]
[WebAssembly] Add missing _S opcodes of atomic stores to InstPrinter
Summary: This was missing in D48839 (rL336145).
Reviewers: aardappel
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D48992
llvm-svn: 336390
Heejin Ahn [Thu, 5 Jul 2018 21:23:15 +0000 (21:23 +0000)]
[ORC] Add BitReader/BitWriter to target_link_libraries
Summary:
CompileOnDemandLayer.cpp uses function in these libraries, and builds
with `-DSHARED_LIB=ON` fail without this.
Reviewers: lhames
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D48995
llvm-svn: 336389
Craig Topper [Thu, 5 Jul 2018 20:38:31 +0000 (20:38 +0000)]
[X86] Use shufflevector instead of a select with a constant mask for fmaddsub/fmsubadd IR emission.
Shufflevector is easier to generate and matches what the backend pattern matches without relying on constant selects being turned into shuffles.
While I was there I also made the IR regular expressions a little stricter to ensure operand order on the shuffle.
llvm-svn: 336388
Sander de Smalen [Thu, 5 Jul 2018 20:21:21 +0000 (20:21 +0000)]
This is a recommit of r336322, previously reverted in r336324 due to
a deficiency in TableGen that has been addressed in r336334.
[AArch64][SVE] Asm: Support for predicated FP rounding instructions.
This patch also adds instructions for predicated FP square-root and
reciprocal exponent.
The added instructions are:
- FRINTI Round to integral value (current FPCR rounding mode)
- FRINTX Round to integral value (current FPCR rounding mode, signalling inexact)
- FRINTA Round to integral value (to nearest, with ties away from zero)
- FRINTN Round to integral value (to nearest, with ties to even)
- FRINTZ Round to integral value (toward zero)
- FRINTM Round to integral value (toward minus Infinity)
- FRINTP Round to integral value (toward plus Infinity)
- FSQRT Floating-point square root
- FRECPX Floating-point reciprocal exponent
llvm-svn: 336387
Marc-Andre Laperle [Thu, 5 Jul 2018 19:35:01 +0000 (19:35 +0000)]
[clangd] Implementation of textDocument/documentSymbol
Summary:
An AST-based approach is used to retrieve the document symbols rather than an
in-memory index query. The index is not an ideal fit to achieve this because of
the file-centric query being done here whereas the index is suited for
project-wide queries. Document symbols also includes more symbols and need to
keep the order as seen in the file.
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Subscribers: tomgr, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47846
llvm-svn: 336386
Lang Hames [Thu, 5 Jul 2018 19:01:27 +0000 (19:01 +0000)]
[ORC] In CompileOnDemandLayer2, clone modules on to different contexts by
writing them to a buffer and re-loading them.
Also introduces a multithreaded variant of SimpleCompiler
(MultiThreadedSimpleCompiler) for compiling IR concurrently on multiple
threads.
These changes are required to JIT IR on multiple threads correctly.
No test case yet. I will be looking at how to modify LLI / LLJIT to test
multithreaded JIT support soon.
llvm-svn: 336385
Diogo N. Sampaio [Thu, 5 Jul 2018 18:49:32 +0000 (18:49 +0000)]
Testing commit permision
llvm-svn: 336384
Craig Topper [Thu, 5 Jul 2018 18:43:58 +0000 (18:43 +0000)]
[X86] Remove the last of the 'x86.fma.' intrinsics and autoupgrade them to 'llvm.fma'. Add upgrade tests for all.
Still need to remove the AVX512 masked versions.
llvm-svn: 336383
Louis Dionne [Thu, 5 Jul 2018 18:41:50 +0000 (18:41 +0000)]
Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY"
This reverts commit r336369. The commit had two problems:
1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of
_LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the
dylib and the check-cxx-abilist failing.
2. The LLDB tests started failing because they undefine
`_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and
fix the tests before we can go forward with this change.
llvm-svn: 336382
Marshall Clow [Thu, 5 Jul 2018 17:44:12 +0000 (17:44 +0000)]
Fix HTML blunder
llvm-svn: 336381
Erich Keane [Thu, 5 Jul 2018 17:23:15 +0000 (17:23 +0000)]
Add PCH tests for R336379
I seemingly forgot the tests for this commit, added here.
llvm-svn: 336380
Erich Keane [Thu, 5 Jul 2018 17:22:13 +0000 (17:22 +0000)]
[clang-cl, PCH] Implement support for MS-style PCH through headers
Implement support for MS-style PCH through headers.
This enables support for /Yc and /Yu where the through header is either
on the command line or included in the source. It replaces the current
support the requires the header also be specified with /FI.
This change adds a -cc1 option -pch-through-header that is used to either
start or stop compilation during PCH create or use.
When creating a PCH, the compilation ends after compilation of the through
header.
When using a PCH, tokens are skipped until after the through header is seen.
Patch By: mikerice
Differential Revision: https://reviews.llvm.org/D46652
llvm-svn: 336379
Rui Ueyama [Thu, 5 Jul 2018 17:14:33 +0000 (17:14 +0000)]
Remove redundnat call of makeArrayRef(). NFC.
llvm-svn: 336378
Raphael Isemann [Thu, 5 Jul 2018 17:12:11 +0000 (17:12 +0000)]
Fixed redefinition warnings with LLVM_ENABLE_MODULES
Summary:
It seems we both have the HAVE_LIBCOMPRESSION define in the config header
and in the source files definitions of some files. This causes that the
Config.h header emits the following warning when we compile the Host module:
```
In file included from <module-includes>:21:
In file included from /Users/teemperor/llvm/llvm/tools/lldb/include/lldb/Host/MainLoop.h:13:
tools/lldb/include/lldb/Host/Config.h:33:9: warning: 'HAVE_LIBCOMPRESSION' macro redefined [-Wmacro-redefined]
^
<command line>:1:9: note: previous definition is here
^
```
It's not really clear why the define is in both places (the commit message
just says it fixes some unspecified bug), but we can easily work around this
by just guarding our define in Config.h.
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D48977
llvm-svn: 336377
Craig Topper [Thu, 5 Jul 2018 17:10:17 +0000 (17:10 +0000)]
[X86] Add SHUF128 to target shuffle decoding.
Differential Revision: https://reviews.llvm.org/D48954
llvm-svn: 336376
Matt Arsenault [Thu, 5 Jul 2018 17:05:36 +0000 (17:05 +0000)]
Fix asserts in AMDGCN fmed3 folding by handling more cases of NaN
Better NaN handling for AMDGCN fmed3.
All operands are checked for NaN now. The checks
were moved before the canonicalization to provide
a better mapping from fclamp. Changed the behaviour
of fmed3(x,y,NaN) to return max(x,y) instead of
min(x,y) in light of this. Updated tests as a result
and added some new cases to cover the fix.
Patch by Alan Baker
llvm-svn: 336375
Matt Arsenault [Thu, 5 Jul 2018 17:01:29 +0000 (17:01 +0000)]
AMDGPU: Don't use spir_kernel in a test
Also use verify-machineinstrs.
llvm-svn: 336374
Matt Arsenault [Thu, 5 Jul 2018 17:01:20 +0000 (17:01 +0000)]
AMDGPU/GlobalISel: Implement custom kernel arg lowering
Avoid using allocateKernArg / AssignFn. We do not want any
of the type splitting properties of normal calling convention
lowering.
For now at least this exists alongside the IR argument lowering
pass. This is necessary to handle struct padding correctly while
some arguments are still skipped by the IR argument lowering
pass.
llvm-svn: 336373
Rui Ueyama [Thu, 5 Jul 2018 16:58:42 +0000 (16:58 +0000)]
Simplify PPC64::calcEFlags().
In this file we only have to handle the v2 ABI, so what we need to do
is to just make sure that all object files have v2 or unspecified version
number.
Differential Revision: https://reviews.llvm.org/D48112
llvm-svn: 336372
Simon Pilgrim [Thu, 5 Jul 2018 16:56:28 +0000 (16:56 +0000)]
[CostModel][X86] Add UDIV/UREM by pow2 costs
Normally InstCombine would have simplified these to SRL/AND instructions but we may still see these during SLP vectorization etc.
llvm-svn: 336371
Paul Semel [Thu, 5 Jul 2018 16:49:46 +0000 (16:49 +0000)]
[llvm-objdump] Removed archive-headers-disas test
This test is failing because of the disas part.
For the moment, I will juste remove it. I will add it again tomorrow
with a proper fix.
llvm-svn: 336370
Louis Dionne [Thu, 5 Jul 2018 16:49:38 +0000 (16:49 +0000)]
[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.
This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.
Reviewers: EricWF
Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists
Differential Revision: https://reviews.llvm.org/D48892
llvm-svn: 336369
Louis Dionne [Thu, 5 Jul 2018 16:16:03 +0000 (16:16 +0000)]
[NFC] Add <initializer_list> to the synopsis of <utility>
Summary:
It is part of the synopsis in the Standard and <utility> does include it,
but it was left out of the synopsis comment.
Reviewers: EricWF, mclow.lists
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48611
llvm-svn: 336368
Andrea Di Biagio [Thu, 5 Jul 2018 16:13:49 +0000 (16:13 +0000)]
[llvm-mca] Fix RegisterFile debug prints. NFC
llvm-svn: 336367
Rui Ueyama [Thu, 5 Jul 2018 16:03:20 +0000 (16:03 +0000)]
Make a test more robust.
Reported by Chris Jackson.
llvm-svn: 336366
Marco Castelluccio [Thu, 5 Jul 2018 15:52:59 +0000 (15:52 +0000)]
Make __gcov_flush flush counters for all shared libraries
Summary:
This will make the behavior of __gcov_flush match the GCC behavior.
I would like to rename __gcov_flush to __llvm_gcov_flush (in case of programs linking to libraries built with different compilers), but I guess we can't for compatibility reasons.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: samsonov, vitalybuka, pcc, kcc, junbuml, glider, fhahn, eugenis, dvyukov, davidxl, srhines, chh, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D48538
llvm-svn: 336365
Erich Keane [Thu, 5 Jul 2018 15:52:58 +0000 (15:52 +0000)]
Fix __builtin_*_overflow when out-param isn't constexpr
As brought up on cfe-commits[1], r334650 causes the dependency of the
out parameter to the __builtin_*_overflow functions to be ignored. The result
was a usage that was otherwise constexpr (both operands to the operation were
constexpr) would be evaluated, but the out parameter wouldn't be modified, so
it would still be 'undef'.
This patch correctly handles the return value of handleAssignment to ensure that
this value is properly considered/evaluated.
[1] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-
20180702/233667.html
llvm-svn: 336364
Paul Semel [Thu, 5 Jul 2018 15:24:11 +0000 (15:24 +0000)]
[llvm-objcopy] Fix timezone dependant tests
llvm-svn: 336363
Tobias Grosser [Thu, 5 Jul 2018 15:23:28 +0000 (15:23 +0000)]
[ScopInfo] Move foldSizeConstantsToRight() to isl++
Summary: This patch updates the isl interface used in `foldSizeConstantsToRight()` to the new C++ interface.
Reviewers: chelini, grosser, philip.pfaffe, Meinersbur
Reviewed By: grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48965
llvm-svn: 336362
Lei Huang [Thu, 5 Jul 2018 15:21:37 +0000 (15:21 +0000)]
[Power9] Add lib calls for float128 operations with no equivalent PPC instructions
Map the following instructions to the proper float128 lib calls:
pow[i], exp[2], log[2|10], sin, cos, fmin, fmax
Differential Revision: https://reviews.llvm.org/D48544
llvm-svn: 336361
Simon Pilgrim [Thu, 5 Jul 2018 15:15:47 +0000 (15:15 +0000)]
[X86][SSE] Add srem x, (1 << c) combine tests
Now that D45806 has landed we can start trying to avoid scalarizing srem by constant - these tests demonstrate some example cases.
llvm-svn: 336360
George Rimar [Thu, 5 Jul 2018 15:01:44 +0000 (15:01 +0000)]
[ELF] - Add test case for checking PT_INTERP behavior.
When PT_INTERP is specified in PHDRS command, it should be created.
(if other conditions met)
We had no test for the folowing line:
https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1108
And for this header itself.
Patch fixes that.
llvm-svn: 336359
Simon Marchi [Thu, 5 Jul 2018 14:53:17 +0000 (14:53 +0000)]
[clang-move] ClangMoveTests: Remove dots in output paths
Summary:
Following D48903 ([VirtualFileSystem] InMemoryFileSystem::status: Return
a Status with the requested name), the paths output by clang-move in the
FileToReplacements map may contain leading "./". For example, where we
would get "foo.h", we'll now get "./foo.h". This breaks the tests,
because we are doing exact string lookups in the FileToFileID and
Results maps (they contain "foo.h", but we search for "./foo.h").
To mitigate this, try to normalize a little bit the paths output by
clang-move to remove that leading "./".
This patch should be safe to merge before D48903, remove_dots will just
be a no-op.
Reviewers: ilya-biryukov, hokein
Reviewed By: hokein
Subscribers: ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D48951
llvm-svn: 336358
Paul Semel [Thu, 5 Jul 2018 14:43:29 +0000 (14:43 +0000)]
[llvm-objdump] Add --archive-headers (-a) option
llvm-svn: 336357
George Rimar [Thu, 5 Jul 2018 14:27:36 +0000 (14:27 +0000)]
[ELF] - Eliminate dead "if". NFC.
We call switchTo() from assignAddresses() for switching to Aether,
and from assignOffsets().
First calls assignOffsets() one by one for each output section.
(https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1045)
That I believe means the condition removed in this patch is dead.
llvm-svn: 336356
Gabor Buella [Thu, 5 Jul 2018 14:26:56 +0000 (14:26 +0000)]
[X86] Fix some vector cmp builtins - TRUE/FALSE predicates
This patch removes on optimization used with the TRUE/FALSE
predicates, as was suggested in https://reviews.llvm.org/D45616
for r335339.
The optimization was buggy, since r335339 used it also
for *_mask builtins, without actually applying the mask -- the
mask argument was just ignored.
Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D48715
llvm-svn: 336355
George Rimar [Thu, 5 Jul 2018 14:09:47 +0000 (14:09 +0000)]
[ELF] - Convert excessive dyn_cast -> cast. NFC.
Currently, there are only OutputSection and SymbolAssignment
commands possible at the first level under SECTIONS tag.
Hence, dyn_cast was excessive.
llvm-svn: 336354
George Rimar [Thu, 5 Jul 2018 14:01:54 +0000 (14:01 +0000)]
[ELF] - Test we are able to assign version to symbols that are not "_Z*"
This is to test the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L681
If symbol does not start from _Z prefix and we have extern "C++",
we do not call demangler and use its name as is.
llvm-svn: 336353
Clement Courbet [Thu, 5 Jul 2018 13:54:51 +0000 (13:54 +0000)]
[llvm-exegesis] Add uop computation for more X87 instruction classes.
Summary:
This allows measuring comparisons (UCOM_FpIr32,UCOM_Fpr32,...),
conditional moves (CMOVBE_Fp32,...)
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D48713
llvm-svn: 336352
Simon Pilgrim [Thu, 5 Jul 2018 13:51:35 +0000 (13:51 +0000)]
Fix comment typo. NFCI.
llvm-svn: 336351