platform/upstream/llvm.git
4 years agoAMDGPU/GlobalISel: Fix not using global atomics on gfx9+
Matt Arsenault [Fri, 24 Jan 2020 16:26:34 +0000 (11:26 -0500)]
AMDGPU/GlobalISel: Fix not using global atomics on gfx9+

For some reason the flat/global atomics end up in the generated
matcher table in a different order from SelectionDAG. Use
AddedComplexity to prefer checking for global atomics first.

4 years ago[LoopUnroll] Remove remapInstruction().
Whitney Tsang [Thu, 23 Jan 2020 20:11:28 +0000 (20:11 +0000)]
[LoopUnroll] Remove remapInstruction().

Summary:
LoopUnroll can reuse the RemapInstruction() in ValueMapper, or
remapInstructionsInBlocks() in CloneFunction, depending on the needs.
There is no need to have its own version in LoopUnroll.

By calling RemapInstruction() without TypeMapper or Materializer and
with Flags (RF_NoModuleLevelChanges | RF_IgnoreMissingLocals), it does
the same as remapInstruction(). remapInstructionsInBlocks() calls
RemapInstruction() exactly as described.

Looking at the history, I cannot find any obvious reason to have its own
version.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto,
foad, aprantl
Reviewed By: jdoerfert
Subscribers: hiraditya, zzheng, llvm-commits, prithayan, anhtuyen
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D73277

4 years ago[test][llvm-dwarfdump] Add extra test case for invalid MD5 form
James Henderson [Fri, 3 Jan 2020 14:35:54 +0000 (14:35 +0000)]
[test][llvm-dwarfdump] Add extra test case for invalid MD5 form

A subsequent patch will change how an invalid file name table is handled
to allow parsing to continue. This patch adds a test case that will
demonstrate a difference in behaviour with that change between invalid
file tables where the error is before the end of the stated prologue
length and where the error occurs after the stated length.

Reviewed by: dblaikie

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

4 years ago[DebugInfo] Make incorrect debug line extended opcode length non-fatal
James Henderson [Fri, 3 Jan 2020 13:59:46 +0000 (13:59 +0000)]
[DebugInfo] Make incorrect debug line extended opcode length non-fatal

It is possible to try to keep parsing a debug line program even when the
length of an extended opcode does not match what is expected for that
opcode. This patch changes what was previously a fatal error to be
non-fatal. The parser now continues by assuming the the claimed length
is correct, even if it means moving the offset backwards.

Reviewed by: dblaikie

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

4 years agoAMDPGPU/GlobalISel: Select more MUBUF global addressing modes
Matt Arsenault [Sat, 18 Jan 2020 02:28:58 +0000 (21:28 -0500)]
AMDPGPU/GlobalISel: Select more MUBUF global addressing modes

The handling of the high bits of the resource descriptor seem weird to
me, where the 3rd dword changes based on the instruction.

4 years agoclang-format: [JS] options for arrow functions.
Martin Probst [Fri, 24 Jan 2020 10:30:31 +0000 (11:30 +0100)]
clang-format: [JS] options for arrow functions.

Summary:
clang-format currently always wraps the body of non-empty arrow
functions:

    const x = () => {
      z();
    };

This change implements support for the `AllowShortLambdasOnASingleLine`
style options, controlling the indent style for arrow function bodies
that have one or fewer statements. SLS_All puts all on a single line,
SLS_Inline only arrow functions used in an inline position.

    const x = () => { z(); };

Multi-statement arrow functions continue to be wrapped. Function
expressions (`a = function() {}`) and function/method declarations are
unaffected as well.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[mlir] Harden error propagation in LLVM import
Alex Zinenko [Thu, 16 Jan 2020 13:32:33 +0000 (14:32 +0100)]
[mlir] Harden error propagation in LLVM import

Summary:
LLVM importer to MLIR was implemented mostly as a prototype. As such, it did
not deal handle errors in a consistent way, reporting them out stderr in some
cases and continuing the execution in the error state until eventually
crashing. This is not desirable for a user-facing tool. Make sure errors are
returned from functions, consistently checked at call sites and propagated
further. Functions returning nullable IR values return nullptr to denote the
error state. Other functions return LogicalResult. LLVM importer in
mlir-translate should no longer crash on unsupported inputs.

The errors are reported without association with the source file (and therefore
cannot be checked using -verify-diagnostics). Attaching them to the actual
input file is left for future work.

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

4 years ago[mlir] LLVM import: handle constant data and array/vector aggregates
Alex Zinenko [Thu, 16 Jan 2020 12:24:42 +0000 (13:24 +0100)]
[mlir] LLVM import: handle constant data and array/vector aggregates

Summary:
Implement the handling of llvm::ConstantDataSequential and
llvm::ConstantAggregate for (nested) array and vector types when imporitng LLVM
IR to MLIR. In all cases, the result is a DenseElementsAttr that can be used in
either a `llvm.mlir.global` or a `llvm.mlir.constant`. Nested aggregates are
unpacked recursively until an element or a constant data is found. Nested
arrays with innermost scalar type are represented as DenseElementsAttr of
tensor type. Nested arrays with innermost vector type are represented as
DenseElementsAttr with (multidimensional) vector type.

Constant aggregates of struct type are not yet supported as the LLVM dialect
does not have a well-defined way of modeling struct-type constants.

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

4 years agoAMDGPU/GlobalISel: Initial selection of MUBUF addr64 load/store
Matt Arsenault [Wed, 22 Jan 2020 21:56:48 +0000 (16:56 -0500)]
AMDGPU/GlobalISel: Initial selection of MUBUF addr64 load/store

Fixes the main reason for compile failures on SI, but doesn't really
try to use the addressing modes yet.

4 years ago[X86][AVX] Add test case from PR11210
Simon Pilgrim [Mon, 27 Jan 2020 15:05:08 +0000 (15:05 +0000)]
[X86][AVX] Add test case from PR11210

