Commit Graph

457722 Commits

Author SHA1 Message Date
Ellis Hoag
4bddef4117 [InstrProf][Temporal] Add weight field to traces
As discussed in [0], add a `weight` field to temporal profiling traces found in profiles. This allows users to use the `--weighted-input=` flag in the `llvm-profdata merge` command to weight traces from different scenarios differently.

Note that this is a breaking change, but since [1] landed very recently and there is no way to "use" this trace data, there should be no users of this feature. We believe it is acceptable to land this change without bumping the profile format version.

[0] https://reviews.llvm.org/D147812#4259507
[1] https://reviews.llvm.org/D147287

Reviewed By: snehasish

Differential Revision: https://reviews.llvm.org/D148150
2023-04-13 10:37:05 -07:00
Sam Clegg
aca110f9dd [lld][WebAssembly] Trace export of symbols when specified with --trace-symbol. NFC
Differential Revision: https://reviews.llvm.org/D148190
2023-04-13 10:36:27 -07:00
Valentin Clement
f8330c1482
[mlir][openacc] Add acc.serial operation
The acc.serial operation models the OpenACC serial construct.
The serial construct defines a region of a program that is to be
executed sequentially on the current device.
The operation is modelled on the acc.parallel operation and will
receive similar updates when the data operands operations will
be implemented.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D148250
2023-04-13 10:35:56 -07:00
Fangrui Song
8c63dc6f6d Internalize AllocationBegin functions after D147005
Reviewed By: thurston

Differential Revision: https://reviews.llvm.org/D148195
2023-04-13 10:28:58 -07:00
Alexey Bataev
f82eb7e066 [SLP]Introduce gather cost estimation function.
Introduced BoUpSLP::ShuffleCostEstimator::gather function as an initial
implementation of the gather/buildvector cost estimation for buildvector
nodes. It will allow to use general codegen infrastructure for better
cost estimation + it improves the cost estimation for the
gathers/buildvectors.

Improved part of D110978.

Differential Revision: https://reviews.llvm.org/D148174
2023-04-13 10:16:00 -07:00
Valentin Clement
3d683cb9f1
[mlir][openacc][NFC] Use assembly format for acc.parallel
Remove the custoom parser and printer for the acc.parallel
operation and use the assembly format directly.

Reviewed By: PeteSteinfeld, razvanlupusoru

Differential Revision: https://reviews.llvm.org/D148183
2023-04-13 10:15:08 -07:00
Simon Pilgrim
48fca4b6f3 [CostModel][X86] Add latency/code-size/size-latency target costs for minnum/maxnum intrinsics
Using the latest version of the script from D103695 to compare costmodel vs llvm-mca statistics.

