Commit Graph

300860 Commits

Author SHA1 Message Date
Wei Mi 6323fb3d7f [SampleFDO][NFC] Remove debugging log left over in the code.
llvm-svn: 344304
2018-10-11 22:14:27 +00:00
Sanjay Patel 99c02f6301 [x86] add tests for extract_element; NFC
The transform for this pattern has an unnecessary one-use limitation.

llvm-svn: 344303
2018-10-11 22:04:36 +00:00
Rui Ueyama 936cfa86e5 Remove `else` after `return`.
llvm-svn: 344302
2018-10-11 21:57:52 +00:00
Sanjay Patel 7ad8e32f03 [x86] regenerate CHECKs; NFC
llvm-svn: 344301
2018-10-11 21:44:38 +00:00
Eli Friedman 8b44cc21c6 [ELF] Fix link failure with Android compressed relocation support.
Android uses a compressed relocation format, which means the size of the
relocation section isn't predictable based on the number of relocations,
and can vary if the layout changes in any way. To deal with this, the
linker normally runs multiple passes until the layout converges.

The layout should converge if the size of the compressed
relocation section increases monotonically: if the size of an encoded
offset increases by one byte, the larget value which can be encoded is
multiplied by 128, so the representable offsets grow much faster than
the size of the section itself.

The problem here is that there is no code to ensure the size of the
section doesn't decrease.  If the size of the relocation section
decreases, the relative offsets can increase due to alignment
restrictions, so that can force the size of the relocation section to
increase again.  The end result is an infinite loop; the loop gets cut
off after 10 iterations with the message "thunk creation not
converged".

To avoid this issue, this patch adds padding to the end of the
relocation section if its size would decrease.  The extra
padding is harmless because of the way the format is defined:
decoding stops after it reaches the number of relocations specified
in the section's header.

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

llvm-svn: 344300
2018-10-11 21:43:06 +00:00
Eugene Zelenko 724a3b728a [Documentation] Rephrase modernize-deprecated-ios-base-aliases description. Add clangd and clang-doc placeholders in Release Notes.
llvm-svn: 344299
2018-10-11 21:40:32 +00:00
Aaron Smith c66838aee9 [llvm-pdbutil] Pretty print PDBSymbolUsingNamespace symbols
Reviewers: rnk, zturner, llvm-commits

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

llvm-svn: 344298
2018-10-11 21:37:18 +00:00
Dan Albert 86b1488faa Revert "[Driver] Default Android toolchains to libc++."
Breaks some of the Android bots because they aren't expecting to need
to explicitly set -stdlib.

This reverts commit 031072f5048654b01a40f639633de1ff4e2f3dc8.

llvm-svn: 344297
2018-10-11 21:28:42 +00:00
Dan Albert dc112f4595 [Driver] Default Android toolchains to libc++.
Reviewers: srhines, pirama, EricWF

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 344296
2018-10-11 20:58:43 +00:00
Dan Albert e4dd75a9cb [Driver] Default to `-z now` and `-z relro` on Android.
Summary:
RTLD_LAZY is not supported on Android (though failing to use `-z now`
will work since it is assumed by the loader).

RelRO is required.

Reviewers: srhines, pirama

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 344295
2018-10-11 20:57:54 +00:00
Rui Ueyama 2600e0946b Rename SymbolTable::addRegular -> SymbolTable::addDefined.
We have addAbsolute, addBitcode, addCommon, etc. addRegular looked a
bit inconsistent.

llvm-svn: 344294
2018-10-11 20:43:01 +00:00
Dan Albert 99ac6c8e89 [Driver] Fix --hash-style choice for Android.
Summary:
Android supports GNU style hashes as of Marshmallow, so we should be
generating both styles for pre-M targets and GNU hashes for newer
targets.

Reviewers: srhines, pirama

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 344293
2018-10-11 20:39:32 +00:00
Rui Ueyama cf41adaaa0 Remove unused default arguments.
llvm-svn: 344292
2018-10-11 20:38:34 +00:00
Craig Topper 35d513c7e4 [X86] Type legalize v2f32 loads by using an f64 load and a scalar_to_vector.
On 64-bit targets the generic legalize will use an i64 load and a scalar_to_vector for us. But on 32-bit targets i64 isn't legal and the generic legalizer will end up emitting two 32-bit loads. We have DAG combines that try to put those two loads back together with pretty good success.

