- Jun 02, 2020
-
-
Haojian Wu authored
Summary: For a none-function-like unresolved expression, clang builds a TypoExpr for it, and tries to correct it afterwards. If the typo-correction fails, clang just drops the whole expr. This patch improves the recovery strategy -- if the typo-correction fails, we preserve the AST by degrading the typo exprs to recovery exprs. This would improve toolings for "undef_var" broken cases: ``` void foo(); void test() { fo^o(undef_var); // go-to-def, hover still works. } ``` TESTED=ran tests with this patch + turn-on-recovery-ast patch, it breaks one declare_variant_messages testcase (the diagnostics are slightly changed), I think it is acceptable. ``` Error: 'error' diagnostics seen but not expected: File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 16: expected 'match' clause on 'omp declare variant' directive File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 57: expected 'match' clause on 'omp declare variant' directive error: 'warning' diagnostics expected but not seen: File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 47: the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 87: the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored error: 'warning' diagnostics seen but not expected: File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 47: the context selector 'kind' in the context set 'device' cannot have a score ('<recovery-expr>()'); score ignored File llvm-project/clang/test/OpenMP/declare_variant_messages.cpp Line 87: the context selector 'kind' in the context set 'device' cannot have a score ('<recovery-expr>()'); score ignored 6 errors generated. ``` Reviewers: sammccall, jdoerfert Subscribers: sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80733 -
Matt Arsenault authored
The pass which infers when it's legal to load a global address space as SMRD was only considering amdgpu_kernel, and ignoring the shader entry type calling conventions.
-
Haojian Wu authored
-
Kadir Cetinkaya authored
-
Matt Arsenault authored
The change to fold_priv_arith looks strange to me, but this was already the untested behavior for local.
-
Kadir Cetinkaya authored
Summary: ReplayPreamble was just grabbing the reference of IncludeStructure passed to it and then replayed any includes seen so while exiting built-in file. This implies any include seen in built-in files being replayed as part of preamble, even though they are not. This wasn't an issue until we've started patching preambles, as includes from built-in files were not mapped back to main-file. This patch copies over existing includes at the time of ReplayPreamble::attach and only replies those to prevent any includes from the preamble patch getting mixed-in. Reviewers: sammccall, jkorous Subscribers: ilya-biryukov, MaskRay, dexonsmith, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80988
-
Kadir Cetinkaya authored
This reverts commit bff0c56f. I've pushed the earlier version of the patch by mistake.
-
Nico Weber authored
-
Igor Kudrin authored
-
Alex Zinenko authored
Dialect conversion infrastructure supports 1->N type conversions by requiring individual conversions to provide facilities to generate operations retrofitting N values into 1 of the original type when N > 1. This functionality can also be used to materialize explicit "cast"-like operations, but it did not support 1->1 type conversions until now. Modify TypeConverter to support materialization of cast operations for 1-1 conversions. This also makes materialization specification more extensible following the same pattern as type conversions. Instead of overloading a virtual function, users or subclasses of TypeConversion can now register type-specific materialization callbacks that will be called in order for the given type. Differential Revision: https://reviews.llvm.org/D79729
-
Kadir Cetinkaya authored
ReplayPreamble was just grabbing the reference of IncludeStructure passed to it and then replayed any includes seen so while exiting built-in file. This implies any include seen in built-in files being replayed as part of preamble, even though they are not. This wasn't an issue until we've started patching preambles, as includes from built-in files were not mapped back to main-file. This patch copies over existing includes at the time of ReplayPreamble::attach and only replies those to prevent any includes from the preamble patch getting mixed-in.
-
Djordje Todorovic authored
The collectCallSiteParameters() method searches for instructions which load values into registers used for parameters passing. Previously, interpretation of those values, loaded by one such instruction, was implemented inside collectCallSiteParameters() method. This patch moves the interpretation code from collectCallSiteParameters() method into a separate static method named interpretValue. New method is called from collectCallSiteParameters() to process each instruction from targeted instruction scope. The collectCallSiteParameters() searches for loaded parameter value among instructions which precede the call instruction, inside the same basic block. When needed, new method (interpretValue) could be used for searching any instruction scope. This is preparation for search of parameter value, loaded inside call delay slot. Patch by Nikola Tesic Differential revision: https://reviews.llvm.org/D78106
-
Alex Zinenko authored
One header guard was overlooked when renaming LoopOps to SCF, rename it. Also drop two unused macros, one of which referred to LoopOp (not "Ops", hence the overlook).
-
Pavel Labath authored
Summary: This is a result of the discussion at D78113. Previously we would be only giving the current offset at which the error was detected. However, this was phrased somewhat ambiguously (as it could also mean that end of data was at that offset). The new error message includes the current offset as well as the extent of the data being read. I've changed a couple of file-level static functions into private member functions in order to avoid passing a bunch of new arguments everywhere. Reviewers: dblaikie, jhenderson Subscribers: hiraditya, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78558
-
Pavel Labath authored
Summary: The code changes are very straight-forward -- just handle both DW_AT_GNU and DW_AT_call versions of all tags and attributes. There is just one small gotcha: in the GNU version, DW_AT_low_pc was used both for the "return pc" and the "call pc" values, depending on whether the tag was describing a tail call, while the official scheme uses different attributes for the two things. Reviewers: vsk, dblaikie Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D80519
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Igor Kudrin authored
Differential Revision: https://reviews.llvm.org/D80523
-
Alex Zinenko authored
The lower-to-affine-loops pass in chapters 5-7 of the Toy tutorial has been creating affine loops, erasing their terminator and creating it anew using a PatternRewriter instance to work around the fact that implicit terminators were created without notifying the rewriter. Now that has been fixed in 3ccf4a5b, remove the code erasing and re-creating the terminators and rely on the default ones.
-
Simon Pilgrim authored
-
Alex Zinenko authored
This fixes several post-commit nits from D79688 and D80135, namely typos, debug output and control flow inversion.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Florian Hahn authored
-
Florian Hahn authored
LV currently only supports power of 2 vectorization factors, which has been made explicit with the assertion added in 84045054. However, if the widest type is not a power-of-2 the computed MaxVF won't be a power-of-2 either. This patch updates computeFeasibleMaxVF to ensure the returned value is a power-of-2 by rounding down to the nearest power-of-2. Fixes PR46139. Reviewers: Ayal, gilr, rengolin Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D80870
-
Ehsan Toosi authored
Add BufferAssignmentCallOpConverter as a pattern rewriter for Buffer Placement. It matches the signature of the caller operation with the callee after rewriting the callee with FunctionAndBlockSignatureConverter. Differential Revision: https://reviews.llvm.org/D80785
-
Denis Antrushin authored
gc.relocate intrinsic is special in that its second and third operands are not real values, but indices into relocate's parent statepoint list of GC pointers. To be CSE'd, they need special handling in `isEqual()` and `getHashCode()`. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D80445
-
Muhammad Omair Javaid authored
This patch marks TestCreateDuringInstructionStep.py as flakey for Linux. This is failing randomly on arm/aarch64. I will monitor buildbot and skip it if it fails again.
-
Simon Pilgrim authored
-
Haojian Wu authored
Summary: The Initializer of a InitListExpr can be reset to null, which leads to nullptr-acces crashes. Reviewers: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80980
-
Simon Atanasyan authored
MIPS 64-bit ABI does not provide special PC-relative relocation like R_MIPS_PC32 in 32-bit case. But we can use a "chain of relocation" defined by N64 ABIs. In that case one relocation record might contain up to three relocations which applied sequentially. Width of a final relocation mask applied to the result of relocation depends on the last relocation in the chain. In case of 64-bit PC-relative relocation we need the following chain: `R_MIPS_PC32 | R_MIPS_64`. The first relocation calculates an offset, but does not truncate the result. The second relocation just apply calculated result as a 64-bit value. The 64-bit PC-relative relocation might be useful in generation of `.eh_frame` sections to escape passing `-Wl,-z,notext` flags to linker. Differential Revision: https://reviews.llvm.org/D80390
-
Dmitri Gribenko authored
Reviewers: hlopko, eduucaldas Reviewed By: hlopko, eduucaldas Subscribers: gribozavr2, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80822
-
Kazushi (Jam) Marukawa authored
Summary: Support I32/F32 registers in assembler parser and add regression tests of LD/ST instructions. Differential Revision: https://reviews.llvm.org/D80777
-