platform/upstream/llvm.git
5 years ago[ASan] Support `{f}puts(NULL)` on Darwin
Julian Lettner [Wed, 17 Jul 2019 16:09:25 +0000 (16:09 +0000)]
[ASan] Support `{f}puts(NULL)` on Darwin

On Darwin, the man page states that "both fputs() and puts() print
`(null)' if str is NULL."

rdar://48227136

Reviewed By: Lekensteyn

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

llvm-svn: 366342

5 years agoRemove REQUIRES OMP spec version within lit tests
Jonathan Peyton [Wed, 17 Jul 2019 15:41:00 +0000 (15:41 +0000)]
Remove REQUIRES OMP spec version within lit tests

This is a follow up patch to D64534 (r365963) which removed all OMP
spec versioning within the OpenMP runtime codebase.  This patch removes
REQUIRES: openmp-x.y lines from lit tests.

llvm-svn: 366341

5 years agoAMDGPU: Use getTargetConstant
Matt Arsenault [Wed, 17 Jul 2019 15:35:36 +0000 (15:35 +0000)]
AMDGPU: Use getTargetConstant

Avoids creating an extra intermediate mov.

llvm-svn: 366340

5 years agoFix MSVC 'implicitly capture' compile error. NFCI.
Simon Pilgrim [Wed, 17 Jul 2019 15:31:53 +0000 (15:31 +0000)]
Fix MSVC 'implicitly capture' compile error. NFCI.

llvm-svn: 366339

5 years ago[clangd] Type hierarchy: don't resolve parents if the client only asked for children
Nathan Ridge [Wed, 17 Jul 2019 15:26:49 +0000 (15:26 +0000)]
[clangd] Type hierarchy: don't resolve parents if the client only asked for children

Summary: Also reorganize the code for computing supertypes to make it more symmetric to subtypes.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366338

5 years ago[clang-tidy] Adjust location of namespace comment diagnostic
Ilya Biryukov [Wed, 17 Jul 2019 15:22:14 +0000 (15:22 +0000)]
[clang-tidy] Adjust location of namespace comment diagnostic

Summary:
If there is no comment, place it at the closing brace of a namespace
definition. Previously it was placed at the next character after the
closing brace.

The new position produces a better location for highlighting in clangd
and does not seem to make matters worse for clang-tidy.

Reviewers: alexfh, hokein

Reviewed By: alexfh, hokein

Subscribers: xazax.hun, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366337

5 years ago[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field
Mike Rice [Wed, 17 Jul 2019 15:18:45 +0000 (15:18 +0000)]
[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

checkDecl is only valid for VarDecls or FieldDecls, since getCanonicalDecl
expects only these. Prevent other Decl kinds (such as CXXMethodDecls and
EnumConstantDecls) from entering and asserting.

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

llvm-svn: 366336

5 years ago[Attributor] Deduce "willreturn" function attribute
Hideto Ueno [Wed, 17 Jul 2019 15:15:43 +0000 (15:15 +0000)]
[Attributor] Deduce "willreturn" function attribute

Summary:
Deduce the "willreturn" attribute for functions.

For now, intrinsics are not willreturn. More annotation will be done in another patch.

Reviewers: jdoerfert

Subscribers: jvesely, nhaehnle, nicholas, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 366335

5 years ago[llvm-ar][test] Add tests failing on Darwin
Owen Reynolds [Wed, 17 Jul 2019 15:10:02 +0000 (15:10 +0000)]
[llvm-ar][test] Add tests failing on Darwin

These tests that failed on Darwin but passed on other machines due to the default archive format differing
on a Darwin machine, and what looks to be bugs in the output of this format.
I can not investigate these issue further so the tests are considered expected failures on Darwin.

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

llvm-svn: 366334

5 years ago[lld] Add Visual Studio compatible diagnostics
Chris Jackson [Wed, 17 Jul 2019 14:54:02 +0000 (14:54 +0000)]
[lld] Add Visual Studio compatible diagnostics

Summary:
Add a --vs-diagnostics flag that alters the format of diagnostic output
to enable source hyperlinks in Visual Studio.

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

Reviewed by: ruiu

llvm-svn: 366333

5 years ago[ASTImporter] Fix structural eq of lambdas
Gabor Marton [Wed, 17 Jul 2019 14:40:09 +0000 (14:40 +0000)]
[ASTImporter] Fix structural eq of lambdas

Summary:
The structural equivalence check reported false eq between lambda classes
with different parameters in their call signature.
The solution is to check the methods for equality too in case of lambda
classes.

Reviewers: a_sidorin, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

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

llvm-svn: 366332

5 years ago[RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default
Alex Bradbury [Wed, 17 Jul 2019 14:32:25 +0000 (14:32 +0000)]
[RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default

This follows the RFC <http://lists.llvm.org/pipermail/llvm-dev/2019-July/133724.html>.

Follow-on commits will add appropriate release notes changes etc.

Pushing this now and in a minimal form so there is reasonable time before 9.0
branches to resolve any issues arising from e.g. the backend being exposed on
different sanitizer setups.

The current builder for RISC-V is on the staging build-bot
<http://lab.llvm.org:8014/builders/llvm-riscv-linux>, however with the RISCV
backend being built by default it won't provide any real additional coverage.
We will shortly set up a builder that runs the test-suite in qemu-user.

llvm-svn: 366331

5 years ago[RISCV][NFC] Remove outdated TODO from test/CodeGen/RISCV/dwarf-eh.ll
Alex Bradbury [Wed, 17 Jul 2019 14:04:48 +0000 (14:04 +0000)]
[RISCV][NFC] Remove outdated TODO from test/CodeGen/RISCV/dwarf-eh.ll

llvm-svn: 366330

5 years ago[AsmPrinter] Make the encoding of call sites in .gcc_except_table configurable and...
Alex Bradbury [Wed, 17 Jul 2019 14:00:35 +0000 (14:00 +0000)]
[AsmPrinter] Make the encoding of call sites in .gcc_except_table configurable and use for RISC-V

The original behavior was to always emit the offsets to each call site in the
call site table as uleb128 values, however on some architectures (eg RISCV)
these uleb128 offsets into the code cannot always be resolved until link time
(because relaxation will invalidate any calculated offsets), and there are no
appropriate relocations for uleb128 values. As a consequence it needs to be
possible to specify an alternative.

This also switches RISCV to use DW_EH_PE_udata4 for call side encodings in
.gcc_except_table

Differential Revision: https://reviews.llvm.org/D63415
Patch by Edward Jones.

llvm-svn: 366329

5 years agoMips: Remove immarg from copy and insert intrinsics
Matt Arsenault [Wed, 17 Jul 2019 13:55:01 +0000 (13:55 +0000)]
Mips: Remove immarg from copy and insert intrinsics

These intrinsics do in fact work with non-constant index arguments.

These are lowered to either the generic
ISD::INSERT_VECTOR_ELT/ISD::EXTRACT_VECTOR_ELT, or to
VEXTRACT_SEXT_ELT. The handling of these all accept variable
indexes. Turning these into generic instructions which do allow
variables introduces complications in a future change to immarg
handling.

Since these just turn into generic instructions, these are kind of
pointless and should probably just be autoupgraded to
extractelement/insertelement.

llvm-svn: 366328

5 years ago[RISCV] Set correct encodings for DWARF exception handling
Alex Bradbury [Wed, 17 Jul 2019 13:54:38 +0000 (13:54 +0000)]
[RISCV] Set correct encodings for DWARF exception handling

This patch sets correct encodings for DWARF exception handling for RISC-V
(other than call site encoding, which must be udata4 rather than uleb128 and
is handled by D63415).

This has the same intend as D63409, except this version matches GCC/binutils
behaviour which uses the same encodings regardless of PIC/non-PIC and
medlow/medany code model.

llvm-svn: 366327

5 years ago[RISCV][NFC] Add tests that capture current encodings for DWARF EH
Alex Bradbury [Wed, 17 Jul 2019 13:48:49 +0000 (13:48 +0000)]
[RISCV][NFC] Add tests that capture current encodings for DWARF EH

Items which are known to be wrong/different vs GCC are marked as TODO and will
be address in follow-up patches.

llvm-svn: 366326

5 years ago[ASTImporter] Fix LLDB lookup in transparent ctx and with ext src
Gabor Marton [Wed, 17 Jul 2019 13:47:46 +0000 (13:47 +0000)]
[ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

Summary:
With LLDB we use localUncachedLookup(), however, that fails to find
Decls when a transparent context is involved and the given DC has
external lexical storage.  The solution is to use noload_lookup, which
works well with transparent contexts.  But, we cannot use only the
noload_lookup since the slow case of localUncachedLookup is still needed
in some other cases.

These other cases are handled in ASTImporterLookupTable, but we cannot
use that with LLDB since that traverses through the AST which initiates
the load of external decls again via DC::decls().

We must avoid loading external decls during the import becuase
ExternalASTSource is implemented with ASTImporter, so external loads
during import results in uncontrolled and faulty import.

Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits

Tags: #clang, #lldb

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

llvm-svn: 366325

5 years ago[llvm-ar][test] \r\n -> \n
Fangrui Song [Wed, 17 Jul 2019 13:40:42 +0000 (13:40 +0000)]
[llvm-ar][test] \r\n -> \n

Also simplify some empty output tests with 'count 0'

llvm-svn: 366324

5 years ago[AMDGPU] Optimize atomic AND/OR/XOR
Jay Foad [Wed, 17 Jul 2019 13:40:03 +0000 (13:40 +0000)]
[AMDGPU] Optimize atomic AND/OR/XOR

Summary: Extend the atomic optimizer to handle AND, OR and XOR.

Reviewers: arsenm, sheredom

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 366323

5 years ago[AArch64] Add support for Transactional Memory Extension (TME)
Momchil Velikov [Wed, 17 Jul 2019 13:23:27 +0000 (13:23 +0000)]
[AArch64] Add support for Transactional Memory Extension (TME)

TME is a future architecture technology, documented in

https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
https://developer.arm.com/docs/ddi0601/a

More about the future architectures:

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
TCANCEL and the target feature/arch extension "tme".

It also implements TME builtin functions, defined in ACLE Q2 2019
(https://developer.arm.com/docs/101028/latest)

Patch by Javed Absar and Momchil Velikov

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

llvm-svn: 366322

5 years ago[clangd] Force the required interpretation of #import on windows tests.
Sam McCall [Wed, 17 Jul 2019 13:21:25 +0000 (13:21 +0000)]
[clangd] Force the required interpretation of #import on windows tests.

Summary: NFC but should fix a bunch of tests.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 366321

5 years ago[clangd] Handle windows line endings in QueryDriver
Kadir Cetinkaya [Wed, 17 Jul 2019 13:14:02 +0000 (13:14 +0000)]
[clangd] Handle windows line endings in QueryDriver

Summary: fixes second case of https://github.com/clangd/clangd/issues/93

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 366320

5 years agoPowerPC: Fix register spilling for SPE registers
Justin Hibbits [Wed, 17 Jul 2019 12:30:48 +0000 (12:30 +0000)]
PowerPC: Fix register spilling for SPE registers

Summary:
Missed in the original commit, use the correct callee-saved register
list for spilling, instead of the standard SVR432 list.  This avoids
needlessly spilling the SPE non-volatile registers when they're not used.

As part of this, also add where missing, and sort, the spill opcode
checks for SPE and SPE4 register classes.

Reviewers: nemanjai, hfinkel, joerg

Subscribers: kbarton, jsji, llvm-commits

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

llvm-svn: 366319

5 years agoPowerPC/SPE: Fix load/store handling for SPE
Justin Hibbits [Wed, 17 Jul 2019 12:30:04 +0000 (12:30 +0000)]
PowerPC/SPE: Fix load/store handling for SPE

Summary:
Pointed out in a comment for D49754, register spilling will currently
spill SPE registers at almost any offset.  However, the instructions
`evstdd` and `evldd` require a) 8-byte alignment, and b) a limit of 256
(unsigned) bytes from the base register, as the offset must fix into a
5-bit offset, which ranges from 0-31 (indexed in double-words).

The update to the register spill test is taken partially from the test
case shown in D49754.

Additionally, pointed out by Kei Thomsen, globals will currently use
evldd/evstdd, though the offset isn't known at compile time, so may
exceed the 8-bit (unsigned) offset permitted.  This fixes that as well,
by forcing it to always use evlddx/evstddx when accessing globals.

Part of the patch contributed by Kei Thomsen.

Reviewers: nemanjai, hfinkel, joerg

Subscribers: kbarton, jsji, llvm-commits

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

llvm-svn: 366318

5 years ago[MIPS GlobalISel] ClampScalar and select pointer G_ICMP
Petar Avramovic [Wed, 17 Jul 2019 12:08:01 +0000 (12:08 +0000)]
[MIPS GlobalISel] ClampScalar and select pointer G_ICMP

Add narrowScalar to half of original size for G_ICMP.
ClampScalar G_ICMP's operands 2 and 3 to to s32.
Select G_ICMP for pointers for MIPS32. Pointer compare is same
as for integers, it is enough to declare them as legal type.

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

llvm-svn: 366317

5 years ago[lldb][NFC] Tablegenify watchpoint commands
Raphael Isemann [Wed, 17 Jul 2019 11:48:29 +0000 (11:48 +0000)]
[lldb][NFC] Tablegenify watchpoint commands

Part of the project that migrates these struct initializers to our
new lldb-tablegen.

llvm-svn: 366316

5 years ago[AArch64] Consistent types and naming for AArch64 target features (NFC)
Momchil Velikov [Wed, 17 Jul 2019 11:24:37 +0000 (11:24 +0000)]
[AArch64] Consistent types and naming for AArch64 target features (NFC)

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

Committed as obvious.

llvm-svn: 366315

5 years agoAMDGPU/GFX10: Apply the VMEM-to-scalar-write hazard also to writes to EXEC
Nicolai Haehnle [Wed, 17 Jul 2019 11:22:57 +0000 (11:22 +0000)]
AMDGPU/GFX10: Apply the VMEM-to-scalar-write hazard also to writes to EXEC

Summary: Change-Id: I854fbf7d48e937bef9f8f3f5d0c8aeb970652630

Reviewers: rampitec, mareko

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

Tags: #llvm

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

Change-Id: I4405b3a7f84186acea5a78d291bff71056e745fc
llvm-svn: 366314

5 years agoAMDGPU: Improve alias analysis for GDS
Nicolai Haehnle [Wed, 17 Jul 2019 11:22:19 +0000 (11:22 +0000)]
AMDGPU: Improve alias analysis for GDS

Summary: GDS cannot alias anything else.

Original patch by: Marek Olšák

Reviewers: arsenm, mareko

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, Petar.Avramovic, llvm-commits

Tags: #llvm

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

Change-Id: I07bfbd96f5d5c37a6dfba7997df12f291dd794b0
llvm-svn: 366313

5 years ago[TableGen] Do not set ReadNone attribute on intrinsics with side effects
Momchil Velikov [Wed, 17 Jul 2019 10:53:13 +0000 (10:53 +0000)]
[TableGen] Do not set ReadNone attribute on intrinsics with side effects

If an intrinsic is defined without outputs, but having side effects,
it still can be removed completely from the program. This patch makes
TableGen not set Attribute::ReadNone for intrinsics which
are declared with IntrHasSideEffects.

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

llvm-svn: 366312

5 years ago[clangd] Fix error message in tweaktests to be useful. NFC
Sam McCall [Wed, 17 Jul 2019 10:17:47 +0000 (10:17 +0000)]
[clangd] Fix error message in tweaktests to be useful. NFC

llvm-svn: 366311

5 years ago[llvm-ar][test] Add coverage for replace and update key letters
Owen Reynolds [Wed, 17 Jul 2019 10:16:44 +0000 (10:16 +0000)]
[llvm-ar][test] Add coverage for replace and update key letters

Some more tests to increase llvm-ar test coverage, this time for replace 'r' and update 'u'.

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

llvm-svn: 366309

5 years ago[ARM GlobalISel] Cleanup CallLowering. NFC
Diana Picus [Wed, 17 Jul 2019 10:01:27 +0000 (10:01 +0000)]
[ARM GlobalISel] Cleanup CallLowering. NFC

Migrate CallLowering::lowerReturnVal to use the same infrastructure as
lowerCall/FormalArguments and remove the now obsolete code path from
splitToValueTypes.

Forgot to push this earlier.

llvm-svn: 366308

5 years ago[ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892
Fangrui Song [Wed, 17 Jul 2019 09:23:04 +0000 (09:23 +0000)]
[ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892

Summary:
After D58892 split the RW PT_LOAD on the PT_GNU_RELRO boundary, the new
layout is:

PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro)) PT_LOAD(.data. .bss)

The two pageAlign() calls at PT_GNU_RELRO boundaries are redundant due
to the existence of PT_LOAD.

Reviewers: grimar, peter.smith, ruiu, espindola

Reviewed By: ruiu

Subscribers: sfertile, atanasyan, emaste, arichardson, llvm-commits

Tags: #llvm

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

llvm-svn: 366307

5 years ago[OpenCL][Sema] Minor refactoring and constraint checking
Marco Antognini [Wed, 17 Jul 2019 08:52:09 +0000 (08:52 +0000)]
[OpenCL][Sema] Minor refactoring and constraint checking

Summary:
Simplify code a bit and add assertion to address post-landing comments
from D64083.

Subscribers: yaxunl, Anastasia, cfe-commits

Tags: #clang

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

llvm-svn: 366306

5 years ago[Driver] Enable __cxa_atexit on Solaris
Rainer Orth [Wed, 17 Jul 2019 08:37:00 +0000 (08:37 +0000)]
[Driver] Enable __cxa_atexit on Solaris

Starting with Solaris 11.4 (which is now the required minimal version), Solaris does
support __cxa_atexit.  This patch reflects that.

One might consider removing the affected tests altogether instead of inverting them,
as is done on other targets.

Besides, this lets two ASan tests PASS:

  AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc
  AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

llvm-svn: 366305

5 years agoReplace CRLF with LF.
Rui Ueyama [Wed, 17 Jul 2019 08:31:51 +0000 (08:31 +0000)]
Replace CRLF with LF.

llvm-svn: 366304

5 years ago[mips] Remove redundant test case. NFC
Simon Atanasyan [Wed, 17 Jul 2019 08:12:03 +0000 (08:12 +0000)]
[mips] Remove redundant test case. NFC

The `inlineasm-constraint-reg64.ll` test checks the same functionality.

llvm-svn: 366303

5 years ago[mips] Name inline asm constraint test cases in a uniform manner. NFC
Simon Atanasyan [Wed, 17 Jul 2019 08:11:57 +0000 (08:11 +0000)]
[mips] Name inline asm constraint test cases in a uniform manner. NFC

llvm-svn: 366302

5 years ago[mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64
Simon Atanasyan [Wed, 17 Jul 2019 08:11:40 +0000 (08:11 +0000)]
[mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64

The `MUL` instruction is available starting from the MIPS32/MIPS64 targets.

llvm-svn: 366301

5 years ago[mips] Implement .cplocal directive
Simon Atanasyan [Wed, 17 Jul 2019 08:11:31 +0000 (08:11 +0000)]
[mips] Implement .cplocal directive

This directive forces to use the alternate register for context pointer.
For example, this code:
  .cplocal $4
  jal foo
expands to:
  ld    $25, %call16(foo)($4)
  jalr  $25

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

llvm-svn: 366300

5 years ago[mips] Support the "o" inline asm constraint
Simon Atanasyan [Wed, 17 Jul 2019 08:11:15 +0000 (08:11 +0000)]
[mips] Support the "o" inline asm constraint

As well as other LLVM targets we do not handle "offsettable"
memory addresses in any special way. In other words, the "o" constraint
is an exact equivalent of the "m" one. But some existing code require
the "o" constraint support.

This fixes PR42589.

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

llvm-svn: 366299

5 years ago[Target][NFCI] Remove commented out code
Alex Langford [Wed, 17 Jul 2019 07:13:42 +0000 (07:13 +0000)]
[Target][NFCI] Remove commented out code

llvm-svn: 366295

5 years ago[LoopInfo] Fix getUniqueNonLatchExitBlocks
Serguei Katkov [Wed, 17 Jul 2019 07:09:20 +0000 (07:09 +0000)]
[LoopInfo] Fix getUniqueNonLatchExitBlocks

It is possible that exit block has two predecessors and one of them is a latch
block while another is not.

Current algorithm is based on the assumption that all exits are dedicated
and therefore we can check only first predecessor of loop exit to find all unique
exits.

However if we do not consider latch block and it is first predecessor of some
exit then this exit will be found.

Regression test is added.

As a side effect of algorithm re-writing, the restriction that all exits are dedicated
is eliminated.

Reviewers: reames, fhahn, efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D64787

llvm-svn: 366294

5 years ago[NativePDB] Make GetTranslationUnitDecl return an lldb CompilerDeclCtx
Nathan Lanza [Wed, 17 Jul 2019 07:05:49 +0000 (07:05 +0000)]
[NativePDB] Make GetTranslationUnitDecl return an lldb CompilerDeclCtx

Summary:
We intend to make PdbAstBuilder abstract and implement
PdbAstBuilderClang along with any other languages that wish to use
PDBs. This is the first step.

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

llvm-svn: 366293

5 years ago[Target][NFCI] Rename variable
Alex Langford [Wed, 17 Jul 2019 07:03:17 +0000 (07:03 +0000)]
[Target][NFCI] Rename variable

This variable doesn't have anything to do with clang.

llvm-svn: 366292

5 years agoUpdate email address.
Qiu Chaofan [Wed, 17 Jul 2019 07:02:02 +0000 (07:02 +0000)]
Update email address.

llvm-svn: 366291

5 years agogn build: Merge r366265
Nico Weber [Wed, 17 Jul 2019 01:21:14 +0000 (01:21 +0000)]
gn build: Merge r366265

llvm-svn: 366289

5 years agogn build: Merge r366216
Nico Weber [Wed, 17 Jul 2019 01:19:30 +0000 (01:19 +0000)]
gn build: Merge r366216

llvm-svn: 366288

5 years agoAMDGPU: Add some missing builtins
Matt Arsenault [Wed, 17 Jul 2019 00:01:03 +0000 (00:01 +0000)]
AMDGPU: Add some missing builtins

llvm-svn: 366286

5 years agoDon't require python exe and lib versions to match while crosscompiling
Nathan Lanza [Tue, 16 Jul 2019 23:54:17 +0000 (23:54 +0000)]
Don't require python exe and lib versions to match while crosscompiling

Summary:
While cross compiling, the python executable is used to run a handful
of scripts while the libraries are linked and headers are included.
Theoretically it's possible for the versions to match completely, but
requiring the build to match 2.7.10 to 2.7.15 is unnecessary.

Subscribers: mgorny

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

llvm-svn: 366285

5 years agoFix OpenCLCXX test on 32-bit Windows where thiscall is present
Reid Kleckner [Tue, 16 Jul 2019 23:44:33 +0000 (23:44 +0000)]
Fix OpenCLCXX test on 32-bit Windows where thiscall is present

llvm-svn: 366284

5 years ago[AMDGPU] Autogenerate register asm names
Stanislav Mekhanoshin [Tue, 16 Jul 2019 23:44:21 +0000 (23:44 +0000)]
[AMDGPU] Autogenerate register asm names

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

llvm-svn: 366283

5 years agoFix darwin-ld.c if dsymutil.exe exists on PATH
Reid Kleckner [Tue, 16 Jul 2019 23:38:05 +0000 (23:38 +0000)]
Fix darwin-ld.c if dsymutil.exe exists on PATH

llvm-svn: 366282

5 years agoadd a workaround in GetLine to account for ReadFile not reporintg error
Nathan Lanza [Tue, 16 Jul 2019 23:01:59 +0000 (23:01 +0000)]
add a workaround in GetLine to account for ReadFile not reporintg error

Summary:
ReadFile on Windows is supposed to set ERROR_OPERATION_ABORTED according
to the docs on MSDN. However, this has evidently been a known bug since
Windows 8. Therefore, we can't detect if a signal interrupted in the
fgets. So pressing ctrl-c causes the repl to end and the process to
exit. A temporary workaround is just to attempt to fgets twice until
this bug is fixed.

A possible alternative would be to set a flag in the `sigint_handler`
and simply check that flag in the true part of the if statement.
However, signal handlers on Windows are asynchronous and this would
require sleeping on the repl loop thread while still not necessarily
guarnateeing that you caught the sigint.

Reviewers: jfb

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

llvm-svn: 366281

5 years agoARM: Fix missing immarg for space intrinsic
Matt Arsenault [Tue, 16 Jul 2019 22:41:38 +0000 (22:41 +0000)]
ARM: Fix missing immarg for space intrinsic

llvm-svn: 366280

5 years agoGlobalISel: Add overload of handleAssignments with CCState
Matt Arsenault [Tue, 16 Jul 2019 22:41:34 +0000 (22:41 +0000)]
GlobalISel: Add overload of handleAssignments with CCState

AMDGPU needs to allocate special argument registers separately from
the user function argument list, so needs direct control over the
CCState.

The ArgLocs argument is only really necessary because CCState doesn't
allow access to it.

llvm-svn: 366279

5 years ago[TableGen] Generate offsets into a flat array for getOperandType
Justin Bogner [Tue, 16 Jul 2019 22:39:18 +0000 (22:39 +0000)]
[TableGen] Generate offsets into a flat array for getOperandType

Rather than an array of std::initializer_list, generate a table of
offsets and a flat array of the operands for getOperandType. This is a
bit more efficient on platforms that don't manage to get the array of
inintializer_lists initialized at link time (I'm looking at you
macOS). It's also quite quite a bit faster to compile.

llvm-svn: 366278

5 years agoFix a typo in target features
George Burgess IV [Tue, 16 Jul 2019 22:32:17 +0000 (22:32 +0000)]
Fix a typo in target features

There was a slight typo in r364352 that ended up causing our backend to
complain on some x86 Android builds. This CL fixes that.

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

llvm-svn: 366276

5 years ago[WebAssembly] Compile all TLS on Emscripten as local-exec
Guanzhong Chen [Tue, 16 Jul 2019 22:22:08 +0000 (22:22 +0000)]
[WebAssembly] Compile all TLS on Emscripten as local-exec

Summary:
Currently, on Emscripten, dynamic linking is not supported with threads.
This means that if thread-local storage is used, it must be used in a
statically-linked executable. Hence, local-exec is the only possible model.

This diff compiles all TLS variables to use local-exec on Emscripten as a
temporary measure until dynamic linking is supported with threads.

The goal for this is to allow C++ types with constructors to be thread-local.

Currently, when `clang` compiles a `thread_local` variable with a constructor,
it generates `__tls_guard` variable:

    @__tls_guard = internal thread_local global i8 0, align 1

As no TLS model is specified, this is treated as general-dynamic, which we do
not support (and cannot support without implementing dynamic linking support
with threads in Emscripten). As a result, any C++ constructor in `thread_local`
variables would not compile.

By compiling all `thread_local` as local-exec, `__tls_guard` will compile and
we can support C++ constructors with TLS without implementing dynamic linking
with threads.

Depends on D64537

Reviewers: tlively, aheejin, sbc100

Reviewed By: aheejin

Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 366275

5 years ago[TableGen] Add "getOperandType" to get operand types from opcode/opidx
Justin Bogner [Tue, 16 Jul 2019 22:10:16 +0000 (22:10 +0000)]
[TableGen] Add "getOperandType" to get operand types from opcode/opidx

The InstrInfoEmitter outputs an enum called "OperandType" which gives
numerical IDs to each operand type. This patch makes use of this enum
to define a function called "getOperandType", which allows looking up
the type of an operand given its opcode and operand index.

Patch by Nicolas Guillemot. Thanks!

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

llvm-svn: 366274

5 years agoAdd REQUIRES: x86 to safeseh-no.s test for x86
Reid Kleckner [Tue, 16 Jul 2019 22:01:30 +0000 (22:01 +0000)]
Add REQUIRES: x86 to safeseh-no.s test for x86

llvm-svn: 366273

5 years ago[WebAssembly] Implement thread-local storage (local-exec model)
Guanzhong Chen [Tue, 16 Jul 2019 22:00:45 +0000 (22:00 +0000)]
[WebAssembly] Implement thread-local storage (local-exec model)

Summary:
Thread local variables are placed inside a `.tdata` segment. Their symbols are
offsets from the start of the segment. The address of a thread local variable
is computed as `__tls_base` + the offset from the start of the segment.

`.tdata` segment is a passive segment and `memory.init` is used once per thread
to initialize the thread local storage.

`__tls_base` is a wasm global. Since each thread has its own wasm instance,
it is effectively thread local. Currently, `__tls_base` must be initialized
at thread startup, and so cannot be used with dynamic libraries.

`__tls_base` is to be initialized with a new linker-synthesized function,
`__wasm_init_tls`, which takes as an argument a block of memory to use as the
storage for thread locals. It then initializes the block of memory and sets
`__tls_base`. As `__wasm_init_tls` will handle the memory initialization,
the memory does not have to be zeroed.

To help allocating memory for thread-local storage, a new compiler intrinsic
is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns
the size of the thread-local storage for the current function.

The expected usage is to run something like the following upon thread startup:

    __wasm_init_tls(malloc(__builtin_wasm_tls_size()));

Reviewers: tlively, aheejin, kripken, sbc100

Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 366272

5 years agoAMDGPU: Partially revert r366250
Matt Arsenault [Tue, 16 Jul 2019 22:00:10 +0000 (22:00 +0000)]
AMDGPU: Partially revert r366250

GCCBuiltin doesn't work for these, because they have a mangled type
(although they arguably should not).

llvm-svn: 366271

5 years ago[ORC][docs] Fix an RST error: the code-block directive needs a newline after it.
Lang Hames [Tue, 16 Jul 2019 21:41:43 +0000 (21:41 +0000)]
[ORC][docs] Fix an RST error: the code-block directive needs a newline after it.

llvm-svn: 366270

5 years ago[ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to section.
Lang Hames [Tue, 16 Jul 2019 21:34:59 +0000 (21:34 +0000)]
[ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to section.

llvm-svn: 366269

5 years ago[x86] use more phadd for reductions
Sanjay Patel [Tue, 16 Jul 2019 21:30:41 +0000 (21:30 +0000)]
[x86] use more phadd for reductions

This is part of what is requested by PR42023:
https://bugs.llvm.org/show_bug.cgi?id=42023

There's an extension needed for FP add, but exactly how we would specify
that using flags is not clear to me, so I left that as a TODO.
We're still missing patterns for partial reductions when the input vector
is 256-bit or 512-bit, but I think that's a failure of vector narrowing.
If we can reduce the widths, then this matching should work on those tests.

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

llvm-svn: 366268

5 years ago[clang-format] Don't detect call to ObjC class method as C++11 attribute specifier
Ben Hamilton [Tue, 16 Jul 2019 21:29:40 +0000 (21:29 +0000)]
[clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

Summary:
Previously, clang-format detected something like the following as a C++11 attribute specifier.

  @[[NSArray class]]

instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails.

To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.)

Contributed by rkgibson2.

Reviewers: benhamilton

Reviewed By: benhamilton

Subscribers: aaron.ballman, cfe-commits

Tags: #clang

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

llvm-svn: 366267

5 years ago[NFC][ScopBuilder] Move addUserContext to ScopBuilder
Dominik Adamski [Tue, 16 Jul 2019 21:29:06 +0000 (21:29 +0000)]
[NFC][ScopBuilder] Move addUserContext to ScopBuilder

Scope of changes:
1) Moved addUserContext to ScopBuilder.
2) Moved command line option UserContextStr to ScopBuilder.

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

llvm-svn: 366266

5 years ago[clang-tidy] initial version of readability-convert-member-functions-to-static
Matthias Gehre [Tue, 16 Jul 2019 21:19:00 +0000 (21:19 +0000)]
[clang-tidy] initial version of readability-convert-member-functions-to-static

Summary:
Finds non-static member functions that can be made ``static``.

I have run this check (repeatedly) over llvm-project. It made 1708 member functions
``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address
was taken and stored in a variable of pointer-to-member type (e.g. passed to
llvm::StringSwitch).
It also made 243 member functions ``const``. (This is currently very conservative
to have no false-positives and can hopefully be extended in the future.)

You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval

Reviewers: alexfh, aaron.ballman

Subscribers: mgorny, xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 366265

5 years agoDWARF: Skip zero column for inline call sites
David Blaikie [Tue, 16 Jul 2019 21:15:19 +0000 (21:15 +0000)]
DWARF: Skip zero column for inline call sites

D64033 <https://reviews.llvm.org/D64033> added DW_AT_call_column for
inline sites. However, that change wasn't aware of "-gno-column-info".
To avoid adding column info when "-gno-column-info" is used, now
DW_AT_call_column is only added when we have non-zero column (when
"-gno-column-info" is used, column will be zero).

Patch by Wenlei He!

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

llvm-svn: 366264

5 years ago[libcxx] Rejigger test for destroying delete feature-test macros
Louis Dionne [Tue, 16 Jul 2019 21:13:40 +0000 (21:13 +0000)]
[libcxx] Rejigger test for destroying delete feature-test macros

In r361572, we introduced library support for C++20 destroying delete
and decided to only define the library feature-test macro when the
compiler supports the underlying language feature. This patch reworks
the tests to mirror that.

llvm-svn: 366263

5 years ago[NFC][ScopBuilder] Move buildAliasChecks and its implementing methods to ScopBuilder
Dominik Adamski [Tue, 16 Jul 2019 21:10:45 +0000 (21:10 +0000)]
[NFC][ScopBuilder] Move buildAliasChecks and its implementing methods to ScopBuilder

Scope of changes:
1) Moved buildAliasChecks to ScopBuilder.
2) Moved buildAliasGroup to ScopBuilder.
3) Moved buildAliasGroups to ScopBuilder.
4) Moved buildAliasGroupsForAccesses to ScopBuilder.
5) Moved splitAliasGroupsByDomain to ScopBuilder.
6) Moved addNonEmptyDomainConstraints to ScopBuilder.
7) Moved buildMinMaxAccess to ScopBuilder.
8) Moved calculateMinMaxAccess to ScopBuilder.
9) Moved getAccessDomain to ScopBuilder.
10) Moved command line options used only by buildAliasChecks functions to ScopBuilder.
11) Refactored buildAliasGroup function. Added addAliasGroup function to Scop class for pushing back calculated min/max accesses.
12) Added function incrementNumberOfAliasingAssumptions which increments number of statistic variable AssumptionsAliasing. AssumptionsAliasing variable is defined by STATISTIC macro inside ScopInfo.cpp and it is also used by function trackAssumption from Scop class.
13) Added reference to OptimizationRemarkEmitter to ScopBuilder class.
14) Moved calculateMinMaxAccess function to ScopBuilder class.

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

llvm-svn: 366262

5 years ago[Symbol] Remove unused fields from ClangASTContext
Alex Langford [Tue, 16 Jul 2019 21:05:08 +0000 (21:05 +0000)]
[Symbol] Remove unused fields from ClangASTContext

llvm-svn: 366261

5 years ago[NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilder
Dominik Adamski [Tue, 16 Jul 2019 20:51:04 +0000 (20:51 +0000)]
[NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilder

Scope of changes:
1) Moved addRecordedAssumptions to ScopBuilder.
2) Moved Assumption struct outside Scop class.
3) Refactored addRecordedAssumptions function. Replaced while loop by
for range loop.
4) Added function to clear processed Assumptions.

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

llvm-svn: 366260

5 years ago[libc++] Add missing UNSUPPORTED for CTAD tests
Louis Dionne [Tue, 16 Jul 2019 20:41:33 +0000 (20:41 +0000)]
[libc++] Add missing UNSUPPORTED for CTAD tests

The tests for unordered_set and unordered_multiset were missing UNSUPPORTED
markup for Apple Clang 9.1, which is still being used on some CI bots.

llvm-svn: 366259

5 years ago[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6
Julian Lettner [Tue, 16 Jul 2019 20:41:04 +0000 (20:41 +0000)]
[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6

Cleanup ARM64 assembly after removing unnecessary computation of mangled
stack pointer in previous commit.

llvm-svn: 366258

5 years agoAMDGPU/GlobalISel: Select G_ASHR
Matt Arsenault [Tue, 16 Jul 2019 20:31:25 +0000 (20:31 +0000)]
AMDGPU/GlobalISel: Select G_ASHR

llvm-svn: 366257

5 years agoAMDGPU/GlobalISel: Select G_LSHR
Matt Arsenault [Tue, 16 Jul 2019 20:25:43 +0000 (20:25 +0000)]
AMDGPU/GlobalISel: Select G_LSHR

llvm-svn: 366256

5 years ago[PowerPC][HTM] Fix impossible reg-to-reg copy assert with ttest builtin
Jinsong Ji [Tue, 16 Jul 2019 20:24:33 +0000 (20:24 +0000)]
[PowerPC][HTM] Fix impossible reg-to-reg copy assert with ttest builtin

Summary:
This is exposed by our internal testing.
The reduced testcase will assert with "Impossible reg-to-reg copy"

We can't use COPY to do 32-bit to 64-bit conversion.

Reviewers: kbarton, hfinkel, nemanjai

Reviewed By: hfinkel

Subscribers: hiraditya, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 366255

5 years agoAMDGPU/GlobalISel: Select G_SHL
Matt Arsenault [Tue, 16 Jul 2019 20:15:30 +0000 (20:15 +0000)]
AMDGPU/GlobalISel: Select G_SHL

I think this manages to not break the DAG handling with the divergent
predicates because the stadalone divergent patterns end up with a
higher priority than the pattern on the instruction definition.

The 16-bit versions don't work yet.

llvm-svn: 366254

5 years ago[GWP-ASan] Add thread ID to PRNG seed.
Mitch Phillips [Tue, 16 Jul 2019 20:06:17 +0000 (20:06 +0000)]
[GWP-ASan] Add thread ID to PRNG seed.

Summary:
Adds thread ID to PRNG seed for increased entropy. In particular, this allows
multiple runs in quick succession that will have different PRNG seeds, allowing
for better demos/testing.

Reviewers: kcc

Reviewed By: kcc

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 366253

5 years ago[AMDGPU] Change register type for v32 vectors
Stanislav Mekhanoshin [Tue, 16 Jul 2019 20:06:00 +0000 (20:06 +0000)]
[AMDGPU] Change register type for v32 vectors

When it is AReg_1024 this results in unnecessary copying into
AGPRs of a 32 element vectors even though they are not intended
for an mfma instruction.

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

llvm-svn: 366252

5 years agoFix -Wreturn-type warning. NFC.
Michael Liao [Tue, 16 Jul 2019 19:59:08 +0000 (19:59 +0000)]
Fix -Wreturn-type warning. NFC.

llvm-svn: 366251

5 years agoAMDGPU: Fix some missing GCCBuiltin declarations
Matt Arsenault [Tue, 16 Jul 2019 19:44:14 +0000 (19:44 +0000)]
AMDGPU: Fix some missing GCCBuiltin declarations

llvm-svn: 366250

5 years agoAMDGPU/GlobalISel: Fix selection of private stores
Matt Arsenault [Tue, 16 Jul 2019 19:27:44 +0000 (19:27 +0000)]
AMDGPU/GlobalISel: Fix selection of private stores

llvm-svn: 366249

5 years agoAMDGPU/GlobalISel: Select private loads
Matt Arsenault [Tue, 16 Jul 2019 19:22:21 +0000 (19:22 +0000)]
AMDGPU/GlobalISel: Select private loads

llvm-svn: 366248

5 years agoFix LLDB Windows build Python version logic after r366243
Reid Kleckner [Tue, 16 Jul 2019 18:46:51 +0000 (18:46 +0000)]
Fix LLDB Windows build Python version logic after r366243

llvm-svn: 366247

5 years agoAMDGPU/GlobalISel: Select flat stores
Matt Arsenault [Tue, 16 Jul 2019 18:42:53 +0000 (18:42 +0000)]
AMDGPU/GlobalISel: Select flat stores

llvm-svn: 366246

5 years agoMark new test as requiring an x86 backend for LTO native object generation
Reid Kleckner [Tue, 16 Jul 2019 18:34:46 +0000 (18:34 +0000)]
Mark new test as requiring an x86 backend for LTO native object generation

llvm-svn: 366245

5 years agoFix linkrepro.test after safeseh:no change
Reid Kleckner [Tue, 16 Jul 2019 18:33:13 +0000 (18:33 +0000)]
Fix linkrepro.test after safeseh:no change

Add the @feat.00 flag to the input.

llvm-svn: 366244

5 years ago[CMake] Fail when Python interpreter doesn't match Python libraries version
Jonas Devlieghere [Tue, 16 Jul 2019 18:27:12 +0000 (18:27 +0000)]
[CMake] Fail when Python interpreter doesn't match Python libraries version

Because of how CMake finds the Python libraries and interpreter, it's
possible to end up with a discrepancy between the two. For example,
you'd end up using a Python 3 interpreter to run the test suite while
LLDB was built and linked against Python 2.

This patch adds a fatal error to CMake so we find out at configuration
time, instead of finding out at test time.

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

llvm-svn: 366243

5 years agoAMDGPU: Add register classes to flat store patterns
Matt Arsenault [Tue, 16 Jul 2019 18:26:42 +0000 (18:26 +0000)]
AMDGPU: Add register classes to flat store patterns

For some reason GlobalISelEmitter needs register classes to import
these, although it works for the load patterns.

llvm-svn: 366242

5 years ago[IndVars] Speculative fix for an assertion failure seen in bots
Philip Reames [Tue, 16 Jul 2019 18:23:49 +0000 (18:23 +0000)]
[IndVars] Speculative fix for an assertion failure seen in bots

I don't have an IR sample which is actually failing, but the issue described in the comment is theoretically possible, and should be guarded against even if there's a different root cause for the bot failures.

llvm-svn: 366241

5 years agoAMDGPU: Replace store PatFrags
Matt Arsenault [Tue, 16 Jul 2019 18:21:25 +0000 (18:21 +0000)]
AMDGPU: Replace store PatFrags

Convert the easy cases to formats understood for GlobalISel.

llvm-svn: 366240

5 years ago[COFF] Implement /safeseh:no and check @feat.00 flags by default
Reid Kleckner [Tue, 16 Jul 2019 18:17:33 +0000 (18:17 +0000)]
[COFF] Implement /safeseh:no and check @feat.00 flags by default

Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.

Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.

Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.

Reviewers: mstorsjo, ruiu, thakis

Reviewed By: ruiu, thakis

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 366238

5 years agoAMDGPU/GlobalISel: Select flat loads
Matt Arsenault [Tue, 16 Jul 2019 18:05:29 +0000 (18:05 +0000)]
AMDGPU/GlobalISel: Select flat loads

Now that the patterns use the new PatFrag address space support, the
only blocker to importing most load patterns is the addressing mode
complex patterns.

llvm-svn: 366237

5 years agoTeach `llvm-pdbutil pretty -native` about `-injected-sources`
Nico Weber [Tue, 16 Jul 2019 18:04:26 +0000 (18:04 +0000)]
Teach `llvm-pdbutil pretty -native` about `-injected-sources`

`pretty -native -injected-sources -injected-source-content` works with
this patch, and produces identical output to the dia version.

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

llvm-svn: 366236

5 years ago[AMDGPU] Optimize atomic max/min
Jay Foad [Tue, 16 Jul 2019 17:44:54 +0000 (17:44 +0000)]
[AMDGPU] Optimize atomic max/min

Summary:
Extend the atomic optimizer to handle signed and unsigned max and min
operations, as well as add and subtract.

Reviewers: arsenm, sheredom, critson, rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 366235