This patch instead uses f64 to avoid the splitting entirely. I've made it do the same for 64-bit mode for consistency and to keep the load in the fp domain.

There are a few things in here that look like regressions in 32-bit mode, but I believe they bring us closer to the 64-bit mode codegen. And that the 64-bit mode code could be better. I think those issues should be looked at separately.

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

llvm-svn: 344291
2018-10-11 20:36:06 +00:00
Rui Ueyama c7497d3ac5 Remove SymbolTable::addUndefined<ELF32LE>(StringRef).
Because we can implement the function as a non-member function.

llvm-svn: 344290
2018-10-11 20:34:29 +00:00
Kostya Serebryany 0cb8710e11 [hwasan] relax a test
llvm-svn: 344289
2018-10-11 20:29:00 +00:00
Michal Gorny d50a4310dc [python] [tests] Fix calling tests on Windows
Fix passing arguments to the Python test command to use 'env' builtin
CMake command, in order to fix compatibility with Windows.

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

llvm-svn: 344288
2018-10-11 20:26:55 +00:00
Thomas Lively f04bed8e79 [WebAssembly][NFC] Remove repetition of Defs = [ARGUMENTS] (fixed)
llvm-svn: 344287
2018-10-11 20:21:22 +00:00
Warren Ristow 000dbbca39 Update test of r344198 to work with release builds.
llvm-svn: 344286
2018-10-11 20:19:25 +00:00
Aaron Enye Shi 72c0373d9a [HIP] Remove unused irif bitcode from test
This is part of previous commit [HIP] Replace irif library with hip.amdgcn.bc

Reviewers: yaxunl

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

llvm-svn: 344285
2018-10-11 19:52:32 +00:00
Sumanth Gundapaneni a4a9155e4f [Hexagon] Restrict compound instructions with constant value.
Having a constant value operand in the compound instruction
is not always profitable. This patch improves coremark by ~4% on
Hexagon.

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

llvm-svn: 344284
2018-10-11 19:48:15 +00:00
Sumanth Gundapaneni 77418a3753 [Pipeliner] Use the Index from Topo instead of relying on NodeNum. (NFC)
In future, if we may add any new DAG mutations other than artificial dependencies,
the NodeNum may not be valid. Instead the index from topological schedule DAG can be
used as long as we update it with the DAG change.

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

llvm-svn: 344283
2018-10-11 19:45:07 +00:00
Sumanth Gundapaneni 8916e438c4 [Pipeliner] Fix the Schedule DAG topoligical order.
This patch updates the DAG change to reflect in the topological ordering
of the nodes.

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

llvm-svn: 344282
2018-10-11 19:42:46 +00:00
Aaron Enye Shi e1a353adb0 [HIP] Replace irif library with hip.amdgcn.bc
No longer use irif amdgcn library, instead we will use the previous fence functions from new hip.amdgcn.bc bitcode library. Update hip-device-libs.hip test as well.

llvm-svn: 344281
2018-10-11 19:41:54 +00:00
Thomas Lively ab37189f7e [WebAssembly] Revert rL344180, which was breaking expensive checks
llvm-svn: 344280
2018-10-11 18:45:48 +00:00
Zachary Turner e8a6c3eb96 Revert SymbolFileNativePDB plugin.
This was originally causing some test failures on non-Windows
platforms, which required fixes in the compiler and linker.  After
those fixes, however, other tests started failing.  Reverting
temporarily until I can address everything.

llvm-svn: 344279
2018-10-11 18:45:44 +00:00
Artem Dergachev 2ce1d6faf8 Revert r344197 "[MC][ELF] compute entity size for explicit sections"
Revert r344206 "[MC][ELF] Fix section_mergeable_size.ll"

They were causing failures on too many important buildbots for too long.
Please revert eagerly if your fix takes more than a couple of hours to land!

