Commit Graph

298108 Commits

Author SHA1 Message Date
Kamil Rytarowski 6c3f626378 Improve portability of internal_sysctl()
Add an explicit cast from uptr to size_t to prevent potential type mismatch.

llvm-svn: 341183
2018-08-31 08:24:23 +00:00
Kirill Bobyrev c1bb7b9ec4 [NFC] Use LLVM naming conventions within FileDistance
Reviewed by: sammccall

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

llvm-svn: 341182
2018-08-31 08:19:50 +00:00
Kamil Rytarowski 935203306f 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
2018-08-31 08:10:06 +00:00
Dean Michael Berris 146d5791d9 [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
2018-08-31 08:04:56 +00:00
Martin Storsjo 24f590fca6 [ELF] [ARM] Don't mix 'ip' and 'r12' as names for the same register in comments. NFC.
llvm-svn: 341179
2018-08-31 08:03:33 +00:00
Martin Storsjo 9e4d5f9b7b [AArch64] Hook up the missed machine operand flag name for MO_DLLIMPORT
llvm-svn: 341178
2018-08-31 08:00:34 +00:00
Martin Storsjo f010872b5c [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
2018-08-31 08:00:31 +00:00
Martin Storsjo 2dcaa41e1e [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
2018-08-31 08:00:25 +00:00
Martin Storsjo 802fcb4167 [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
2018-08-31 07:45:20 +00:00
Craig Topper 83e9f928ba [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
2018-08-31 07:05:39 +00:00
Craig Topper 7073f03f70 [X86] Add a -x86-experimental-vector-widening command line to vec_fp_to_int.ll.
llvm-svn: 341173
2018-08-31 07:05:38 +00:00
Craig Topper e9af89a78b [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
2018-08-31 07:05:37 +00:00
Craig Topper 2140a8e307 [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
2018-08-31 07:05:36 +00:00
Kostya Serebryany f0965c3af4 [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
2018-08-31 06:08:48 +00:00
Matt Arsenault 65e43cade8 AMDGPU: Remove obsolete tests
llvm-svn: 341169
2018-08-31 06:07:45 +00:00
Matt Arsenault 988df63525 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
2018-08-31 06:02:36 +00:00
Pavel Labath d9e8c773de 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
2018-08-31 06:01:02 +00:00
Kostya Serebryany bca94773b7 [hwasan] simplify the code, NFC
llvm-svn: 341166
2018-08-31 05:55:18 +00:00
Matt Arsenault 0da6350dc8 AMDGPU: Remove remnants of old address space mapping
llvm-svn: 341165
2018-08-31 05:49:54 +00:00
Pavel Labath e7ec083f19 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
2018-08-31 05:34:03 +00:00
Pavel Labath d5fa57eb19 Silence some "control reaches end of non-void function" warnings with gcc
llvm-svn: 341163
2018-08-31 05:18:11 +00:00
Kostya Serebryany 60746d91c1 [hwasan] more heap-buffer-overflow tests
llvm-svn: 341162
2018-08-31 05:05:01 +00:00
Argyrios Kyrtzidis 2b6ec65696 [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
2018-08-31 03:51:33 +00:00
Kostya Serebryany 53cb061b32 [hwasan] report heap-buffer-overflow location, once, not once per each live thread
llvm-svn: 341160
2018-08-31 03:29:09 +00:00
Kostya Serebryany 1e2ec57803 [hwasan] properly report heap-buffer-overflow
llvm-svn: 341159
2018-08-31 03:18:31 +00:00
Kostya Serebryany e775a3ee42 [hwasan] fix the build on Linux Ubuntu 14.04. We don't need __hwasan_shadow on Linux at all
llvm-svn: 341158
2018-08-31 02:38:23 +00:00
Raphael Isemann 1f0b1027f1 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
2018-08-31 02:07:05 +00:00
Kostya Serebryany f8be3fa5b6 [hwasan] make malloc(0) return nullptr, add basic address description for stack addresses
llvm-svn: 341156
2018-08-31 01:38:00 +00:00
Lang Hames b8b8de423d [ORC] Remove a stray debugging output line left in a unit test.
llvm-svn: 341155
2018-08-31 00:53:53 +00:00
Lang Hames 6d32002e2b [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
2018-08-31 00:53:17 +00:00
Fangrui Song f1126325e8 [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
2018-08-31 00:33:16 +00:00
Fangrui Song 8810f3319c Import lit.llvm after rL341130
llvm-svn: 341152
2018-08-31 00:26:46 +00:00
Fangrui Song a4db70f945 Import lit.llvm after rC341132
llvm-svn: 341151
2018-08-31 00:24:36 +00:00
Fangrui Song 0f0f8aa2e1 Import lit.llvm after rLLD341134
llvm-svn: 341150
2018-08-31 00:23:09 +00:00
Fangrui Song 780dfe11fc Import lit.llvm after rL341135
llvm-svn: 341149
2018-08-31 00:22:20 +00:00
Fangrui Song d958df8324 [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
2018-08-31 00:16:22 +00:00
Max Kazantsev c683d643c9 Revert "[NFC] Add severe validation of InstructionPrecedenceTracking" for discussion
llvm-svn: 341147
2018-08-31 00:01:54 +00:00
Stephen Kelly a21cc1f5df Remove vestiges of configure buildsystem
Summary:

Subscribers: mgorny, cfe-commits

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

llvm-svn: 341146
2018-08-30 23:41:03 +00:00
Stephen Kelly 7cbfd8bb2f 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
2018-08-30 23:25:44 +00:00
Stephen Kelly 7dfed0b22c Extract runCommandsInFile method
Subscribers: cfe-commits

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

llvm-svn: 341144
2018-08-30 23:25:38 +00:00
Kostya Serebryany 347b989cef [hwasan] fix the linux-only pthread_create interceptor and reinstate the two threaded tests
llvm-svn: 341143
2018-08-30 23:22:26 +00:00
Stephen Kelly fc934cd916 Allow binding to NamedValue resulting from let expression
Subscribers: cfe-commits

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

llvm-svn: 341142
2018-08-30 23:11:09 +00:00
Stephen Kelly 5fb9dc51dc Extract parseBindID method
Subscribers: cfe-commits

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

llvm-svn: 341141
2018-08-30 23:11:01 +00:00
Stephen Kelly b8e0886006 Add dump() method for SourceRange
Subscribers: cfe-commits

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

llvm-svn: 341140
2018-08-30 23:10:52 +00:00
Fangrui Song c799893787 [PPC64] Remove unused -z notext from a test
llvm-svn: 341139
2018-08-30 23:01:00 +00:00
Michael Berg 7b9e86445c [NFC] adding initial intersect test for Node to Instruction association
llvm-svn: 341138
2018-08-30 22:43:34 +00:00
Krzysztof Parzyszek d51f7b3b43 [Hexagon] Check validity of register class when generating bitsplit
llvm-svn: 341137
2018-08-30 22:26:43 +00:00
Eli Friedman d5d0a4d27f [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
2018-08-30 22:18:27 +00:00
Nico Weber f5415179bc 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
2018-08-30 22:13:34 +00:00
Nico Weber abb8febb72 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
2018-08-30 22:12:16 +00:00