Stella Stamenova [Tue, 7 Aug 2018 20:58:02 +0000 (20:58 +0000)]
[lit, python] Change the order of the quotes in the lit cfg file
Double quotes are always correct in paths on windows while single quotes only work sometimes. By swapping the order of the quotes in the subsitution we guarantee that the quotes will be correct on Windows. Both sets work correctly on Linux in the test environment.
llvm-svn: 339180
Stella Stamenova [Tue, 7 Aug 2018 20:54:38 +0000 (20:54 +0000)]
[lit, python3] Update lit error logging to work correctly in python3 and other test fixes
Summary:
In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and instead all 'str' objects are Unicode string. This change updates the logic in the test logging for lit to correctly process each of the types, and more importantly, to not just fail in Python3.
This change also reverses the use of quotes in several of the cfg files. By using '""' we are guaranteeing that the resulting path will work correctly on Windows while "''" only works correctly sometimes. This also fixes one of the failing tests.
Reviewers: asmith, zturner
Subscribers: stella.stamenova, delcypher, llvm-commits
Differential Revision: https://reviews.llvm.org/D50397
llvm-svn: 339179
Alexander Polyakov [Tue, 7 Aug 2018 20:45:46 +0000 (20:45 +0000)]
[lldb-mi] Re-implement target-select command
Now target-select uses SB API instead of HandleCommand.
This patch has been reviewed along with the r339175.
Differential Revision: https://reviews.llvm.org/D49739
llvm-svn: 339178
Krzysztof Parzyszek [Tue, 7 Aug 2018 20:33:47 +0000 (20:33 +0000)]
[Hexagon] Allow use of gather intrinsics even with no-packets
Vgather requires must be in a packet with a store, which contradicts
the no-packets feature. As a consequence, gather/scatter could not be
used with no-packets. Relax this, and allow gather packets as exceptions
to the no-packets requirements.
llvm-svn: 339177
Sanjay Patel [Tue, 7 Aug 2018 20:32:55 +0000 (20:32 +0000)]
[InstSimplify] fold fsub+fadd with common operand
llvm-svn: 339176
Alexander Polyakov [Tue, 7 Aug 2018 20:23:57 +0000 (20:23 +0000)]
Add new API to SBTarget class
Summary:
The new API appends an image search path to the
target's path mapping list.
Reviewers: aprantl, clayborg, labath
Reviewed By: aprantl
Subscribers: ki.stfu, lldb-commits
Differential Revision: https://reviews.llvm.org/D49739
llvm-svn: 339175
Sanjay Patel [Tue, 7 Aug 2018 20:23:49 +0000 (20:23 +0000)]
[InstSimplify] fold fadd+fsub with common operand
llvm-svn: 339174
Anastasis Grammenos [Tue, 7 Aug 2018 20:21:56 +0000 (20:21 +0000)]
[Local] Add dbg location on unreachable inst in changeToUnreachable
As show in https://bugs.llvm.org/show_bug.cgi?id=37960
it would be desirable to have debug location in the unreachable
instruction.
Also adds a unti test for this function.
Differential Revision: https://reviews.llvm.org/D50340
llvm-svn: 339173
Heejin Ahn [Tue, 7 Aug 2018 20:19:23 +0000 (20:19 +0000)]
[WebAssembly] CFG sort support for exception handling
Summary:
This patch extends CFGSort pass to support exception handling. Once it
places a loop header, it does not place blocks that are not dominated by
the loop header until all the loop blocks are sorted. This patch extends
the same algorithm to exception 'catch' part, using the information
calculated by WebAssemblyExceptionInfo class.
Reviewers: dschuff, sunfish
Subscribers: sbc100, jgravelle-google, llvm-commits
Differential Revision: https://reviews.llvm.org/D46500
llvm-svn: 339172
Sanjay Patel [Tue, 7 Aug 2018 20:14:27 +0000 (20:14 +0000)]
[InstSimplify] fold fsub+fsub with common operand
llvm-svn: 339171
Martin Storsjo [Tue, 7 Aug 2018 20:02:40 +0000 (20:02 +0000)]
[Headers] Expand _Unwind_Exception for SEH on MinGW/x86_64
This matches how GCC defines this struct.
Differential Revision: https://reviews.llvm.org/D50380
llvm-svn: 339170
Nico Weber [Tue, 7 Aug 2018 19:55:12 +0000 (19:55 +0000)]
Update msbuild integration warnings: Don't warn on /Zi and /X
We do need to map /Zi to /Z7 explicitly for msbuild as explained in this file,
but since /Zi is passed by default and since things transparently work fine
with it mapped to /Z7, we shouldn't produce effectively inactionable noise for
it.
Also don't warn on /X since clang-cl supports that (since r326357; the risk of
duplicating a bunch of clang-cl driver logic here).
https://reviews.llvm.org/D50398
llvm-svn: 339169
Sanjay Patel [Tue, 7 Aug 2018 19:49:13 +0000 (19:49 +0000)]
[InstSimplify] add tests for fadd/fsub; NFC
Instcombine gets some, but not all, of these cases via
it's internal reassociation transforms. It fails in
all cases with vector types.
llvm-svn: 339168
Leonard Chan [Tue, 7 Aug 2018 19:43:53 +0000 (19:43 +0000)]
[Sema] Fix for crash on conditional operation with address_space pointer
Compiling the following causes clang to crash
```
char *cmp(__attribute__((address_space(1))) char *x, __attribute__((address_space(2))) char *y) {
return x < y ? x : y;
}
```
with the message: "wrong cast for pointers in different address
spaces(must be an address space cast)!"
This is because during IR emission, the source and dest type for a
bitcast should not have differing address spaces.
This fix prints an error since the code shouldn't compile in the first place.
Differential Revision: https://reviews.llvm.org/D50278
llvm-svn: 339167
Alexey Bataev [Tue, 7 Aug 2018 19:21:05 +0000 (19:21 +0000)]
[SLP] Fix insert point for reused extract instructions.
Summary:
Reworked the previously committed patch to insert shuffles for reused
extract element instructions in the correct position. Previous logic was
incorrect, and might lead to the crash with PHIs and EH instructions.
Reviewers: efriedma, javed.absar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50143
llvm-svn: 339166
Nico Weber [Tue, 7 Aug 2018 19:10:28 +0000 (19:10 +0000)]
lld-link: Take /SUBSYSTEM into account for automatic /ENTRY detection.
If /subsystem:windows is passed, link.exe only looks for WinMain and wWinMain,
and if /subsystem:console is passed it only looks for main and wmain. lld-link
used to look for all 4 in both cases. This patch makes lld-link match
link.exe's behavior.
This requires that the subsystem is known by the time findDefaultEntry() gets
called. findDefaultEntry() is called before the main link loop, so that the
loop can mark the entry point as undefined. That means inferSubsystem() has to
be called above the main loop as well. This in turn means /subsystem: from
.drectve sections only has an effect on entry point inference for obj files
passed to lld-link directly (and not in obj files found later in .lib files).
link.exe seems to ignore /subsystem: for obj files from lib files completely
(while in lld it's ignored only for entry point detection but it still
overrides /subsystem: flags passed on the command line for the value that gets
written in the output file).
Also, if the subsytem isn't needed (e.g. when only writing a /def: lib file and
not writing a coff file), link.exe doesn't complain if the subsystem isn't
known, so both subsystem and entry point handling should be below the early
return lld has for that case.
Fixes PR36523.
https://reviews.llvm.org/D50316
llvm-svn: 339165
Volodymyr Sapsai [Tue, 7 Aug 2018 19:05:41 +0000 (19:05 +0000)]
[VFS] Emit an error when entry at root level uses a relative path.
Entries with only a filename prevent us from building a file system tree and
cause the assertion
> Assertion failed: (NewParentE && "Parent entry must exist"), function uniqueOverlayTree, file clang/lib/Basic/VirtualFileSystem.cpp, line 1303.
Entries with a relative path are simply not discoverable during header search.
rdar://problem/
28990865
Reviewers: bruno, benlangmuir
Reviewed By: bruno
Subscribers: dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D49518
llvm-svn: 339164
Sam Clegg [Tue, 7 Aug 2018 18:55:41 +0000 (18:55 +0000)]
[WebAssembly] Remove use of lld -flavor flag
This flag is deprecated. The preferred way to select the lld
flavor is by calling it by one of its aliases.
Differential Revision: https://reviews.llvm.org/D50395
llvm-svn: 339163
Wei Mi [Tue, 7 Aug 2018 18:13:10 +0000 (18:13 +0000)]
[SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold
getOrCompHotCountThreshold/getOrCompColdCountThreshold introduced in
https://reviews.llvm.org/D45377 contain a bad mistake and will only return 1 or 0
instead of the true hot/cold cutoff value. The patch fixes the mistake. But the
mistake seems not causing big performance difference according to internal server
benchmarks testing.
Differential Revision: https://reviews.llvm.org/D50370
llvm-svn: 339162
Leonard Mosescu [Tue, 7 Aug 2018 18:00:30 +0000 (18:00 +0000)]
Misc module/dwarf logging improvements
This change improves the logging for the lldb.module category to note a few interesting cases:
1. Local object file found, but specs not matching
2. Local object file not found, using a placeholder module
The handling and logging for the cases wehre we fail to load compressed dwarf
symbols is also improved.
Differential Revision: https://reviews.llvm.org/D50274
llvm-svn: 339161
Alexander Polyakov [Tue, 7 Aug 2018 17:55:26 +0000 (17:55 +0000)]
[lldb-mi] Re-implement MI HandleProcessEventStateSuspended.
Summary: Now this function uses SB API instead of HandleCommand.
Reviewers: aprantl, clayborg, labath
Reviewed By: aprantl
Subscribers: ki.stfu, lldb-commits
Differential Revision: https://reviews.llvm.org/D49632
llvm-svn: 339160
Philip Reames [Tue, 7 Aug 2018 17:54:36 +0000 (17:54 +0000)]
[LICM] Strengthen assume hoisting tests [NFC]
As requested in review of https://reviews.llvm.org/D50364
llvm-svn: 339159
David Greene [Tue, 7 Aug 2018 17:44:43 +0000 (17:44 +0000)]
[WebAssembly] Force use of lld for test/Driver/wasm-toolchain.c(pp)
lld is the only supported linker that works for WebAssembly, so ensure
clang is using it for this test. This gets the tests passing when
configuring clang to use a different linker by default.
Differential Revision: https://reviews.llvm.org/D49897
llvm-svn: 339158
Craig Topper [Tue, 7 Aug 2018 17:35:02 +0000 (17:35 +0000)]
[SelectionDAG] When splitting scatter nodes during DAGCombine, create a serial chain dependency.
Scatter could have multiple identical indices. We need to maintain sequential order. We get this right in LegalizeVectorTypes, but not in this code.
Differential Revision: https://reviews.llvm.org/D50374
llvm-svn: 339157
Craig Topper [Tue, 7 Aug 2018 17:34:59 +0000 (17:34 +0000)]
[SelectionDAG][X86][SystemZ] Add a generic nonvolatile_store/nonvolatile_load pattern fragment in TargetSelectionDAG.td
Differential Revision: https://reviews.llvm.org/D50358
llvm-svn: 339156
Alex Langford [Tue, 7 Aug 2018 17:34:13 +0000 (17:34 +0000)]
Add instructions for building LLDB on Mac OS X with CMake
Summary:
There were previously no instructions for building LLDB on Mac OS X
with CMake. It's sufficiently close to building on Linux/FreeBSD/NetBSD that a
well-motivated developer could figure out the steps themselves. However, having
an explicit guide is better and can provide Mac OS X specific configurations
(e.g. LLDB_BUILD_FRAMEWORK).
Reviewers: labath, clayborg
Subscribers: emaste, krytarowski
Differential Revision: https://reviews.llvm.org/D50362
llvm-svn: 339155
Tatyana Krasnukha [Tue, 7 Aug 2018 16:46:11 +0000 (16:46 +0000)]
Check result after setting PC value.
llvm-svn: 339153
Alexey Bataev [Tue, 7 Aug 2018 16:14:36 +0000 (16:14 +0000)]
[OPENMP] Mark variables captured in declare target region as implicitly
declare target.
According to OpenMP 5.0, variables captured in lambdas in declare target
regions must be considered as implicitly declare target.
llvm-svn: 339152
David Bolvansky [Tue, 7 Aug 2018 15:54:50 +0000 (15:54 +0000)]
[RFC] Build LLVM-C.dll on MSVC that exports only the C API
Summary:
Hello!
This commit adds a LLVM-C target that is always built on MSVC. A big fat warning, this is my first cmake code ever so there is a fair bit of I-have-no-idea-what-I'm-doing going on here. Which is also why I placed it outside of llvm-shlib as I was afraid of breaking things of other people. Secondly llvm-shlib builds a LLVM.so which exports all symbols and then does a thin library that points to it, but on Windows we do not build a LLVM.dll so that would have complicated the code more.
The patch includes a python script that calls dumpbin.exe to get all of the symbols from the built libraries. It then grabs all the symbols starting with LLVM and generates the export file from those. The export file is then used to create the library just like the LLVM-C that is built on darwin.
Improvements that I need help with, to follow up this review.
- Get cmake to make sure that dumpbin.exe is on the path and wire the full path to the script.
- Use LLVM-C.dll when building llvm-c-test so we can verify that the symbols are exported.
- Bundle the LLVM-C.dll with the windows installer.
Why do this? I'm building a language frontend which is self-hosting, and on windows because of various tooling issues we have a problem of consuming the LLVM*.lib directly on windows. Me and the users of my projects using LLVM would be greatly helped by having LLVM-C.dll built and shipped by the Windows installer. Not only does LLVM takes forever to build, you have to run a extra python script in order to get the final DLL.
Any comments, thoughts or help is greatly appreciated.
Cheers, Jakob.
Patch by: Wallbraker (Jakob Bornecrantz)
Reviewers: compnerd, beanz, hans, smeenai
Reviewed By: beanz
Subscribers: xbolva00, bhelyer, Memnarch, rnk, fedor.sergeev, chapuni, smeenai, john.brawn, deadalnix, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D35077
llvm-svn: 339151
Scott Linder [Tue, 7 Aug 2018 15:52:49 +0000 (15:52 +0000)]
[OpenCL] Restore r338899 (reverted in r338904), fixing stack-use-after-return
Always emit alloca in entry block for enqueue_kernel builtin.
Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC
later because it is not in the entry block.
llvm-svn: 339150
Florian Hahn [Tue, 7 Aug 2018 15:36:11 +0000 (15:36 +0000)]
[GVN,NewGVN] Keep nonnull if K does not move.
In combineMetadata, we should be able to preserve K's nonnull metadata,
if K does not move. This condition should hold for all replacements by
NewGVN/GVN, but I added a bunch of assertions to verify that.
Fixes PR35038.
There probably are additional kinds of metadata that could be preserved
using similar reasoning. This is follow-up work.
Reviewers: dberlin, davide, efriedma, nlopes
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D47339
llvm-svn: 339149
Sjoerd Meijer [Tue, 7 Aug 2018 15:11:47 +0000 (15:11 +0000)]
[ARM] FP16: codegen support for VACGT
Differential Revision: https://reviews.llvm.org/D50236
llvm-svn: 339148
Simon Pilgrim [Tue, 7 Aug 2018 14:50:39 +0000 (14:50 +0000)]
[DAG] Allow non-uniform constant vectors to call BuildSDIV
This was missed in D50185.
NFC until we add actual non-uniform support to BuildSDIV (similar BuildUDIV support in D49248) - for now it just early outs.
llvm-svn: 339147
Simon Pilgrim [Tue, 7 Aug 2018 14:40:21 +0000 (14:40 +0000)]
[TargetLowering] Use pre-computed Shift value type in BuildUDIV (NFCI)
This was missed in D49248
llvm-svn: 339146
Andrew V. Tischenko [Tue, 7 Aug 2018 14:36:43 +0000 (14:36 +0000)]
[X86] MCA tests for XCHG*, XADD* and CMPXCHG* instructions
Differential Revision: https://reviews.llvm.org/D49912
llvm-svn: 339145
Sanjay Patel [Tue, 7 Aug 2018 14:36:27 +0000 (14:36 +0000)]
[InstSimplify] move minnum/maxnum with common op fold from instcombine
llvm-svn: 339144
Max Moroz [Tue, 7 Aug 2018 14:22:00 +0000 (14:22 +0000)]
[libFuzzer] Disable print_unstable_stats.test for aarch64.
Summary:
Follow-up for https://reviews.llvm.org/D50264. Reported by testbots:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5592
Reviewers: morehouse, kevinwkt, metzman, javed.absar, Dor1s
Reviewed By: Dor1s
Subscribers: kristof.beyls, delcypher, #sanitizers, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D50386
llvm-svn: 339143
Sanjay Patel [Tue, 7 Aug 2018 14:13:40 +0000 (14:13 +0000)]
[InstSimplify] add tests for minnum/maxnum with shared op; NFC
llvm-svn: 339142
Sanjay Patel [Tue, 7 Aug 2018 14:12:08 +0000 (14:12 +0000)]
[InstSimplify] move misplaced minnum/maxnum tests; NFC
llvm-svn: 339141
Jonas Paulsson [Tue, 7 Aug 2018 13:48:09 +0000 (13:48 +0000)]
[SystemZ] Comment update.
Update the comment in nextGroup since the ProcResourceCounters are not anymore
always decremented with '1'.
llvm-svn: 339140
Jonas Paulsson [Tue, 7 Aug 2018 13:44:11 +0000 (13:44 +0000)]
[SystemZ] NFC: Remove redundant check in SystemZHazardRecognizer.
Remove the redundant check against zero when updating ProcResourceCounters in
nextGroup(), as pointed out in https://reviews.llvm.org/D50187.
Review: Ulrich Weigand.
llvm-svn: 339139
Florian Hahn [Tue, 7 Aug 2018 13:27:33 +0000 (13:27 +0000)]
[GVN,NewGVN] Move patchReplacementInstruction to Utils/Local.h
This function is shared between both implementations. I am not sure if
Utils/Local.h is the best place though.
Reviewers: davide, dberlin, efriedma, xbolva00
Reviewed By: efriedma, xbolva00
Differential Revision: https://reviews.llvm.org/D47337
llvm-svn: 339138
George Rimar [Tue, 7 Aug 2018 13:13:19 +0000 (13:13 +0000)]
[LLD][ELF] - Add test cases for ScriptParser::readDynamicList(). NFCI.
This 2 test cases covers the following code:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L185
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L189
llvm-svn: 339137
Pavel Labath [Tue, 7 Aug 2018 13:10:16 +0000 (13:10 +0000)]
Move ScalarTest to follow the class being tested
This should have been a part of r339127, but I missed it somehow.
llvm-svn: 339136
Kristof Umann [Tue, 7 Aug 2018 12:55:26 +0000 (12:55 +0000)]
[analyzer][UninitializedObjectChecker] New flag to turn off dereferencing
Even for a checker being in alpha, some reports about pointees held so little
value to the user that it's safer to disable pointer/reference chasing for now.
It can be enabled with a new flag, in which case checker should function as it
has always been. This can be set with `CheckPointeeInitialization`.
Differential Revision: https://reviews.llvm.org/D49438
llvm-svn: 339135
Bruno Ricci [Tue, 7 Aug 2018 12:40:41 +0000 (12:40 +0000)]
[AST][NFC] Use unsigned in the bit-fields of IdentifierInfo
Avoid mixing bool and unsigned in the bit-fields of IdentifierInfo
since MSVC packs this poorly. Also clang-format the changes.
llvm-svn: 339134
Bruno Ricci [Tue, 7 Aug 2018 12:23:41 +0000 (12:23 +0000)]
[AST][NFC] Use unsigned in the bit-fields of PrintingPolicy
Avoid the mix between bools and unsigned since MSVC pack
this poorly.
llvm-svn: 339132
Pavel Labath [Tue, 7 Aug 2018 12:16:49 +0000 (12:16 +0000)]
Fix a couple of extended-offsetof warnings that had slipped through
llvm-svn: 339130
Jonas Devlieghere [Tue, 7 Aug 2018 12:14:01 +0000 (12:14 +0000)]
Fix inconsistency with/without debug information (-g)
This fixes an inconsistency in code generation when compiling with or
without debug information (-g). When debug information is available in
an empty block, the original test would fail, resulting in possibly
different code.
Patch by: Jeroen Dobbelaere
Differential revision: https://reviews.llvm.org/D49467
llvm-svn: 339129
David Chisnall [Tue, 7 Aug 2018 12:02:46 +0000 (12:02 +0000)]
[objc-gnustep] Don't emit .guess ivar offset vars.
These were intended to allow non-fragile and fragile ABI code to be
mixed, as long as the fragile classes were higher up the hierarchy than
the non-fragile ones. Unfortunately:
- No one actually wants to do this.
- Recent versions of Linux's run-time linker break it.
llvm-svn: 339128
Pavel Labath [Tue, 7 Aug 2018 11:07:21 +0000 (11:07 +0000)]
Move RegisterValue,Scalar,State from Core to Utility
These three classes have no external dependencies, but they are used
from various low-level APIs. Moving them down to Utility improves
overall code layering (although it still does not break any particular
dependency completely).
The XCode project will need to be updated after this change.
Differential Revision: https://reviews.llvm.org/D49740
llvm-svn: 339127
Aleksandar Beserminji [Tue, 7 Aug 2018 10:45:45 +0000 (10:45 +0000)]
[mips] Handle branch expansion corner cases
When potential jump instruction and target are in the same segment, use
jump instruction with immediate field.
In cases where offset does not fit immediate value of a bc/j instructions,
offset is stored into register, and then jump register instruction is used.
Differential Revision: https://reviews.llvm.org/D48019
llvm-svn: 339126
Andrea Di Biagio [Tue, 7 Aug 2018 10:33:46 +0000 (10:33 +0000)]
[Tablegen] In TargetSchedule.td: Remove unused argument `pfmCounters` from ProcResourceUnits.
PFM counters don't need to be passed in input to the definition of
ProcResourceUnits. class PfmIssueCounter (see r329675) is used to map resources
to PFM counter(s).
Differential Revision: https://reviews.llvm.org/D50333
llvm-svn: 339125
George Rimar [Tue, 7 Aug 2018 10:29:35 +0000 (10:29 +0000)]
[LLD][ELF] - Added test case for non-nullterminated wide strings.
This covers the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputSection.cpp#L1032
llvm-svn: 339124
Krasimir Georgiev [Tue, 7 Aug 2018 10:23:24 +0000 (10:23 +0000)]
[clang-format] comment reflow: add last line's penalty when ending broken
Summary:
This fixes a bug in clang-format where the last line's penalty is not
taken into account when its ending is broken. Usually the last line's penalty
is handled by addNextStateToQueue, but in cases where the trailing `*/` is put
on a newline, the contents of the last line have to be considered for penalizing.
Reviewers: mprobst
Reviewed By: mprobst
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50378
llvm-svn: 339123
Pavel Labath [Tue, 7 Aug 2018 09:54:52 +0000 (09:54 +0000)]
[DebugInfo] Reduce debug_str_offsets section size
Summary:
The accelerator tables use the debug_str section to store their strings.
However, they do not support the indirect method of access that is
available for the debug_info section (DW_FORM_strx et al.).
Currently our code is assuming that all strings can/will be referenced
indirectly, and puts all of them into the debug_str_offsets section.
This is generally true for regular (unsplit) dwarf, but in the DWO case,
most of the strings in the debug_str section will only be used from the
accelerator tables. Therefore the contents of the debug_str_offsets
section will be largely unused and bloating the main executable.
This patch rectifies this by teaching the DwarfStringPool to
differentiate between strings accessed directly and indirectly. When a
user inserts a string into the pool it has to declare whether that
string will be referenced directly or not. If at least one user requsts
indirect access, that string will be assigned an index ID and put into
debug_str_offsets table. Otherwise, the offset table is skipped.
This approach reduces the overall binary size (when compiled with
-gdwarf-5 -gsplit-dwarf) in my tests by about 2% (debug_str_offsets is
shrunk by 99%).
Reviewers: probinson, dblaikie, JDevlieghere
Subscribers: aprantl, mgrang, llvm-commits
Differential Revision: https://reviews.llvm.org/D49493
llvm-svn: 339122
Simon Pilgrim [Tue, 7 Aug 2018 09:51:34 +0000 (09:51 +0000)]
[TargetLowering] Add support for non-uniform vectors to BuildUDIV
This patch refactors the existing TargetLowering::BuildUDIV base implementation to support non-uniform constant vector denominators.
It also includes a fold for MULHU by pow2 constants to SRL which can now more readily occur from BuildUDIV.
Differential Revision: https://reviews.llvm.org/D49248
llvm-svn: 339121
Simon Pilgrim [Tue, 7 Aug 2018 09:31:22 +0000 (09:31 +0000)]
[X86][SSE] Add more non-uniform exact sdiv vector tests covering all/none ashr paths
llvm-svn: 339120
Hans Wennborg [Tue, 7 Aug 2018 09:27:05 +0000 (09:27 +0000)]
vs integration: bump version number
llvm-svn: 339119
Hans Wennborg [Tue, 7 Aug 2018 09:15:16 +0000 (09:15 +0000)]
vs integration: update the publisher name
llvm-svn: 339118
Hans Wennborg [Tue, 7 Aug 2018 09:02:06 +0000 (09:02 +0000)]
vs integration: fix default path to clang-cl
Differential Revision: https://reviews.llvm.org/D50335
llvm-svn: 339117
Haojian Wu [Tue, 7 Aug 2018 08:57:52 +0000 (08:57 +0000)]
[clangd] Share getSymbolID implementation.
Summary: And remove all duplicated implementation.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D50375
llvm-svn: 339116
George Rimar [Tue, 7 Aug 2018 08:41:37 +0000 (08:41 +0000)]
[LLD][ELF] - Add a test case for code in Archive::fetch(). NFCI.
This covers the following piece with a test.
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L830
Thanks to Peter Collingbourne for providing the reproducer sample!
llvm-svn: 339114
George Rimar [Tue, 7 Aug 2018 08:11:38 +0000 (08:11 +0000)]
[yaml2obj] - Add a support for changing EntSize.
I was trying to add a test case for LLD and found that it
is impossible to set sh_entsize via yaml.
The patch implements the missing part.
Differential revision: https://reviews.llvm.org/D50235
llvm-svn: 339113
Karl-Johan Karlsson [Tue, 7 Aug 2018 08:10:33 +0000 (08:10 +0000)]
Fix clash of gcc toolchains in driver regression tests
For some regression tests the path to the right toolchain is specified
using the -sysroot switch. However, if clang was configured with a
custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the
equivalent configure command), the path to the custom gcc toolchain path
takes precedence to the one specified by sysroot. This causes several
regression tests to fail as they will be using an unexpected path. This
patch fixes this issue by adding --gcc-toolchain='' to all tests that
rely on that. The empty string causes the driver to pick the path from
sysroot instead.
This patch contain the same kind of fixes as done in rC225182
llvm-svn: 339112
Sjoerd Meijer [Tue, 7 Aug 2018 08:05:15 +0000 (08:05 +0000)]
[ARM][NFC] Replaced tab characters in test file vfcmp.ll.
llvm-svn: 339111
Matt Arsenault [Tue, 7 Aug 2018 07:49:13 +0000 (07:49 +0000)]
AMDGPU: Add builtin for s_dcache_wb
llvm-svn: 339110
Matt Arsenault [Tue, 7 Aug 2018 07:49:04 +0000 (07:49 +0000)]
AMDGPU: Add builtin for s_dcache_inv_vol
llvm-svn: 339109
Matt Arsenault [Tue, 7 Aug 2018 07:28:46 +0000 (07:28 +0000)]
AMDGPU: Add feature vi-insts
This is necessary to add a VI specific builtin,
__builtin_amdgcn_s_dcache_wb. We already have an
overly specific feature for one of these builtins,
for s_memrealtime. I'm not sure whether it's better
to add more of those, or to get rid of that and merge
it with vi-insts.
Alternatively, maybe this logically goes with scalar-stores?
llvm-svn: 339104
Craig Topper [Tue, 7 Aug 2018 06:52:49 +0000 (06:52 +0000)]
[SelectionDAG][X86] Rename MaskedLoadSDNode::getSrc0 to getPassThru.
Src0 doesn't really convey any meaning to what the operand is. Passthru matches what's used in the documentation for the intrinsic this comes from.
llvm-svn: 339101
Martin Storsjo [Tue, 7 Aug 2018 06:42:53 +0000 (06:42 +0000)]
[COFF] Fix a comment about automatic resolving of dllimports from within a module. NFC.
Differential Revision: https://reviews.llvm.org/D50357
llvm-svn: 339100
Craig Topper [Tue, 7 Aug 2018 06:13:40 +0000 (06:13 +0000)]
[SelectionDAG][X86] Rename getValue to getPassThru for gather SDNodes.
getValue is more meaningful name for scatter than it is for gather. Split them and use getPassThru for gather.
llvm-svn: 339096
Tobias Grosser [Tue, 7 Aug 2018 05:51:21 +0000 (05:51 +0000)]
Update isl to
isl-0.20-48-g13eba5b5
This is a regular maintenance updated.
llvm-svn: 339095
Tobias Grosser [Tue, 7 Aug 2018 05:50:58 +0000 (05:50 +0000)]
Make update-isl work with latest isl versions
Latest isl versions require clang to build a 'dist' package. Make sure
we actually ask for it.
While being there, also make sure we build isl on all cores.
llvm-svn: 339094
JF Bastien [Tue, 7 Aug 2018 04:44:13 +0000 (04:44 +0000)]
Auto var init test fix #2
It turns out that the AVX bots have different alignment for their vectors, and my test mistakenly assumed a particular vector alignent on the stack. Instead, capture the alignment and test for it in subsequent operations.
llvm-svn: 339093
Dean Michael Berris [Tue, 7 Aug 2018 04:42:39 +0000 (04:42 +0000)]
[XRay] Improve error reporting when loading traces
Summary:
This change uses a single offset pointer used throughout the
implementation of the individual record parsers. This allows us to
report where in a trace file parsing failed.
We're still in an intermediate step here as we prepare to refactor this
further into a set of types and use object-oriented design principles
for a cleaner implementation. The next steps will be to allow us to
parse/dump files in a streaming fashion and incrementally build up the
structures in memory instead of the current all-or-nothing approach.
Reviewers: kpw, eizan
Reviewed By: kpw
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D50169
llvm-svn: 339092
Stella Stamenova [Tue, 7 Aug 2018 04:08:46 +0000 (04:08 +0000)]
[lit, tests] Fix failing lit test: shtest-format.py
Summary:
The problem here is that on windows double quotes are used for paths (usually) while single quotes are not. This is not generally a problem for the tests because the lit infrastructure tends to treat both the same. One (and possibly only) exception is when some tests are run in an external shell such as some of the shtest-format tests. In this case on windows the path to python was not created correctly because it had single quotes and the test failed.
This same test is already failing with python 3 which is why our testing missed the new failure. This patch will take care of the immediate failure with python 2 and I'll send a follow up for the python 3 failure.
Reviewers: asmith, zturner
Subscribers: delcypher, llvm-commits
Differential Revision: https://reviews.llvm.org/D50373
llvm-svn: 339091
JF Bastien [Tue, 7 Aug 2018 04:03:03 +0000 (04:03 +0000)]
Remove broken command flag
I was using it for testing, r339089 shouldn't have contained it.
llvm-svn: 339090
JF Bastien [Tue, 7 Aug 2018 03:12:52 +0000 (03:12 +0000)]
[NFC] Test automatic variable initialization
Summary:
r337887 started using memset for automatic variable initialization where sensible. A follow-up discussion leads me to believe that we should better test automatic variable initialization, and that there are probably follow-up patches in clang and LLVM to improve codegen. It’ll be important to measure -O0 compile time, and figure out which transforms should be in the frontend versus the backend.
This patch is just a test of the current behavior, no questions asked. Follow-up patches will tune the code generation.
<rdar://problem/
42981573>
Subscribers: dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50361
llvm-svn: 339089
Artem Dergachev [Tue, 7 Aug 2018 02:27:38 +0000 (02:27 +0000)]
[analyzer] pr37204: Take signedness into account in getTruthValue().
It now actually produces a signed APSInt when the QualType passed into it is
signed, which is what any caller would expect.
Fixes a couple of crashes.
Differential Revision: https://reviews.llvm.org/D50363
llvm-svn: 339088
Artem Dergachev [Tue, 7 Aug 2018 02:22:59 +0000 (02:22 +0000)]
[analyzer] NFC: Document that we support implicit argument constructors.
The change in the AST in r338135 caused us to accidentally support
inlining constructors of operator implicit arguments. Previously they were
hard to support because they were treated as arguments in expressions
but not in declarations, but now they can be transparently treated as
simple temporaries.
Add tests and comments to explain how it now works.
Differential Revision: https://reviews.llvm.org/D49627
llvm-svn: 339087
Max Kazantsev [Tue, 7 Aug 2018 01:47:20 +0000 (01:47 +0000)]
[NFC] Factor out implicit control flow logic from GVN
Logic for tracking implicit control flow instructions was added to GVN to
perform PRE optimizations correctly. It appears that GVN is not the only
optimization that sometimes does PRE, so this logic is required in other
places (such as Jump Threading).
This is an NFC patch that encapsulates all ICF-related logic in a dedicated
utility class separated from GVN.
Differential Revision: https://reviews.llvm.org/D40293
llvm-svn: 339086
Balaji V. Iyer [Tue, 7 Aug 2018 00:31:44 +0000 (00:31 +0000)]
Performing a test commmit as requested by Chris Lattner.
-This line, and those below, will be ignored--
M TemplateBase.h
llvm-svn: 339085
Heejin Ahn [Tue, 7 Aug 2018 00:22:22 +0000 (00:22 +0000)]
[WebAssembly] Enable atomic expansion for unsupported atomicrmws
Summary:
Wasm does not have direct counterparts to some of LLVM IR's atomicrmw
instructions (min, max, umin, umax, and nand). This enables atomic
expansion using cmpxchg instruction within a loop for those atomicrmw
instructions.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D49440
llvm-svn: 339084
Fangrui Song [Mon, 6 Aug 2018 23:50:26 +0000 (23:50 +0000)]
[ELF] Use MathExtras.h llvm::SignExtend64
Summary: To be consistent with other files where only SignExtend64 is used.
Reviewers: ruiu, espindola
Subscribers: emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D50366
llvm-svn: 339083
Derek Schuff [Mon, 6 Aug 2018 23:16:50 +0000 (23:16 +0000)]
[WebAssembly] Replace SIMD expression types with V128
Summary:
The spec only defines a SIMD expression type of V128 and
leaves interpretation of different vector types to the instructions.
Differential Revision: https://reviews.llvm.org/D50367
Patch by Thomas Lively
llvm-svn: 339082
Max Moroz [Mon, 6 Aug 2018 23:14:13 +0000 (23:14 +0000)]
[libFuzzer] Add unstable function printing to print_unstable_stats flag
Summary:
There may be cases in which a user wants to know which part of their code is unstable.
We use ObservedFuncs and UnstableCounters to print at exit which of the ObservedFunctions
are unstable under the -print_unstable_stats flag.
Patch by Kyungtak Woo (@kevinwkt).
Reviewers: Dor1s, metzman, morehouse
Reviewed By: Dor1s, metzman, morehouse
Subscribers: delcypher, #sanitizers, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D50264
llvm-svn: 339081
Emmett Neyman [Mon, 6 Aug 2018 23:11:38 +0000 (23:11 +0000)]
Changed how LLVM IR was generated to increase vectorization
Summary: Changed the structure of the generated IR to make it easier to vectorize
Reviewers: morehouse, kcc
Reviewed By: morehouse
Subscribers: cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D50342
llvm-svn: 339080
George Karpenkov [Mon, 6 Aug 2018 23:09:07 +0000 (23:09 +0000)]
[analyzer] Add ASTContext to CheckerManager
Some checkers require ASTContext. Having it in the constructor saves a
lot of boilerplate of having to pass it around.
Differential Revision: https://reviews.llvm.org/D50111
llvm-svn: 339079
Matt Arsenault [Mon, 6 Aug 2018 23:01:31 +0000 (23:01 +0000)]
AMDGPU: cvt_pk_rtz_f16 canonicalizes
llvm-svn: 339078
Matt Arsenault [Mon, 6 Aug 2018 22:45:51 +0000 (22:45 +0000)]
AMDGPU: Handle some vector operations in isCanonicalized
llvm-svn: 339077
Stella Stamenova [Mon, 6 Aug 2018 22:37:53 +0000 (22:37 +0000)]
[lit, python] Always add quotes around the python path in lit
Summary:
The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.
This is a companion change to: https://reviews.llvm.org/D50206
Reviewers: asmith, zturner
Differential Revision: https://reviews.llvm.org/D50280
llvm-svn: 339076
Stella Stamenova [Mon, 6 Aug 2018 22:37:49 +0000 (22:37 +0000)]
[lit, python] Always add quotes around the python path in lit
Summary:
The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.
This is a companion change to: https://reviews.llvm.org/D50206
Reviewers: asmith, zturner, espindola
Subscribers: emaste, sbc100, arichardson, aheejin, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D50282
llvm-svn: 339075
Stella Stamenova [Mon, 6 Aug 2018 22:37:45 +0000 (22:37 +0000)]
[lit, python] Always add quotes around the python path in lit
Summary:
The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.
This is a companion change to: https://reviews.llvm.org/D50206
Reviewers: asmith, zturner
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50281
llvm-svn: 339074
Stella Stamenova [Mon, 6 Aug 2018 22:37:44 +0000 (22:37 +0000)]
[lit, python] Always add quotes around the python path in lit
Summary:
The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.
This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests.
Reviewers: asmith, zturner, alexshap, jakehehrlich
Reviewed By: zturner, alexshap, jakehehrlich
Subscribers: mehdi_amini, nemanjai, eraman, kbarton, jakehehrlich, steven_wu, dexonsmith, stella.stamenova, delcypher, llvm-commits
Differential Revision: https://reviews.llvm.org/D50206
llvm-svn: 339073
Matt Arsenault [Mon, 6 Aug 2018 22:30:44 +0000 (22:30 +0000)]
AMDGPU: Push fcanonicalize through partially constant build_vector
This usually avoids some re-packing code, and may
help find canonical sources.
llvm-svn: 339072
Stephane Sezer [Mon, 6 Aug 2018 22:21:28 +0000 (22:21 +0000)]
Revert "Add a relocation for R_AARCH64_ABS32 in ObjectFileELF"
This reverts commit
f055ce7eb893cd0d17ebcfd4125018f46f983aff.
llvm-svn: 339071
Matt Arsenault [Mon, 6 Aug 2018 22:10:26 +0000 (22:10 +0000)]
AMDGPU: Refactor fcanonicalize combine
This will make more complex combines easier.
llvm-svn: 339070
Philip Reames [Mon, 6 Aug 2018 22:07:37 +0000 (22:07 +0000)]
[LICM] Extract a helper function for readability [NFC]
llvm-svn: 339069
Stephane Sezer [Mon, 6 Aug 2018 22:04:08 +0000 (22:04 +0000)]
Add a relocation for R_AARCH64_ABS32 in ObjectFileELF
Summary:
.rela.debug_info relocations are being done via
ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case
that iterates over the relocation type is only implemented for a few
different types and `assert(false)`es over the rest.
Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations
Reviewers: sas, xiaobai, peter.smith, clayborg, javed.absar, espindola
Differential Revision: https://reviews.llvm.org/D49407
Change by Nathan Lanza <lanza@fb.com>
llvm-svn: 339068