Heejin Ahn [Fri, 2 Mar 2018 01:03:40 +0000 (01:03 +0000)]
[WebAssembly] Gather EH instructions in one place. NFC.
Summary:
- Gather EH instructions in one place for easy tracking (more will be
added later)
- Variable name change
Reviewers: dschuff
Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D43742
llvm-svn: 326522
Fedor Indutny [Fri, 2 Mar 2018 00:59:27 +0000 (00:59 +0000)]
[ArgumentPromotion] don't break musttail invariant PR36543
Summary:
Do not break musttail invariant by promoting arguments of musttail
callee or caller.
Reviewers: sanjoy, dberlin, hfinkel, george.burgess.iv, fhahn, rnk
Reviewed By: rnk
Subscribers: rnk, llvm-commits
Differential Revision: https://reviews.llvm.org/D43926
llvm-svn: 326521
George Karpenkov [Fri, 2 Mar 2018 00:55:59 +0000 (00:55 +0000)]
[analyzer] Prevent crashing in NonNullParamChecker
https://bugs.llvm.org/show_bug.cgi?id=36381
rdar://
37543426
Turns out, the type passed for the lambda capture was incorrect.
One more argument to abandon the getSVal overload which does not require the
type information.
Differential Revision: https://reviews.llvm.org/D43925
llvm-svn: 326520
Eugene Zelenko [Fri, 2 Mar 2018 00:54:51 +0000 (00:54 +0000)]
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 326519
George Karpenkov [Fri, 2 Mar 2018 00:54:05 +0000 (00:54 +0000)]
[analyzer] [NFC] [tests] Make test more resilient to changes in exploration strategy
llvm-svn: 326518
Heejin Ahn [Fri, 2 Mar 2018 00:39:16 +0000 (00:39 +0000)]
[WebAssembly] Add exception handling option
Summary: Add exception handling option to clang.
Reviewers: dschuff
Subscribers: jfb, sbc100, jgravelle-google, sunfish, cfe-commits
Differential Revision: https://reviews.llvm.org/D43681
llvm-svn: 326517
George Karpenkov [Fri, 2 Mar 2018 00:30:43 +0000 (00:30 +0000)]
Utility functions for checked arithmetic
Provide checkedAdd and checkedMul functions, providing checked
arithmetic on signed integers.
Differential Revision: https://reviews.llvm.org/D43704
llvm-svn: 326516
Craig Topper [Fri, 2 Mar 2018 00:27:44 +0000 (00:27 +0000)]
[InstCombine] Simplify test cases by removing loads/stores that aren't required for what is being tested.
The loads and stores were getting the data and storing the results. There's no reason we can't just use function arguments and return.
llvm-svn: 326515
Pavel Labath [Fri, 2 Mar 2018 00:17:05 +0000 (00:17 +0000)]
Speed up TestWatchpointMultipleThreads
Summary:
The inferior was sleeping before doing any interesting work. I remove that
to make the test faster.
While looking at the purpose of the test (to check that watchpoints are
propagated to all existing threads - r140757) I noticed that the test has
diverged from the original intention and now it creates the threads *after* the
watchpoint is set (this probably happened during the std::thread refactor).
After some discussion, we decided both scenarios make sense, so I modify the
test to test both.
The watchpoint propagation functionality is not really debug info depenent, so
I also stop replication of this test. This brings the test's time from ~108s
down to 4s.
Reviewers: davide, jingham
Subscribers: aprantl, lldb-commits
Differential Revision: https://reviews.llvm.org/D43857
llvm-svn: 326514
Sanjay Patel [Fri, 2 Mar 2018 00:14:51 +0000 (00:14 +0000)]
[InstCombine] allow fmul fold with less than 'fast'
This is a retry of r326502 with updates to the reassociate
test file that I missed the first time.
@test15_reassoc in the supposed -reassociate test file
(except that it tests 2 other passes too...) shows that
there's no clear responsiblity for reassociation transforms.
Instcombine now gets that case, but only because the
constant values are identical. Otherwise, it would still
miss that pattern.
Reassociate doesn't get that case because it hasn't been
updated to use less than 'fast' FMF.
llvm-svn: 326513
David L. Jones [Fri, 2 Mar 2018 00:07:45 +0000 (00:07 +0000)]
[NFC] Move CommentOpts checks to the call sites that depend on it. (Re-applying r326501.)
When parsing comments, for example, for -Wdocumentation, slightly different
behaviour occurs when -fparse-all-comments is specified. However, these
differences are subtle:
1. All comments are saved during parsing, regardless of whether they are doc
comments or not.
2. "Maybe-doc" comments, like <, !, etc, are saved as such, instead of marking
them as ordinary comments. The maybe-doc type of comment is never saved
otherwise. (Warning on these is the impetus of -Wdocumentation.)
3. All comments are treated as doc comments in ASTContext, even if they are ordinary.
This change moves the logic for checking CommentOptions.ParseAllComments closer
to where it has an effect. The overall logic is unchanged, but checks of the
ParseAllComments flag are now done where the effect will be clearer.
Subscribers: cfe-commits
llvm-svn: 326512
Sanjay Patel [Thu, 1 Mar 2018 23:41:03 +0000 (23:41 +0000)]
[Reassociate] regenerate checks; NFC
llvm-svn: 326511
Sanjay Patel [Thu, 1 Mar 2018 23:39:24 +0000 (23:39 +0000)]
revert r326502: [InstCombine] allow fmul fold with less than 'fast'
I forgot that I added tests for 'reassoc' to -reassociate, but
suprisingly that file calls -instcombine too, so it is affected.
I'll update that file and try again.
llvm-svn: 326510
Rui Ueyama [Thu, 1 Mar 2018 23:29:05 +0000 (23:29 +0000)]
[WebAssembly] Simplify COMDAT handling.
Differential Revision: https://reviews.llvm.org/D43966
llvm-svn: 326509
David L. Jones [Thu, 1 Mar 2018 23:14:00 +0000 (23:14 +0000)]
Revert r326501 due to buildbot breakage.
Original change:
[NFC] Move CommentOpts checks to the call sites that depend on it.
When parsing comments, for example, for -Wdocumentation, slightly different
behaviour occurs when -fparse-all-comments is specified. However, these
differences are subtle:
1. All comments are saved during parsing, regardless of whether they are doc comments or not.
2. "Maybe-doc" comments, like //<, //!, etc, are saved as such, instead of marking them as ordinary comments. The maybe-doc type of comment is never saved otherwise. (Warning on these is the impetus of -Wdocumentation.)
3. All comments are treated as doc comments in ASTContext, even if they are ordinary.
This change moves the logic for checking CommentOptions.ParseAllComments closer
to where it has an effect. The overall logic is unchanged, but checks of the
ParseAllComments flag are now done where the effect will be clearer.
llvm-svn: 326508
Rui Ueyama [Thu, 1 Mar 2018 23:11:30 +0000 (23:11 +0000)]
Report an error if you try to link against .dll instead of .lib.
It is a usage error to feed a .dll file instead of a .dll to COFF linker.
Previously, lld failed with a mysterious error message. Now we reject
it at the driver.
Fixes https://bugs.llvm.org/show_bug.cgi?id=36440
Differential Revision: https://reviews.llvm.org/D43964
llvm-svn: 326507
Rui Ueyama [Thu, 1 Mar 2018 23:06:10 +0000 (23:06 +0000)]
Accept both `--foo bar` and `--foo=bar` styles options.
GNU linkers by convention supports both `--foo bar` and `--foo=bar` styles
for all long options that take arguments.
Differential Revision: https://reviews.llvm.org/D43972
llvm-svn: 326506
Yonghong Song [Thu, 1 Mar 2018 23:04:59 +0000 (23:04 +0000)]
bpf: introduce -mattr=dwarfris to disable DwarfUsesRelocationsAcrossSections
Commit
e4507fb8c94b ("bpf: disable DwarfUsesRelocationsAcrossSections")
disables MCAsmInfo DwarfUsesRelocationsAcrossSections unconditionally
so that dwarf will not use cross section (between dwarf and symbol table)
relocations. This new debug format enables pahole to dump structures
correctly as libdwarves.so does not have BPF backend support yet.
This new debug format, however, breaks bcc (https://github.com/iovisor/bcc)
source debug output as llvm in-memory Dwarf support has some issues to
handle it. More specifically, with DwarfUsesRelocationsAcrossSections
disabled, JIT compiler does not generate .debug_abbrev and Dwarf
DIE (debug info entry) processing is not happy about this.
This patch introduces a new flag -mattr=dwarfris
(dwarf relocation in section) to disable DwarfUsesRelocationsAcrossSections.
DwarfUsesRelocationsAcrossSections is true by default.
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 326505
Rui Ueyama [Thu, 1 Mar 2018 23:01:41 +0000 (23:01 +0000)]
Rename a test file and fix indentation.
llvm-svn: 326504
Rui Ueyama [Thu, 1 Mar 2018 22:56:52 +0000 (22:56 +0000)]
Set DF_TEXTREL to executables that need text relocations.
Summary:
If an executable needs text relocations, it should be marked as such so
that the loader can prepare for text relocations. We currently create a
dummy segment with DT_TEXTREL for that purpose.
Generic ABI as of 2000 [1] mentioned that "Its [DT_TEXTREL's] use
has been superseded by the DF_TEXTREL flag". However, it's actually not
superseded even after 18 years. OpenBSD and musl recognize only DT_TEXTREL.
So we still need to set both.
[1] http://www.sco.com/developers/gabi/2000-07-17/ch5.dynamic.html
Reviewers: rafael
Subscribers: emaste, llvm-commits, arichardson
Differential Revision: https://reviews.llvm.org/D43920
llvm-svn: 326503
Sanjay Patel [Thu, 1 Mar 2018 22:53:47 +0000 (22:53 +0000)]
[InstCombine] allow fmul fold with less than 'fast'
llvm-svn: 326502
David L. Jones [Thu, 1 Mar 2018 22:41:53 +0000 (22:41 +0000)]
[NFC] Move CommentOpts checks to the call sites that depend on it.
When parsing comments, for example, for -Wdocumentation, slightly different
behaviour occurs when -fparse-all-comments is specified. However, these
differences are subtle:
1. All comments are saved during parsing, regardless of whether they are doc
comments or not.
2. "Maybe-doc" comments, like //<, //!, etc, are saved as such, instead of
marking them as ordinary comments. The maybe-doc type of comment is never
saved otherwise. (Warning on these is the impetus of -Wdocumentation.)
3. All comments are treated as doc comments in ASTContext, even if they are
ordinary.
This change moves the logic for checking CommentOptions.ParseAllComments closer
to where it has an effect. The overall logic is unchanged, but checks of the
ParseAllComments flag are now done where the effect will be clearer.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D43663
llvm-svn: 326501
Craig Topper [Thu, 1 Mar 2018 22:32:25 +0000 (22:32 +0000)]
[DAGCombiner] When combining zero_extend of a truncate, only mask before extending for vectors.
Masking first, prevents the extend from being combine with loads. Its also interfering with some vXi1 extraction code.
Differential Revision: https://reviews.llvm.org/D42679
llvm-svn: 326500
Chih-Hung Hsieh [Thu, 1 Mar 2018 22:26:19 +0000 (22:26 +0000)]
[Driver] Pass -f[no-]emulated-tls and set up ExplicitEmulatedTLS
Since LLVM r326341, default EmulatedTLS mode is decided in backend
according to target triple. Any front-end should pass -f[no]-emulated-tls
to backend and set up ExplicitEmulatedTLS only when the flags are used.
Differential Revision: https://reviews.llvm.org/D43965
llvm-svn: 326499
Rafael Espindola [Thu, 1 Mar 2018 22:23:51 +0000 (22:23 +0000)]
Don't ingoned --enable-new-dtags.
llvm-svn: 326498
Simon Pilgrim [Thu, 1 Mar 2018 22:22:31 +0000 (22:22 +0000)]
[X86][MMX] Improve handling of 64-bit MMX constants
64-bit MMX constant generation usually ends up lowering into SSE instructions before being spilled/reloaded as a MMX type.
This patch bitcasts the constant to a double value to allow correct loading directly to the MMX register.
I've added MMX constant asm comment support to improve testing, it's better to always print the double values as hex constants as MMX is mainly an integer unit (and even with 3DNow! its just floats).
Differential Revision: https://reviews.llvm.org/D43616
llvm-svn: 326497
Richard Smith [Thu, 1 Mar 2018 22:20:13 +0000 (22:20 +0000)]
[modules] Don't diagnose "redefinition" of a friend with a pending definition
if the other definition is a merged copy of the same function.
llvm-svn: 326496
Craig Topper [Thu, 1 Mar 2018 22:15:39 +0000 (22:15 +0000)]
[SelectionDAG] Support some SimplifySetCC cases for comparing against vector splats of constants.
This supports things like
(setcc ugt X, 0) -> (setcc ne X, 0)
I've restricted to only make changes to vectors before legalize ops because I doubt all targets have accurate condition code legality information for vectors given how little we did before.
Differential Revision: https://reviews.llvm.org/D42948
llvm-svn: 326495
Simon Pilgrim [Thu, 1 Mar 2018 22:05:40 +0000 (22:05 +0000)]
[X86][AVX] Add v2f32 <-> v2i8/v2i16/v2i32 vector tests
llvm-svn: 326494
Richard Smith [Thu, 1 Mar 2018 22:01:06 +0000 (22:01 +0000)]
[www] Capitalize "Clang" when referring to the project, and generalize the
introduction on the front page page.
We still use the lowercase "clang" spelling when referring to the driver binary.
llvm-svn: 326493
Krzysztof Parzyszek [Thu, 1 Mar 2018 21:54:08 +0000 (21:54 +0000)]
[Hexagon] Add trap1 instruction
llvm-svn: 326492
Adrian Prantl [Thu, 1 Mar 2018 21:53:17 +0000 (21:53 +0000)]
Add an llc testcase analogous to test/LTO/X86/strip-debug-info.ll
rdar://problem/
37963669
llvm-svn: 326491
Matt Arsenault [Thu, 1 Mar 2018 21:25:30 +0000 (21:25 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for @llvm.amdgcn.cvt.pkrtz
Patch by Tom Stellard
llvm-svn: 326490
Matt Arsenault [Thu, 1 Mar 2018 21:25:25 +0000 (21:25 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for G_OR
Patch by Tom Stellard
llvm-svn: 326489
Simon Pilgrim [Thu, 1 Mar 2018 21:21:30 +0000 (21:21 +0000)]
[X86][SSE] Regenerate float to/from i8/i16 vector tests
llvm-svn: 326488
Matt Arsenault [Thu, 1 Mar 2018 21:20:44 +0000 (21:20 +0000)]
AMDGPU/GlobalISel: Remove default register mapping
This crashes for some opcodes, which prevents the SelectionDAG
fallback from working.
Patch by Tom Stellard
llvm-svn: 326487
Evandro Menezes [Thu, 1 Mar 2018 21:17:36 +0000 (21:17 +0000)]
[AArch64] Clean up code (NFC)
Clean up a couple of functions in `AArch64TargetLowering` by removing
redundant statements.
llvm-svn: 326486
Marshall Clow [Thu, 1 Mar 2018 21:16:07 +0000 (21:16 +0000)]
Added P0805 to the list of ready bits
llvm-svn: 326485
Simon Pilgrim [Thu, 1 Mar 2018 21:13:26 +0000 (21:13 +0000)]
[X86][SSE] Regenerate odd sized sext/zext tests
llvm-svn: 326484
Matt Arsenault [Thu, 1 Mar 2018 21:08:51 +0000 (21:08 +0000)]
AMDGPU/GlobalISel: Use a more correct getValueMapping
This was finding the wrong size registers for anything with
more than 2 components.
Patch by Tom Stellard
llvm-svn: 326483
Matt Arsenault [Thu, 1 Mar 2018 20:59:44 +0000 (20:59 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for G_BITCAST
Patch by Tom Stellard
llvm-svn: 326482
Matt Arsenault [Thu, 1 Mar 2018 20:56:21 +0000 (20:56 +0000)]
AMDGPU/GlobalISel: Mark i32->i64 zext as legal
llvm-svn: 326481
Martin Storsjo [Thu, 1 Mar 2018 20:42:28 +0000 (20:42 +0000)]
[AArch64] Add support for secrel add/load/store relocations for COFF
Differential Revision: https://reviews.llvm.org/D43288
llvm-svn: 326480
Matt Arsenault [Thu, 1 Mar 2018 20:40:55 +0000 (20:40 +0000)]
AMDGPU/GlobalISel: InstrMapping for llvm.amdgcn.exp.compr
Patch by Tom Stellard
llvm-svn: 326479
Rui Ueyama [Thu, 1 Mar 2018 20:38:38 +0000 (20:38 +0000)]
[MinGW] Fix --{start,end}-group.
Currently --start-group=foo is accidentally accepted by the MinGW driver.
Differential Revision: https://reviews.llvm.org/D43836
llvm-svn: 326478
Matt Arsenault [Thu, 1 Mar 2018 20:24:37 +0000 (20:24 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for @llvm.amdgcn.exp
Patch by Tom Stellard
llvm-svn: 326477
Martin Storsjo [Thu, 1 Mar 2018 20:22:57 +0000 (20:22 +0000)]
[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC
Make types with sizes that aren't a power of two an error (that can
be disabled) in structs with ms_struct layout, except on mingw where
the situation is quite likely to occur and GCC handles it silently.
Differential Revision: https://reviews.llvm.org/D43908
llvm-svn: 326476
Craig Topper [Thu, 1 Mar 2018 20:05:09 +0000 (20:05 +0000)]
[SimplifyLibCalls] Update an obviously copy and pasted header comment to match this file. NFC
llvm-svn: 326475
Craig Topper [Thu, 1 Mar 2018 20:05:07 +0000 (20:05 +0000)]
[InstCombine] Auto-generate complete checks. NFC
llvm-svn: 326474
Matt Arsenault [Thu, 1 Mar 2018 19:27:10 +0000 (19:27 +0000)]
AMDGPU/GlobalISel: Define InstrMappings for G_ICMP
Patch by Tom Stellard
llvm-svn: 326472
Matt Arsenault [Thu, 1 Mar 2018 19:22:05 +0000 (19:22 +0000)]
AMDGPU/GlobalISel: Make i32 mul legal
llvm-svn: 326471
Matt Arsenault [Thu, 1 Mar 2018 19:16:52 +0000 (19:16 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for G_IMPLICIT_DEF
Patch by Tom Stellard
llvm-svn: 326470
Saleem Abdulrasool [Thu, 1 Mar 2018 19:13:43 +0000 (19:13 +0000)]
Driver: hoist `-fno-rtti-data` to a driver flag
This is needed for building with the GNU driver (`clang++`) when
targeting Windows and using msvcprt. This flag is the equivalent of
`/GR-`.
llvm-svn: 326469
Matt Arsenault [Thu, 1 Mar 2018 19:13:30 +0000 (19:13 +0000)]
AMDGPU/GlobalISel: Define instruction mapping for G_FCONSTANT
Patch by Tom Stellard
llvm-svn: 326468
Matt Arsenault [Thu, 1 Mar 2018 19:09:25 +0000 (19:09 +0000)]
AMDGPU/GlobalISel: Add copyCost for VGPR->SGPR copies
Patch by Tom Stellard
llvm-svn: 326467
Matt Arsenault [Thu, 1 Mar 2018 19:09:21 +0000 (19:09 +0000)]
AMDGPU/GlobalISel: Make i32 xor legal
llvm-svn: 326466
Matt Arsenault [Thu, 1 Mar 2018 19:09:16 +0000 (19:09 +0000)]
AMDGPU/GlobalISel: Mark 32/64-bit G_FCMP as legal
Patch by Tom Stellard
llvm-svn: 326465
Matt Arsenault [Thu, 1 Mar 2018 19:04:25 +0000 (19:04 +0000)]
AMDGPU/GlobalISel: Mark 32-bit G_FPTOSI as legal
Patch by Tom Stellard
llvm-svn: 326464
Ed Maste [Thu, 1 Mar 2018 19:02:41 +0000 (19:02 +0000)]
Correct man page description for --section-start
The argument is section=address, not just address.
(For compatibility with GNU linkers we need to, but do not yet, accept
--section-start=section=address.)
llvm-svn: 326463
Artem Dergachev [Thu, 1 Mar 2018 18:53:13 +0000 (18:53 +0000)]
[analyzer] Enable cfg-temporary-dtors by default.
Don't enable c++-temp-dtor-inlining by default yet, due to this reference
counting pointe problem.
Otherwise the new mode seems stable and allows us to incrementally fix C++
problems in much less hacky ways.
Differential Revision: https://reviews.llvm.org/D43804
llvm-svn: 326461
Sam Clegg [Thu, 1 Mar 2018 18:48:08 +0000 (18:48 +0000)]
[WebAssembly] Fix broken gcc build after rL326454
The gcc builders were broken by rL326454
See: https://reviews.llvm.org/D43921
llvm-svn: 326460
Ed Maste [Thu, 1 Mar 2018 18:40:11 +0000 (18:40 +0000)]
Where possible use --long-opt=value in lld man page
We intend to maintain compatibility with GNU ld, and in the GNU world
long options are conventionally specified as --long-option=value. For
whatever reason GNU ld.bfd accepts both --long-option value and
--long-option=value, but documents the former. Follow suit.
Some lld long options do not accept the = form; this is probably a bug
to be fixed (along with a man page update).
Reported by Ingo Schwarze, for --entry.
llvm-svn: 326459
Eric Liu [Thu, 1 Mar 2018 18:30:48 +0000 (18:30 +0000)]
[clangd] Make symbol name a required parameter for CanonicalIncludes::mapHeader
llvm-svn: 326458
Artem Belevich [Thu, 1 Mar 2018 18:28:45 +0000 (18:28 +0000)]
[NVPTX] use pattern matching to lower int_nvvm_match_all_sync*.
Now that patterns can handle intrinsics returning multiple results,
use tablegen'ed pattern matching instead of custom lowering.
Differential Revision: https://reviews.llvm.org/D43890
llvm-svn: 326457
Eric Liu [Thu, 1 Mar 2018 18:06:40 +0000 (18:06 +0000)]
[clangd] Support include canonicalization in symbol leve.
Summary:
Symbols with different canonical includes might be defined in the same header
(e.g. symbols defined in STL <iosfwd>). This patch adds support for mapping from
qualified symbol names to canonical headers and special mapping for symbols in <iosfwd>
Reviewers: sammccall, hokein
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits
Differential Revision: https://reviews.llvm.org/D43869
llvm-svn: 326456
Sam Clegg [Thu, 1 Mar 2018 18:06:39 +0000 (18:06 +0000)]
[WebAssembly] Use uint8_t for single byte values to match the spec
Differential Revision: https://reviews.llvm.org/D43922
llvm-svn: 326455
Sam Clegg [Thu, 1 Mar 2018 18:06:21 +0000 (18:06 +0000)]
[WebAssembly] Use uint8_t for single byte values to match the spec
The original BinaryEncoding.md document used to specify that
these values were `varint7`, but the official spec lists them
explicitly as single byte values and not LEB.
A similar change for wabt is in flight:
https://github.com/WebAssembly/wabt/pull/782
Differential Revision: https://reviews.llvm.org/D43921
llvm-svn: 326454
Zachary Turner [Thu, 1 Mar 2018 18:00:29 +0000 (18:00 +0000)]
[PDB] Defer writing the build id until the rest of the PDB is written.
For now this is NFC, but this small refactor opens the door to
letting us embed a hash of the PDB in the build id field of the
PDB.
Differential Revision: https://reviews.llvm.org/D43913
llvm-svn: 326453
Eric Liu [Thu, 1 Mar 2018 17:42:27 +0000 (17:42 +0000)]
[clangd] Forward all environment variables along with CLANGD_TRACE to clangd.
llvm-svn: 326452
Alexander Timofeev [Thu, 1 Mar 2018 17:36:43 +0000 (17:36 +0000)]
[AMDGPU] : fix for the crash in SIRegisterInfo when the regiser class not found
Differential revision: https://reviews.llvm.org./D43334
llvm-svn: 326451
Krzysztof Parzyszek [Thu, 1 Mar 2018 17:03:26 +0000 (17:03 +0000)]
[Hexagon] Add guest registers
llvm-svn: 326450
Pavel Labath [Thu, 1 Mar 2018 16:56:28 +0000 (16:56 +0000)]
Make TestDynamicValueSameBase gcc-compatible
gcc will say that the type of "this" is "T * const", clang "T *".
Compare the unqualified type names to erase the difference between the
two, as the constness is not a part of this test.
FWIW, I think that the gcc behavior makes more sense here.
llvm-svn: 326449
Sanjay Patel [Thu, 1 Mar 2018 16:28:32 +0000 (16:28 +0000)]
[InstCombine] remove stale comments for tests; NFC
llvm-svn: 326448
Stefan Pintilie [Thu, 1 Mar 2018 16:16:08 +0000 (16:16 +0000)]
[Power9] Add missing instructions to the Power 9 scheduler
Adding more instructions using InstRW so that we can move away from ItinRW
and ultimately have a complete Power 9 scheduler.
Differential Revision: https://reviews.llvm.org/D43899
llvm-svn: 326447
Ed Maste [Thu, 1 Mar 2018 16:02:19 +0000 (16:02 +0000)]
Correct markup and nits in ld.lld man page
Patch by Ingo Schwarze
llvm-svn: 326446
Nicholas Wilson [Thu, 1 Mar 2018 15:55:59 +0000 (15:55 +0000)]
[WebAssembly] Update pre-generated test files to match latest llc output. NFC.
The ordering of llc's output was changed in rL326334.
Differential Revision: https://reviews.llvm.org/D43941
llvm-svn: 326445
Sanjay Patel [Thu, 1 Mar 2018 15:50:26 +0000 (15:50 +0000)]
[InstCombine] simplify code for (X*Y) * X => (X*X) * Y ; NFCI
llvm-svn: 326444
Sebastian Pop [Thu, 1 Mar 2018 15:47:39 +0000 (15:47 +0000)]
[AArch64] generate vuzp instead of mov
when a BUILD_VECTOR is created out of a sequence of EXTRACT_VECTOR_ELT with a
specific pattern sequence, either <0, 2, 4, ...> or <1, 3, 5, ...>, replace the
BUILD_VECTOR with either vuzp1 or vuzp2.
With this patch LLVM generates the following code for the first function fun1 in the testcase:
adrp x8, .LCPI0_0
ldr q0, [x8, :lo12:.LCPI0_0]
tbl v0.16b, { v0.16b }, v0.16b
ext v1.16b, v0.16b, v0.16b, #8
uzp1 v0.8b, v0.8b, v1.8b
str d0, [x8]
ret
Without this patch LLVM currently generates this code:
adrp x8, .LCPI0_0
ldr q0, [x8, :lo12:.LCPI0_0]
tbl v0.16b, { v0.16b }, v0.16b
mov v1.16b, v0.16b
mov v1.b[1], v0.b[2]
mov v1.b[2], v0.b[4]
mov v1.b[3], v0.b[6]
mov v1.b[4], v0.b[8]
mov v1.b[5], v0.b[10]
mov v1.b[6], v0.b[12]
mov v1.b[7], v0.b[14]
str d1, [x8]
ret
llvm-svn: 326443
Sanjay Patel [Thu, 1 Mar 2018 15:30:44 +0000 (15:30 +0000)]
[InstCombine] move/add tests for fmul reassociation; NFC
This transform may be out-of-scope for instcombine,
but this is only documenting the current behavior.
llvm-svn: 326442
Rafael Espindola [Thu, 1 Mar 2018 15:25:46 +0000 (15:25 +0000)]
Don't allocate a header bellow address 0.
With the current code if the script has a PHDRS we always obey and try
to allocate a header. This can cause Min - HeaderSize to underflow.
It looks like bfd actually prints an error for this case. With this
patch we do the same.
Found while looking at pr36515.
llvm-svn: 326441
Sanjay Patel [Thu, 1 Mar 2018 15:13:42 +0000 (15:13 +0000)]
[InstCombine] auto-generate full checks; NFC
llvm-svn: 326440
Ilya Biryukov [Thu, 1 Mar 2018 14:54:16 +0000 (14:54 +0000)]
Resubmit [analyzer] Support for naive cross translation unit analysis
Originally submitted as r326323 and r326324.
Reverted in r326432.
Reverting the commit was a mistake.
The breakage was due to invalid build files in our internal buildsystem,
CMakeLists did not have any cyclic dependencies.
llvm-svn: 326439
Hans Wennborg [Thu, 1 Mar 2018 14:48:19 +0000 (14:48 +0000)]
UsersManual: improve the clang-cl text some more
llvm-svn: 326438
Tatyana Krasnukha [Thu, 1 Mar 2018 14:36:42 +0000 (14:36 +0000)]
Make Finalize tolerant of empty register sets.
llvm-svn: 326437
Alexey Bataev [Thu, 1 Mar 2018 14:32:37 +0000 (14:32 +0000)]
Revert "[DEBUGINFO] Add flag for DWARF2 or less to use sections as references."
This reverts commit r326328 to remove checks for emission of certain
sections after discussion with Eric Christofer.
llvm-svn: 326436
Jonas Hahnfeld [Thu, 1 Mar 2018 14:03:18 +0000 (14:03 +0000)]
[OMPT] Fix interoperability test with GCC
We have to ensure that the runtime is initialized _before_ waiting
for the two started threads to guarantee that the master threads
post their ompt_event_thread_begin before the worker threads. This
is not guaranteed in the parallel region where one worker thread
could start before the other master thread has invoked the callback.
The problem did not happen with Clang becauses the generated code
calls __kmpc_global_thread_num() and cashes its result for functions
that contain OpenMP pragmas.
Differential Revision: https://reviews.llvm.org/D43882
llvm-svn: 326435
Hans Wennborg [Thu, 1 Mar 2018 14:00:19 +0000 (14:00 +0000)]
UsersManual: beef up the clang-cl text a little
llvm-svn: 326434
Than McIntosh [Thu, 1 Mar 2018 13:31:57 +0000 (13:31 +0000)]
[CodeGen] fix argument attribute in lowering statepoint/patchpoint
Summary:
Use the correct loop index varaible, ArgI, to retrieve attributes.
Reviewers: thanm, sanjoy, rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43832
llvm-svn: 326433
Ilya Biryukov [Thu, 1 Mar 2018 12:43:39 +0000 (12:43 +0000)]
Revert "[analyzer] Support for naive cross translation unit analysis"
Also revert "[analyzer] Fix a compiler warning"
This reverts commits r326323 and r326324.
Reason: the commits introduced a cyclic dependency in the build graph.
This happens to work with cmake, but breaks out internal integrate.
llvm-svn: 326432
George Rimar [Thu, 1 Mar 2018 12:36:01 +0000 (12:36 +0000)]
[ELF] - Don't crash on broken MEMORY declaration.
LLD crashes with broken scripts shown in testcase,
because fails to read memory regon name and accesses
MemoryRegions's element which is nullptr.
Patch fixes it.
Differential revision: https://reviews.llvm.org/D43866
llvm-svn: 326431
George Rimar [Thu, 1 Mar 2018 12:27:04 +0000 (12:27 +0000)]
[ELF] - Do not remove empty sections that use symbols in expressions.
This is PR36515.
Currenly if we have a script like .debug_info 0 : { *(.debug_info) },
we would not remove this section and keep it in the output.
That does not work, because it is common case for
debug sections to have a zero address expression.
Patch changes behavior so that we remove only sections
that do not use symbols in its expressions.
Differential revision: https://reviews.llvm.org/D43863
llvm-svn: 326430
Benjamin Kramer [Thu, 1 Mar 2018 11:31:44 +0000 (11:31 +0000)]
[SCCP] Fix unused variable warning in release builds.
llvm-svn: 326429
Joachim Protze [Thu, 1 Mar 2018 11:26:15 +0000 (11:26 +0000)]
[OMPT] Fix task-type test with GCC
This is similar to D43882. The runtime needs to be initialized before calling print_ids(0)
http://lab.llvm.org:8011/builders/openmp-gcc-x86_64-linux-debian/builds/60
Differential Revision: https://reviews.llvm.org/D43897
llvm-svn: 326428
George Rimar [Thu, 1 Mar 2018 10:38:51 +0000 (10:38 +0000)]
[ELF] - Fix eh-frame-reloc-out-of-range.test.
Was broken after recent testcases changes.
llvm-svn: 326427
Francois Ferrand [Thu, 1 Mar 2018 10:09:13 +0000 (10:09 +0000)]
[clang-format] Add SpaceBeforeColon option
Summary:
When disabled, this option allows removing the space before colon,
making it act more like the semi-colon. When enabled (default), the
current behavior is not affected.
This mostly affects C++11 loop, initializer list, inheritance list and
container literals:
class Foo: Bar {}
Foo::Foo(): a(a) {}
for (auto i: myList) {}
f({a: 1, b: 2, c: 3});
Reviewers: krasimir, djasper
Reviewed By: djasper
Subscribers: xvallspl, teemperor, karies, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D32525
llvm-svn: 326426
Jonas Devlieghere [Thu, 1 Mar 2018 10:05:54 +0000 (10:05 +0000)]
[dsymutil] Move string pool into its own implementatino file. NFC.
The DwarfLinker implementation is already relatively large with over 4k
LOC. This commit moves the implementation of NonRelocatableStringpool
into a separate cpp file.
llvm-svn: 326425
Nicholas Wilson [Thu, 1 Mar 2018 09:38:02 +0000 (09:38 +0000)]
[WebAssembly] Reorder exports to match symbol table order
This fixes a TODO introduced in rLLD325861.
Differential Revision: https://reviews.llvm.org/D43877
llvm-svn: 326424
Shiva Chen [Thu, 1 Mar 2018 07:47:27 +0000 (07:47 +0000)]
[PATCH] [compiler-rt, RISCV] Support builtins for RISC-V
Summary:
Support builtins for RISC-V, RV32 and RV64.
Reviewers: asb, apazos, mgrang
Differential Revision: https://reviews.llvm.org/D42958
llvm-svn: 326420
Serge Pavlov [Thu, 1 Mar 2018 07:04:11 +0000 (07:04 +0000)]
Function definition may have uninstantiated body
Current implementation of `FunctionDecl::isDefined` does not take into
account redeclarations that do not have bodies, but the bodies can be
instantiated from corresponding templated definition. This behavior does
not allow to detect function redefinition in the cases where friend
functions is defined in class templates. For instance, the code:
```
template<typename T> struct X { friend void f() {} };
X<int> xi;
void f() {}
```
compiles successfully but must fail due to redefinition of `f`. The
declaration of the friend `f` is created when the containing template
`X` is instantiated, but it does not have a body as per 14.5.4p4
because `f` is not odr-used.
With this change the function `Sema::CheckForFunctionRedefinition`
considers functions with uninstantiated bodies as definitions.
Differential Revision: https://reviews.llvm.org/D30170
llvm-svn: 326419
Max Kazantsev [Thu, 1 Mar 2018 06:56:48 +0000 (06:56 +0000)]
[SCEV] Smart range calculation for SCEVUnknown Phis
The range of SCEVUnknown Phi which merges values `X1, X2, ..., XN`
can be evaluated as `U(Range(X1), Range(X2), ..., Range(XN))`.
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D43810
llvm-svn: 326418