Rui Ueyama [Fri, 14 Sep 2018 23:51:17 +0000 (23:51 +0000)]
Style fix. NFC.
llvm-svn: 342300
Rui Ueyama [Fri, 14 Sep 2018 23:51:05 +0000 (23:51 +0000)]
Rename GdbIndex.{cpp,h} -> DWARF.{cpp,h}.
These files used to contain classes and functions for .gdb_index,
but they are moved to SyntheticSections.{cpp,h}, so the name is now
irrelevant.
llvm-svn: 342299
Rui Ueyama [Fri, 14 Sep 2018 23:28:13 +0000 (23:28 +0000)]
Revert r342297: Discard uncompressed buffer after creating .gdb_index contents.
Looks like it broke some local builds that use -gdb-index.
llvm-svn: 342298
Rui Ueyama [Fri, 14 Sep 2018 22:57:39 +0000 (22:57 +0000)]
Discard uncompressed buffer after creating .gdb_index contents.
Once we create .gdb_index contents, .zdebug_gnu_pub{names,types}
are useless, so there's no need to keep their uncompressed data
in memory.
I observed that for a test case in which lld creates a 3GB .gdb_index
section, the maximum resident set size reduced from 43GB to 29GB after
this patch.
Differential Revision: https://reviews.llvm.org/D52126
llvm-svn: 342297
Thomas Lively [Fri, 14 Sep 2018 22:35:12 +0000 (22:35 +0000)]
[WebAssembly] SIMD neg
Summary: Depends on D52007.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52009
llvm-svn: 342296
Zachary Turner [Fri, 14 Sep 2018 22:29:19 +0000 (22:29 +0000)]
[PDB] Make the pretty dumper output modified types.
Currently if we got something like `const Foo` we'd ignore it and
just rely on printing the unmodified `Foo` later on. However,
for testing the native reading code we really would like to be able
to see these so that we can verify that the native reader can
actually handle them. Instead of printing out the full type though,
just print out the header.
llvm-svn: 342295
Martin Storsjo [Fri, 14 Sep 2018 22:26:59 +0000 (22:26 +0000)]
[COFF] Provide __CTOR_LIST__ and __DTOR_LIST__ symbols for MinGW
MinGW uses these kind of list terminator symbols for traversing
the constructor/destructor lists. These list terminators are
actual pointers entries in the lists, with the values 0 and
(uintptr_t)-1 (instead of just symbols pointing to the start/end
of the list).
(This mechanism exists in both the mingw-w64 crt startup code and
in libgcc; normally the mingw-w64 one is used, but a DLL build of
libgcc uses the libgcc one. Therefore it's not trivial to change
the mechanism without lots of cross-project synchronization and
potentially invalidating some combinations of old/new versions
of them.)
When mingw-w64 has been used with lld so far, the CRT startup object
files have so far provided these symbols, ending up with different,
incompatible builds of the CRT startup object files depending on
whether binutils or lld are going to be used.
In order to avoid the need of different configuration of the CRT startup
object files depending on what linker to be used, provide these symbols
in lld instead. (Mingw-w64 checks at build time whether the linker
provides these symbols or not.) This unifies this particular detail
between the two linkers.
This does disallow the use of the very latest lld with older versions
of mingw-w64 (the configure check for the list was added recently;
earlier it simply checked whether the CRT was built with gcc or clang),
and requires rebuilding the mingw-w64 CRT. But the number of users of
lld+mingw still is low enough that such a change should be tolerable,
and unifies this aspect of the toolchains, easing interoperability
between the toolchains for the future.
The actual test for this feature is added in ctors_dtors_priority.s,
but a number of other tests that checked absolute output addresses
are updated.
Differential Revision: https://reviews.llvm.org/D52053
llvm-svn: 342294
Craig Topper [Fri, 14 Sep 2018 22:26:09 +0000 (22:26 +0000)]
[BreakFalseDeps] Fix bad formatting. NFC
llvm-svn: 342293
Sanjay Patel [Fri, 14 Sep 2018 22:23:35 +0000 (22:23 +0000)]
[InstCombine] refactor mul narrowing folds; NFCI
Similar to rL342278:
The test diffs are all cosmetic due to the change in
value naming, but I'm including that to show that the
new code does perform these folds rather than something
else in instcombine.
D52075 should be able to use this code too rather than
duplicating all of the logic.
llvm-svn: 342292
Adrian Prantl [Fri, 14 Sep 2018 21:43:45 +0000 (21:43 +0000)]
Attempt to unbreak the build after r342286.
llvm-svn: 342291
Fangrui Song [Fri, 14 Sep 2018 21:36:35 +0000 (21:36 +0000)]
test/Driver/output-file-cleanup.c: delete non-readable temporary file
%t-dir/2.c made tools (rsync, ripgrep, ...) sad (EACCES warning).
llvm-svn: 342290
Sanjay Patel [Fri, 14 Sep 2018 21:30:07 +0000 (21:30 +0000)]
[InstCombine] add/use overflowing math helper functions; NFC
The mul case can already be refactored to use this similar to
rL342278.
The sub case is proposed in D52075.
llvm-svn: 342289
Lion Yang [Fri, 14 Sep 2018 21:26:05 +0000 (21:26 +0000)]
[PowerPC] Fix the calling convention for i1 arguments on PPC32
Summary:
Integer types smaller than i32 must be extended to i32 by default.
The feature "crbits" introduced at r202451 handles i1 as a special case,
but it did not extend properly.
The caller was, therefore, passing i1 stack arguments by writing 0/1 to
the first byte of the 4-byte stack object and callee was
reading the first byte for the value.
"crbits" is enabled if the optimization level is greater than 1,
which is very common in "release builds".
Such discrepancies with ABI specification also introduces
potential incompatibility with programs or libraries
built with other compilers e.g. GCC.
Fixes PR38661
Reviewers: hfinkel, cuviper
Subscribers: sylvestre.ledru, glaubitz, nagisa, nemanjai, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D51108
llvm-svn: 342288
Thomas Lively [Fri, 14 Sep 2018 21:21:42 +0000 (21:21 +0000)]
[WebAssembly][NFC] Move SIMD encoding tests to dedicated file
Summary:
This change makes the tests more focused and avoids problematic
interactions between the testing modes and instruction encoding. This
change also allows the other tests to use less verbose output and
stricter checks.
Reviewers: aheejin, dschuff, aardappel
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52007
llvm-svn: 342287
Zachary Turner [Fri, 14 Sep 2018 21:19:52 +0000 (21:19 +0000)]
Add missing include.
llvm-svn: 342286
Reid Kleckner [Fri, 14 Sep 2018 21:14:08 +0000 (21:14 +0000)]
[codeview] Remove dead code
llvm-svn: 342285
Zachary Turner [Fri, 14 Sep 2018 21:03:57 +0000 (21:03 +0000)]
[PDB] Refactor a little of the Symbol creation code.
Eventually we need to be able to support nested types, which don't
have an associated CVType record. To handle this, remove the
CVType from all of the record classes, and instead store the
deserialized record. Then move the deserialization up to the thing
that creates the type. This actually makes error handling better
anyway as we can return an invalid symbol instead of asserting false.
llvm-svn: 342284
Wei Mi [Fri, 14 Sep 2018 20:52:59 +0000 (20:52 +0000)]
[SampleFDO] Add FunctionOffsetTable in compact binary format profile.
The patch saves a function offset table which maps function name index to the
offset of its function profile to the start of the binary profile. By using
the function offset table, for those function profiles which will not be used
when compiling a module, the profile reader does't have to read them. For
profile size around 10~20M, it saves ~10% compile time.
Differential Revision: https://reviews.llvm.org/D51863
llvm-svn: 342283
Reid Kleckner [Fri, 14 Sep 2018 20:51:07 +0000 (20:51 +0000)]
Mark index-tools.test as REQUIRES: shell so that it does not run with the internal lit shell which does not support "if"
llvm-svn: 342282
Reid Kleckner [Fri, 14 Sep 2018 20:50:39 +0000 (20:50 +0000)]
Relax assumption about default method calling convention in new test
llvm-svn: 342281
Davide Italiano [Fri, 14 Sep 2018 20:48:34 +0000 (20:48 +0000)]
[IRInterpreter] Minor cleanups, add comments. NFCI.
llvm-svn: 342280
Fangrui Song [Fri, 14 Sep 2018 20:41:42 +0000 (20:41 +0000)]
test/Other/can-execute.txt: delete %t after the test
This test constructs a non-readable file of mode 0111, which lingers in the test output directory and will cause EACCES to various tools (rg, rsync, ...)
llvm-svn: 342279
Sanjay Patel [Fri, 14 Sep 2018 20:40:46 +0000 (20:40 +0000)]
[InstCombine] refactor add narrowing folds; NFCI
The test diffs are all cosmetic due to the change in
value naming, but I'm including that to show that the
new code does perform these folds rather than something
else in instcombine.
llvm-svn: 342278
Sebastian Pop [Fri, 14 Sep 2018 20:36:19 +0000 (20:36 +0000)]
HotColdSplit: fix invalid SSA due to outlining
The test used to fail with an invalid phi node: the two predecessors were outlined
and the SSA representation was left invalid. The patch adds the exit block to the
cold region.
llvm-svn: 342277
Sebastian Pop [Fri, 14 Sep 2018 20:36:14 +0000 (20:36 +0000)]
HotColdSplit: fix isSingleEntrySingleExit
remove duplicate entries from isSingleEntrySingleExit: the Entry block is
already added by the loop over the dominance frontier.
Remove the heuristic from isOutlineCandidate that a region is too small when it
only contains a basic block. With this change we now grow regions starting from
a block and we continue adding to the ValidColdRegion. Check the heuristic just
before code generation.
llvm-svn: 342276
Sebastian Pop [Fri, 14 Sep 2018 20:36:10 +0000 (20:36 +0000)]
HotColdSplit: add back propagation to extend cold regions
Also fix a problem in forward propagation:
const TerminatorInst *TI = It->getTerminator();
was set outside the while loop that iterates over It.
llvm-svn: 342275
Sanjay Patel [Fri, 14 Sep 2018 20:33:40 +0000 (20:33 +0000)]
[InstCombine] add more tests for add narrowing folds; NFC
llvm-svn: 342274
Thomas Lively [Fri, 14 Sep 2018 20:22:45 +0000 (20:22 +0000)]
[WebAssembly][NFC] Fix unconventional test names
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52110
llvm-svn: 342273
Reid Kleckner [Fri, 14 Sep 2018 20:16:31 +0000 (20:16 +0000)]
Remove unused DIASession field
llvm-svn: 342272
Shuai Wang [Fri, 14 Sep 2018 20:07:18 +0000 (20:07 +0000)]
[analyzer] Handle forwarding reference better in ExprMutationAnalyzer.
Summary:
We used to treat an `Expr` mutated whenever it's passed as non-const
reference argument to a function. This results in false positives in
cases like this:
```
int x;
std::vector<int> v;
v.emplace_back(x); // `x` is passed as non-const reference to `emplace_back`
```
In theory the false positives can be suppressed with
`v.emplace_back(std::as_const(x))` but that's considered overly verbose,
inconsistent with existing code and spammy as diags.
This diff handles such cases by following into the function definition
and see whether the argument is mutated inside.
Reviewers: lebedev.ri, JonasToth, george.karpenkov
Subscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits
Differential Revision: https://reviews.llvm.org/D52008
llvm-svn: 342271
Konstantin Zhuravlyov [Fri, 14 Sep 2018 20:00:36 +0000 (20:00 +0000)]
AMDGPU: Clear the bits before they are being set in program resource registers
Change by Tony Tye
llvm-svn: 342270
Alex Langford [Fri, 14 Sep 2018 19:44:09 +0000 (19:44 +0000)]
Fix lit/example/many-tests pickling issue
Summary:
The multiprocess module uses pickling to transfer
information between processes and does not know how to pickle
the class created in the lit.cfg file and thus the example
fails.
Implement ManyTests in a separate file and import for the
example test passes
Patch by Nathan Lanza <nathan@lanza.io>
Differential Revision: https://reviews.llvm.org/D51328
llvm-svn: 342269
Lion Yang [Fri, 14 Sep 2018 19:43:11 +0000 (19:43 +0000)]
Test commit access
Remove trailing spaces
llvm-svn: 342268
Jonas Toth [Fri, 14 Sep 2018 19:42:37 +0000 (19:42 +0000)]
[NFC][clangd] silence pedantic extra ';' warning
llvm-svn: 342267
Alex Langford [Fri, 14 Sep 2018 19:41:20 +0000 (19:41 +0000)]
Fix lldb-vscode README.md
Summary: The readme was missing "-" characters to enable links
Patch by Nathan Lanza <nathan@lanza.io>
Differential Revision: https://reviews.llvm.org/D52069
llvm-svn: 342266
Reid Kleckner [Fri, 14 Sep 2018 19:39:40 +0000 (19:39 +0000)]
Revert r342183 "[DAGCombine] Fix crash when store merging created an extract_subvector with invalid index."
Causes 'isVector() && "Invalid vector type!"' assertion when building
Skia in Chrome.
llvm-svn: 342265
Adrian Prantl [Fri, 14 Sep 2018 19:38:45 +0000 (19:38 +0000)]
Fix debug info for SelectionDAG legalization of DAG nodes with two results.
This patch fixes the debug info handling for SelectionDAG legalization
of DAG nodes with two results. When an replaced SDNode has more than
one result, transferDbgValues was always copying the SDDbgValue from
the first result and attaching them to all members. In reality
SelectionDAG::ReplaceAllUsesWith() is given an array of SDNodes
(though the type signature doesn't make this obvious (cf. the call
site code in ReplaceNode()).
rdar://problem/
44162227
Differential Revision: https://reviews.llvm.org/D52112
llvm-svn: 342264
Steven Wu [Fri, 14 Sep 2018 19:38:21 +0000 (19:38 +0000)]
[ThinLTOCodeGenerator] Avoid Rehash StringMap in ThreadPool
Summary:
During threaded thinLTO, it is possible that the entry for current
module doesn't exist in StringMaps (like ExportLists, ResolvedODR,
etc.). Using operator[] might trigger a rehash for the StringMap, which
might happen on multiple threads at the same time.
rdar://problem/
43846199
Reviewers: tejohnson, mehdi_amini, kromanova, pcc
Reviewed By: tejohnson
Subscribers: dang, inglorion, eraman, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D52049
llvm-svn: 342263
Davide Italiano [Fri, 14 Sep 2018 18:55:31 +0000 (18:55 +0000)]
[IRInterpreter] Fall back to JIT with 128-bit values.
They're not that common, and falling back is definitely
better than throwing an error instead of the result. If we
feel motivated, we might end up implementing support for these,
but it's unclear whether it's worth the effort/complexity.
Fixes PR38925.
<rdar://problem/
44436068>
llvm-svn: 342262
Sam McCall [Fri, 14 Sep 2018 18:49:16 +0000 (18:49 +0000)]
[clangd] Work around compiler macro expansion bugs(?) in completion tests
llvm-svn: 342261
Reid Kleckner [Fri, 14 Sep 2018 18:44:37 +0000 (18:44 +0000)]
Revert r342210 "[ARM] bottom-top mul support in ARMParallelDSP"
It causes assertion failures while building Skia for Android in
Chromium:
https://ci.chromium.org/buildbot/chromium.clang/ToTAndroid/4550
Reduction forthcoming.
llvm-svn: 342260
Jim Ingham [Fri, 14 Sep 2018 18:41:40 +0000 (18:41 +0000)]
Make the eSearchDepthFunction searches work, add tests
using the scripted breakpoint resolver.
Differential Revision: https://reviews.llvm.org/D52111
llvm-svn: 342259
Simon Pilgrim [Fri, 14 Sep 2018 18:35:21 +0000 (18:35 +0000)]
Revert a line-endings change that somehow got included with rL342257
llvm-svn: 342258
Simon Pilgrim [Fri, 14 Sep 2018 18:33:31 +0000 (18:33 +0000)]
[X86][SSE] Lower shuffles to permute(unpack(x,y)) (PR31151)
Attempt to lower a shuffle as an unpack of elements from two inputs followed by a single-input (wider) permutation.
As long as the permutation is wider this is a win - there may be some circumstances where same size permutations would also be useful but I've left that for future work.
Differential Revision: https://reviews.llvm.org/D52043
llvm-svn: 342257
Craig Topper [Fri, 14 Sep 2018 18:27:09 +0000 (18:27 +0000)]
[X86] Re-generate test checks using current version of the script. NFC
The regular expression used for stack accesses is different today.
llvm-svn: 342256
Matt Morehouse [Fri, 14 Sep 2018 18:24:02 +0000 (18:24 +0000)]
[libFuzzer] Disable value-profile-strncmp.test on aarch64.
Test no longer finds the BINGO on clang-cmake-aarch64-full bot, and I
can't reproduce on our ARM machine.
llvm-svn: 342255
Sanjay Patel [Fri, 14 Sep 2018 18:12:30 +0000 (18:12 +0000)]
[InstCombine] rename test file to better describe the fold; NFC
The folds are not limited to zext, and the real goal is width
reduction of a math op. D52075 is proposing to extend this to
subtracts.
llvm-svn: 342254
Sanjay Patel [Fri, 14 Sep 2018 18:06:36 +0000 (18:06 +0000)]
[InstCombine] remove unnecessary target constraints for tests; NFC
These are universal folds.
llvm-svn: 342253
Benjamin Kramer [Fri, 14 Sep 2018 18:05:30 +0000 (18:05 +0000)]
[modernize-use-transparent-functors] TypeLocs can be implicitly created, don't crash when encountering those.
llvm-svn: 342252
Sanjay Patel [Fri, 14 Sep 2018 18:05:14 +0000 (18:05 +0000)]
[InstCombine] move test next to related tests; NFC
llvm-svn: 342251
Sanjay Patel [Fri, 14 Sep 2018 18:02:17 +0000 (18:02 +0000)]
[InstCombine] remove stall comment from test file; NFC
llvm-svn: 342250
Sanjay Patel [Fri, 14 Sep 2018 17:53:44 +0000 (17:53 +0000)]
[InstCombine] regenerate test checks; NFC
There was a bug in a check line regex that could cause the test to fail
with a naming difference. The auto-gen script seems to work as expected now.
llvm-svn: 342249
Nico Weber [Fri, 14 Sep 2018 17:34:46 +0000 (17:34 +0000)]
Introduce explicit add_unittest_with_input_files target for tests that use llvm::getInputFileDirectory()
Using llvm::getInputFileDirectory() in unit tests is discouraged, so require an explicit opt-in.
This way, cmake also writes ~60 fewer unused files to disk.
Differential Revision: https://reviews.llvm.org/D52095
llvm-svn: 342248
Adrian Prantl [Fri, 14 Sep 2018 17:32:52 +0000 (17:32 +0000)]
fix noasserts build
llvm-svn: 342247
Shuai Wang [Fri, 14 Sep 2018 17:27:27 +0000 (17:27 +0000)]
Remove PseudoConstantAnalysis
Summary: It's not used anywhere for years. The last usage is removed in https://reviews.llvm.org/rL198476 in 2014.
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D51946
llvm-svn: 342246
Adrian Prantl [Fri, 14 Sep 2018 17:08:02 +0000 (17:08 +0000)]
SelectionDAG: Add compact SDDbgValue representation to -dag-dump-verbose output
llvm-svn: 342245
James Henderson [Fri, 14 Sep 2018 16:48:47 +0000 (16:48 +0000)]
Revert r342233.
This caused LLD test failures, which I've been unable to reproduce.
Reverting to allow for further investigation next week.
llvm-svn: 342244
Adrian Prantl [Fri, 14 Sep 2018 16:12:14 +0000 (16:12 +0000)]
fix typos
llvm-svn: 342241
Hans Wennborg [Fri, 14 Sep 2018 15:18:30 +0000 (15:18 +0000)]
[clang-cl] Fix PR38934: failing to dllexport class template member w/ explicit instantiation and PCH
The code in ASTContext::DeclMustBeEmitted was supposed to handle this,
but didn't take into account that synthesized members such as operator=
might not get marked as template specializations, because they're
synthesized on the instantiation directly when handling the class-level
dllexport attribute.
llvm-svn: 342240
Ed Maste [Fri, 14 Sep 2018 14:25:37 +0000 (14:25 +0000)]
lld: add -z interpose support
-z interpose sets the DF_1_INTERPOSE flag, marking the object as an
interposer.
Via FreeBSD PR 230604, linking Valgrind with lld failed.
Differential Revision: https://reviews.llvm.org/D52094
llvm-svn: 342239
Louis Dionne [Fri, 14 Sep 2018 14:07:16 +0000 (14:07 +0000)]
[clang] Make sure attributes on member classes are applied properly
Summary:
Attributes on member classes of class templates and member class templates
of class templates are not currently instantiated. This was discovered by
Richard Smith here:
http://lists.llvm.org/pipermail/cfe-dev/2018-September/059291.html
This commit makes sure that attributes are instantiated properly. This
commit does not fix the broken behavior for member partial and explicit
specializations of class templates.
PR38913
Reviewers: rsmith
Subscribers: dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D51997
llvm-svn: 342238
Sanjay Patel [Fri, 14 Sep 2018 13:47:33 +0000 (13:47 +0000)]
[InstCombine] add more tests for x86 blendv (PR38814); NFC
llvm-svn: 342237
Ulrich Weigand [Fri, 14 Sep 2018 13:36:55 +0000 (13:36 +0000)]
[asan] Fix test case failure on SystemZ
Since we changed our inlining parameters, this test case was failing
on SystemZ, as the two tests were now both inlined into the main
function, which the test didn't expect. Fixed by adding a few more
noinline attributes.
llvm-svn: 342236
Simon Pilgrim [Fri, 14 Sep 2018 13:31:14 +0000 (13:31 +0000)]
[X86][BMI1] Fix BLSI/BLSMSK/BLSR BMI1 scheduling on btver2
These have the same behaviour as tzcnt on btver2 - confirmed with AMD 16h SOG, Agner and instlatx64.
llvm-svn: 342235
Simon Pilgrim [Fri, 14 Sep 2018 13:09:56 +0000 (13:09 +0000)]
[X86][BMI1] Add scheduler class for BLSI/BLSMSK/BLSR BMI1 instructions
llvm-svn: 342234
James Henderson [Fri, 14 Sep 2018 12:51:19 +0000 (12:51 +0000)]
[ThinLTO]Allow setting of maximum cache size with 64-bit number
Also added a C-interface function for large values, and updated
llvm-lto's --thinlto-cache-max-size-bytes switch to take a type larger
than int.
The maximum cache size in terms of bytes is a 64-bit number. However,
the methods to set it only took unsigned previously, which meant that
the maximum cache size could not be specified above 4GB. That's quite
small compared to the output of some projects, so it makes sense to
provide the ability to set larger values in that field.
We also needed a C-interface function that provides a greater range
than the existing thinlto_codegen_set_cache_size_bytes, which also only
takes an unsigned, so this change also adds
hinlto_codegen_set_cache_size_megabytes.
Reviewed by: mehdi_amini, tejohnson, steven_wu
Differential Revision: https://reviews.llvm.org/D52023
llvm-svn: 342233
Sam McCall [Fri, 14 Sep 2018 12:47:38 +0000 (12:47 +0000)]
[VFS] vfs::directory_iterator yields path and file type instead of full Status
Summary:
Most callers I can find are using only `getName()`. Type is used by the
recursive iterator.
Now we don't have to call stat() on every listed file (on most platforms).
Exceptions are e.g. Solaris where readdir() doesn't include type information.
On those platforms we'll still stat() - see D51918.
The result is significantly faster (stat() can be slow).
My motivation: this may allow us to improve clang IO on large TUs with long
include search paths. Caching readdir() results may allow us to skip many stat()
and open() operations on nonexistent files.
Reviewers: bkramer
Subscribers: fedor.sergeev, cfe-commits
Differential Revision: https://reviews.llvm.org/D51921
llvm-svn: 342232
Kristina Brooks [Fri, 14 Sep 2018 12:42:13 +0000 (12:42 +0000)]
[Driver] Fix missing MultiArch include dir on powerpcspe
On powerpc-linux-gnuspe, the header files are located in their
own include directory named /usr/lib/powerpc-linux-gnuspe,
so add this directory to PPCMultiarchIncludeDirs.
Patch by glaubitz (John Paul Adrian Glaubitz)
Differential Revision: https://reviews.llvm.org/D52066
llvm-svn: 342231
Sam McCall [Fri, 14 Sep 2018 12:36:06 +0000 (12:36 +0000)]
[clangd] Don't override the preamble while completing inside it, it doesn't work.
Summary:
To stay fast, enable single-file-mode instead. This is fine since completions
in the preamble are simple.
The net effect for now is to suppress the spurious TopLevel completions when
completing inside the preamble.
Once Sema has include directive completion, this will be more important.
Reviewers: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D52071
llvm-svn: 342230
Sam McCall [Fri, 14 Sep 2018 12:32:08 +0000 (12:32 +0000)]
[clangd] Don't double-infer compile commands after r342228
llvm-svn: 342229
Sam McCall [Fri, 14 Sep 2018 12:24:09 +0000 (12:24 +0000)]
[Tooling] JSONCompilationDatabasePlugin infers compile commands for missing files
Summary:
See the existing InterpolatingCompilationDatabase for details on how this works.
We've been using this in clangd for a while, the heuristics seem to work well.
Reviewers: bkramer
Subscribers: ilya-biryukov, ioeric, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D51729
llvm-svn: 342228
Kirill Bobyrev [Fri, 14 Sep 2018 12:21:09 +0000 (12:21 +0000)]
[clangd] NFC: Fix IndexBenchmark CLI arguments handling
llvm-svn: 342227
Ilya Biryukov [Fri, 14 Sep 2018 11:39:05 +0000 (11:39 +0000)]
[clangd] Update IndexerMain.cpp file comment after rename. NFC
llvm-svn: 342226
Ilya Biryukov [Fri, 14 Sep 2018 11:28:48 +0000 (11:28 +0000)]
[analyzer] Restore final on NeedsCastLocField. NFC
To fix compiler warning about non-virtual dtor introduced in r342221.
llvm-svn: 342225
Kristof Umann [Fri, 14 Sep 2018 11:20:16 +0000 (11:20 +0000)]
[analyzer] Attempt to make a windows buildbot happy.
Got an error that a cast is happening from a pointer type to long, which is
smaller.
llvm-svn: 342223
David Stuttard [Fri, 14 Sep 2018 10:27:19 +0000 (10:27 +0000)]
[AMDGPU] Ensure trig range reduction only used for subtargets that require it
Summary:
GFX9 and above support sin/cos instructions with a greater range and thus don't
require a fract instruction prior to invocation.
Added a subtarget feature to reflect this and added code to take advantage of
expanded range on GFX9+
Also updated the tests to check correct behaviour
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D51933
Change-Id: I1c1f1d3726a5ae32116646ca5cfa1ab4ef69e5b0
llvm-svn: 342222
Kristof Umann [Fri, 14 Sep 2018 10:18:26 +0000 (10:18 +0000)]
[analyzer][UninitializedObjectChecker] Support for nonloc::LocAsInteger
Differential Revision: https://reviews.llvm.org/D49437
llvm-svn: 342221
Kristof Umann [Fri, 14 Sep 2018 10:10:09 +0000 (10:10 +0000)]
[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields
Based on a suggestion from @george.karpenkov.
In some cases, structs are used as unions with a help of a tag/kind field.
This patch adds a new string flag (a pattern), that is matched against the
fields of a record, and should a match be found, the entire record is ignored.
For more info refer to http://lists.llvm.org/pipermail/cfe-dev/2018-August/058906.html
and to the responses to that, especially http://lists.llvm.org/pipermail/cfe-dev/2018-August/059215.html.
Differential Revision: https://reviews.llvm.org/D51680
llvm-svn: 342220
Kristof Umann [Fri, 14 Sep 2018 09:39:26 +0000 (09:39 +0000)]
[analyzer][UninitializedObjectChecker] Refactored checker options
Since I plan to add a number of new flags, it made sense to encapsulate
them in a new struct, in order not to pollute FindUninitializedFields's
constructor with new boolean options with super long names.
This revision practically reverts D50508, since FindUninitializedFields
now accesses the pedantic flag anyways.
Differential Revision: https://reviews.llvm.org/D51679
llvm-svn: 342219
Wolfgang Pieb [Fri, 14 Sep 2018 09:14:10 +0000 (09:14 +0000)]
[DWARF] reposting r342048, which was reverted in r342056 due to buildbot
errors.
Adjusted 2 test cases for ARM and darwin and fixed a bug with the original
change in dsymutil.
llvm-svn: 342218
Kristof Umann [Fri, 14 Sep 2018 09:13:36 +0000 (09:13 +0000)]
[analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees
Differential Revision: https://reviews.llvm.org/D50892
llvm-svn: 342217
Sylvestre Ledru [Fri, 14 Sep 2018 09:08:21 +0000 (09:08 +0000)]
Use Chrome and Firefox as example of success for clang
llvm-svn: 342216
Kristof Umann [Fri, 14 Sep 2018 09:07:40 +0000 (09:07 +0000)]
[analyzer][UninitializedObjectChecker] Updated comments
Some of the comments are incorrect, imprecise, or simply nonexistent.
Since I have a better grasp on how the analyzer works, it makes sense
to update most of them in a single swoop.
I tried not to flood the code with comments too much, this amount
feels just right to me.
Differential Revision: https://reviews.llvm.org/D51417
llvm-svn: 342215
Sylvestre Ledru [Fri, 14 Sep 2018 09:00:48 +0000 (09:00 +0000)]
remove 11 years old videos from the homepage. if you have a suggestion, please drop me an email
llvm-svn: 342214
Kristof Umann [Fri, 14 Sep 2018 08:58:21 +0000 (08:58 +0000)]
[analyzer][UninitializedObjectChecker] Fixed dereferencing
iThis patch aims to fix derefencing, which has been debated for months now.
Instead of working with SVals, the function now relies on TypedValueRegion.
Differential Revision: https://reviews.llvm.org/D51057
llvm-svn: 342213
Sylvestre Ledru [Fri, 14 Sep 2018 08:55:09 +0000 (08:55 +0000)]
update the doc to compare with gcc 4.9 instead of 4.2
llvm-svn: 342212
Sylvestre Ledru [Fri, 14 Sep 2018 08:52:18 +0000 (08:52 +0000)]
gcc is now returning the same output on this example, removing this example
llvm-svn: 342211
Sam Parker [Fri, 14 Sep 2018 08:09:09 +0000 (08:09 +0000)]
[ARM] bottom-top mul support in ARMParallelDSP
On failing to find sequences that can be converted into dual macs,
try to find sequential 16-bit loads that are used by muls which we
can then use smultb, smulbt, smultt with a wide load.
Differential Revision: https://reviews.llvm.org/D51983
llvm-svn: 342210
Florian Hahn [Fri, 14 Sep 2018 07:50:20 +0000 (07:50 +0000)]
[LoopInterchange] Preserve ScalarEvolution, by forgetting about interchanged loops.
As preparation for LoopInterchange becoming a loop pass, it needs to
preserve ScalarEvolution. Even though interchanging should not change
the trip count of the loop, it modifies loop entry, latch and exit
blocks.
I added -verify-scev to some loop interchange tests, but the verification does
not catch problems caused by missing invalidation of SE in loop interchange, as
the trip counts themselves do not change. So there might be potential to
make the SE verification covering more stuff in the future.
Reviewers: mkazantsev, efriedma, karthikthecool
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D52026
llvm-svn: 342209
Aleksandr Urakov [Fri, 14 Sep 2018 07:46:06 +0000 (07:46 +0000)]
[PDB] Use the raw PDB symbol interface more accurately
Summary:
This patch adds some symbol tag checks before using the `IPDBRawSymbol`
interface to improve safety and readability.
Reviewers: zturner
Reviewed By: zturner
Subscribers: lldb-commits, stella.stamenova
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D51967
llvm-svn: 342208
Jonas Paulsson [Fri, 14 Sep 2018 06:46:55 +0000 (06:46 +0000)]
[SystemZ] Adjust cost functions for subtargets that use LI + LOC instead of IPM
After recent improvements which makes better use of LOC instead of IPM, the
TTI cost functions also needs to be updated to reflect this.
This involves sext, zext and xor of i1.
The tests were updated so that for z13 the new costs are expected, while the
old costs are still checked for on zEC12.
Review: Ulrich Weigand
https://reviews.llvm.org/D51339
llvm-svn: 342207
Martin Storsjo [Fri, 14 Sep 2018 06:08:56 +0000 (06:08 +0000)]
[COFF] Allow embedded directives to be separated by null bytes
The PE spec says that they will be separated by spaces, but link.exe
handles it just fine if they are separated by null bytes as well.
This adds tests to the lld repo, with the actual functional change
in LLVM in SVN r342204.
Differential Revision: https://reviews.llvm.org/D52014
llvm-svn: 342206
Martin Storsjo [Fri, 14 Sep 2018 06:08:51 +0000 (06:08 +0000)]
[COFF] Avoid copying of chunk vectors. NFC.
When declaring the pair variable as "auto Pair : Map", it is
effectively declared as
std::pair<std::pair<StringRef, uint32_t>, std::vector<Chunk *>>.
This effectively does a full, shallow copy of the Chunk vector,
just to be thrown away after each iteration.
Differential Revision: https://reviews.llvm.org/D52051
llvm-svn: 342205
Martin Storsjo [Fri, 14 Sep 2018 06:08:01 +0000 (06:08 +0000)]
[Support] Treat null bytes as separator in windows command line strings
When reading directives from a .drectve section, the directives are
tokenized as a normal windows command line. However in these cases,
link.exe allows the directives to be separated by null bytes, not only by
spaces.
A test case for this change will be added in the lld repo.
Differential Revision: https://reviews.llvm.org/D52014
llvm-svn: 342204
Craig Topper [Fri, 14 Sep 2018 05:16:58 +0000 (05:16 +0000)]
[InstCombine] Add some test cases for (add (sext x), (sext y)) --> (sext (add int x, y)) and (mul (sext x), (sext y)) --> (sext (mul x, y)). NFC
llvm-svn: 342203
Max Kazantsev [Fri, 14 Sep 2018 04:50:38 +0000 (04:50 +0000)]
[NFC] Remove meaningless code from GVN
llvm-svn: 342202
Hideki Saito [Fri, 14 Sep 2018 02:02:57 +0000 (02:02 +0000)]
Fix for the buildbot failure lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/23635
from the commit (r342197) of https://reviews.llvm.org/D50820.
llvm-svn: 342201
Dean Michael Berris [Fri, 14 Sep 2018 01:59:12 +0000 (01:59 +0000)]
[XRay][clang] Emit "never-instrument" attribute
Summary:
Before this change, we only emit the XRay attributes in LLVM IR when the
-fxray-instrument flag is provided. This may cause issues with thinlto
when the final binary is being built/linked with -fxray-instrument, and
the constitutent LLVM IR gets re-lowered with xray instrumentation.
With this change, we can honour the "never-instrument "attributes
provided in the source code and preserve those in the IR. This way, even
in thinlto builds, we retain the attributes which say whether functions
should never be XRay instrumented.
This change addresses llvm.org/PR38922.
Reviewers: mboerger, eizan
Subscribers: mehdi_amini, dexonsmith, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D52015
llvm-svn: 342200
Richard Trieu [Fri, 14 Sep 2018 01:15:28 +0000 (01:15 +0000)]
[ODRHash] Fix early exit that skipped code.
There is a bit of code at the end of AddDeclaration that should be run on
every exit of the function. However, there was an early exit beforehand
that could be triggered, which causes a small amount of data to skip the
hashing, leading to false positive mismatch. Use a separate function so
that this code is always run.
llvm-svn: 342199
Fangrui Song [Fri, 14 Sep 2018 00:56:11 +0000 (00:56 +0000)]
[clangd] Fix TUScheduler typos
llvm-svn: 342198