llvm-svn: 344278
2018-10-11 18:43:08 +00:00
Jason Molenda 25b3900f9f Fix this comment so it is consistent with all the others.
llvm-svn: 344277
2018-10-11 18:41:34 +00:00
Sean Fertile 518be95072 Revert "clang-cl: Add /showFilenames option (PR31957)"
This reverts https://reviews.llvm.org/rL344234 which is causing failures on
several bots due to invalid llvm.linker.options.

llvm-svn: 344276
2018-10-11 18:40:35 +00:00
Jason Molenda dcb3c28fd8 Don't mark an LC_BUILD_VERSION as giving us a
correct version if it has a major verison 0.

llvm-svn: 344275
2018-10-11 18:37:53 +00:00
Leonard Chan 64e21b5cfd [PassManager/Sanitizer] Port of AddresSanitizer pass from legacy to new PassManager
This patch ports the legacy pass manager to the new one to take advantage of
the benefits of the new PM. This involved moving a lot of the declarations for
`AddressSantizer` to a header so that it can be publicly used via
PassRegistry.def which I believe contains all the passes managed by the new PM.

This patch essentially decouples the instrumentation from the legacy PM such
hat it can be used by both legacy and new PM infrastructure.

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

llvm-svn: 344274
2018-10-11 18:31:51 +00:00
Alexey Bataev ff23bb6622 [OPENMP][NVPTX]Reduce memory use for globalized vars in
target/teams/distribute regions.

Previously introduced globalization scheme that uses memory coalescing
scheme may increase memory usage fr the variables that are devlared in
target/teams/distribute contexts. We don't need 32 copies of such
variables, just 1. Patch reduces memory use in this case.

llvm-svn: 344273
2018-10-11 18:30:31 +00:00
Nirav Dave f1f2a2a31a [DAG] Fix Big Endian in Load-Store forwarding
Summary:
Correct offset calculation in load-store forwarding for big-endian
targets.

Reviewers: rnk, RKSimon, waltl

Subscribers: sdardis, nemanjai, hiraditya, jrtc27, atanasyan, jsji, llvm-commits

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

llvm-svn: 344272
2018-10-11 18:28:59 +00:00
Krzysztof Parzyszek 5d3a6f76a8 [Hexagon] Eliminate potential sources of non-determinism in HCE
Also, avoid comparing GUIDs when ordering global addresses, because
source file location can cause different GUID to be calculated. As a
result, a pair of symbols can compare "less" in one directory, but
"greater" in another.

