platform/upstream/llvm.git
6 years agoRevert r329684 (and follow-ups 329693, 329714). See discussion on https://reviews...
Nico Weber [Tue, 10 Apr 2018 18:53:28 +0000 (18:53 +0000)]
Revert r329684 (and follow-ups 329693, 329714). See discussion on https://reviews.llvm.org/D43578.

llvm-svn: 329739

6 years ago[X86] Add test case for llvm change r329734
Craig Topper [Tue, 10 Apr 2018 18:43:44 +0000 (18:43 +0000)]
[X86] Add test case for llvm change r329734

This test ensures the popfd instruction in MS inline assembly can properly find a clobber name for the dirflag register. Previously the register was named 'DF', but it needs to be named 'dirflag' to match the name in the GCC register name list.

llvm-svn: 329738

6 years ago[CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.
Artem Belevich [Tue, 10 Apr 2018 18:38:22 +0000 (18:38 +0000)]
[CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.

Currently we always include PTX into the fatbin along
with the GPU code.It about doubles the size of the GPU binary
we need to carry in the executable. These options allow control
inclusion of PTX into GPU binary.

This patch does not change the defaults, though we may consider
making no-PTX the default in the future.

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

llvm-svn: 329737

6 years ago[InstSimplify] fix formatting; NFC
Sanjay Patel [Tue, 10 Apr 2018 18:38:19 +0000 (18:38 +0000)]
[InstSimplify] fix formatting; NFC

llvm-svn: 329736

6 years ago[Parser] Fix assertion-on-invalid for unexpected typename.
Volodymyr Sapsai [Tue, 10 Apr 2018 18:29:47 +0000 (18:29 +0000)]
[Parser] Fix assertion-on-invalid for unexpected typename.

In `ParseDeclarationSpecifiers` for the code

    class A typename A;

we were able to annotate token `kw_typename` because it refers to
existing type. But later during processing token `annot_typename` we
failed to `SetTypeSpecType` and exited switch statement leaving
annotation token unconsumed. The code after the switch statement failed
because it didn't expect a special token.

The fix is not to assume that switch statement consumes all special
tokens and consume any token, not just non-special.

rdar://problem/37099386

Reviewers: rsmith, arphaman

Reviewed By: rsmith

Subscribers: jkorous-apple, cfe-commits

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

llvm-svn: 329735

6 years ago[X86] Change the name string for the newly add DF flag register to 'dirflag' to match...
Craig Topper [Tue, 10 Apr 2018 18:21:04 +0000 (18:21 +0000)]
[X86] Change the name string for the newly add DF flag register to 'dirflag' to match the clobber name supported by clang for MS inline assembly.

This should fix the failure found by Chromium reported here https://bugs.chromium.org/p/chromium/issues/detail?id=831158

The test case will be added in clang.

llvm-svn: 329734

6 years ago[DebugInfoPDB] Add missing test for findSymbolByRVA and findSymbolByAddr
Aaron Smith [Tue, 10 Apr 2018 18:12:49 +0000 (18:12 +0000)]
[DebugInfoPDB] Add missing test for findSymbolByRVA and findSymbolByAddr

llvm-svn: 329733

6 years ago[llvm-mca] reorder text
Sanjay Patel [Tue, 10 Apr 2018 18:10:14 +0000 (18:10 +0000)]
[llvm-mca] reorder text

On 2nd reading, putting the C example after the bit about
multiple regions makes this flow better.

llvm-svn: 329732

6 years ago[LLVM-C] Add Missing 'break's in InlineAsm bindings
Robert Widmann [Tue, 10 Apr 2018 18:10:10 +0000 (18:10 +0000)]
[LLVM-C] Add Missing 'break's in InlineAsm bindings

Summary: Noticed by Andrea Di Biagio while reviewing r329369

Reviewers: whitequark, harlanhaskins

Reviewed By: harlanhaskins

Subscribers: llvm-commits, abergmeier-dsfishlabs

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

llvm-svn: 329731

6 years ago[clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to...
Zinovy Nis [Tue, 10 Apr 2018 18:05:24 +0000 (18:05 +0000)]
[clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

The threshold option is 'MinTypeNameLength' with default value '5'.
With MinTypeNameLength == 5 'int'/'bool' and 'const int'/'const bool'
will not be converted to 'auto', while 'unsigned' will be.

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

llvm-svn: 329730

6 years ago[llvm-mca] fix formatting
Sanjay Patel [Tue, 10 Apr 2018 17:56:24 +0000 (17:56 +0000)]
[llvm-mca] fix formatting

llvm-svn: 329729

6 years agoRevert 329716 "Add missing nullptr check before getSection() to AArch64MachObjectWrit...
Jessica Paquette [Tue, 10 Apr 2018 17:53:41 +0000 (17:53 +0000)]
Revert 329716 "Add missing nullptr check before getSection() to AArch64MachObjectWriter::recordRelocation"

This broke a bunch of bots so I'm reverting while I figure it out.

llvm-svn: 329728

6 years agoFix a typo in the gtest build target for Debug configuration.
Jim Ingham [Tue, 10 Apr 2018 17:49:56 +0000 (17:49 +0000)]
Fix a typo in the gtest build target for Debug configuration.

I usually run DebugClang...

llvm-svn: 329727

6 years ago[llvm-mca] add example workflow for source code
Sanjay Patel [Tue, 10 Apr 2018 17:49:45 +0000 (17:49 +0000)]
[llvm-mca] add example workflow for source code

This is copied from Andrea's text in PR36875:
https://bugs.llvm.org/show_bug.cgi?id=36875

As noted there, this is a hack...but it's a good one!
It's important to show potential workflows up-front
with examples, so customers can copy and experiment
with them.

llvm-svn: 329726

6 years ago[clangd] Use operator<< to prevent printers issues in Gtest
Marc-Andre Laperle [Tue, 10 Apr 2018 17:34:46 +0000 (17:34 +0000)]
[clangd] Use operator<< to prevent printers issues in Gtest

Summary:
It is possible that there will be two different instantiations of
the printer template for a given type and some tests could end up calling the
wrong (default) one. For example, it was seen in CodeCompleteTests.cpp when
printing CompletionItems that it would use the wrong printer because the default
is also instantiated in ClangdTests.cpp.

With this change, objects that were previously printed with a custom Printer now
get printed through the operator<< which is declared alongside the class.
This rule of the thumb should make it less error-prone.

Reviewers: simark, ilya-biryukov, sammccall

Reviewed By: simark, ilya-biryukov, sammccall

Subscribers: bkramer, hokein, sammccall, klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits

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

llvm-svn: 329725

6 years ago[DebugInfoPDB] Add DIA implementations of findSymbolByRVA and findSymbolByAddr
Aaron Smith [Tue, 10 Apr 2018 17:33:18 +0000 (17:33 +0000)]
[DebugInfoPDB] Add DIA implementations of findSymbolByRVA and findSymbolByAddr

llvm-svn: 329724

6 years agoFix test failure in arm64-no-section.ll
Jessica Paquette [Tue, 10 Apr 2018 17:32:12 +0000 (17:32 +0000)]
Fix test failure in arm64-no-section.ll

There was a missing not line. Also, tail call before ret -> call before ret.

llvm-svn: 329723

6 years agoFix the Xcode build for the addition of OptionArgsParser.
Jim Ingham [Tue, 10 Apr 2018 17:20:27 +0000 (17:20 +0000)]
Fix the Xcode build for the addition of OptionArgsParser.

llvm-svn: 329722

6 years ago[clang-tidy] Adding alias for anon namespaces in header (fuchsia module)
Julie Hockett [Tue, 10 Apr 2018 16:53:51 +0000 (16:53 +0000)]
[clang-tidy] Adding alias for anon namespaces in header (fuchsia module)

Adding alias to google-build-namespaces to the Fuchsia module (checks
for anonymous namespaces in headers).

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

llvm-svn: 329720

6 years ago[CodeGen] Fix printing bundles in MIR output
Krzysztof Parzyszek [Tue, 10 Apr 2018 16:46:13 +0000 (16:46 +0000)]
[CodeGen] Fix printing bundles in MIR output

Delay printing the newline until after the opening bracket was
printed, e.g.
  BUNDLE implicit-def $r1, implicit-def $r21, implicit $r1 {
    renamable $r1 = S2_asr_i_r renamable $r1, 1
    renamable $r21 = A2_tfrsi 0
  }
instead of
  BUNDLE implicit-def $r1, implicit-def $r21, implicit $r1
 {    renamable $r1 = S2_asr_i_r renamable $r1, 1
    renamable $r21 = A2_tfrsi 0
  }

llvm-svn: 329719

6 years agoRevert r329611, "AArch64: Allow offsets to be folded into addresses with ELF."
Peter Collingbourne [Tue, 10 Apr 2018 16:19:30 +0000 (16:19 +0000)]
Revert r329611, "AArch64: Allow offsets to be folded into addresses with ELF."

Caused a build failure in check-tsan.

llvm-svn: 329718

6 years ago[WebAssembly] Add support for custom sections
Sam Clegg [Tue, 10 Apr 2018 16:12:49 +0000 (16:12 +0000)]
[WebAssembly] Add support for custom sections

Copy user-defined custom sections into the output, concatenating
sections with the same name.

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

llvm-svn: 329717

6 years agoAdd missing nullptr check to AArch64MachObjectWriter::recordRelocation
Jessica Paquette [Tue, 10 Apr 2018 15:53:28 +0000 (15:53 +0000)]
Add missing nullptr check to AArch64MachObjectWriter::recordRelocation

There was missing nullptr check before a call to getSection() in
recordRelocation. This would result in a segfault in code like the attached
test.

This adds the missing check and a test which makes sure we get the expected
error output.

llvm-svn: 329716

6 years agoAMDGPU/MC: Allow disassembling without symbol info
Nicolai Haehnle [Tue, 10 Apr 2018 15:46:43 +0000 (15:46 +0000)]
AMDGPU/MC: Allow disassembling without symbol info

Summary:
We would like the UMR debugging tool[0] to be able to provide
disassembly for currently live waves based on plain memory
dumps, and we want to leverage the LLVM disassembler for this.

This mostly works, except that UMR clearly can't provide real
symbol info, so it wants to set DisInfo == nullptr.

[0] https://cgit.freedesktop.org/amd/umr/

Reviewers: arsenm, rampitec, artem.tamazov, dp

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

Change-Id: Ibb2c5af2e66f2e100b4702fd81308e1932bc4ee6
llvm-svn: 329715

6 years agoI removed the failed test.
Andrew V. Tischenko [Tue, 10 Apr 2018 15:45:43 +0000 (15:45 +0000)]
I removed the failed test.

llvm-svn: 329714

6 years ago[OpenMP] Remove extra warning when we build
Guansong Zhang [Tue, 10 Apr 2018 15:28:31 +0000 (15:28 +0000)]
[OpenMP] Remove extra warning when we build

Summary:
This one line change is to remove this warning message

"warning: integer conversion resulted in a change of sign"

Reviewers: grokos

Reviewed By: grokos

Subscribers: openmp-commits

Tags: #openmp

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

llvm-svn: 329713

6 years ago[PDB] Remove dead code and run clang format; NFC
Aaron Smith [Tue, 10 Apr 2018 15:25:04 +0000 (15:25 +0000)]
[PDB] Remove dead code and run clang format; NFC

llvm-svn: 329712

6 years ago[llvm-mca] Simplify code. NFC
Andrea Di Biagio [Tue, 10 Apr 2018 15:14:15 +0000 (15:14 +0000)]
[llvm-mca] Simplify code. NFC

llvm-svn: 329711

6 years ago[X86] Disable SGX for Skylake Server - CPP test
Gabor Buella [Tue, 10 Apr 2018 15:03:03 +0000 (15:03 +0000)]
[X86] Disable SGX for Skylake Server - CPP test

Summary: Fix test case - corresponding to r329701

Reviewers: craig.topper, davezarzycki

Reviewed By: davezarzycki

Subscribers: cfe-commits

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

llvm-svn: 329710

6 years agoFix spelling. NFC.
Chad Rosier [Tue, 10 Apr 2018 14:57:13 +0000 (14:57 +0000)]
Fix spelling. NFC.

llvm-svn: 329709

6 years ago[llvm-mca] Move the logic that prints dispatch unit statistics from BackendStatistics...
Andrea Di Biagio [Tue, 10 Apr 2018 14:55:14 +0000 (14:55 +0000)]
[llvm-mca] Move the logic that prints dispatch unit statistics from BackendStatistics to its own view.

This patch moves the logic that collects and analyzes dispatch events to the
DispatchStatistics view.

Added flag -dispatch-stats to print statistics related to the dispatch logic.

llvm-svn: 329708

6 years ago[pdbutil] Print the checksum hex string when using the '-lines' option
Aaron Smith [Tue, 10 Apr 2018 14:47:12 +0000 (14:47 +0000)]
[pdbutil] Print the checksum hex string when using the '-lines' option

llvm-svn: 329707

6 years ago[sanitizer] Allow BackgroundThread to not depend on StackDepot v2
Kostya Kortchinsky [Tue, 10 Apr 2018 14:41:40 +0000 (14:41 +0000)]
[sanitizer] Allow BackgroundThread to not depend on StackDepot v2

Summary:
This is a redo of D45296.
It looks like the random stack-protector issues I was getting were coming from
my Android emulator, and updating everything all around and relaunching stuff
ended up making it go away.
I guess I'll have to see how it behaves on the bots.
Only additional change from the previous CL is some `const` were appropriate.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 329706

6 years ago[CodeGen/Dwarf] Rename the "sizetype" synthetic type and add it to the accelerator...
Pavel Labath [Tue, 10 Apr 2018 14:23:41 +0000 (14:23 +0000)]
[CodeGen/Dwarf] Rename the "sizetype" synthetic type and add it to the accelerator table

Summary:
This type is created on-demand and used as the base type for array
ranges. Since it is "special", its construction did not go through the
createTypeDIE function and so it was never inserted into the accelerator
table, although it clearly belongs there.

I add an explicit addAccelType call to insert it into the table.

During review, we also decided to rename the type to something more
unique to avoid confusion in case the user has own "sizetype" type. The
new name for the type size __ARRAY_SIZE_TYPE__.

Reviewers: JDevlieghere, aprantl, dblaikie

Subscribers: llvm-commits

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

llvm-svn: 329705

6 years agoFix whitespace indentation. NFCI.
Simon Pilgrim [Tue, 10 Apr 2018 14:21:33 +0000 (14:21 +0000)]
Fix whitespace indentation. NFCI.

llvm-svn: 329704

6 years ago[Testing/Support] Make Failed() matcher work with abstract error types
Pavel Labath [Tue, 10 Apr 2018 14:11:53 +0000 (14:11 +0000)]
[Testing/Support] Make Failed() matcher work with abstract error types

Failed<ErrorInfoBase>() did not compile, because it was attempting to
create a copy of the Error object when passing it to the nested matcher,
which was not possible because ErrorInfoBase is abstract.

This commit fixes the problem by making sure we pass the ErrorInfo
object by reference, which also improves the handling of non-abstract
objects, as we avoid potentially slicing an object during the copy.

llvm-svn: 329703

6 years agoAttempt to fix Windows build after r329698.
Nico Weber [Tue, 10 Apr 2018 14:08:25 +0000 (14:08 +0000)]
Attempt to fix Windows build after r329698.

llvm-svn: 329702

6 years ago[X86] Disable SGX for Skylake Server
Gabor Buella [Tue, 10 Apr 2018 14:04:21 +0000 (14:04 +0000)]
[X86] Disable SGX for Skylake Server

Reviewers: craig.topper, zvi, echristo

Reviewed By: craig.topper

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

llvm-svn: 329701

6 years ago[X86] Disable SGX for Skylake Server
Gabor Buella [Tue, 10 Apr 2018 13:58:57 +0000 (13:58 +0000)]
[X86] Disable SGX for Skylake Server

Reviewers: craig.topper, zvi, echristo

Reviewed By: craig.topper

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

llvm-svn: 329700

6 years agoUse llvm::sys::fs::real_path() in clang.
Nico Weber [Tue, 10 Apr 2018 13:36:38 +0000 (13:36 +0000)]
Use llvm::sys::fs::real_path() in clang.

No expected behavior change.
https://reviews.llvm.org/D45165

llvm-svn: 329698

6 years agos/LLVM_ON_WIN32/_WIN32/, lldb
Nico Weber [Tue, 10 Apr 2018 13:33:45 +0000 (13:33 +0000)]
s/LLVM_ON_WIN32/_WIN32/, lldb

LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

llvm-svn: 329697

6 years agos/LLVM_ON_WIN32/_WIN32/, lld
Nico Weber [Tue, 10 Apr 2018 13:15:21 +0000 (13:15 +0000)]
s/LLVM_ON_WIN32/_WIN32/, lld

LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

llvm-svn: 329696

6 years agos/LLVM_ON_WIN32/_WIN32/, clang-tools-extra
Nico Weber [Tue, 10 Apr 2018 13:14:03 +0000 (13:14 +0000)]
s/LLVM_ON_WIN32/_WIN32/, clang-tools-extra

LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

llvm-svn: 329695

6 years ago[llvm-mca] Increase the default number of iterations to 100.
Andrea Di Biagio [Tue, 10 Apr 2018 12:50:03 +0000 (12:50 +0000)]
[llvm-mca] Increase the default number of iterations to 100.

llvm-svn: 329694

6 years agoThe test was fixed.
Andrew V. Tischenko [Tue, 10 Apr 2018 12:17:01 +0000 (12:17 +0000)]
The test was fixed.

llvm-svn: 329693

6 years ago[DA] Improve alias checking in dependence analysis
David Green [Tue, 10 Apr 2018 11:37:21 +0000 (11:37 +0000)]
[DA] Improve alias checking in dependence analysis

Improve the alias analysis to account for cases where we
know that src/dst pairs cannot alias due to things like
TBAA. As we know they are noalias, we know no dependency
can occur. Also fixes issues around the size parameter
to AA being incorrect.

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

llvm-svn: 329692

6 years ago[AArch64] Use FP to access the emergency spill slot
Francis Visoiu Mistrih [Tue, 10 Apr 2018 11:29:40 +0000 (11:29 +0000)]
[AArch64] Use FP to access the emergency spill slot

In the presence of variable-sized stack objects, we always picked the
base pointer when resolving frame indices if it was available.

This makes us hit an assert where we can't reach the emergency spill
slot if it's too far away from the base pointer. Since on AArch64 we
decide to place the emergency spill slot at the top of the frame, it
makes more sense to use FP to access it.

The changes here don't affect only emergency spill slots but all the
frame indices. The goal here is to try to choose between FP, BP and SP
so that we minimize the offset and avoid scavenging, or worse, asserting
when trying to access a slot allocated by the scavenger.

Previously discussed here: https://reviews.llvm.org/D40876.

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

llvm-svn: 329691

6 years ago[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader
Tim Renouf [Tue, 10 Apr 2018 11:25:15 +0000 (11:25 +0000)]
[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader

Summary:
For OS type AMDPAL, the scratch descriptor is loaded from offset 0 of
the GIT, whose 32 bit pointer is in s0 (s8 for gfx9 merged shaders).

This commit fixes that to use offset 0x10 instead of offset 0 for a
compute shader, per the PAL ABI spec.

V2: Ensure s0 (s8 for gfx9 merged shader) is marked live-in when loading
scratch descriptor from GIT.

Reviewers: kzhuravl, nhaehnle, timcorringham

Subscribers: kzhuravl, wdng, yaxunl, t-tye, llvm-commits, dstuttard, nhaehnle, arsenm

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

Change-Id: I93dffa647758e37f613bb5e0dfca840d82e6d26f
llvm-svn: 329690

6 years agoCodeGen tests - typo fixes NFC
Gabor Buella [Tue, 10 Apr 2018 11:20:05 +0000 (11:20 +0000)]
CodeGen tests - typo fixes NFC

llvm-svn: 329689

6 years ago[compiler-rt][asan][mips] UnXFAIL some consistently passing tests
Simon Dardis [Tue, 10 Apr 2018 11:09:17 +0000 (11:09 +0000)]
[compiler-rt][asan][mips] UnXFAIL some consistently passing tests

llvm-svn: 329688

6 years agoAArch64: diagnose unpredictable store-exclusive instructions
Tim Northover [Tue, 10 Apr 2018 11:04:29 +0000 (11:04 +0000)]
AArch64: diagnose unpredictable store-exclusive instructions

Much like any written register in load/store instructions, the status register
is not allowed to overlap with any others. So diagnose it like we already do
with the other cases.

llvm-svn: 329687

6 years ago[X86][Broadwell] HWPort5 should not be added to BroadwellModelProcResources.
Andrea Di Biagio [Tue, 10 Apr 2018 10:49:41 +0000 (10:49 +0000)]
[X86][Broadwell] HWPort5 should not be added to BroadwellModelProcResources.

The BroadwellModelProcResources had an entry for HWPort5, which is a Haswell
resource, and not a Broadwell processor resource. That entry was added to the
Broadwell model because variable blends were consuming it.

This was clearly a typo (the resource name should have been BWPort5), which
unfortunately was never caught before. It was not reported as an error because
HWPort5 is a resource defined by the Haswell model. It has been found when
testing some code with llvm-mca: the list of resources in the resource pressure
view was odd.

This patch fixes the issue; now variable blend instructions consume 2 cycles on
BWPort5 instead of HWPort5. This is enough to get rid of the extra (spurious)
entry in the BroadWellModelProcResources table.

llvm-svn: 329686

6 years ago[Tooling] fix UB when interpolating compile commands with an empty index
Sam McCall [Tue, 10 Apr 2018 10:36:46 +0000 (10:36 +0000)]
[Tooling] fix UB when interpolating compile commands with an empty index

llvm-svn: 329685

6 years ago-ftime-report switch support in Clang.
Andrew V. Tischenko [Tue, 10 Apr 2018 10:34:13 +0000 (10:34 +0000)]
-ftime-report switch support in Clang.
The current support of the feature produces only 2 lines in report:
 -Some general Code Generation Time;
 -Total time of Backend Consumer actions.
This patch extends Clang time report with new lines related to Preprocessor, Include Filea Search, Parsing, etc.
Differential Revision: https://reviews.llvm.org/D43578

llvm-svn: 329684

6 years ago[llvm-ar] Temporarily make the tool case detection test Windows-only to fix the build...
Alexandre Ganea [Tue, 10 Apr 2018 10:26:23 +0000 (10:26 +0000)]
[llvm-ar] Temporarily make the tool case detection test Windows-only to fix the build (introduced in r329658)

llvm-svn: 329683

6 years agoArgs: replace isprint8 usage with isprint
Pavel Labath [Tue, 10 Apr 2018 10:07:22 +0000 (10:07 +0000)]
Args: replace isprint8 usage with isprint

It looks like we introduced isprint8 way back in r169417 to be used on
getopt's short_options, which we sometimes set to values which are out
of range for normal chars to indicate options with no short form.

However, this is not how the function is used in the Args class, where
we explicitly process a string character by character.

This removes the last external dependency from the Args class.

llvm-svn: 329682

6 years ago[AArch64][SVE] Asm: Add support for unpredicated LSL/LSR (shift by immediate) instruc...
Sander de Smalen [Tue, 10 Apr 2018 10:03:13 +0000 (10:03 +0000)]
[AArch64][SVE] Asm: Add support for unpredicated LSL/LSR (shift by immediate) instructions.

Reviewers: rengolin, fhahn, javed.absar, SjoerdMeijer, huntergr, t.p.northover, echristo, evandro

Reviewed By: rengolin, fhahn

Subscribers: tschuett, kristof.beyls, llvm-commits

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

llvm-svn: 329681

6 years agoReapply "[llvm-mca] Do not separate iterations with a newline in the timeline view."
Andrea Di Biagio [Tue, 10 Apr 2018 09:55:33 +0000 (09:55 +0000)]
Reapply "[llvm-mca] Do not separate iterations with a newline in the timeline view."

This reapplies r329403 with a fix for the floating point rounding issue.

llvm-svn: 329680

6 years agoMove OptionElementVector helper structs from Args to Options
Pavel Labath [Tue, 10 Apr 2018 09:48:05 +0000 (09:48 +0000)]
Move OptionElementVector helper structs from Args to Options

These are not used anywhere in the Args class. They should have been
moved as a part of r327110 (Moving Option parsing from Args to Options),
but I did not notice them then.

This does not affect the layering in any way, but in makes sense for the
structs to be defined in the near the code that uses them.

llvm-svn: 329679

6 years ago[ELF] - Do not crash when trying to order --defsym/linker script symbols.
George Rimar [Tue, 10 Apr 2018 09:44:44 +0000 (09:44 +0000)]
[ELF] - Do not crash when trying to order --defsym/linker script symbols.

Currently, we crash because File is null for
such symbols.

Differential revision: https://reviews.llvm.org/D45440

llvm-svn: 329678

6 years agoMove Args::StringTo*** functions to a new OptionArgParser class
Pavel Labath [Tue, 10 Apr 2018 09:03:59 +0000 (09:03 +0000)]
Move Args::StringTo*** functions to a new OptionArgParser class

Summary:
The idea behind this is to move the functionality which depend on other lldb
classes into a separate class. This way, the Args class can be turned
into a lightweight arc+argv wrapper and moved into the lower lldb
layers.

Reviewers: jingham, zturner

Subscribers: lldb-commits

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

llvm-svn: 329677

6 years ago[MC][TableGen] Fix r329675.
Clement Courbet [Tue, 10 Apr 2018 08:43:46 +0000 (08:43 +0000)]
[MC][TableGen] Fix r329675.

Caught by bots with -Wmissing-braces.

llvm-svn: 329676

6 years ago[MC][TableGen] Add optional libpfm counter names for ProcResUnits.
Clement Courbet [Tue, 10 Apr 2018 08:16:37 +0000 (08:16 +0000)]
[MC][TableGen] Add optional libpfm counter names for ProcResUnits.

Summary:
Subtargets can define the libpfm counter names that can be used to
measure cycles and uops issued on ProcResUnits.
This allows making llvm-exegesis available on more targets.
Fixes PR36984.

Reviewers: gchatelet, RKSimon, andreadb, craig.topper

Subscribers: llvm-commits

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

llvm-svn: 329675

6 years ago[AArch64][SVE] Asm: Add support for SVE INDEX instructions.
Sander de Smalen [Tue, 10 Apr 2018 07:01:53 +0000 (07:01 +0000)]
[AArch64][SVE] Asm: Add support for SVE INDEX instructions.

Reviewers: rengolin, fhahn, javed.absar, SjoerdMeijer, huntergr, t.p.northover, echristo, evandro

Reviewed By: rengolin, fhahn

Subscribers: tschuett, llvm-commits, kristof.beyls

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

llvm-svn: 329674

6 years ago[x86] Model the direction flag (DF) separately from the rest of EFLAGS.
Chandler Carruth [Tue, 10 Apr 2018 06:40:51 +0000 (06:40 +0000)]
[x86] Model the direction flag (DF) separately from the rest of EFLAGS.

This cleans up a number of operations that only claimed te use EFLAGS
due to using DF. But no instructions which we think of us setting EFLAGS
actually modify DF (other than things like popf) and so this needlessly
creates uses of EFLAGS that aren't really there.

In fact, DF is so restrictive it is pretty easy to model. Only STD, CLD,
and the whole-flags writes (WRFLAGS and POPF) need to model this.

I've also somewhat cleaned up some of the flag management instruction
definitions to be in the correct .td file.

Adding this extra register also uncovered a failure to use the correct
datatype to hold X86 registers, and I've corrected that as necessary
here.

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

llvm-svn: 329673

6 years ago[sanitizer] Enable threads for libc++ build used by the symbolizer
Petr Hosek [Tue, 10 Apr 2018 05:54:36 +0000 (05:54 +0000)]
[sanitizer] Enable threads for libc++ build used by the symbolizer

Disabling threads makes <atomic> unusable, but this is needed by LLVM
libraries that are dependencies of the symbolizer.

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

llvm-svn: 329672

6 years ago[ExprConstant] Use an AST node and a version number as a key to create
Akira Hatanaka [Tue, 10 Apr 2018 05:15:01 +0000 (05:15 +0000)]
[ExprConstant] Use an AST node and a version number as a key to create
an APValue and retrieve it from map Temporaries.

The version number is needed when a single AST node is visited multiple
times and is used to create APValues that are required to be distinct
from each other (for example, MaterializeTemporaryExprs in default
arguments and VarDecls in loops).

rdar://problem/36505742

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

llvm-svn: 329671

6 years ago[X86] Prevent folding loads with 64-bit ANDs with immediates that fit in 32-bits.
Craig Topper [Tue, 10 Apr 2018 03:44:15 +0000 (03:44 +0000)]
[X86] Prevent folding loads with 64-bit ANDs with immediates that fit in 32-bits.

Prefer to use the 32-bit AND with immediate instead.

Primarily I'm doing this to ensure that immediates created by shrinkAndImmediate will always get absorbed into the AND. But I do believe this would be a reduction in the number of uops that need to execute. Ideally we should shrink the 'and' and the 'load' during DAG combine to re-enable the fold.

Fixes PR37063.

llvm-svn: 329667

6 years agoRevert "[PR16756] Use SSAUpdaterBulk in JumpThreading." one more time.
Michael Zolotukhin [Tue, 10 Apr 2018 03:40:29 +0000 (03:40 +0000)]
Revert "[PR16756] Use SSAUpdaterBulk in JumpThreading." one more time.

This reverts r329661. Bots are still unhappy.

llvm-svn: 329666

6 years ago[libcxx] [test] Use the correct type from strlen. Include correct header.
Billy Robert O'Neal III [Tue, 10 Apr 2018 03:04:07 +0000 (03:04 +0000)]
[libcxx] [test] Use the correct type from strlen. Include correct header.

llvm-svn: 329665

6 years agoRevert "Revert "[PR16756] Use SSAUpdaterBulk in JumpThreading.""
Michael Zolotukhin [Tue, 10 Apr 2018 02:16:45 +0000 (02:16 +0000)]
Revert "Revert "[PR16756] Use SSAUpdaterBulk in JumpThreading.""

This reapplies commit r329644.

llvm-svn: 329661

6 years ago[SSAUpdaterBulk] Handle CFG with unreachable from entry blocks.
Michael Zolotukhin [Tue, 10 Apr 2018 02:16:29 +0000 (02:16 +0000)]
[SSAUpdaterBulk] Handle CFG with unreachable from entry blocks.

llvm-svn: 329660

6 years ago[DebugInfo][COFF] Fix reading variable-length encoded records
Alexandre Ganea [Tue, 10 Apr 2018 01:58:45 +0000 (01:58 +0000)]
[DebugInfo][COFF] Fix reading variable-length encoded records

While reading Codeview records which contain variable-length encoded integers,
such as LF_BCLASS, LF_ENUMERATE, LF_MEMBER, LF_VBCLASS or LF_IVBCLASS,
the record's size would be improperly calculated in cases where the value was
indeed of a variable length (>= LF_NUMERIC). This caused a bad alignement on
the next record, which would/might crash later on.

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

llvm-svn: 329659

6 years ago[llvm-ar] Fix lib.exe detection when running within MSVC toolchain
Alexandre Ganea [Tue, 10 Apr 2018 01:50:25 +0000 (01:50 +0000)]
[llvm-ar] Fix lib.exe detection when running within MSVC toolchain

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

llvm-svn: 329658

6 years ago[x86] Introduce a pass to begin more systematically fixing PR36028 and similar issues.
Chandler Carruth [Tue, 10 Apr 2018 01:41:17 +0000 (01:41 +0000)]
[x86] Introduce a pass to begin more systematically fixing PR36028 and similar issues.

The key idea is to lower COPY nodes populating EFLAGS by scanning the
uses of EFLAGS and introducing dedicated code to preserve the necessary
state in a GPR. In the vast majority of cases, these uses are cmovCC and
jCC instructions. For such cases, we can very easily save and restore
the necessary information by simply inserting a setCC into a GPR where
the original flags are live, and then testing that GPR directly to feed
the cmov or conditional branch.

However, things are a bit more tricky if arithmetic is using the flags.
This patch handles the vast majority of cases that seem to come up in
practice: adc, adcx, adox, rcl, and rcr; all without taking advantage of
partially preserved EFLAGS as LLVM doesn't currently model that at all.

There are a large number of operations that techinaclly observe EFLAGS
currently but shouldn't in this case -- they typically are using DF.
Currently, they will not be handled by this approach. However, I have
never seen this issue come up in practice. It is already pretty rare to
have these patterns come up in practical code with LLVM. I had to resort
to writing MIR tests to cover most of the logic in this pass already.
I suspect even with its current amount of coverage of arithmetic users
of EFLAGS it will be a significant improvement over the current use of
pushf/popf. It will also produce substantially faster code in most of
the common patterns.

This patch also removes all of the old lowering for EFLAGS copies, and
the hack that forced us to use a frame pointer when EFLAGS copies were
found anywhere in a function so that the dynamic stack adjustment wasn't
a problem. None of this is needed as we now lower all of these copies
directly in MI and without require stack adjustments.

Lots of thanks to Reid who came up with several aspects of this
approach, and Craig who helped me work out a couple of things tripping
me up while working on this.

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

llvm-svn: 329657

6 years agoShadowCallStack/x86_64: Ignore pseudo-machine instructions
Vlad Tsyrklevich [Tue, 10 Apr 2018 01:31:01 +0000 (01:31 +0000)]
ShadowCallStack/x86_64: Ignore pseudo-machine instructions

llvm-svn: 329656

6 years ago[CodeGen] Allow undefined loads in statement instances outside context.
Michael Kruse [Tue, 10 Apr 2018 01:20:51 +0000 (01:20 +0000)]
[CodeGen] Allow undefined loads in statement instances outside context.

A check in assert-builds was meant to verify that a load provides a
value in all statement instances (i.e. its domain).  The domain is
commonly gist'ed within the parameter context to contain fewer
constraints.  However, statement instances outside the context are
no valid executions, hence the value provided can be undefined.

Refine the check for valid loads to only needed to be defined within
the SCoP context.

In addition, the JSONImporter had to be changed to allow importing
access relations that are broader than the current access relation,
but still defined over all statement instances.

This should fix the compiler crash in test-suite's oggenc of the
-polly-process-unprofitable buildbot.

llvm-svn: 329655

6 years ago[CodeGen] Convert BlockGenerator::generateScalarLoads to isl++. NFC.
Michael Kruse [Tue, 10 Apr 2018 01:20:47 +0000 (01:20 +0000)]
[CodeGen] Convert BlockGenerator::generateScalarLoads to isl++. NFC.

llvm-svn: 329654

6 years ago[ScopInfo] Avoid iterator invalidation.
Michael Kruse [Tue, 10 Apr 2018 01:20:41 +0000 (01:20 +0000)]
[ScopInfo] Avoid iterator invalidation.

Commit r329640 introduced the removal of all MemoryAccesses of a Scop.
It accidentally continued iterating over a vector whose iterators
have been invalidated by a MemoryAccess removal.

Make a copy of the MemoryAccesses to remove to iterate over while
removing them.

llvm-svn: 329653

6 years ago[AST] Attempt to fix buildbot warnings + appease MSVC; NFCI
George Burgess IV [Tue, 10 Apr 2018 01:11:26 +0000 (01:11 +0000)]
[AST] Attempt to fix buildbot warnings + appease MSVC; NFCI

GCC 4.8.4 on a bot was warning about `ArgPassingKind` not fitting in
`ArgPassingRestrictions`, which appears to be incorrect, since
`ArgPassingKind` only has three potential values:

"warning: 'clang::RecordDecl::ArgPassingRestrictions' is too small to
hold all values of 'enum clang::RecordDecl::ArgPassingKind'"

Additionally, I remember hearing (though my knowledge may be outdated)
that MSVC won't merge adjacent bitfields if their types are different.

Try to fix both issues by turning these into `uint8_t`s.

llvm-svn: 329652

6 years agoObject: Don't mark alias unconditionally defined
Vitaly Buka [Tue, 10 Apr 2018 00:53:16 +0000 (00:53 +0000)]
Object: Don't mark alias unconditionally defined

Summary:
Can't remove EmitAssignment override as llvm/test/Object/X86/nm-bitcodeweak.test
expects this behavior.

Reviewers: pcc, espindola

Subscribers: mehdi_amini, hiraditya, llvm-commits

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

llvm-svn: 329651

6 years agoRevert "[PR16756] Use SSAUpdaterBulk in JumpThreading."
Michael Zolotukhin [Tue, 10 Apr 2018 00:42:43 +0000 (00:42 +0000)]
Revert "[PR16756] Use SSAUpdaterBulk in JumpThreading."

This reverts commit r329644.

llvm-svn: 329650

6 years agoFix for the buildbot failure. Now-unused private field TTI deleted.
Hideki Saito [Tue, 10 Apr 2018 00:38:36 +0000 (00:38 +0000)]
Fix for the buildbot failure. Now-unused private field TTI deleted.

llvm-svn: 329649

6 years ago[CachePruning] Fix comment about ext4 per-directory file limit. NFC
Fangrui Song [Tue, 10 Apr 2018 00:12:28 +0000 (00:12 +0000)]
[CachePruning] Fix comment about ext4 per-directory file limit. NFC

There is a limit on number of subdirectories if dir_nlinks is not
enabled (31998), but per-directory number of files is not limited.

llvm-svn: 329648

6 years agohypot: Port from amd builtins
Jan Vesely [Tue, 10 Apr 2018 00:11:58 +0000 (00:11 +0000)]
hypot: Port from amd builtins

v2: Fix whitespace errors

Use only subnormal path.
Passes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>

llvm-svn: 329647

6 years agoFix line endings (CR/LF -> LF) introduced by rL329613
Alexandre Ganea [Tue, 10 Apr 2018 00:09:15 +0000 (00:09 +0000)]
Fix line endings (CR/LF -> LF) introduced by rL329613

reviewer: zturner
llvm-svn: 329646

6 years ago[NFC][LV] Move InterleaveInfo from Legal to CostModel
Hideki Saito [Mon, 9 Apr 2018 23:45:40 +0000 (23:45 +0000)]
[NFC][LV] Move InterleaveInfo from Legal to CostModel

Summary:
Another clean up, following D43208.

Interleaved memory access analysis/optimization has nothing to do with vectorization legality. It doesn't really belong there. On the other hand, cost model certainly has to know about it.

In principle, vectorization should proceed like Legality ==> Optimization ==> CostModel ==> CodeGen, and this change just does that,
by moving the interleaved access analysis/decision out of Legal, and run it just before CostModel object is created.

After this, I can move LoopVectorizationLegality and Hints/Requirements classes into it's own header file, making it shareable within Transform tree. I have the patch already but I don't want to mix with this change. Eventual goal is to move to Analysis tree, but I first need to move RecurrenceDescriptor/InductionDescriptor from Transform/Util/LoopUtil.* to Analysis.

Reviewers: rengolin, hfinkel, mkuper, dcaballe, sguggill, fhahn, aemerson

Reviewed By: rengolin

Subscribers: llvm-commits

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

llvm-svn: 329645

6 years ago[PR16756] Use SSAUpdaterBulk in JumpThreading.
Michael Zolotukhin [Mon, 9 Apr 2018 23:37:37 +0000 (23:37 +0000)]
[PR16756] Use SSAUpdaterBulk in JumpThreading.

Summary:
SSAUpdater is a bottleneck in JumpThreading, and this patch improves the
situation by using SSAUpdaterBulk instead.

Compile time impact: no noticable changes on CTMark, a big improvement
on the test from PR16756.

Reviewers: dberlin, davide, MatzeB

Subscribers: llvm-commits, hiraditya

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

llvm-svn: 329644

6 years ago[PR16756] Add SSAUpdaterBulk.
Michael Zolotukhin [Mon, 9 Apr 2018 23:37:20 +0000 (23:37 +0000)]
[PR16756] Add SSAUpdaterBulk.

Summary:
SSAUpdater is a bottleneck in a number of passes, and one of the reasons
is that it performs a lot of unnecessary computations (DT/IDF) over and
over again. This patch adds a new SSAUpdaterBulk that uses existing DT
and avoids recomputing IDF when possible.

Reviewers: dberlin, davide, MatzeB

Subscribers: llvm-commits, hiraditya

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

llvm-svn: 329643

6 years agoAdd a test for nested --start-group.
Rui Ueyama [Mon, 9 Apr 2018 23:30:21 +0000 (23:30 +0000)]
Add a test for nested --start-group.

llvm-svn: 329642

6 years ago[ScopInfo] Completely remove MemoryAccesses when their parent statement is removed.
Michael Kruse [Mon, 9 Apr 2018 23:13:05 +0000 (23:13 +0000)]
[ScopInfo] Completely remove MemoryAccesses when their parent statement is removed.

Removing a statement left its MemoryAccesses in some lists and maps of
the SCoP.  Which lists depends on at which phase of the SCoP
construction the statement is deleted.  Follow-up passes could still see
the already deleted MemoryAccesses by iterating through these
lists/maps, resulting in an access violation.

When removing a ScopStmt, also remove all its MemoryAccesses by using
the same mechnism that removes a MemoryAccess.

llvm-svn: 329640

6 years ago[ScopInfo] Actually remove from list.
Michael Kruse [Mon, 9 Apr 2018 23:13:01 +0000 (23:13 +0000)]
[ScopInfo] Actually remove from list.

std::remove, despite its name, does not remove elements from a list, but
only moves them to the end of a list.  Call erase() to shorten the
vector to the remaining elements.

Test case included in next commit.

llvm-svn: 329639

6 years ago[MemorySSA] remove cruft; NFC.
George Burgess IV [Mon, 9 Apr 2018 23:09:27 +0000 (23:09 +0000)]
[MemorySSA] remove cruft; NFC.

The caching walker used to hold its own caches, which made its `reset()`
function meaningful. Since caching has been moved out of it, there's no
reason to continue to have these cache-related methods.

Similarly, the EXPENSIVE_CHECKS block that's getting removed used to
rerun the query with caching disabled. Since that's how we always do
queries now, it's redundant.

llvm-svn: 329638

6 years agoAdd --warn-backrefs to maintain compatibility with other linkers
Rui Ueyama [Mon, 9 Apr 2018 23:05:48 +0000 (23:05 +0000)]
Add --warn-backrefs to maintain compatibility with other linkers

I'm proposing a new command line flag, --warn-backrefs in this patch.
The flag and the feature proposed below don't exist in GNU linkers
nor the current lld.

--warn-backrefs is an option to detect reverse or cyclic dependencies
between static archives, and it can be used to keep your program
compatible with GNU linkers after you switch to lld. I'll explain the
feature and why you may find it useful below.

lld's symbol resolution semantics is more relaxed than traditional
Unix linkers. Therefore,

  ld.lld foo.a bar.o

succeeds even if bar.o contains an undefined symbol that have to be
resolved by some object file in foo.a. Traditional Unix linkers
don't allow this kind of backward reference, as they visit each
file only once from left to right in the command line while
resolving all undefined symbol at the moment of visiting.

In the above case, since there's no undefined symbol when a linker
visits foo.a, no files are pulled out from foo.a, and because the
linker forgets about foo.a after visiting, it can't resolve
undefined symbols that could have been resolved otherwise.

That lld accepts more relaxed form means (besides it makes more
sense) that you can accidentally write a command line or a build
file that works only with lld, even if you have a plan to
distribute it to wider users who may be using GNU linkers.  With
--check-library-dependency, you can detect a library order that
doesn't work with other Unix linkers.

The option is also useful to detect cyclic dependencies between
static archives. Again, lld accepts

  ld.lld foo.a bar.a

even if foo.a and bar.a depend on each other. With --warn-backrefs
it is handled as an error.

Here is how the option works. We assign a group ID to each file. A
file with a smaller group ID can pull out object files from an
archive file with an equal or greater group ID. Otherwise, it is a
reverse dependency and an error.

A file outside --{start,end}-group gets a fresh ID when
instantiated. All files within the same --{start,end}-group get the
same group ID. E.g.

  ld.lld A B --start-group C D --end-group E

A and B form group 0, C, D and their member object files form group
1, and E forms group 2. I think that you can see how this group
assignment rule simulates the traditional linker's semantics.

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

llvm-svn: 329636

6 years ago[ObjC++] Never pass structs that transitively contain __weak fields in
Akira Hatanaka [Mon, 9 Apr 2018 22:48:22 +0000 (22:48 +0000)]
[ObjC++] Never pass structs that transitively contain __weak fields in
registers.

This patch fixes a bug in r328731 that caused structs transitively
containing __weak fields to be passed in registers. The patch replaces
the flag RecordDecl::CanPassInRegisters with a 2-bit enum that indicates
whether the struct or structs containing the struct are forced to be
passed indirectly.

This reapplies r329617. r329617 didn't specify the underlying type for
enum ArgPassingKind, which caused regression tests to fail on a windows
bot.

rdar://problem/39194693

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

llvm-svn: 329635

6 years agoGetRandom / OpenBSD, using getentropy to get high quality randomness
Vitaly Buka [Mon, 9 Apr 2018 22:46:40 +0000 (22:46 +0000)]
GetRandom / OpenBSD, using getentropy to get high quality randomness

Summary:
- getentropy presence since late 2014, safe to use.
- guarantees to delivers good random data up to 256 bytes.
- fall back to /dev/urandom as long the buffer is correct.

Patch by David CARLIER

Reviewers: kubamracek, vitalybuka

Reviewed By: vitalybuka

Subscribers: cryptoad, llvm-commits, #sanitizers

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

llvm-svn: 329633

6 years ago[MemorySSA] Remove redundant assert; NFC
George Burgess IV [Mon, 9 Apr 2018 22:45:14 +0000 (22:45 +0000)]
[MemorySSA] Remove redundant assert; NFC

The `if (!Def && !Use) return nullptr;` right above this assert sort of
defeats the purpose.

llvm-svn: 329632

6 years agolibFuzzer, OpenBSD support
Vitaly Buka [Mon, 9 Apr 2018 22:38:26 +0000 (22:38 +0000)]
libFuzzer, OpenBSD support

Summary:
- Enabling libfuzzer on OpenBSD
- OpenBSD can t support asan, msan ... the tests can t be run.

Patch by David CARLIER

Reviewers: eugenis, phosek, vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, krytarowski, llvm-commits, #sanitizers

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

llvm-svn: 329631

6 years ago[AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC).
Eugene Zelenko [Mon, 9 Apr 2018 22:14:10 +0000 (22:14 +0000)]
[AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC).

llvm-svn: 329630

6 years ago[CFI] Disable CFI checks for __cxa_decrement_exception_refcount
Vlad Tsyrklevich [Mon, 9 Apr 2018 22:11:28 +0000 (22:11 +0000)]
[CFI] Disable CFI checks for __cxa_decrement_exception_refcount

Summary:
exception_header->exceptionDestructor is a void(*)(void*) function
pointer; however, it can point to destructors like std::
exception::~exception that don't match that type signature.

Reviewers: pcc, vitalybuka

Reviewed By: vitalybuka

Subscribers: kcc, christof, cfe-commits

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

llvm-svn: 329629