Avoids using the default costs, which was assuming libm calls.
2023-04-13 18:07:03 +01:00
ruturaj4
3ac550984e [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in a typedef
enums and structs declared inside typedefs have incorrect declaration fragments, where the typedef keyword and other syntax is missing.

For the following struct:

typedef struct Test {
    int hello;
} Test;
The produced declaration is:

"declarationFragments": [
  {
    "kind": "keyword",
    "spelling": "struct"
  },
  {
    "kind": "text",
    "spelling": " "
  },
  {
    "kind": "identifier",
    "spelling": "Test"
  }
],
instead the declaration fragments should represent the following

typedef struct Test {
    …
} Test;

This patch removes the condition in SymbolGraphSerializer.cpp file and completes declaration fragments

Reviewed By: dang

Differential Revision: https://reviews.llvm.org/D146385
2023-04-13 17:55:45 +01:00
Ivan Butygin
1fb24cef40 [mlir][scf] Make whileOp builder funcs optional
Create empty block without the terminator in this case.

Differential Revision: https://reviews.llvm.org/D148137
2023-04-13 18:49:04 +02:00
Peter Klausler
52a0b02c25
[flang][runtime] Reset the left tab limit when flushing output
When flushing output to a non-positionable tty or socket file, reset the
left tab limit.  Otherwise, non-advancing output to that file will contain
an increasing amount of leading spaces in each flush.  Also, detect
newline characters in stream output, and treat them as record
advancement.

Differential Revision: https://reviews.llvm.org/D148157
2023-04-13 09:43:40 -07:00
Nick Desaulniers
fc4494dffa [StackProtector] don't check stack protector before calling nounwind functions
https://reviews.llvm.org/rGd656ae28095726830f9beb8dbd4d69f5144ef821
introduced a additional checks before calling noreturn functions in
response to this security paper related to Catch Handler Oriented
Programming (CHOP):
https://download.vusec.net/papers/chop_ndss23.pdf
See also:
https://bugs.chromium.org/p/llvm/issues/detail?id=30

This causes stack canaries to be inserted in C code which was
unexpected; we noticed certain Linux kernel trees stopped booting after
this (in functions trying to initialize the stack canary itself).
https://github.com/ClangBuiltLinux/linux/issues/1815

There is no point checking the stack canary like this when exceptions
are disabled (-fno-exceptions or function is marked noexcept) or for C
code.  The GCC patch for this issue does something similar:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a25982ada523689c8745d7fb4b1b93c8f5dab2e7

Android measured a 2% regression in RSS as a result of d656ae2809 and
undid it globally:
https://android-review.googlesource.com/c/platform/build/soong/+/2524336

Reviewed By: xiangzhangllvm

Differential Revision: https://reviews.llvm.org/D147975
2023-04-13 09:37:06 -07:00
Simon Pilgrim
f0e6529133 [CostModel][X86] Add latency/code-size test coverage for minnum/maxnum intrinsics
And improve test coverage for the existing size-latency tests to match
2023-04-13 17:34:26 +01:00
Antoine Moynault
bdbe15f729 [llvm-readobj] fix unit test failure on 32bit machines
Several bots are failing on 32-bit since https://reviews.llvm.org/D145761 was merged
  https://lab.llvm.org/buildbot/#/builders/178/builds/4384

It seems due to the use of uintptr_t (32bit here) for storing 64 bit values.

Issue is fixed by replacing to uint64_t (as suggested by DavidSpickett).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D148208
2023-04-13 16:28:44 +00:00
Arthur Eubanks
29a88f991b Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"
This reverts commit fffdb7eac5.

Causes crashes, see https://reviews.llvm.org/D145208
2023-04-13 09:09:36 -07:00
Balaji V. Iyer
4da96515ea [mlir][math] Expand math.exp2 to use math.exp.
Exp2 functions are pushed directly to libm. This is problematic for
situations where libm is not available. This patch will expand the exp2
function to use exp2 with the input multiplied by ln2 (natural log).

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D148064
2023-04-13 16:06:04 +00:00
Matt Arsenault
ba19fb3bd7 InstSimplify: Regenerate checks in a test
For some reason this was missing the "Assertions have been autogenerated"
comment so were getting spurious diffs in a future change.
2023-04-13 12:05:05 -04:00
Simon Pilgrim
b3480d5ede [SLP] Compute min/max scalar reduction costs using min/max intrinsics instead of expanded cmp+sel
By default these will expand back to cmp/sel, but some targets (X86) has optimized costs for scalar integer min/max patterns which are lower than the default expansion (pre-SSE41 is particularly weak for vector min/max support).

Differential Revision: [SLP] Compute min/max scalar reduction costs using min/max intrinsics instead of expanded cmp+sel
2023-04-13 17:00:39 +01:00
Jay Foad
2d39f5b5cd [AMDGPU] Allow use of TTMP registers in AMDGPUResourceUsageAnalysis
With architected SGPRs, workgroup IDs are passed into a compute shader
in TTMP registers. Allow for this in AMDGPUResourceUsageAnalysis instead
of failing an assertion.

Differential Revision: https://reviews.llvm.org/D148239
2023-04-13 16:56:22 +01:00
Jay Foad
cf736e2325 [AMDGPU] Avoid else-after-return in isLegalAddressingMode. NFC. 2023-04-13 16:55:58 +01:00
Lawrence Benson
3653722ce6 [AArch64] Add more efficient vector bitcast for AArch64
Adds a DAG combine checks for vector comparisons followed by a bitcast to a
scalar value. Previously, this resulted in an expand.  Now, this is done with a
constant number of instructions that take one bit per vector value (via an AND
mask) and perfom a horizontal add to get a single value. This is especially
useful for Clang's __builtin_convertvector() to a bool vector.

Issue: https://github.com/llvm/llvm-project/issues/59829

Differential Revision: https://reviews.llvm.org/D145301
2023-04-13 16:44:09 +01:00
Simon Pilgrim
aa754f7e0f [IR] llvm::createMinMaxOp - create integer min/max intrinsics instead of icmp/sel
Based off D148215, when expanding a min/max reduction we should be creating min/max intrinsics directly instead of relying on instcombine to fold them back together.

This patch handles integer min/max cases. Hopefully we can add floating point support soon (at least for fastmath/nnan cases) - but we're missing some of the plumbing to pass the correct FMF to the intrinsic at the moment.

Differential Revision: https://reviews.llvm.org/D148221
2023-04-13 16:40:43 +01:00
Caroline Tice
be58b42a75 [lldb] Add 'CHECK' to class-type-nullptr-deref.s test.
This test previously relied on just segfaulting or not. This commit adds
a CHECK statement to the test.

Differential Revision: https://reviews.llvm.org/D148151
2023-04-13 08:17:53 -07:00
Chris Jones
62bf6c2e10 Use bytes, not str, to return C++ strings to Python.
`str` must be valid UTF-8, which is not guaranteed for C++ strings.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D147818
2023-04-13 17:09:19 +02:00
Nicole Rabjohn
a5f2e60a91 [libcxx][AIX] Reverting XFAILs for test cases after OS update
These test cases were fixed with AIX 73TL1, and are currently passing on AIX machines with that fix. This fix has also been backported to the 7.2 service line. These were tested on a machine with AIX 7.2 TL 5 SP4 installed.

Differential Revision: https://reviews.llvm.org/D148040
2023-04-13 11:02:17 -04:00
Zequan Wu
0529da5b94 [Coverage] Handle invalid end location of an expression/statement.
Fix a crash when an expression/statement can have valid start location but invalid end location in some situations. For example: https://github.com/llvm/llvm-project/blob/llvmorg-16.0.1/clang/lib/Sema/SemaExprCXX.cpp#L1536

This confuses `CounterCoverageMappingBuilder` when popping a region from region
stack as if the end location is a macro or include location.

Reviewed By: hans, aaron.ballman

Differential Revision: https://reviews.llvm.org/D147073
2023-04-13 10:53:02 -04:00
Utkarsh Saxena
ed365f464a [clangd] Use FileEntryRef for canonicalizing filepaths.
Using FileEntry for retrieving filenames give the name used for the last access. FileEntryRef gives the first access name.

Last access name is suspected to change with unrelated changes in clang or the underlying filesystem. First access name gives more stability to the name and makes it easier to track.

Differential Revision: https://reviews.llvm.org/D148213
2023-04-13 16:49:30 +02:00
Vlad Serebrennikov
18b1a7a5d1 [clang][NFC] Use a different service for CWG issue links
We've been using https://wg21.link for C++ DR status page, but it forwards non-resolved issues to EDG wiki, which is not useful for general public. This patch replace it with https://cplusplus.github.io/CWG/issues/ .
2023-04-13 17:49:06 +03:00
Job Noorman
8bbfac7be1 [BOLT][NFC] Fix UB due to unaligned load in DebugStrOffsetsWriter
The following tests fail when enabling UBSan due to an unaligned memory
load:

> runtime error: load of misaligned address 0x620000000643 for type
> 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte
> alignment

  BOLT :: AArch64/asm-func-debug.test
  BOLT :: AArch64/update-debug-reloc.test
  BOLT :: X86/asm-func-debug.test
  BOLT :: X86/dwarf5-df-dualcu.test
  BOLT :: X86/dwarf5-df-mono-dualcu.test
  BOLT :: X86/dwarf5-ftypes-dwp-input-dwo-output.test
  BOLT :: X86/dwarf5-locaddrx.test
  BOLT :: X86/dwarf5-split-dwarf4-monolithic.test
  BOLT :: X86/inlined-function-mixed.test
  BOLT :: non-empty-debug-line.test

This patch fixes this by using read32le for the load.

Reviewed By: ayermolo

Differential Revision: https://reviews.llvm.org/D148217
2023-04-13 16:39:22 +02:00
Nikita Popov
934373886e [Attributor] Convert some tests to opaque pointers (NFC) 2023-04-13 16:38:52 +02:00
Archibald Elliott
9ee4fe63bc [ARM] Fix Crashes in fp16/bf16 Inline Asm
We were still seeing occasional crashes with inline assembly blocks
using fp16/bf16 after my previous patches:
- https://reviews.llvm.org/rGff4027d152d0
- https://reviews.llvm.org/rG7d15212b8c0c
- https://reviews.llvm.org/rG20b2d11896d9

It turns out:
- The original two commits were wrong, and we should have always been
  choosing the SPR register class, not the HPR register class, so that
  LLVM's SelectionDAGBuilder correctly did the right splits/joins.
- The `splitValueIntoRegisterParts`/`joinRegisterPartsIntoValue` changes
  from rG20b2d11896d9 are still correct, even though they sometimes
  result in inefficient codegen of casts between fp16/bf16 and i32/f32
  (which is visible in these tests).

This patch fixes crashes in `getCopyToParts` and when trying to select
`(bf16 (bitconvert (fp16 ...)))` dags when Neon is enabled.

This patch also adds support for passing fp16/bf16 values using the 'x'
constraint that is LLVM-specific. This should broadly match how we pass
with 't' and 'w', but with a different set of valid S registers.

Differential Revision: https://reviews.llvm.org/D147715
2023-04-13 15:34:04 +01:00
Timm Bäder
4a6a4f84a7 [clang][Interp] Add a failing test case 2023-04-13 15:55:57 +02:00
Timm Bäder
f508d9b1d4 [clang][Interp] Don't create global variables more than once
just because we're being told to evaluate it twice. This sometimes
happens when a variable is evaluated again during codegen.

Differential Revision: https://reviews.llvm.org/D147535
2023-04-13 15:41:43 +02:00
Jun Zhang
2ecbe7ca76
[Docs] Point to the correct bug tracker
Signed-off-by: Jun Zhang <jun@junz.org>
2023-04-13 21:36:20 +08:00
Timm Bäder
25d6123854 [clang][Interp] Make sure we have a variable scope for initializers
Otherwise, we run into an assertion when trying to use the current
variable scope while creating temporaries for constructor initializers.

Differential Revision: https://reviews.llvm.org/D147534
2023-04-13 15:35:30 +02:00
David Spickett
e07a421dd5 [lldb] Show register fields using bitfield struct types
This change uses the information from target.xml sent by
the GDB stub to produce C types that we can use to print
register fields.

lldb-server *does not* produce this information yet. This will
only work with GDB stubs that do. gdbserver or qemu
are 2 I know of. Testing is added that uses a mocked lldb-server.
```
(lldb) register read cpsr x0 fpcr fpsr x1
    cpsr = 0x60001000
         = (N = 0, Z = 1, C = 1, V = 0, TCO = 0, DIT = 0, UAO = 0, PAN = 0, SS = 0, IL = 0, SSBS = 1, BTYPE = 0, D = 0, A = 0, I = 0, F = 0, nRW = 0, EL = 0, SP = 0)
```

Only "register read" will display fields, and only when
we are not printing a register block.

For example, cpsr is a 32 bit register. Using the target's scratch type
system we construct a type:
```
struct __attribute__((__packed__)) cpsr {
  uint32_t N : 1;
  uint32_t Z : 1;
  ...
  uint32_t EL : 2;
  uint32_t SP : 1;
};
```

If this register had unallocated bits in it, those would
have been filled in by RegisterFlags as anonymous fields.
A new option "SetChildPrintingDecider" is added so we
can disable printing those.

Important things about this type:
* It is packed so that sizeof(struct cpsr) == sizeof(the real register).
  (this will hold for all flags types we create)
* Each field has the same storage type, which is the same as the type
  of the raw register value. This prevents fields being spilt over
  into more storage units, as is allowed by most ABIs.
* Each bitfield size matches that of its register field.
* The most significant field is first.

The last point is required because the most significant bit (MSB)
being on the left/top of a print out matches what you'd expect to
see in an architecture manual. In addition, having lldb print a
different field order on big/little endian hosts is not acceptable.

As a consequence, if the target is little endian we have to
reverse the order of the fields in the value. The value of each field
remains the same. For example 0b01 doesn't become 0b10, it just shifts
up or down.

This is needed because clang's type system assumes that for a struct
like the one above, the least significant bit (LSB) will be first
for a little endian target. We need the MSB to be first.

Finally, if lldb's host is a different endian to the target we have
to byte swap the host endian value to match the endian of the target's
typesystem.

| Host Endian | Target Endian | Field Order Swap | Byte Order Swap |
|-------------|---------------|------------------|-----------------|
| Little      | Little        | Yes              | No              |
| Big         | Little        | Yes              | Yes             |
| Little      | Big           | No               | Yes             |
| Big         | Big           | No               | No              |

Testing was done as follows:
* Little -> Little
  * LE AArch64 native debug.
* Big -> Little
  * s390x lldb running under QEMU, connected to LE AArch64 target.
* Little -> Big
  * LE AArch64 lldb connected to QEMU's GDB stub, which is running
    an s390x program.
* Big -> Big
 * s390x lldb running under QEMU, connected to another QEMU's GDB
   stub, which is running an s390x program.

As we are not allowed to link core code to plugins directly,
I have added a new plugin RegisterTypeBuilder. There is one implementation
of this, RegisterTypeBuilderClang, which uses TypeSystemClang to build
the CompilerType from the register fields.

Reviewed By: jasonmolenda

Differential Revision: https://reviews.llvm.org/D145580
2023-04-13 13:04:34 +00:00
Alex Zinenko
842879b3b1 [mlir] fix mismerge in bazel 2023-04-13 14:58:11 +02:00
Timm Bäder
7a356de83c [clang][github] Try to fix multi-line py comment
Introduced in 09effa706a
2023-04-13 14:47:24 +02:00
Archibald Elliott
eeb4fe093d [NFC][ARM] Fix Type in Test
I landed this test with a typo, the callsites all show `fp16_inner`
returning `half`, so the declaration should too.
2023-04-13 13:43:51 +01:00
Timm Bäder
09effa706a [llvm][github] Add good-first-issue comment to issues
Differential Revision: https://reviews.llvm.org/D146819
2023-04-13 14:39:59 +02:00
Archibald Elliott
41eba6cdde [AArch64][GISel] Legalize non-power-of-two G_CTTZ
The main change here is to add a `widenScalarToNextPow2` before the
`clampScalar` so that non-power-of-two sizes between 32 and 64 are
turned into s64 count trailing zeroes.

However, if you make the legalisation rules depend on TypeIdx 0 (the
output), then you still get crashes for the s65 testcase, which I solved
by instead flipping the rules around to be about TypeIdx 1 (the input),
with a `scalarSameSizeAs` at the end to tie index 0 to index 1. This,
incidentally, is how things are written for `G_CTLZ`.

Differential Revision: https://reviews.llvm.org/D147602
2023-04-13 13:38:40 +01:00
Alex Zinenko
3fe7127d48 [mlir] add structured (Linalg) transform op matchers
Add a set of transform operations into the "structured" extension of the
Transform dialect that allow one to select transformation targets more
specifically than the currently available matching. In particular, add
the mechanism for identifying the producers of operands (input and init
in destination-passing style) and users of results, as well as
mechanisms for reasoning about the shape of the iteration space.

Additionally, add several transform operations to manipulate parameters
that could be useful to implement more advanced selectors. Specifically,
new operations let one produce and compare parameter values to implement
shape-driven transformations.

New operations are placed in separate files to decrease compilation
time. Some relayering of the extension is necessary to avoid repeated
generation of enums.

Depends on D148013
Depends on D148014
Depends on D148015

Reviewed By: chelini

Differential Revision: https://reviews.llvm.org/D148017
2023-04-13 12:37:51 +00:00
David Spickett
54981bb75d [lldb] Read register fields from target XML
This teaches ProcessGDBRemote to look for "flags" nodes
in the target XML that tell you what fields a register has.

https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html

It will check for various invalid inputs like:
* Flags nodes with 0 fields in them.
* Start or end being > the register size.
* Fields that overlap.
* Required properties not being present (e.g. no name).
* Flag sets being redefined.

If anything untoward is found, we'll just drop the field or the
flag set altogether. Register fields are a "nice to have" so LLDB
shouldn't be crashing because of them, instead just log anything
we throw away. So the user can fix their XML/file a bug with their
vendor.

Once that is done it will sort the fields and pass them to
the RegisterFields class I added previously.

There is no way to see these fields yet, so tests for this code
will come later when the formatting code is added.

The fields are stored in a map of unique pointers on the
ProcessGDBRemote class. It will give out raw pointers on the
assumption that the GDB process lives longer than the users
of those pointers do. Which means RegisterInfo is still a trivial struct
but we are properly destroying the fields when the GDB process ends.

We can't store the fields directly in the map because adding new
items may cause its storage to be reallocated, which would invalidate
pointers we've already given out.

Reviewed By: jasonmolenda, JDevlieghere

Differential Revision: https://reviews.llvm.org/D145574
2023-04-13 12:34:14 +00:00
Stefan Gränitz
cc6ab268d8 [lldb][ObjectFileELF] Improve error output for unsupported arch/relocations
ObjectFileELF::ApplyRelocations() considered all 32-bit input objects to be i386 and didn't provide good error messages for AArch32 objects. Please find an example in https://github.com/llvm/llvm-project/issues/61948
While we are here, let' improve the situation for unsupported architectures as well. I think we should report the error here too and not silently fail (or crash with assertions enabled).

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D147627
2023-04-13 14:32:15 +02:00
Job Noorman
df3f1e2f31 [BOLT][NFC] Fix UB due to left shift of negative value
The following test fails when enabling UBSan due to a left shift of a
negative value:

> runtime error: left shift of negative value -2

  BOLT :: AArch64/ext-island-ref.s

This patch fixes this by using a multiplication instead of a shift.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D148218
2023-04-13 14:29:19 +02:00
Nicolas Vasilache
b3ed6e5455 [mlir][Linalg] Fix hoist padding through scf.for iter_arg
Previously, hoisting through an iter_arg would mistakenly yield the unpadded value and
cast it to the padded value.

This was incorrect and resulted in out-of-bounds accesses.
The correct formulation is to yield the padded value and extract a smaller dynamic slice
out of it.

Differential Revision: https://reviews.llvm.org/D148173
2023-04-13 05:21:38 -07:00
David Spickett
c950ba7d48 [llvm][readobj] Add AArch64 SME and SME2 note types
These are used to store new state added by the Scalable Matrix
Extension which is documented in
https://developer.arm.com/documentation/ddi0616/aa/.

The values match those defined by Linux, see:
e62252bc55/include/uapi/linux/elf.h (L435)

The ZT register(s) are added by SME2 which is not yet publicly
documented but has support in LLVM and Linux already.

Also added descriptions for SVE and PAC_MASK notes since those
were missing.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D148126
2023-04-13 13:17:38 +01:00
Jorge Pinto Sousa
66202d83b5 Make 'static assertion failed' diagnostics point to the static assertion expression
"static assertion failed" pointed to the static_assert token and
then underlined the static assertion expression:

<source>:3:1: error: static assertion failed
    static_assert(false);
    ^             ~~~~~
    1 error generated.
See Godbolt: https://godbolt.org/z/r38booz59

Now it points to and highlights the assertion expression.

Fixes https://github.com/llvm/llvm-project/issues/61951
Differential Revision: https://reviews.llvm.org/D147745
2023-04-13 08:15:13 -04:00
Timm Bäder
dfafb7fe5a [clang][NFC] More range for loops in TextDiagnostic.cpp 2023-04-13 13:43:57 +02:00
Timm Bäder
650d69ffe4 [clang][NFC] Fix comment typo 2023-04-13 13:42:58 +02:00
Kadir Cetinkaya
3d6d2ae6f4
[include-cleaner] Handle incomplete template specializations
Instantiation pattern is null for incomplete template types and using
specializaiton decl results in not seeing re-declarations.

Differential Revision: https://reviews.llvm.org/D148158
2023-04-13 13:34:12 +02:00