llvm-svn: 344271
2018-10-11 18:26:02 +00:00
Craig Topper fb2ac8969e [X86] Restore X86ISelDAGToDAG::matchBEXTRFromAnd. Teach address matching to create a BEXTR pattern from a (shl (and X, mask >> C1) if C1 can be folded into addressing mode.
This is an alternative to D53080 since I think using a BEXTR for a shifted mask is definitely an improvement when the shl can be absorbed into addressing mode. The other cases I'm less sure about.

We already have several tricks for handling an and of a shift in address matching. This adds a new case for BEXTR.

I've moved the BEXTR matching code back to X86ISelDAGToDAG to allow it to match. I suppose alternatively we could directly emit a X86ISD::BEXTR node that isel could pattern match. But I'm trying to view BEXTR matching as an isel concern so DAG combine can see 'and' and 'shift' operations that are well understood. We did lose a couple cases from tbm_patterns.ll, but I think there are ways to recover that.

I've also put back the manual load folding code in matchBEXTRFromAnd that I removed a few months ago in r324939. This gives us some more freedom to make decisions based on the ability to fold a load. I haven't done anything with that yet.

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

llvm-svn: 344270
2018-10-11 18:06:07 +00:00
Zachary Turner e502f8b315 Better support for POSIX paths in PDBs.
While it doesn't make a *ton* of sense for POSIX paths to be
in PDBs, it's possible to occur in real scenarios involving
cross compilation.

The tools need to be able to handle this, because certain types
of debugging scenarios are possible without a running process
and so don't necessarily require you to be on a Windows system.
These include post-mortem debugging and binary forensics (e.g.
using a debugger to disassemble functions and examine symbols
without running the process).

There's changes in clang, LLD, and lldb in this patch.  After
this the cross-platform disassembly and source-list tests pass
on Linux.

Furthermore, the behavior of LLD can now be summarized by a much
simpler rule than before: Unless you specify /pdbsourcepath and
/pdbaltpath, the PDB ends up with paths that are valid within
the context of the machine that the link is performed on.

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

llvm-svn: 344269
2018-10-11 18:01:55 +00:00
Jordan Rupprecht 1845645b0d [llvm-nm] Fix crash when running with --print-armap on corrupt archives.
error() in llvm-nm intentionally does not return so that the callee can move on to future files/slices. When printing the archive map, this is not currently handled (the caller assumes that error() returns), so processing continues despite there being an error.

Also, change one return to a break, so that symbols can be printed even if the archive map is corrupt.

llvm-svn: 344268
2018-10-11 17:55:11 +00:00
Eric Liu 480a5075ad Revert "[Lex] TokenConcatenation now takes const Preprocessor"
This reverts commit r344262. This was an unintentional commit.

llvm-svn: 344267
2018-10-11 17:50:04 +00:00
Eric Liu c612e04c29 clang-cl: set output of lit-test to a tmp file after r344234
Some test frameworks do not allow output file in CWD.

llvm-svn: 344266
2018-10-11 17:49:20 +00:00
Martin Storsjo 8cc0f71261 [COFF] Add and use a Wordsize field in Config. NFCI.
Differential Revision: https://reviews.llvm.org/D53143

llvm-svn: 344265
2018-10-11 17:45:58 +00:00
Martin Storsjo 21eb363302 [COFF] Set proper pointer size alignment for LocalImportChunk
When these are accessed with load/store instructions on ARM64,
it becomes strictly necessary to have them properly aligned.

This fixes PR39228.

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

llvm-svn: 344264
2018-10-11 17:45:51 +00:00
Michal Gorny cc8ea49d1f [python] [tests] Retab CMakeLists.txt for consistency (NFC)
llvm-svn: 344263
2018-10-11 17:45:35 +00:00
Eric Liu c8ae649658 [Lex] TokenConcatenation now takes const Preprocessor
Differential Revision: https://reviews.llvm.org/D52502

llvm-svn: 344262
2018-10-11 17:35:29 +00:00
Marshall Clow c83d283a2e Revert commit r344254; does not work with C++03
llvm-svn: 344261
2018-10-11 17:28:57 +00:00
Michal Gorny 12e1df2f19 [tests] Remove Python tests from check-all due to breakage
Remove the Python tests from default target in order to fix two
kinds of breakage uncovered by enabling them: one failing test on Linux,
and problem with the test command on Windows.  Both to be addressed
in followup revisions.

llvm-svn: 344260
2018-10-11 17:25:05 +00:00
Aaron Ballman 20ea72476c Improve -Wshadow warnings with enumerators.
Addresses PR24718 by checking for enumerators that shadow other enumerators. Catches issues like:

enum E1{e1};
void f(void) {
  enum E2{e1};
}

llvm-svn: 344259
2018-10-11 16:40:18 +00:00
Michal Gorny 61adf8aeb4 [tests] Include Python binding tests in CMake rules
Add a new CMake rule check-clang-python to run the Python bindings'
test suite, and include it in check-all.

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

llvm-svn: 344258
2018-10-11 16:32:54 +00:00
Brad Smith 3910c7b832 Some improvements to the OpenBSD driver.
- OpenBSD has switched to compiler_rt / libcxx
- Fix sysroot and lib path handling
- Some cleaning up

llvm-svn: 344257
2018-10-11 16:13:44 +00:00
Fangrui Song 95b45cb4fd [clang-move] Remove clang:: qualifier
Summary:
The use sites are enclosed by `namespace clang`, so clang:: is not
necessary. Many unqualified names have already been used, e.g. SourceManager SourceLocation LangOptions. This change makes the code terser and more consistent.

Reviewers: hokein

Reviewed By: hokein

Subscribers: ioeric, cfe-commits

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

llvm-svn: 344256
2018-10-11 16:09:26 +00:00
Sanjay Patel 4875662e57 [DAGCombiner] move comment closer to the corresponding code; NFC
llvm-svn: 344255
2018-10-11 16:07:25 +00:00