summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [ADT] Use a lookup table in hexdigit() and call that from toHex()Hans Wennborg2022-01-111-6/+6
| | | | | | | | A lookup table, which toHex() was using, seems like the better approach. Having two implementations is redundant, so put the lookup table in hexdigit() and make toHex() call that. Differential revision: https://reviews.llvm.org/D116960
* [SemaOverload] compareConversionFunctions - use castAs<> instead of getAs<> ↵Simon Pilgrim2022-01-111-2/+1
| | | | | | to avoid dereference of nullptr The pointer is dereferenced immediately below, so assert the cast is correct instead of returning nullptr
* [SemaOverload] Use castAs<> instead of getAs<> to avoid dereference of nullptrSimon Pilgrim2022-01-111-3/+2
| | | | The pointer is always dereferenced inside BuildSimilarlyQualifiedPointerType, so assert the cast is correct instead of returning nullptr
* [clang] [test] Fix clang-cl unused argument tests on paths that start with /UMartin Storsjö2022-01-111-0/+10
| | | | | | | | | | | This reinstates a test that was temporarily removed in e26bbae30218a35d76a79fe90b0e41dd0f71b779, in a form that works on Darwin. Use -LD instead of -link as a linker argument that is unused when compiling, that produces warnings normally. -LD can be placed anywhere in the command line, so that the command line ends with "-- %s", making paths starting with /U correctly interpreted as paths, not options.
* [LICM] Regenerate test checks (NFC)Nikita Popov2022-01-111-46/+214
|
* [MLIR] Update allocs to memref.allocs in documentation.Julian Gross2022-01-117-30/+30
| | | | | | | | Changed the remaining appearances of alloc to memref.alloc in several documentation sections, since they lead to misunderstandings, if they are used. Differential Revision: https://reviews.llvm.org/D116999
* [RISCV] Generate 32 bits jumptable entries when code model is smallwangpc2022-01-113-2/+28
| | | | | | | | | | The code can only address the whole RV32 address space or the lower 2 GiB of the RV64 address space in small code model, so 32 bits entry is enough. Cache hit ratio and code size have some improvements. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116435
* [flang] Add tests for converting arrays and refs to arrays. NFCDiana Picus2022-01-111-2/+33
| | | | | | | Cover more of the code paths from LLVMTypeConverter::convertPointerLike and LLVMTypeConverter::convertSequenceType. Differential Revision: https://reviews.llvm.org/D116927
* [clangd] Save more getFileID in SelectionSam McCall2022-01-111-16/+28
| | | | This saves about 10% of SelectionVisitor::pop().
* [SCEVExpander] Use IntToPtr for temporary instruction.Florian Hahn2022-01-111-2/+2
| | | | | Use PtrToInt instead Add when creating temporary instructions. The add might get folded away with more sophisticated folding.
* [IR] Change vector.splice intrinsic to reject out-of-bounds indicesDavid Sherwood2022-01-116-307/+89
| | | | | | | | | | | | | | | | | | | I've changed the definition of the experimental.vector.splice instrinsic to reject indices that are known to be or possibly out-of-bounds. In practice, this means changing the definition so that the index is now only valid in the range [-VL, VL-1] where VL is the known minimum vector length. We use the vscale_range attribute to take the minimum vscale value into account so that we can permit more indices when the attribute is present. The splice intrinsic is currently only ever generated by the vectoriser, which will never attempt to splice vectors with out-of-bounds values. Changing the definition also makes things simpler for codegen since we can always assume that the index is valid. This patch was created in response to review comments on D115863 Differential Revision: https://reviews.llvm.org/D115933
* [clangd] Small optimization in SelectionTreeSam McCall2022-01-111-2/+5
| | | | | This seems to be strictly faster in all cases. Before fixing D116978 it was one of the hot paths, and may become one again.
* [clang] [test] Remove newly added tests that fail on DarwinMartin Storsjö2022-01-111-10/+0
| | | | | | | | | | These tests were recently added in 50ec1306d060e46e0d53c9f5d8a052e1b0d10d3b. The clang-cl invocations interpret the source path, %s, which begins with /Users, as a cl option /U. Normally this is worked around by passing -- before the arguments that must be interpreted as files, not options, but in the current test, the -link option must be passed last, after any file names.
* [LoopVersioning] Check the full generated runtime checks in lcssa.ll.Florian Hahn2022-01-111-6/+33
| | | | This makes improvements in follow-up patches more obvious.
* [mlir][GPU] Fix attribute name of DL specificationDiego Caballero2022-01-112-10/+10
| | | | | | | | | | | D115722 added a DL spec to GPU modules. It happens that the DL default interface implementation is sensitive to the name of the DL spec attribute. This patch is fixing the name of the attribute to be the expected one. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D116956
* [CodeGen] Make element type in emitArrayDestroy() predictableNikita Popov2022-01-113-6/+8
| | | | | | | | | | | | | | When calling emitArrayDestroy(), the pointer will usually have ConvertTypeForMem(EltType) as the element type, as one would expect. However, globals with initializers sometimes don't use the same types as values normally would, e.g. here the global uses { double, i32 } rather than %struct.T as element type. Add an early cast to the global destruction path to avoid this special case. The cast would happen lateron anyway, it only gets moved to an earlier point. Differential Revision: https://reviews.llvm.org/D116219
* [CSKY] Add CSKYConstantIslands Pass to lift or duplicate constant pool entryZi Xuan Wu2022-01-1111-135/+1633
| | | | | | | | Loading constants inline is expensive on CSKY and it's in general better to place the constant nearby in code space and then it can be loaded with a simple 16/32 bit load instruction like lrw. It needs lift or duplicates constant pool entry to make constant nearby so that lrw instruction can reach.
* [RISCV] Override TargetLowering::BuildSDIVPow2 to generate SELECTwangpc2022-01-113-0/+866
| | | | | | | | | When `Zbt` is enabled, we can generate SELECT for division by power of 2, so that there is no data dependency. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D114856
* [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence ↵Martin Storsjö2022-01-114-6/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | some unused argument warnings When passing a set of flags to configure defaults for a specific target (similar to the cmake settings `CLANG_DEFAULT_RTLIB`, `CLANG_DEFAULT_UNWINDLIB`, `CLANG_DEFAULT_CXX_STDLIB` and `CLANG_DEFAULT_LINKER`, but without hardcoding them in the binary), some of the flags may cause warnings (e.g. `-stdlib=` when compiling C code). Allow requesting selectively ignoring unused arguments among some of the arguments on the command line, without needing to resort to `-Qunused-arguments` or `-Wno-unused-command-line-argument`. Fix up the existing diagnostics.c testcase. It was added in response to PR12181 to fix handling of `-Werror=unused-command-line-argument`, but the command line option in the test (`-fzyzzybalubah`) now triggers "error: unknown argument" instead of the intended warning. Change it into a linker input (`-lfoo`) which triggers the intended diagnostic. Extend the existing test case to check more cases and make sure that it keeps testing the intended case. Add testing of the new option to this existing test. Differential Revision: https://reviews.llvm.org/D116503
* [gn build] Port 8d23b7420c92LLVM GN Syncbot2022-01-111-0/+1
|
* [libc++][ranges] Implement `uninitialized_copy{,_n}` and ↵Konstantin Varlamov2022-01-1024-100/+1816
| | | | | | | | `uninitialized_move{,_n}`. Also implement `in_out_result` which is a prerequisite. Differential Revision: https://reviews.llvm.org/D116023
* [NFC][XCOFF][llvm-readobj] replace binaries with YAMLs (only tests for Symbols).Esme-Yi2022-01-117-846/+381
| | | | | | | | Summary: Since yaml2obj now supports converting AuxSymbols, we can use YAMLs as input for symbol-related tests of llvm-readobj instead of binaries. Reviewed By: jhenderson, shchenz Differential Revision: https://reviews.llvm.org/D114434
* allow llvm-reduce, if asked, to run its set of passes more than once, taking ↵John Regehr2022-01-103-11/+34
| | | | longer to finish but also potentially resulting in a smaller reduced file.
* [ELF] Move OffsetGetter before some static functions. NFCFangrui Song2022-01-101-46/+46
| | | | to prepare for D116881.
* [lld-macho] Change some global pointers to unique_ptrFangrui Song2022-01-105-10/+10
| | | | | | | | Similar to D116143. My x86-64 `lld` is ~8KiB smaller. Reviewed By: keith Differential Revision: https://reviews.llvm.org/D116902
* [lld-macho][test] Add missing coverage for archive/dylib resolution after ↵Fangrui Song2022-01-101-0/+2
| | | | | | | | | | | | D115092 When `file->fetch(sym)` is replaced with a no-op, no test fails. The new test catches the case. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D116916
* [RISCV] Block vmsgeu.vi with 0 immediate in IselChenbing.Zheng2022-01-114-83/+84
| | | | | | | | | For vmsgeu.vi with 0, we know this is always true. So we can replace it with vmset.m (unmasked) or vmset.m+vmand.mm (masked). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116584
* [RISCV] Select vl op to X0 when it is equal to ~0.jacquesguan2022-01-112-3/+3
| | | | | | Now the backend will select ~0 vl to a register and load instruction, we could use X0 to replace it. Differential Revision: https://reviews.llvm.org/D116798
* [RISCV] Add precommit test for select vl op that equal to ~0.jacquesguan2022-01-111-0/+15
| | | | | | Precommit test for D116798 Differential Revision: https://reviews.llvm.org/D116799
* [M68k][test][NFC] Reorder the tests for MxBTST_MI and MxBTST_MRJim Lin2022-01-112-48/+48
| | | | Follow the order of definitions in M68kInstrBits.td
* [RISCV] Use shift for zero extension when Zbb and Zbp are not enabledHaocong.Lu2022-01-1136-896/+741
| | | | | | | | | | | Now AND is used for zero extension when both Zbb and Zbp are not enabled. It may be better to use shift operation if the trailing ones mask exceeds simm12. This patch optimzes LUI+ADDI+AND to SLLI+SRLI. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116720
* git-clang-format HEAD~Nick Desaulniers2022-01-101-4/+4
|
* [TargetLowering] precommit refactor from D115688 NFCNick Desaulniers2022-01-101-13/+13
| | | | Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
* [RISCV] Use vmv.s.x to build one element splat vector.jacquesguan2022-01-1111-916/+630
| | | | | | When we want to create an splat vector that only the first element is initialized, we could use vmv.s.x or vfmv.s.f to build it. Differential Revision: https://reviews.llvm.org/D116277
* Partial revert of 82fb4f4Philip Reames2022-01-103-39/+27
| | | | Two crashes have been reported. This change disables the new logic while leaving the new node in tree. Hopefully, that's enough to allow investigation without breakage while avoiding massive churn.
* Delete a stale commentPhilip Reames2022-01-101-4/+0
|
* [AST] lookup in parent DeclContext for transparent DeclContextChuanqi Xu2022-01-114-3/+29
| | | | | | | | | | | | | The compiler would crash if we lookup for name in transparent decl context. See the tests attached for example. I think this should make sense since the member declared in transparent DeclContext are semantically defined in the enclosing (non-transparent) DeclContext, this is the definition for transparent DeclContext. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D116792
* [SelectionDAG] Add additional documentation to FP_TO_S/UINT_SAT to justify ↵Craig Topper2022-01-101-0/+4
| | | | | | | | | D116870. NFC As noted in post-commit review, the value of the bits between the saturating type and result type were not defined defined. Define them to be sign extended for FP_TO_SINT_SAT and zero extended for FP_TO_UINT_SAT.
* [AST] Don't consider 'ExportDecl' when calculating DeclContext 'Encloses'Chuanqi Xu2022-01-112-1/+33
| | | | | | | | | | This mimics the style of 90010c2e1 (Don't consider 'LinkageSpec' when calculating DeclContext 'Encloses'). Since ExportDecl and LinkageSpec are transparent DeclContext, they share some similarity. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D116911
* Add a `qualified` directive to the Op, Attribute, and Type declarative ↵Mehdi Amini2022-01-1112-12/+202
| | | | | | | | | | | assembly format This patch introduces a new directive that allow to parse/print attributes and types fully qualified. This is a follow-up to ee0908703d29 which introduces the eliding of the `!dialect.mnemonic` by default and allows to force to fully qualify each type/attribute individually. Differential Revision: https://reviews.llvm.org/D116905
* [clang][OpenMP5.1] Initial parsing/sema for 'indirect' clauseJennifer Yu2022-01-1013-39/+218
| | | | Differential Revision: https://reviews.llvm.org/D116764
* [Tooling] When transferring compile commands between files, always use '--'Sam McCall2022-01-114-25/+10
| | | | | | | | | | "driver <flags> -- <input>" is a particularly convenient form of the compile command to manipulate, with fewer special cases to handle. Guaranteeing that the output command is of that form is cheap and makes it easier to consume the result in some cases. Differential Revision: https://reviews.llvm.org/D116721
* [Diagnostics] Don't drop a statically set NoWarningAsError flag during ↵Wolfgang Pieb2022-01-102-1/+7
| | | | | | | | | | | | option processing When a -W<diag> option is given on the command line, and the corresponding diagnostic has the NoWarnOnError flag set, prevent the flag from being dropped when the severity is reevaluated. This fixes PR51837. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D109981
* [libcxx][test] Make LIBCPP_STATIC_ASSERT usable at namespace scopeCasey Carter2022-01-101-5/+5
| | | | | | ... even when `!defined(_LIBCPP_VERSION)`. (Note that the previous definition for this case - `((void)0);` - is ill-formed at namespace scope.) Ditto for `LIBCPP_ASSERT`, `LIBCPP_ASSERT_NOEXCEPT`, `LIBCPP_ASSERT_NOT_NOEXCEPT`, and `LIBCPP_ONLY`. Differential Revision: https://reviews.llvm.org/D116880
* Emit the C++ dialect in -gmodules .pcm files.Adrian Prantl2022-01-102-1/+2
| | | | | | | | | | | | | | | | Because of commit: https://reviews.llvm.org/D104291 the -gmodules .pcm files do not have the same DW_AT_language dialect as the .o file. This was a simple matter of passing the DebugStrictDwarf flag to the PCHContainerGenerator object's CodeGenOpts from the CompilerInstance passed in to it. Before this change if you ran dwarfdump on the gmodule cache folder you would get DW_AT_language (DW_LANG_C_plus_plus) even when using -std=c++14 with clang Patch by Shubham Rastogi! Differential Revision: https://reviews.llvm.org/D116790
* docs: update some bug tracker references (NFC)Keith Smiley2022-01-103-12/+9
| | | | | | Fixes https://github.com/llvm/llvm-project/issues/53091 Differential Revision: https://reviews.llvm.org/D116898
* [CodeCompletion] Complete designators for fields in anonymous structs/unionsSam McCall2022-01-112-1/+17
| | | | | | Fixes https://github.com/clangd/clangd/issues/836 Differential Revision: https://reviews.llvm.org/D116717
* Add coverage of GlobalsModRef's indirect global casePhilip Reames2022-01-101-14/+85
|
* [libc] Add linux aarch64 syscall implementation.Siva Chandra2022-01-106-6/+143
| | | | | | | | | Add mmap and munmap to the linux aarch64 entrypoint list as the first user of these syscalls. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D116949
* [NFC][regalloc] Pull out some AllocationOrder/CostPerUseLimit eviction logicMircea Trofin2022-01-102-26/+55
| | | | | | We are reusing that logic in the ML implementation. Differential Revision: https://reviews.llvm.org/D116075