Roman Lebedev [Fri, 31 Aug 2018 08:59:15 +0000 (08:59 +0000)]
[XRay] FDRProducerConsumerTest: unbreak (gcc?) build
/build/llvm/unittests/XRay/FDRProducerConsumerTest.cpp:90:27: error: declaration of ‘std::unique_ptr<llvm::xray::Record> llvm::xray::{anonymous}::RoundTripTest<T>::Record’ [-fpermissive]
std::unique_ptr<Record> Record;
^~~~~~
In file included from /build/llvm/include/llvm/XRay/FDRLogBuilder.h:12,
from /build/llvm/unittests/XRay/FDRProducerConsumerTest.cpp:15:
/build/llvm/include/llvm/XRay/FDRRecords.h:28:7: error: changes meaning of ‘Record’ from ‘class llvm::xray::Record’ [-fpermissive]
class Record {
^~~~~~
llvm-svn: 341189
Roman Lebedev [Fri, 31 Aug 2018 08:52:03 +0000 (08:52 +0000)]
[NFC][X86][AArch64] A few more patterns for [lack of] signed truncation check pattern.[NFC][X86][AArch64] A few more patterns for [lack of] signed truncation check pattern.
llvm-svn: 341188
Kamil Rytarowski [Fri, 31 Aug 2018 08:51:29 +0000 (08:51 +0000)]
Try to fix internal_sysctl() for MacOSX
Cast the first argument to (int *) removing const.
llvm-svn: 341187
Pavel Labath [Fri, 31 Aug 2018 08:31:27 +0000 (08:31 +0000)]
XFail one more VSCode test which fails under heavy load
llvm-svn: 341186
Andrea Di Biagio [Fri, 31 Aug 2018 08:30:47 +0000 (08:30 +0000)]
[X86][BtVer2] Fix WriteFShuffle256 schedule write info.
This patch fixes the number of micro opcodes, and processor resource cycles for
the following AVX instructions:
vinsertf128rr/rm
vperm2f128rr/rm
vbroadcastf128
Tests have been regenerated using the usual scripts in the llvm/utils directory.
Differential Revision: https://reviews.llvm.org/D51492
llvm-svn: 341185
Kirill Bobyrev [Fri, 31 Aug 2018 08:29:48 +0000 (08:29 +0000)]
NFC: Fix build failure after rL341182
Didn't rename another variable reference.
llvm-svn: 341184
Kamil Rytarowski [Fri, 31 Aug 2018 08:24:23 +0000 (08:24 +0000)]
Improve portability of internal_sysctl()
Add an explicit cast from uptr to size_t to prevent potential type mismatch.
llvm-svn: 341183
Kirill Bobyrev [Fri, 31 Aug 2018 08:19:50 +0000 (08:19 +0000)]
[NFC] Use LLVM naming conventions within FileDistance
Reviewed by: sammccall
Differential Revision: https://reviews.llvm.org/D51527
llvm-svn: 341182
Kamil Rytarowski [Fri, 31 Aug 2018 08:10:06 +0000 (08:10 +0000)]
Add internal_sysctl() used by FreeBSD, NetBSD, OpenBSD and MacOSX
Summary:
Switch local sysctl(2) calls to internal_sysctl().
This is a preparation for introduction of interceptors for
the sysctl*() family of functions and switching `internal_sysctl*()`
to libc calls bypassing interceptors.
No functional change intended with this revision.
Reviewers: vitalybuka, joerg, kcc
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D51425
llvm-svn: 341181
Dean Michael Berris [Fri, 31 Aug 2018 08:04:56 +0000 (08:04 +0000)]
[XRay] FDR Record Producer/Consumer Implementation
Summary:
This patch defines two new base types called `RecordProducer` and
`RecordConsumer` which have default implementations for convenience
(particularly for testing).
A `RecordProducer` implementation has one member function called
`produce()` which serves as a factory constructor for `Record`
instances. This code exercises the `RecordInitializer` code path in the
implementation for `FileBasedRecordProducer`.
A `RecordConsumer` has a single member function called `consume(...)`
which, as the name implies, consumes instances of
`std::unique_ptr<Record>`. We have two implementations, one of which is
used in the test to generate a vector of `std::unique_ptr<Record>`
similar to how the `LogBuilder` implementation works.
We introduce a test in `FDRProducerConsumerTest` which ensures that
records we write through the `FDRTraceWriter` can be loaded by the
`FileBasedRecordProducer`. The record(s) loaded this way are written
again through the `FDRTraceWriter` into a separate string, which we then
compare. This ensures that the read-in bytes to create the `Record`
instances in memory can be replicated when written out through the
`FDRTraceWriter`.
This change depends on D51210 and is part of the refactoring of D50441
into smaller, more focused changes.
Reviewers: eizan, kpw
Subscribers: mgorny, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D51289
llvm-svn: 341180
Martin Storsjo [Fri, 31 Aug 2018 08:03:33 +0000 (08:03 +0000)]
[ELF] [ARM] Don't mix 'ip' and 'r12' as names for the same register in comments. NFC.
llvm-svn: 341179
Martin Storsjo [Fri, 31 Aug 2018 08:00:34 +0000 (08:00 +0000)]
[AArch64] Hook up the missed machine operand flag name for MO_DLLIMPORT
llvm-svn: 341178
Martin Storsjo [Fri, 31 Aug 2018 08:00:31 +0000 (08:00 +0000)]
[MinGW] [X86] Pass true for the second parameter to StubValueTy for MO_COFFSTUB. NFC.
These stubs should never be emitted for internal symbols, and
nothing in AsmPrinter ever actually use this value when producing
the stubs for COFF anyway.
llvm-svn: 341177
Martin Storsjo [Fri, 31 Aug 2018 08:00:25 +0000 (08:00 +0000)]
[MinGW] [ARM] Add stubs for potential automatic dllimported variables
The runtime pseudo relocations can't handle the ARM format embedded
addresses in movw/movt pairs. By using stubs, the potentially
dllimported addresses can be touched up by the runtime pseudo relocation
framework.
Differential Revision: https://reviews.llvm.org/D51450
llvm-svn: 341176
Martin Storsjo [Fri, 31 Aug 2018 07:45:20 +0000 (07:45 +0000)]
[COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var>
After fixing up the runtime pseudo relocation, the .refptr.<var>
will be a plain pointer with the same value as the IAT entry itself.
To save a little binary size and reduce the number of runtime pseudo
relocations, redirect references to the IAT entry (via the __imp_<var>
symbol) itself and discard the .refptr.<var> chunk (as long as the
same section chunk doesn't contain anything else than the single
pointer).
As there are now cases for both setting the Live variable to true
and false externally, remove the accessors and setters and just make
the variable public instead.
Differential Revision: https://reviews.llvm.org/D51456
llvm-svn: 341175
Craig Topper [Fri, 31 Aug 2018 07:05:39 +0000 (07:05 +0000)]
[X86] Don't do anything in ReplaceNodeResults for (v2i32 (fptoui/fptosi v2f32)) when -x86-experimental-vector-widening-legalization is on.
We don't need to do our own widening, the generic legalizer can do it.
llvm-svn: 341174
Craig Topper [Fri, 31 Aug 2018 07:05:38 +0000 (07:05 +0000)]
[X86] Add a -x86-experimental-vector-widening command line to vec_fp_to_int.ll.
llvm-svn: 341173
Craig Topper [Fri, 31 Aug 2018 07:05:37 +0000 (07:05 +0000)]
[X86] Don't custom widen (v2i32 (setcc v2f32)) when -x86-experimental-vector-widening-legalization is in effect.
We aren't doing anything than what the generic legalizer will do so just let it do it.
llvm-svn: 341172
Craig Topper [Fri, 31 Aug 2018 07:05:36 +0000 (07:05 +0000)]
[X86] Add -x86-experimental-vector-widening-legalization run line to avx512-cvt.ll
This will cover the (v2i32 (setcc v2f32)) case in replaceNodeResults. That code shouldn't be needed at all in this mode. A future patch will skip it.
llvm-svn: 341171
Kostya Serebryany [Fri, 31 Aug 2018 06:08:48 +0000 (06:08 +0000)]
[hwasan] move code around to remove an opaque class definition (HwasanThreadLocalMallocStorage) that had incorrect size and used 10x more than needed RAM (500K instead of 50K per thread)
llvm-svn: 341170
Matt Arsenault [Fri, 31 Aug 2018 06:07:45 +0000 (06:07 +0000)]
AMDGPU: Remove obsolete tests
llvm-svn: 341169
Matt Arsenault [Fri, 31 Aug 2018 06:02:36 +0000 (06:02 +0000)]
AMDGPU: Stop forcing internalize at -O0
This doesn't really matter if clang is always emitting
the visibility as hidden by default.
llvm-svn: 341168
Pavel Labath [Fri, 31 Aug 2018 06:01:02 +0000 (06:01 +0000)]
Fix a typo in mac SIP workaround
presumably the or subexpression was meant to be evaluated first. The way
it is now means that we apply the workaround for any python in `/usr`,
which matches pretty much every unix system.
llvm-svn: 341167
Kostya Serebryany [Fri, 31 Aug 2018 05:55:18 +0000 (05:55 +0000)]
[hwasan] simplify the code, NFC
llvm-svn: 341166
Matt Arsenault [Fri, 31 Aug 2018 05:49:54 +0000 (05:49 +0000)]
AMDGPU: Remove remnants of old address space mapping
llvm-svn: 341165
Pavel Labath [Fri, 31 Aug 2018 05:34:03 +0000 (05:34 +0000)]
Increase qHostInfo packet timeout
Host info computation can involve DNS traffic (to compute the remote
host name). On very unreliable networks (such as free WiFi on trains),
this can take several seconds to complete or timeout. Increase the
qHostInfo timeout to account for this.
llvm-svn: 341164
Pavel Labath [Fri, 31 Aug 2018 05:18:11 +0000 (05:18 +0000)]
Silence some "control reaches end of non-void function" warnings with gcc
llvm-svn: 341163
Kostya Serebryany [Fri, 31 Aug 2018 05:05:01 +0000 (05:05 +0000)]
[hwasan] more heap-buffer-overflow tests
llvm-svn: 341162
Argyrios Kyrtzidis [Fri, 31 Aug 2018 03:51:33 +0000 (03:51 +0000)]
[clang-move] Explicitly ignore implicit UsingDirectiveDecls instead of depending on them missing source locations
This is adjustment to allow the logic to work even if implicit UsingDirectiveDecls get actual source locations.
There should be no functionality change.
llvm-svn: 341161
Kostya Serebryany [Fri, 31 Aug 2018 03:29:09 +0000 (03:29 +0000)]
[hwasan] report heap-buffer-overflow location, once, not once per each live thread
llvm-svn: 341160
Kostya Serebryany [Fri, 31 Aug 2018 03:18:31 +0000 (03:18 +0000)]
[hwasan] properly report heap-buffer-overflow
llvm-svn: 341159
Kostya Serebryany [Fri, 31 Aug 2018 02:38:23 +0000 (02:38 +0000)]
[hwasan] fix the build on Linux Ubuntu 14.04. We don't need __hwasan_shadow on Linux at all
llvm-svn: 341158
Raphael Isemann [Fri, 31 Aug 2018 02:07:05 +0000 (02:07 +0000)]
Fixed missing sidebars on the website
We didn't mark these HTML files as executable, which means that
the SSI includes for including the sidebar didn't work.
llvm-svn: 341157
Kostya Serebryany [Fri, 31 Aug 2018 01:38:00 +0000 (01:38 +0000)]
[hwasan] make malloc(0) return nullptr, add basic address description for stack addresses
llvm-svn: 341156
Lang Hames [Fri, 31 Aug 2018 00:53:53 +0000 (00:53 +0000)]
[ORC] Remove a stray debugging output line left in a unit test.
llvm-svn: 341155
Lang Hames [Fri, 31 Aug 2018 00:53:17 +0000 (00:53 +0000)]
[ORC] Add utilities to RTDyldObjectLinkingLayer2 to simplify symbol flag
management and materialization responsibility registration.
The setOverrideObjectFlagsWithResponsibilityFlags method instructs
RTDyldObjectlinkingLayer2 to override the symbol flags produced by RuntimeDyld with
the flags provided by the MaterializationResponsibility instance. This can be used
to enable symbol visibility (hidden/exported) for COFF object files, which do not
currently support the SF_Exported flag.
The setAutoClaimResponsibilityForObjectSymbols method instructs
RTDyldObjectLinkingLayer2 to claim responsibility for any symbols provided by a
given object file that were not already in the MaterializationResponsibility
instance. Setting this flag allows higher-level program representations (e.g.
LLVM IR) to be added based on only a subset of the symbols they provide, without
having to write intervening layers to scan and add the additional symbols. This
trades diagnostic quality for convenience however: If all symbols are enumerated
up-front then clashes can be detected and reported early. If this option is set,
clashes for the additional symbols may not be detected until late, and detection
may depend on the flow of control through JIT'd code.
llvm-svn: 341154
Fangrui Song [Fri, 31 Aug 2018 00:33:16 +0000 (00:33 +0000)]
[PPC64] Improve a test ppc64_entry_point.s
Rename to ppc64-entry-point.s
Deduplicate .text dump of little-endian big-endian
llvm-svn: 341153
Fangrui Song [Fri, 31 Aug 2018 00:26:46 +0000 (00:26 +0000)]
Import lit.llvm after rL341130
llvm-svn: 341152
Fangrui Song [Fri, 31 Aug 2018 00:24:36 +0000 (00:24 +0000)]
Import lit.llvm after rC341132
llvm-svn: 341151
Fangrui Song [Fri, 31 Aug 2018 00:23:09 +0000 (00:23 +0000)]
Import lit.llvm after rLLD341134
llvm-svn: 341150
Fangrui Song [Fri, 31 Aug 2018 00:22:20 +0000 (00:22 +0000)]
Import lit.llvm after rL341135
llvm-svn: 341149
Fangrui Song [Fri, 31 Aug 2018 00:16:22 +0000 (00:16 +0000)]
[PPC64] Improve a test ppc64-toc-rel.s
Deduplicate dump of .text .data for little-endian and big-endian
Fix a RELOCS-NE check line typo
llvm-svn: 341148
Max Kazantsev [Fri, 31 Aug 2018 00:01:54 +0000 (00:01 +0000)]
Revert "[NFC] Add severe validation of InstructionPrecedenceTracking" for discussion
llvm-svn: 341147
Stephen Kelly [Thu, 30 Aug 2018 23:41:03 +0000 (23:41 +0000)]
Remove vestiges of configure buildsystem
Summary:
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D50738
llvm-svn: 341146
Stephen Kelly [Thu, 30 Aug 2018 23:25:44 +0000 (23:25 +0000)]
Add preload option to clang-query
Summary: This allows loading a file with pre-defined let commands for example.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51261
llvm-svn: 341145
Stephen Kelly [Thu, 30 Aug 2018 23:25:38 +0000 (23:25 +0000)]
Extract runCommandsInFile method
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51260
llvm-svn: 341144
Kostya Serebryany [Thu, 30 Aug 2018 23:22:26 +0000 (23:22 +0000)]
[hwasan] fix the linux-only pthread_create interceptor and reinstate the two threaded tests
llvm-svn: 341143
Stephen Kelly [Thu, 30 Aug 2018 23:11:09 +0000 (23:11 +0000)]
Allow binding to NamedValue resulting from let expression
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51259
llvm-svn: 341142
Stephen Kelly [Thu, 30 Aug 2018 23:11:01 +0000 (23:11 +0000)]
Extract parseBindID method
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51258
llvm-svn: 341141
Stephen Kelly [Thu, 30 Aug 2018 23:10:52 +0000 (23:10 +0000)]
Add dump() method for SourceRange
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50662
llvm-svn: 341140
Fangrui Song [Thu, 30 Aug 2018 23:01:00 +0000 (23:01 +0000)]
[PPC64] Remove unused -z notext from a test
llvm-svn: 341139
Michael Berg [Thu, 30 Aug 2018 22:43:34 +0000 (22:43 +0000)]
[NFC] adding initial intersect test for Node to Instruction association
llvm-svn: 341138
Krzysztof Parzyszek [Thu, 30 Aug 2018 22:26:43 +0000 (22:26 +0000)]
[Hexagon] Check validity of register class when generating bitsplit
llvm-svn: 341137
Eli Friedman [Thu, 30 Aug 2018 22:18:27 +0000 (22:18 +0000)]
[ARM] Enable GEP offset splitting for 32-bit ARM.
It has essentially the same benefit it has on 64-bit ARM: it
substantially reduces the number of constants used by large GEP
operations. Seems to be generally helpful across a few different
codebases I've tried.
Differential Revision: https://reviews.llvm.org/D51462
llvm-svn: 341136
Nico Weber [Thu, 30 Aug 2018 22:13:34 +0000 (22:13 +0000)]
Remove LIT_SITE_CFG_IN_FOOTER, llvm
It's always replaced with the same (short) static string, so just put that
there directly.
No intended behavior change.
https://reviews.llvm.org/D51357
llvm-svn: 341135
Nico Weber [Thu, 30 Aug 2018 22:12:16 +0000 (22:12 +0000)]
Remove LIT_SITE_CFG_IN_FOOTER, lld
It's always replaced with the same (short) static string, so just put that
there directly.
No intended behavior change.
https://reviews.llvm.org/D51357
llvm-svn: 341134
Kostya Serebryany [Thu, 30 Aug 2018 22:11:56 +0000 (22:11 +0000)]
[hwasan] use thread-local ring buffers to properly report heap-use-after-free
llvm-svn: 341133
Nico Weber [Thu, 30 Aug 2018 22:11:16 +0000 (22:11 +0000)]
Remove LIT_SITE_CFG_IN_FOOTER, clang
It's always replaced with the same (short) static string, so just put that
there directly.
No intended behavior change.
https://reviews.llvm.org/D51357
llvm-svn: 341132
Thomas Lively [Thu, 30 Aug 2018 22:10:43 +0000 (22:10 +0000)]
[WebAssembly] Update utility functions with SIMD types
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D51516
llvm-svn: 341131
Nico Weber [Thu, 30 Aug 2018 22:10:13 +0000 (22:10 +0000)]
Remove LIT_SITE_CFG_IN_FOOTER, clang-tools-extra
It's always replaced with the same (short) static string, so just put that
there directly.
No intended behavior change.
https://reviews.llvm.org/D51357
llvm-svn: 341130
Kostya Serebryany [Thu, 30 Aug 2018 22:07:09 +0000 (22:07 +0000)]
[hwasan] temporarily remove two tests to silence the bots
llvm-svn: 341129
Thomas Lively [Thu, 30 Aug 2018 21:43:51 +0000 (21:43 +0000)]
[WebAssembly] Vector conversions
Summary:
Lowers away bitconverts between vector types. This CL depends
on D51383.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D51498
llvm-svn: 341128
Thomas Lively [Thu, 30 Aug 2018 21:36:48 +0000 (21:36 +0000)]
[WebAssembly] SIMD loads and stores
Summary: Reuse the patterns from WebAssemblyInstrMemory.td.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D51383
llvm-svn: 341127
Raphael Isemann [Thu, 30 Aug 2018 21:31:04 +0000 (21:31 +0000)]
Fixed comment for UserExpression::Complete [NFC]
llvm-svn: 341126
Charles Davis [Thu, 30 Aug 2018 21:29:00 +0000 (21:29 +0000)]
Add support for SEH unwinding on Windows.
Summary:
I've tested this implementation on x86-64 to ensure that it works. All
`libc++abi` tests pass, as do all `libc++` exception-related tests. ARM
still remains to be implemented (@compnerd?).
Special thanks to KJK::Hyperion for his excellent series of articles on
how EH works on x86-64 Windows. (Seriously, check it out. It's awesome.)
I'm actually not sure if this should go in as is. I particularly don't
like that I duplicated the UnwindCursor class for this special case.
Reviewers: mstorsjo, rnk, compnerd, smeenai, javed.absar
Subscribers: mgorny, kristof.beyls, christof, chrib, cfe-commits, compnerd, llvm-commits
Differential Revision: https://reviews.llvm.org/D50564
llvm-svn: 341125
Raphael Isemann [Thu, 30 Aug 2018 21:26:32 +0000 (21:26 +0000)]
Use a CompletionRequest in the expression command completion [NFC]
The patch was originally written before we had a CompletionRequest,
so it still used a StringList to pass back the completions to
the request.
llvm-svn: 341124
Adrian Prantl [Thu, 30 Aug 2018 21:21:16 +0000 (21:21 +0000)]
dsymutil: Avoid pruning non-type forward declarations inside DW_TAG_module
forward declarations.
Especially with template instantiations, there are legitimate reasons
why for declarations might be emitted into a DW_TAG_module skeleton /
forward-declaration sub-tree, that are not forward declarations in the
sense of that there is a more complete definition over in a .pcm file.
The example in the testcase is a constant DW_TAG_member of a
DW_TAG_class template instatiation.
rdar://problem/
43623196
llvm-svn: 341123
Zachary Turner [Thu, 30 Aug 2018 21:00:57 +0000 (21:00 +0000)]
Remove some debugging code that was accidentally left in.
llvm-svn: 341122
Raphael Isemann [Thu, 30 Aug 2018 20:56:58 +0000 (20:56 +0000)]
Move NoBuiltin=true closer to the other LangOpts code [NFC]
llvm-svn: 341121
Zachary Turner [Thu, 30 Aug 2018 20:53:48 +0000 (20:53 +0000)]
Add a utility script to stress test the demangler.
llvm-svn: 341120
Zachary Turner [Thu, 30 Aug 2018 20:53:29 +0000 (20:53 +0000)]
[MS Demangler] Add support for $$Z parameter pack separator.
$$Z appears between adjacent expanded parameter packs in the
same template instantiation. We don't need to print it, it's
only there to disambiguate between manglings that would otherwise
be ambiguous. So we just need to parse it and throw it away.
llvm-svn: 341119
Artem Belevich [Thu, 30 Aug 2018 20:53:15 +0000 (20:53 +0000)]
Revert the tests that should've been reverted in rL341115
llvm-svn: 341118
Zachary Turner [Thu, 30 Aug 2018 20:53:11 +0000 (20:53 +0000)]
[MS ABI] Fix mangling issue with dynamic initializer stubs.
There are two types of dynamic initializer stubs. There's
`dynamic initializer for 'x''(void)
and
`dynamic initializer for `static Foo::Bar StaticDataMember''(void)
The second case is disambiguated from the first by the presence of
a ? after the operator code. So the first will appear something like
?__E<name> while the second will appear something like ?__E?<name>.
clang-cl was mangling these both the same though. This patch
matches behavior with cl.
Differential Revision: https://reviews.llvm.org/D51500
llvm-svn: 341117
Vlad Tsyrklevich [Thu, 30 Aug 2018 20:44:51 +0000 (20:44 +0000)]
SafeStack: Prevent OOB reads with mem intrinsics
Summary:
Currently, the SafeStack analysis disallows out-of-bounds writes but not
out-of-bounds reads for mem intrinsics like llvm.memcpy. This could
cause leaks of pointers to the safe stack by leaking spilled registers/
frame pointers. Check for allocas used as source or destination pointers
to mem intrinsics.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: pcc, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D51334
llvm-svn: 341116
Artem Belevich [Thu, 30 Aug 2018 20:43:39 +0000 (20:43 +0000)]
Reverted the "[CUDA/OpenMP] Define only some host macros during device compilation"
The changes were breaking CUDA compilation.
Reverted revisions:
r340681 D50845
[CUDA/OpenMP] Define only some host macros during device compilation
r340772 D51312
[OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading
r340967 D51441
Add predefined macro __gnu_linux__ for proper aux-triple
llvm-svn: 341115
Sterling Augustine [Thu, 30 Aug 2018 20:42:49 +0000 (20:42 +0000)]
Revert r341107. That change breaks lto-android in a way is untested.
llvm-svn: 341114
Tim Northover [Thu, 30 Aug 2018 20:28:32 +0000 (20:28 +0000)]
Hashing: use 64-bit seed for hashing on all platforms.
get_execution_seed returns a size_t which varies across platforms, but its
users actually always feed it into a uint64_t role so it makes sense to be
consistent.
Mostly this is just a tidy-up, but it also apparently allows PCH files to be
shared between Clang compilers built for 32-bit and 64-bit hosts.
llvm-svn: 341113
Raphael Isemann [Thu, 30 Aug 2018 20:19:57 +0000 (20:19 +0000)]
Adjusting some comments in ClangExpressionParser.cpp
llvm-svn: 341112
Kostya Serebryany [Thu, 30 Aug 2018 20:15:39 +0000 (20:15 +0000)]
[hwasan] simplify the thread hangling: instead of the ThreadRegistry (too heavy) simply maintain a linked list of Threads
llvm-svn: 341111
Richard Smith [Thu, 30 Aug 2018 20:15:28 +0000 (20:15 +0000)]
[cxx_status] Use the correct color for a feature in "SVN" status
llvm-svn: 341110
Raphael Isemann [Thu, 30 Aug 2018 20:14:22 +0000 (20:14 +0000)]
Added missing include to <cctype> for 'std::isalnum'
Should fix the failing Windows bots.
llvm-svn: 341109
Craig Topper [Thu, 30 Aug 2018 20:10:10 +0000 (20:10 +0000)]
[X86] Add -x86-experimental-vector-widening-legalization command lines to vector-idiv-v2i32.ll
If we're legalizing via widening already, then the type legalizer will scalarize the divs/rems as i32.
llvm-svn: 341108
Sterling Augustine [Thu, 30 Aug 2018 20:07:23 +0000 (20:07 +0000)]
Refactor Addlibgcc to make the when and what logic more straightfoward.
No functional change. A forthcoming change will add support
for -shared-libgcc.
llvm-svn: 341107
Douglas Yung [Thu, 30 Aug 2018 19:52:57 +0000 (19:52 +0000)]
Change %clang++ to %clangxx in test run line as it was expanding to clang.exe++ on Windows.
llvm-svn: 341106
Raphael Isemann [Thu, 30 Aug 2018 19:47:53 +0000 (19:47 +0000)]
Fixed code style for the CodeCompletion members [NFC]
This code is in LLDB, so it should also follow the LLDB code style
and use the m_ prefix for members.
llvm-svn: 341105
Ana Pazos [Thu, 30 Aug 2018 19:43:19 +0000 (19:43 +0000)]
[RISCV] Fixed SmallVector.h Assertion `idx < size()'
Summary:
RISCVAsmParser needs to handle the case the error message is of specific type, other than the generic Match_InvalidOperand, and the corresponding
operand is missing.
This bug was uncovered by a LLVM MC Assembler Protocol Buffer Fuzzer for the RISC-V assembly language.
Reviewers: asb
Reviewed By: asb
Subscribers: llvm-commits, jocewei, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX
Differential Revision: https://reviews.llvm.org/D50790
llvm-svn: 341104
Craig Topper [Thu, 30 Aug 2018 19:35:40 +0000 (19:35 +0000)]
[DAGCombiner] Fix bad identation. NFC
llvm-svn: 341103
Craig Topper [Thu, 30 Aug 2018 19:35:38 +0000 (19:35 +0000)]
[X86] Weaken an overly aggressive assert.
This assert tried to check that AND constants are only on the RHS. But its possible for both operands to be constants if one is opaque which will prevent the AND from being constant folded.
Fixes PR38771
llvm-svn: 341102
Evandro Menezes [Thu, 30 Aug 2018 19:22:00 +0000 (19:22 +0000)]
[ARM] Adjust the feature set for Exynos
Enable `FeatureUseAA` for all Exynos processors.
llvm-svn: 341101
Richard Smith [Thu, 30 Aug 2018 19:19:15 +0000 (19:19 +0000)]
Update FIXME as requested in code review.
llvm-svn: 341100
Richard Smith [Thu, 30 Aug 2018 19:17:11 +0000 (19:17 +0000)]
Add test file missed from r341097.
llvm-svn: 341099
Richard Smith [Thu, 30 Aug 2018 19:16:35 +0000 (19:16 +0000)]
Add missing -Wc++11-compat / -Wc++14-compat warnings for:
* generic lambdas
* return type deduction
* class template argument deduction
llvm-svn: 341098
Richard Smith [Thu, 30 Aug 2018 19:16:33 +0000 (19:16 +0000)]
Improve attribute documentation to list which spellings are used in which syntaxes.
Summary:
Instead of listing all the spellings (including attribute namespaces) in
the section heading, only list the actual attribute names there, and
list the spellings in the supported syntaxes table.
This allows us to properly describe things like [[fallthrough]], for
which we allow a clang:: prefix in C++ but not in C, and AlwaysInline,
which has one spelling as a GNU attribute and a different spelling as a
keyword, without needing to repeat the syntax description in the
documentation text.
Sample rendering: https://pste.eu/p/T1ZV.html
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51473
llvm-svn: 341097
Pavel Labath [Thu, 30 Aug 2018 19:14:02 +0000 (19:14 +0000)]
Fix deadlock in gdb-client tests
Using a listen queue of length 0 caused a deadlock on my machine in the
gdb-client tests while attempting to establish the loopback socket
connection.
I am not sure if this is down to a different python or kernel version,
but in either case, having queue of length zero sounds like a bad idea,
so I'm bumping that to one (which also fixes the deadlock).
llvm-svn: 341096
Evandro Menezes [Thu, 30 Aug 2018 19:04:51 +0000 (19:04 +0000)]
[InstCombine] Expand the simplification of pow() into exp2()
Generalize the simplification of `pow(2.0, y)` to `pow(2.0 ** n, y)` for all
scalar and vector types.
This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as
252.eon, 447.dealII, 453.povray. Otherwise, no significant regressions on
x86-64 or A64.
Differential revision: https://reviews.llvm.org/D49273
llvm-svn: 341095
Eli Friedman [Thu, 30 Aug 2018 18:59:24 +0000 (18:59 +0000)]
[SROA] Fix alignment for uses of PHI nodes.
Splitting an alloca can decrease the alignment of GEPs into the
partition. Normally, rewriting accounts for this, but the code was
missing for uses of PHI nodes and select instructions.
Fixes https://bugs.llvm.org/show_bug.cgi?id=38707 .
Differential Revision: https://reviews.llvm.org/D51335
llvm-svn: 341094
Alexey Bataev [Thu, 30 Aug 2018 18:56:11 +0000 (18:56 +0000)]
[OPENMP] Fix PR38710: static functions are not emitted as implicitly
'declare target'.
All the functions, referenced in implicit|explicit target regions must
be emitted during code emission for the device.
llvm-svn: 341093
Artem Dergachev [Thu, 30 Aug 2018 18:45:05 +0000 (18:45 +0000)]
[analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings.
Return value of dyn_cast_or_null should be checked before use.
Otherwise we may put a null pointer into the map as a key and eventually
crash in checkDeadSymbols.
Differential Revision: https://reviews.llvm.org/D51385
llvm-svn: 341092
Andrew Kaylor [Thu, 30 Aug 2018 18:37:18 +0000 (18:37 +0000)]
Reverting r340807.
This patch restores the old behavior of getAllocationDataForFunction in MemoryBuiltins.cpp.
llvm-svn: 341091
David Carlier [Thu, 30 Aug 2018 18:12:47 +0000 (18:12 +0000)]
[Xray] Darwin fix variable typo
llvm-svn: 341090