Shows failure to remove sign bit comparison when the result has multiple uses

4 years agoAdd a warning, flags and pragmas to limit the number of pre-processor tokens in a...
Hans Wennborg [Wed, 9 Oct 2019 13:22:38 +0000 (15:22 +0200)]
Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit

See
https://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview
for background discussion.

This adds a warning, flags and pragmas to limit the number of
pre-processor tokens either at a certain point in a translation unit, or
overall.

The idea is that this would allow projects to limit the size of certain
widely included headers, or for translation units overall, as a way to
insert backstops for header bloat and prevent compile-time regressions.

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

4 years agoUse pointer type size for offset constant when lowering load/stores
Dominik Montada [Mon, 27 Jan 2020 14:35:59 +0000 (09:35 -0500)]
Use pointer type size for offset constant when lowering load/stores

4 years agoAMDGPU: Allow i16 shader arguments
Matt Arsenault [Sun, 26 Jan 2020 23:24:24 +0000 (18:24 -0500)]
AMDGPU: Allow i16 shader arguments

Not allowing this just creates unnecessary complications when writing
simple tests.

4 years ago[AMDGPU] Handle multiple base operands in areMemAccessesTriviallyDisjoint
Jay Foad [Thu, 19 Dec 2019 10:54:34 +0000 (10:54 +0000)]
[AMDGPU] Handle multiple base operands in areMemAccessesTriviallyDisjoint

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Depends on D73455.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Handle multiple base operands in shouldClusterMemOps
Jay Foad [Wed, 18 Dec 2019 16:59:25 +0000 (16:59 +0000)]
[AMDGPU] Handle multiple base operands in shouldClusterMemOps

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Depends on D73454.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Handle frame index base operands in memOpsHaveSameBasePtr
Jay Foad [Mon, 6 Jan 2020 13:37:29 +0000 (13:37 +0000)]
[AMDGPU] Handle frame index base operands in memOpsHaveSameBasePtr

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions.
vpykhtin [Mon, 27 Jan 2020 14:25:25 +0000 (17:25 +0300)]
[AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions.

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

4 years ago[WPD] Emit vcall_visibility metadata for MicrosoftCXXABI
Teresa Johnson [Sat, 25 Jan 2020 15:26:09 +0000 (07:26 -0800)]
[WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

Summary:
The MicrosoftCXXABI uses a separate mechanism for emitting vtable
type metadata, and thus didn't pick up the change from D71907
to emit the vcall_visibility metadata under -fwhole-program-vtables.

I believe this is the cause of a Windows bot failure when I committed
follow on change D71913 that required a revert. The failure occurred
in a CFI test that was expecting to not abort because it expected a
devirtualization to occur, and without the necessary vcall_visibility
metadata we would not get devirtualization.

Note in the equivalent code in CodeGenModule::EmitVTableTypeMetadata
(used by the ItaniumCXXABI), we also emit the vcall_visibility metadata
when Virtual Function Elimination is enabled. Since I am not as familiar
with the details of that optimization, I have marked that as a TODO and
am only inserting under -fwhole-program-vtables.

Reviewers: evgeny777

Subscribers: Prazek, ostannard, cfe-commits

Tags: #clang

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

4 years agoGlobalISel: Reimplement widenScalar for G_UNMERGE_VALUES results
Matt Arsenault [Tue, 21 Jan 2020 14:02:42 +0000 (09:02 -0500)]
GlobalISel: Reimplement widenScalar for G_UNMERGE_VALUES results

Only use shifts if the requested type exactly matches the source type,
and create sub-unmerges otherwise.

4 years ago[MVE] Fixup order of gather writeback intrinsic outputs
David Green [Mon, 27 Jan 2020 13:59:29 +0000 (13:59 +0000)]
[MVE] Fixup order of gather writeback intrinsic outputs

The MVE_VLDRWU32_qi_pre gather loads, like the other _pre/_post mve
loads returns the writeback as result 0, the value as result 1. The llvm
ir intrinsic seems to have this the other way around though, and so when
lowering from one to the other we need to switch the first two outputs.

I've also fixed up the types of _pre/_post on normal MVE loads. There we
were already getting the values the right way around, just not for the
types. I don't believe this was causing anything to go wrong, but it was
very confusing to read in the debug output.

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

4 years agoGlobalISel: Translate vector GEPs
Matt Arsenault [Sat, 25 Jan 2020 03:57:49 +0000 (22:57 -0500)]
GlobalISel: Translate vector GEPs

4 years agoRe-land [Support] Extend TimeProfiler to support multiple threads
Russell Gallop [Fri, 3 Jan 2020 16:04:19 +0000 (16:04 +0000)]
Re-land [Support] Extend TimeProfiler to support multiple threads

This makes TimeTraceProfilerInstance thread local. Added
timeTraceProfilerFinishThread() which moves the thread local instance to
a global vector of instances. timeTraceProfilerWrite() then writes
recorded data from all instances.

Threads are identified based on their thread ids. Totals are reported
with artificial thread ids higher than the real ones.

This fixes the previous version to work with __thread as well as
thread_local.

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

4 years ago[LLDB] Fix build failures after removing Version from DWARFExpression.
Igor Kudrin [Mon, 27 Jan 2020 12:33:34 +0000 (19:33 +0700)]
[LLDB] Fix build failures after removing Version from DWARFExpression.

4 years ago[DWARF] Do not pass Version to DWARFExpression. NFCI.
Igor Kudrin [Thu, 23 Jan 2020 02:24:00 +0000 (09:24 +0700)]
[DWARF] Do not pass Version to DWARFExpression. NFCI.

The Version was used only to determine the size of an operand of
DW_OP_call_ref. The size was 4 for all versions apart from 2, but
the DW_OP_call_ref operation was introduced only in DWARF3. Thus,
the code may be simplified and using of Version may be eliminated.

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

4 years ago[DWARF] Simplify DWARFExpression. NFC.
Igor Kudrin [Thu, 23 Jan 2020 11:13:30 +0000 (18:13 +0700)]
[DWARF] Simplify DWARFExpression. NFC.

As DataExtractor already has a method to extract an unsigned value of
a specified size, there is no need to duplicate that.

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

4 years ago[clang-format] Handle escaped " in C# string-literals
Krasimir Georgiev [Mon, 27 Jan 2020 11:37:15 +0000 (12:37 +0100)]
[clang-format] Handle escaped " in C# string-literals

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: klimek, MyDeveloperDay

Tags: #clang-format

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

4 years agoImprovements to call site register worklist
David Stenberg [Mon, 27 Jan 2020 10:36:03 +0000 (11:36 +0100)]
Improvements to call site register worklist

Summary:
This fixes PR44118. For cases where we have a chain like this:

  R8 = R1 (entry value)
  R0 = R8
  call @foo R0

the code that emits call site entries using entry values would not
follow that chain, instead emitting a call site entry with R8 as
location rather than R0. Such a case was discovered when originally
adding dbgcall-site-orr-moves.mir. This patch fixes that issue. This is
done by changing the ForwardedRegWorklist set to a map in which the
worklist registers always map to the parameter registers that they
describe.

Another thing this patch fixes is that worklist registers now can
describe more than one parameter register at a time. Such a case
occurred in dbgcall-site-interpretation.mir, resulting in a call site
entry not being emitted for one of the parameters.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

4 years ago[ASTMatchers] Fix parent traversal with InitListExpr
Stephen Kelly [Mon, 27 Jan 2020 11:16:50 +0000 (11:16 +0000)]
[ASTMatchers] Fix parent traversal with InitListExpr

Children of InitListExpr are traversed twice by RAV, so this code
populates a vector to represent the possibly-multiple parents (in
reality in this situation the parent is the same and is therefore
de-duplicated).

4 years ago[ARM][MVE] Tail-predication: support constant trip count
Sjoerd Meijer [Mon, 27 Jan 2020 11:05:26 +0000 (11:05 +0000)]
[ARM][MVE] Tail-predication: support constant trip count

We had support for runtime trip count values, but not constants, and this adds
supports for that.

And added a minor optimisation while I was add it: don't invoke Cleanup when
there's nothing to clean up.

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

4 years ago[ARM][LowOverheadLoops] Dont ignore VCTP
Sam Parker [Mon, 27 Jan 2020 10:58:46 +0000 (10:58 +0000)]
[ARM][LowOverheadLoops] Dont ignore VCTP

When expanding the LoopStart, we try to remove the iteration count
calculation. However, if part of the calculation was also used to
calculate the number of elements we could end up deleting
instructions that were required to feed DLSTP/WLSTP.

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

4 years agoDon't separate imp/expl def handling for call site params
David Stenberg [Mon, 27 Jan 2020 10:15:55 +0000 (11:15 +0100)]
Don't separate imp/expl def handling for call site params

Summary:
Since D70431 the describeLoadedValue() hook takes a parameter register,
meaning that it can now be asked to describe any register. This means
that we can drop the difference between explicit and implicit defines
that we previously had in collectCallSiteParameters().

I have not found any case for any upstream targets where a parameter
register is only implicitly defined, and does not overlap with any
explicit defines. I don't know if such a case would even make sense. So
as far as I have tested, this patch should be a non-functional change.
However, this reduces the complexity of the code a bit, and it will
simplify the implementation of an upcoming patch which solves PR44118.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: djtodoro, vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

4 years ago[llvm-readobj] - Refine --needed-libs implementation and add a test.
Georgii Rymar [Wed, 22 Jan 2020 12:20:36 +0000 (15:20 +0300)]
[llvm-readobj] - Refine --needed-libs implementation and add a test.

We have no good test for --needed-libs option.
The one we have as a part of Object/readobj-shared-object.test
is not complete.

In this patch I've did a minor NFC changes to the implementation and
added a test. This allowed to remove this piece from
Object/readobj-shared-object.test

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

4 years ago[Alignment][NFC] Use Align with CreateAlignedLoad
Guillaume Chatelet [Mon, 27 Jan 2020 09:37:01 +0000 (10:37 +0100)]
[Alignment][NFC] Use Align with CreateAlignedLoad

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, bollu

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[lldb][NFC] Give import-std-module tests a more unique file names
Raphael Isemann [Mon, 27 Jan 2020 09:55:54 +0000 (10:55 +0100)]
[lldb][NFC] Give import-std-module tests a more unique file names

We want that the *.py names for the tests have unique names but
the current ones are sometimes very simple (e.g., "TestUniquePtr.py")
and could collide with unrelated tests. This just gives all these
tests a "FromStdModule" suffix to make these collisions less likely.

4 years ago[lldb][NFC] Improve documentation for CompletionRequest
Raphael Isemann [Mon, 27 Jan 2020 09:48:22 +0000 (10:48 +0100)]
[lldb][NFC] Improve documentation for CompletionRequest

4 years ago[llvm-readobj] - Add a test for --dyn-symbols when there are no dynamic symbols.
Georgii Rymar [Wed, 22 Jan 2020 11:08:42 +0000 (14:08 +0300)]
[llvm-readobj] - Add a test for --dyn-symbols when there are no dynamic symbols.

It removes the Object/readobj-absent.test test and creates a one more case in
dyn-symbols.test we have.

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

4 years ago[llvm-readobj] - Add a test for --hash-table option.
Georgii Rymar [Tue, 21 Jan 2020 14:49:42 +0000 (17:49 +0300)]
[llvm-readobj] - Add a test for --hash-table option.

We had no test for --hash-table in tools/llvm-readobj.

The one we had was in test/Object and checked that
it is possible to dump the hash table even when an object
doesn't have a section header table.

In this patch I created a test, moved and merged the existent one.
During moving I converted it to be YAML based to stop using the
precompiled binary.

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

4 years ago[Alignment][NFC] Use Align with CreateMaskedScatter/Gather
Guillaume Chatelet [Fri, 24 Jan 2020 16:40:17 +0000 (17:40 +0100)]
[Alignment][NFC] Use Align with CreateMaskedScatter/Gather

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

This patch shows that CreateMaskedScatter/CreateMaskedGather can only take positive non zero alignment values.

Reviewers: courbet

Subscribers: hiraditya, llvm-commits, delena

Tags: #llvm

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

4 years agoFix missing dependency in LibcUnitTest
Guillaume Chatelet [Fri, 24 Jan 2020 10:37:18 +0000 (11:37 +0100)]
Fix missing dependency in LibcUnitTest

Summary: LibcUnitTest is missing a dependency on LLVMSupport. This prevents building with shared libraries.

Reviewers: sivachandra

Subscribers: mgorny, MaskRay, libc-commits

Tags: #libc-project

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

4 years ago[clan-tidy] Fix false positive in bugprone-infinite-loop
Adam Balogh [Thu, 23 Jan 2020 14:13:30 +0000 (15:13 +0100)]
[clan-tidy] Fix false positive in bugprone-infinite-loop

The checker bugprone-infinite-loop does not track changes of
variables in the initialization expression of a variable
declared inside the condition of the while statement. This
leads to false positives, similarly to the one in the bug
report https://bugs.llvm.org/show_bug.cgi?id=44618. This
patch fixes this issue by enabling tracking of the variables
of this expression as well.

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

4 years ago[MIPS GlobalISel] Select population count (popcount)
Petar Avramovic [Mon, 27 Jan 2020 08:59:50 +0000 (09:59 +0100)]
[MIPS GlobalISel] Select population count (popcount)

G_CTPOP is generated from llvm.ctpop.<type> intrinsics, clang generates
these intrinsics from __builtin_popcount and __builtin_popcountll.
Add lower and narrow scalar for G_CTPOP.
Lower G_CTPOP for MIPS32.

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

4 years ago[MIPS GlobalISel] Select count trailing zeros
Petar Avramovic [Mon, 27 Jan 2020 08:51:06 +0000 (09:51 +0100)]
[MIPS GlobalISel] Select count trailing zeros

llvm.cttz.<type> intrinsic has additional i1 argument is_zero_undef,
it tells whether zero as the first argument produces a defined result.
G_CTTZ is generated from llvm.cttz.<type> (<type> <src>, i1 false)
intrinsics, clang generates these intrinsics from __builtin_ctz and
__builtin_ctzll.
G_CTTZ_ZERO_UNDEF comes from llvm.cttz.<type> (<type> <src>, i1 true).
Clang generates such intrinsics as parts of expansion of builtin_ffs
and builtin_ffsll. It is also traditionally part of and many
algorithms that are now predicated on avoiding zero-value inputs.

Add narrow scalar (algorithm uses G_CTTZ_ZERO_UNDEF) for G_CTTZ.
Lower G_CTTZ and G_CTTZ_ZERO_UNDEF for MIPS32.

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

4 years ago[MIPS GlobalISel] Select count leading zeros
Petar Avramovic [Mon, 27 Jan 2020 08:43:38 +0000 (09:43 +0100)]
[MIPS GlobalISel] Select count leading zeros

llvm.ctlz.<type> intrinsic has additional i1 argument is_zero_undef,
it tells whether zero as the first argument produces a defined result.
MIPS clz instruction returns 32 for zero input.
G_CTLZ is generated from llvm.ctlz.<type> (<type> <src>, i1 false)
intrinsics, clang generates these intrinsics from __builtin_clz and
__builtin_clzll.
G_CTLZ_ZERO_UNDEF can also be generated from llvm.ctlz with true as
second argument. It is also traditionally part of and many algorithms
that are now predicated on avoiding zero-value inputs.

Add narrow scalar for G_CTLZ (algorithm uses G_CTLZ_ZERO_UNDEF).
Lower G_CTLZ_ZERO_UNDEF and select G_CTLZ for MIPS32.

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

4 years ago[MachineVerifier] Simplify and delete LLVM_VERIFY_MACHINEINSTRS from a comment. NFC
Fangrui Song [Sun, 26 Jan 2020 23:47:32 +0000 (15:47 -0800)]
[MachineVerifier] Simplify and delete LLVM_VERIFY_MACHINEINSTRS from a comment. NFC

The environment variable has been unused since r228079.

4 years ago[libunwind] Treat assembly files as C on mingw
Martin Storsjö [Sun, 26 Jan 2020 20:14:41 +0000 (22:14 +0200)]
[libunwind] Treat assembly files as C on mingw

When targeting mingw, current CMake (3.16) fails to get the right
flags for assembly source files for windows gnu/clang targets
(see https://gitlab.kitware.com/cmake/cmake/merge_requests/4287
for a fix), causing builds to fail due to `-fPIC` being unsupported
in clang for mingw targets

In the meantime, restore the behaviour from before c48974ffd7d1676
selectively on mingw targets, treating the assembly files as C.

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

4 years ago[NFC] Fix typo in Clang docs
Qiu Chaofan [Mon, 27 Jan 2020 03:37:43 +0000 (11:37 +0800)]
[NFC] Fix typo in Clang docs

4 years ago[FPEnv] Divide macro INSTRUCTION into INSTRUCTION and DAG_INSTRUCTION,
Wang, Pengfei [Fri, 17 Jan 2020 02:32:30 +0000 (10:32 +0800)]
[FPEnv] Divide macro INSTRUCTION into INSTRUCTION and DAG_INSTRUCTION,
and macro FUNCTION likewise. NFCI.

Some functions like fmuladd don't really have a node, we should divide
the declaration form those have node to avoid introducing fake nodes.

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

4 years ago[Concepts] Fix incorrect TemplateArgs for introduction of local parameters
Saar Raz [Sun, 26 Jan 2020 22:57:31 +0000 (00:57 +0200)]
[Concepts] Fix incorrect TemplateArgs for introduction of local parameters

The wrong set of TemplateArgs was being provided to addInstantiatedParametersToScope.
Caused bug #44658.

4 years ago[mlir] Expose getNearestSymbolTable as SymbolTable class method
Lei Zhang [Sun, 26 Jan 2020 15:55:17 +0000 (10:55 -0500)]
[mlir] Expose getNearestSymbolTable as SymbolTable class method

This is a generally useful utility function for interacting with
symbol tables.

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

4 years ago[Concepts] Add missing null check to transformConstructor
Saar Raz [Sun, 26 Jan 2020 22:14:43 +0000 (00:14 +0200)]
[Concepts] Add missing null check to transformConstructor

Caused bug 44671 when transforming a constructor with a type-constraint with no explicit template args.

4 years ago[libunwind] Fix building standalone after c48974ffd7d1676
Martin Storsjö [Sun, 26 Jan 2020 20:11:28 +0000 (22:11 +0200)]
[libunwind] Fix building standalone after c48974ffd7d1676

After this change, we need to explicitly list the languages the
project uses, otherwise the assembly source files won't get built
at all.

Previously (before that commit), the assembly source files were
simply treated as C.

The toplevel llvm CMakeLists.txt adds these three languages, so
when building libunwind integrated as part of that, it works fine.

4 years ago[X86][BdVer2] Polish LEA instruction scheduling info
Roman Lebedev [Sun, 26 Jan 2020 17:33:29 +0000 (20:33 +0300)]
[X86][BdVer2] Polish LEA instruction scheduling info

Based on exhaustive llvm-exegesis measurements.
There may still be some imperfections for LEA16r/LEA32r.

Much like was observed in D68646, i'm also measuring some outliers
with some specific registers.

4 years ago[NFC][MCA] Re-autogenerate all check lines in all X86 MCA tests
Roman Lebedev [Sun, 26 Jan 2020 19:01:33 +0000 (22:01 +0300)]
[NFC][MCA] Re-autogenerate all check lines in all X86 MCA tests

Some whitespace issues have crept in,
and some znver2 check lines were missing..

4 years ago[InstCombine] Add extra shift(c1,add(c2,y)) tests for PR15141
Simon Pilgrim [Sun, 26 Jan 2020 17:27:53 +0000 (17:27 +0000)]
[InstCombine] Add extra shift(c1,add(c2,y)) tests for PR15141

4 years ago[X86][AVX] Extend combineCommutableSHUFP to handle v8f32 and v16f32 commutable shufps...
Simon Pilgrim [Sun, 26 Jan 2020 14:59:53 +0000 (14:59 +0000)]
[X86][AVX] Extend combineCommutableSHUFP to handle v8f32 and v16f32 commutable shufps patterns

4 years ago[Concepts] Fix parsing of scope specifier in compound-requirements, add more tests...
Saar Raz [Sun, 26 Jan 2020 18:39:44 +0000 (20:39 +0200)]
[Concepts] Fix parsing of scope specifier in compound-requirements, add more tests for scope specifiers in type-constraints

The code for parsing of type-constraints in compound-requirements was not adapted for the new TryAnnotateTypeConstraint which
caused compound-requirements with scope specifiers to ignore them.

Also add regression tests for scope specifiers in type-constraints in more contexts.

4 years agoNFC: Implement AST node skipping in ParentMapContext
Stephen Kelly [Fri, 24 Jan 2020 23:46:54 +0000 (23:46 +0000)]
NFC: Implement AST node skipping in ParentMapContext

Summary:
This allows ASTContext to store only one parent map, rather than storing
an entire parent map for each traversal mode used.

This is therefore a partial revert of commit 0a717d5b (Make it possible
control matcher traversal kind with ASTContext, 2019-12-06).

Reviewers: aaron.ballman, rsmith, rnk

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[IR] masked gather/scatter alignment should be set
Guillaume Chatelet [Wed, 22 Jan 2020 13:27:05 +0000 (14:27 +0100)]
[IR] masked gather/scatter alignment should be set

Summary: masked_load and masked_store instructions require the alignment to be specified and a power of two. It seems to me that this requirement applies to masked_gather and masked_scatter as well.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[mlir][spirv] Create builtin variable in nearest symbol table
Lei Zhang [Sat, 25 Jan 2020 15:09:46 +0000 (10:09 -0500)]
[mlir][spirv] Create builtin variable in nearest symbol table

This commit changes the logic of `getBuiltinVariableValue` to get
or create the builtin variable in the nearest symbol table. This
will allow us to use this function in other partial conversion
cases where we haven't created the spv.module yet.

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

4 years ago[mlir][spirv] NFC: simplify load/store builder call sites
Lei Zhang [Sat, 25 Jan 2020 15:58:18 +0000 (10:58 -0500)]
[mlir][spirv] NFC: simplify load/store builder call sites

This commit introduces default values for load/store builders to
simplify builder call sites.

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

4 years ago[mlir][spirv] NFC: expose builtin func op conversion pattern
Lei Zhang [Sat, 25 Jan 2020 22:01:26 +0000 (17:01 -0500)]
[mlir][spirv] NFC: expose builtin func op conversion pattern

This commit exposes the func op conversion pattern via a new
`populateBuiltinFuncToSPIRVPatterns` function from the standard
to SPIR-V conversion passs. This is structurally better given
that func op belongs to the builtin dialect. More importantly,
this makes the pattern reusable to other dialect to SPIR-V
dialect conversion as other dialect can well adopt builtin
func op instead of having its own. Besides, it's very common
to use func ops as test wrappers in lit tests, so test passes
will need to handle func ops too.

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

4 years ago[mlir][spirv] Relax verification to allow flexible placement
Lei Zhang [Sat, 25 Jan 2020 14:16:29 +0000 (09:16 -0500)]
[mlir][spirv] Relax verification to allow flexible placement

Thus far certain SPIR-V ops have been required to be in spv.module.
While this provides strong verification to catch unexpected errors,
it's quite rigid and makes progressive lowering difficult. Sometimes
we would like to partially lower ops from other dialects, which may
involve creating ops like global variables that should be placed in
other module-like ops. So this commit relaxes the requirement of
such SPIR-V ops' scope to module-like ops. Similarly for function-
like ops.

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

4 years ago[mlir][spirv] Add spv.GroupNonUniformElect and spv.GroupNonUniformIAdd
Lei Zhang [Sun, 26 Jan 2020 15:19:24 +0000 (10:19 -0500)]
[mlir][spirv] Add spv.GroupNonUniformElect and spv.GroupNonUniformIAdd

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

4 years ago[X86][AVX] Add tests showing combineCommutableSHUFP failure to handle v8f32 and v16f3...
Simon Pilgrim [Sun, 26 Jan 2020 14:35:56 +0000 (14:35 +0000)]
[X86][AVX] Add tests showing combineCommutableSHUFP failure to handle v8f32 and v16f32 commutable shufps patterns

4 years ago[X86][SSE] combineCommutableSHUFP - permilps(shufps(load(),x)) --> permilps(shufps...
Simon Pilgrim [Sun, 26 Jan 2020 14:31:26 +0000 (14:31 +0000)]
[X86][SSE] combineCommutableSHUFP - permilps(shufps(load(),x)) --> permilps(shufps(x,load()))

Pull out combineTargetShuffle code added in rG3fd5d1c6e7db into a helper function and extend it to handle shufps(shufps(load(),x),y) and shufps(y,shufps(load(),x)) cases as well.

4 years ago[FPEnv] Extended FPOptions with new attributes
Serge Pavlov [Wed, 7 Aug 2019 16:31:26 +0000 (23:31 +0700)]
[FPEnv] Extended FPOptions with new attributes

This change added two new attributes, rounding mode and exception
behavior to the structure FPOptions. These attributes allow more
flexible treatment of specific floating point environment than it is
provided by #pragma STDC FENV_ACCESS.

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

4 years ago[TargetLowering] Respect recursive depth in SimplifyDemandedBits call to ComputeNumSi...
Simon Pilgrim [Sun, 26 Jan 2020 10:01:21 +0000 (10:01 +0000)]
[TargetLowering] Respect recursive depth in SimplifyDemandedBits call to ComputeNumSignBits

4 years agoAMDGPU/GlobalISel: Clean-up code around ISel for Intrinsics.
Maheaha Shivamallappa [Sun, 26 Jan 2020 08:01:53 +0000 (13:31 +0530)]
AMDGPU/GlobalISel: Clean-up code around ISel for Intrinsics.

Summary:
A minor code clean-up around ISel for intrinsic llvm.amdgcn.end.cf()

Reviewers: arsenm, mshivama

Reviewed By: arsenm

Tags: #llvm

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

4 years ago[ELF][PPC32] Support range extension thunks with addends
Fangrui Song [Sun, 26 Jan 2020 02:58:54 +0000 (18:58 -0800)]
[ELF][PPC32] Support range extension thunks with addends

* Generalize the code added in D70637 and D70937. We should eventually remove the EM_MIPS special case.
* Handle R_PPC_LOCAL24PC the same way as R_PPC_REL24.

Reviewed By: Bdragon28

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

4 years ago[Support] `const`ify a method; NFC
George Burgess IV [Sun, 26 Jan 2020 05:44:59 +0000 (21:44 -0800)]
[Support] `const`ify a method; NFC

Pointed out by Stepan on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138617.html

4 years agoMass update the MLIR license header to mention "Part of the LLVM project"
Mehdi Amini [Sun, 26 Jan 2020 03:58:30 +0000 (03:58 +0000)]
Mass update the MLIR license header to mention "Part of the LLVM project"

This is an artifact from merging MLIR into LLVM, the file headers are
now aligned with the rest of the project.

4 years ago[X86] Use a macro to convert X86ISD names to strings in getTargetNodeName.
Craig Topper [Sun, 26 Jan 2020 02:25:45 +0000 (18:25 -0800)]
[X86] Use a macro to convert X86ISD names to strings in getTargetNodeName.

Every case in the switch had a string version of themselves. Two
of them had a typo that used : instead of ::

By using a macro we can automate the string creation and avoid
the possibility of typos like this.

This is similar to what is done on the AMDGPU target.

4 years ago[ELF][PPC32] Support canonical PLT
Fangrui Song [Sat, 25 Jan 2020 01:49:59 +0000 (17:49 -0800)]
[ELF][PPC32] Support canonical PLT

-fno-pie produces a pair of non-GOT-non-PLT relocations R_PPC_ADDR16_{HA,LO} (R_ABS) referencing external
functions.

```
lis 3, func@ha
la 3, func@l(3)
```

In a -no-pie/-pie link, if func is not defined in the executable, a canonical PLT entry (st_value>0, st_shndx=0) will be needed.
References to func in shared objects will be resolved to this address.
-fno-pie -pie should fail with "can't create dynamic relocation ... against ...", so we just need to think about -no-pie.

On x86, the PLT entry passes the JMP_SLOT offset to the rtld PLT resolver.
On x86-64: the PLT entry passes the JUMP_SLOT index to the rtld PLT resolver.
On ARM/AArch64: the PLT entry passes &.got.plt[n]. The PLT header passes &.got.plt[fixed-index]. The rtld PLT resolver can compute the JUMP_SLOT index from the two addresses.

For these targets, the canonical PLT entry can just reuse the regular PLT entry (in PltSection).

On PPC32: PltSection (.glink) consists of `b PLTresolve` instructions and `PLTresolve`. The rtld PLT resolver depends on r11 having been set up to the .plt (GotPltSection) entry.
On PPC64 ELFv2: PltSection (.glink) consists of `__glink_PLTresolve` and `bl __glink_PLTresolve`. The rtld PLT resolver depends on r12 having been set up to the .plt (GotPltSection) entry.

We cannot reuse a `b PLTresolve`/`bl __glink_PLTresolve` in PltSection as a canonical PLT entry. PPC64 ELFv2 avoids the problem by using TOC for any external reference, even in non-pic code, so the canonical PLT entry scenario should not happen in the first place.
For PPC32, we have to create a PLT call stub as the canonical PLT entry. The code sequence sets up r11.

Reviewed By: Bdragon28

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

4 years ago[Concepts] Transform constraints of non-template functions to ConstantEvaluated
Saar Raz [Sat, 25 Jan 2020 20:54:27 +0000 (22:54 +0200)]
[Concepts] Transform constraints of non-template functions to ConstantEvaluated

We would previously try to evaluate atomic constraints of non-template functions as-is,
and since they are now unevaluated at first, this would cause incorrect evaluation (bugs #44657, #44656).

Substitute into atomic constraints of non-template functions as we would atomic constraints
of template functions, in order to rebuild the expressions in a constant-evaluated context.

4 years ago[SelectionDAG] ComputeNumSignBits - add DemandedElts support for MIN/MAX ops
Simon Pilgrim [Sat, 25 Jan 2020 20:20:37 +0000 (20:20 +0000)]
[SelectionDAG] ComputeNumSignBits - add DemandedElts support for MIN/MAX ops

4 years ago[ELF] Rename relocateOne() to relocate() and pass `Relocation` to it
Fangrui Song [Thu, 23 Jan 2020 05:39:16 +0000 (21:39 -0800)]
[ELF] Rename relocateOne() to relocate() and pass `Relocation` to it

Symbol information can be used to improve out-of-range/misalignment diagnostics.
It also helps R_ARM_CALL/R_ARM_THM_CALL which has different behaviors with different symbol types.

There are many (67) relocateOne() call sites used in thunks, {Arm,AArch64}errata, PLT, etc.
Rename them to `relocateNoSym()` to be clearer that there is no symbol information.

Reviewed By: grimar, peter.smith

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

4 years ago[X86] Add tests showing ComputeNumSignBits's failure to use DemandedElts for MIN...
Simon Pilgrim [Sat, 25 Jan 2020 19:28:57 +0000 (19:28 +0000)]
[X86] Add tests showing ComputeNumSignBits's failure to use DemandedElts for MIN/MAX opcodes

4 years ago[SelectionDAG] ComputeNumSignBits - add support for rotate non-uniform vector amounts
Simon Pilgrim [Sat, 25 Jan 2020 19:15:05 +0000 (19:15 +0000)]
[SelectionDAG] ComputeNumSignBits - add support for rotate non-uniform vector amounts

4 years ago[SelectionDAG] ComputeNumSignBits - add support for rotate uniform vector amounts
Simon Pilgrim [Sat, 25 Jan 2020 18:55:47 +0000 (18:55 +0000)]
[SelectionDAG] ComputeNumSignBits - add support for rotate uniform vector amounts

4 years ago[X86] Add tests showing ComputeNumSignBits's failure to see through rotate vector...
Simon Pilgrim [Sat, 25 Jan 2020 18:24:15 +0000 (18:24 +0000)]
[X86] Add tests showing ComputeNumSignBits's failure to see through rotate vector amounts

4 years ago[mlir] Revert MSVC specific part of whole_archive_link
Jacques Pienaar [Sat, 25 Jan 2020 17:52:46 +0000 (09:52 -0800)]
[mlir] Revert MSVC specific part of whole_archive_link

Revert the MSVC specific parts in whole_archive_link to previous form to
potentially address https://bugs.llvm.org/show_bug.cgi?id=44660.

4 years ago[TargetLowering] SimplifyDemandedBits - Remove ashr if all our demandedbits already...
Simon Pilgrim [Sat, 25 Jan 2020 17:36:21 +0000 (17:36 +0000)]
[TargetLowering] SimplifyDemandedBits - Remove ashr if all our demandedbits already match the sign bit

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

4 years ago[mlir] Bootstrap doxygen config
Jacques Pienaar [Sat, 25 Jan 2020 17:17:31 +0000 (09:17 -0800)]
[mlir] Bootstrap doxygen config

Add basic doxygen config following clang and llvm example with minimal
changes.

4 years ago[perf-training] Update ' (in-process)' prefix handling
Francis Visoiu Mistrih [Sat, 25 Jan 2020 17:14:24 +0000 (09:14 -0800)]
[perf-training] Update ' (in-process)' prefix handling

A recent change added a new line after the prefix, so it's now part of
the prefix list.

4 years agoImprove static checks for sprintf and __builtin___sprintf_chk
serge-sans-paille [Thu, 12 Dec 2019 17:38:31 +0000 (18:38 +0100)]
Improve static checks for sprintf and __builtin___sprintf_chk

Implement a pessimistic evaluator of the minimal required size for a buffer
based on the format string, and couple that with the fortified version to emit a
warning when the buffer size is lower than the lower bound computed from the
format string.

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

4 years ago[clangd] Make Notification a little safer.
Sam McCall [Sat, 25 Jan 2020 14:31:55 +0000 (15:31 +0100)]
[clangd] Make Notification a little safer.

I just fixed a test involving a similar Notification class: 18e6a65bae93a

The pattern (notify() on one thread, wait() and then destroy the Notification
on the other) seems innocuous enough. I'm not sure we actually use it in clangd,
but better safe than sorry.

4 years ago[Support] Fix race in threading test, found by TSan
Sam McCall [Sat, 25 Jan 2020 14:22:12 +0000 (15:22 +0100)]
[Support] Fix race in threading test, found by TSan

4 years agoAMDGPU/SILoadStoreOptimizer: Fix uninitialized variable error
Tom Stellard [Sat, 25 Jan 2020 05:52:05 +0000 (21:52 -0800)]
AMDGPU/SILoadStoreOptimizer: Fix uninitialized variable error

This was introduced by 86c944d790728891801778b8d98c2c65a83f36a5 and
caught by the sanitizer-x86_64-linux-fast bot.

4 years ago[lldb/Test] Disable hardware check on arm/aarch64
Jonas Devlieghere [Sat, 25 Jan 2020 04:54:02 +0000 (20:54 -0800)]
[lldb/Test] Disable hardware check on arm/aarch64

BreakpointSites know they're backed by hardware based on whether the
"hardware index" is set. This does not appear the to be done for
arm/aarch64.

https://llvm.org/PR44659

4 years ago[lldb/Test] Update minidebuginfo-set-and-hit-breakpoint.test
Jonas Devlieghere [Sat, 25 Jan 2020 04:46:51 +0000 (20:46 -0800)]
[lldb/Test] Update minidebuginfo-set-and-hit-breakpoint.test

Update test to account for the new 'hardware' field between 'resolved'
and 'hit count'.

4 years agoAMDGPU: Generate test checks
Matt Arsenault [Sat, 25 Jan 2020 02:59:48 +0000 (21:59 -0500)]
AMDGPU: Generate test checks

4 years agoAMDGPU/SILoadStoreOptimizer: Improve merging of out of order offsets
Tom Stellard [Fri, 24 Jan 2020 21:07:08 +0000 (13:07 -0800)]
AMDGPU/SILoadStoreOptimizer: Improve merging of out of order offsets

Summary:
This improves merging of sequences like:

store a, ptr + 4
store b, ptr + 8
store c, ptr + 12
store d, ptr + 16
store e, ptr + 20
store f, ptr

Prior to this patch the basic block was scanned in order to find instructions
to merge and the above sequence would be transformed to:

store4 <a, b, c, d>, ptr + 4
store e, ptr + 20
store r, ptr

With this change, we now sort all the candidate merge instructions by their offset,
so instructions are visited in offset order rather than in the order they appear
in the basic block.  We now transform this sequnce into:

store4 <f, a, b, c>, ptr
store2 <d, e>, ptr + 16

Another benefit of this change is that since we have sorted the mergeable lists
by offset, we can easily check if an instruction is mergeable by checking the
offset of the instruction that becomes before or after it in the sorted list.
Once we determine an instruction is not mergeable we can remove it from the list
and avoid having to do the more expensive mergeablilty checks.

Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

Reviewed By: arsenm, nhaehnle

Subscribers: kerbowa, merge_guards_bot, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Breakpoint] Include whether or not a breakpoint is a HW BP
Jonas Devlieghere [Sat, 25 Jan 2020 01:16:02 +0000 (17:16 -0800)]
[lldb/Breakpoint] Include whether or not a breakpoint is a HW BP

Include whether or not a breakpoint is a hardware breakpoint in the
breakpoint location. This will show up in things like the breakpoint
list.

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

4 years ago[lldb/Breakpoint] Recogize hardware breakpoints as such
Jonas Devlieghere [Sat, 25 Jan 2020 02:49:44 +0000 (18:49 -0800)]
[lldb/Breakpoint] Recogize hardware breakpoints as such

Recognize hardware breakpoints as breakpoints instead of just mach
exceptions. The mach exception is the same for watch and breakpoints, so
we have to try each to figure out which is which.

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

4 years ago[libunwind] Set LIBUNWIND_ASM_SOURCES to the ASM source language from C
James Nagurne [Sat, 25 Jan 2020 03:15:32 +0000 (19:15 -0800)]
[libunwind] Set LIBUNWIND_ASM_SOURCES to the ASM source language from C

I believe this is an oversight from the import of libunwind into its own
library from libc++abi.

In libc++abi, these files had the .s suffix, which indicates that the file
is a preprocessed assembly source file. This caused problems because the
files rely upon preprocessors to guard target-specific blocks.

To fix this, the CMakeLists file marked these files as C so that the
preprocessor would be run over them, but then the compiler would correctly
identify the files as assembly and compile them as such.

When imported to libunwind, these files were (correctly) renamed with .S
suffixes, which are non-preprocessed assembly. Thus, we no longer need the
C language property.

The benefit here is that the files can now benefit from CMAKE_ASM_FLAGS
rather than CMAKE_C_FLAGS.

Patch By: JamesNagurne

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

4 years agoDR1753: Don't permit x.NS::~T() as a pseudo-destructor name.
Richard Smith [Fri, 24 Jan 2020 23:14:25 +0000 (15:14 -0800)]
DR1753: Don't permit x.NS::~T() as a pseudo-destructor name.

When used as qualified names, pseudo-destructors are always named as if
they were members of the type, never as members of the namespace
enclosing the type.

4 years ago[gn build] Port dd8e0a0a23b
LLVM GN Syncbot [Sat, 25 Jan 2020 02:40:48 +0000 (02:40 +0000)]
[gn build] Port dd8e0a0a23b

4 years ago[gn build] (manually) merge 81b700e302b1
Nico Weber [Sat, 25 Jan 2020 02:40:26 +0000 (21:40 -0500)]
[gn build] (manually) merge 81b700e302b1

4 years agoFix header includes after 0697bcb66f1d82f2fd447e9d13b74d141c3ce085
Weverything [Sat, 25 Jan 2020 02:32:54 +0000 (18:32 -0800)]
Fix header includes after 0697bcb66f1d82f2fd447e9d13b74d141c3ce085

4 years agoRevert "Reland: [DWARF] Allow cross-CU references of subprogram definitions"
Vedant Kumar [Sat, 25 Jan 2020 02:07:34 +0000 (18:07 -0800)]
Revert "Reland: [DWARF] Allow cross-CU references of subprogram definitions"

... as well as:
Revert "[DWARF] Defer creating declaration DIEs until we prepare call site info"

This reverts commit fa4701e1979553c2df61698ac1ac212627630442.

This reverts commit 79daafc90308787b52a5d3a7586e82acd5e374b3.

There have been reports of this assert getting hit:

CalleeDIE && "Could not find DIE for call site entry origin