summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] Initial parsing/sema for the 'omp loop' constructomp-loopMike Rice2021-10-2827-8/+588
| | | | | | | Adds basic parsing/sema/serialization support for the #pragma omp loop directive. Differential Revision: https://reviews.llvm.org/D112499
* Revert "[clang] Fortify warning for scanf calls with field width too big."Nico Weber2021-10-283-169/+12
| | | | | This reverts commit 15e3d39110fa4449be4f56196af3bc81b623f3ab. See https://reviews.llvm.org/D111833#3093629
* [lldb][NFC] Improve CppModuleConfiguration documentation a bitRaphael Isemann2021-10-281-3/+3
|
* [lld][ELF] Update name of function in comment. NFCSam Clegg2021-10-281-1/+1
| | | | This function was renamed in https://reviews.llvm.org/D62291.
* [DSE] Eliminates redundant store of an exisiting value (PR16520)Dawid Jurczak2021-10-282-8/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's https://reviews.llvm.org/D90328 follow-up. This change eliminates writes to variables where the value that is being written is already stored in the variable. This achieves the goal by looping through all memory definitions in the current state and getting defining access from each of them. When there is defining access where the write instruction is identical to the original instruction it will remove this redundant write. For example: void f() { x = 1; if foo() { x = 1; g(); } else { h(); } } void g(); void h(); The second x=1 will be eliminated since it is rewriting 1 to x. This pass will produce this: void f() { x = 1; if foo() { g(); } else { h(); } } void g(); void h(); Differential Revision: https://reviews.llvm.org/D111727
* [InstCombine] Fix rare condition violation in canonicalizeClampLikeDavid Green2021-10-282-4/+12
| | | | | | | | | With a "ult x, 0", the fold in canonicalizeClampLike does not validate with undef inputs. This condition will usually have been simplified away, but we should ensure the code is correct in case. https://alive2.llvm.org/ce/z/S8HQ6H vs https://alive2.llvm.org/ce/z/h2XBJ_ See: https://reviews.llvm.org/D108049
* [mlir][linalg] Fix FoldConstantTranspose execution inefficiencyLei Zhang2021-10-281-33/+93
| | | | | | | | | | | * Move SmallVectors outside of inner loops to avoid frequent allocations and deallocations * Calculate linearized index and call flat range getters to avoid internal shape querying behind `getValue`. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D112099
* [X86][AVX] Attempt to fold a scaled index into a gather/scatter scale ↵Simon Pilgrim2021-10-282-36/+60
| | | | | | | | | | immediate (PR13310) If the index operand for a gather/scatter intrinsic is being scaled (self-addition or a shl-by-immediate) then we may be able to fold that scaling into the intrinsic scale immediate value instead. Fixes PR13310. Differential Revision: https://reviews.llvm.org/D108539
* [clangd] Escape error message in AddUsingKadir Cetinkaya2021-10-281-1/+1
| | | | Fixes https://github.com/clangd/clangd/issues/900
* [gn build] (manually) port d736002e90b5Nico Weber2021-10-281-0/+1
|
* [SLP]Improve/fix reordering of the gathered graph nodes.Alexey Bataev2021-10-284-93/+185
| | | | | | | | | | Gathered loads/extractelements/extractvalue instructions should be checked if they can represent a vector reordering node too and their order should ve taken into account for better graph reordering analysis/ Also, if the gather node has reused scalars, they must be reordered instead of the scalars themselves. Differential Revision: https://reviews.llvm.org/D112454
* Re-instate -Wweak-template-vtables as a no-op flagHans Wennborg2021-10-283-1/+8
| | | | | | | Follow-up to 8c136805242014b6ad9ff1afcac9d7f4a18bec3f to allow a less abrupt migration for users. Differential revision: https://reviews.llvm.org/D112704
* [MLIR][LLVM] Add llvm.mlir.global_ctors/dtors and translation supportUday Bondhugula2021-10-287-4/+215
| | | | | | | Add llvm.mlir.global_ctors and global_dtors ops and their translation support to LLVM global_ctors/global_dtors global variables. Differential Revision: https://reviews.llvm.org/D112524
* [lldb/test] Allow indentation in inline testsPavel Labath2021-10-282-1/+37
| | | | | | | This makes it possible to use for loops (and other language constructs) in inline tests. Differential Revision: https://reviews.llvm.org/D112706
* [InstCombine] allow Negator to fold multi-use select with constant armsSanjay Patel2021-10-282-7/+18
| | | | | | | | | | | | | The motivating test is reduced from: https://llvm.org/PR52261 Note that the more general problem of folding any binop into a multi-use select of constants is still there. We need to ease the restriction in InstCombinerImpl::FoldOpIntoSelect() to catch those. But these examples never reach that code because Negator exclusively handles negation patterns within visitSub(). Differential Revision: https://reviews.llvm.org/D112657
* [InstCombine][ConstantFolding] Make ConstantFoldLoadThroughBitcast ↵Peter Waller2021-10-282-3/+30
| | | | | | | | | | | TypeSize-aware The newly added test previously caused the compiler to fail an assertion. It looks like a strightforward TypeSize upgrade. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D112142
* [InstSimplify] Add tests for the range of a half float. NFCDavid Green2021-10-281-0/+295
|
* [GlobalISel][Tablegen] Fix SameOperandMatcher's isIdentical checkKonstantin Schwarz2021-10-283-3/+135
| | | | | | | | | | | During rule optimization, identical SameOperandMatchers are hoisted into a common group, however previously only one operand index was considered. Commutable patterns can introduce SameOperandMatcher checks where the second index is commuted, resulting in a different check that cannot be hoisted. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D111506
* [libomptarget] Build DeviceRTL for amdgpuJon Chesterfield2021-10-2821-13/+90
| | | | | | | | | | Passes same tests as the current deviceRTL. Includes cmake change from D111987. CI is showing a different set of pass/fails to local, committing this without the tests enabled by default while debugging that difference. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D112227
* tsan: move memory access functions to a separate fileDmitry Vyukov2021-10-287-622/+645
| | | | | | | | | | | tsan_rtl.cpp is huge and does lots of things. Move everything related to memory access and tracing to a separate tsan_rtl_access.cpp file. No functional changes, only code movement. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D112625
* [AMDGPU] Add 24-bit mulhi intrinsics in INTRINSIC_WO_CHAIN combine.Abinav Puthan Purayil2021-10-282-50/+31
| | | | | | | | | mul24 intrinsic's operands are simplified by AMDGPUTargetLowering::performIntrinsicWOChainCombine(). This change adds the mul24hi intrinsics in the combine since its operands can be simplified like that of the mul24 intrinsics. Differential Revision: https://reviews.llvm.org/D112702
* [AMDGPU] Fix rhs of the tests in amdgpu-codegenprepare-mul24.ll.Abinav Puthan Purayil2021-10-281-72/+72
| | | | Differential Revision: https://reviews.llvm.org/D112685
* [libc] automemcpyGuillaume Chatelet2021-10-2817-0/+2234
|
* [flang] Checks for pointers to intrinsic functionsEmil Kieri2021-10-285-21/+61
| | | | | | | | | | | Check that when a procedure pointer is initialised or assigned with an intrinsic function, or when its interface is being defined by one, that intrinsic function is unrestricted specific (listed in Table 16.2 of F'2018). Mark intrinsics LGE, LGT, LLE, and LLT as restricted specific. Getting their classifications right helps in designing the tests. Differential Revision: https://reviews.llvm.org/D112381
* [clangd] NFC: Use more idiomatic way of checking for definitionKirill Bobyrev2021-10-281-1/+1
|
* [clangd] NFC: Match function signature in the header and source fileKirill Bobyrev2021-10-281-2/+2
|
* [dexter] XFAIL feature_test source-root-dir.cppOCHyams2021-10-281-0/+3
| | | | Test is failing for unknown reasons and needs investigating.
* [AMDGPU] Add gfx10 uaddsat test coverage. NFC.Jay Foad2021-10-281-0/+123
|
* [Test] Regenerate some of llc test checks using auto updaterMax Kazantsev2021-10-285-43/+194
|
* [analyzer] sprintf is a taint propagator not a sourceBalazs Benics2021-10-282-1/+11
| | | | | | | | | | | | | | | | Due to a typo, `sprintf()` was recognized as a taint source instead of a taint propagator. It was because an empty taint source list - which is the first parameter of the `TaintPropagationRule` - encoded the unconditional taint sources. This typo effectively turned the `sprintf()` into an unconditional taint source. This patch fixes that typo and demonstrated the correct behavior with tests. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D112558
* [MLIR][OpenMP] Fixed the missing inclusive clause in omp.wsloop and fix ↵Shraiysh Vaishay2021-10-285-22/+188
| | | | | | | | | | | | | | | order clause This patch adds the inclusive clause (which was missed in previous reorganization - https://reviews.llvm.org/D110903) in omp.wsloop operation. Added a test for validating it. Also fixes the order clause, which was not accepting any values. It now accepts "concurrent" as a value, as specified in the standard. Reviewed By: kiranchandramohan, peixin, clementval Differential Revision: https://reviews.llvm.org/D112198
* [AMDGPU][GlobalISel] Fix waterfall loopsSebastian Neubauer2021-10-2848-984/+1880
| | | | | | | | | | | | | | - Move the `s_and exec` to its correct position before the content of the waterfall loop - Use the SI_WATERFALL pseudo instruction, like for sdag, to benefit from optimizations - Add support for indirect function calls To support indirect calls, add a G_SI_CALL instruction without register class restrictions and insert a waterfall loop when applying register banks. Differential Revision: https://reviews.llvm.org/D109052
* [GlobalISel] Simplify RegBankSelectNeubauer, Sebastian2021-10-281-17/+5
| | | | | | | | Save the instruction list of a block before selecting banks. This allows to cope with moved instructions, even if they are reordered or splitted into multiple basic blocks. Differential Revision: https://reviews.llvm.org/D111223
* [lldb] Remove ConstString from Process, ScriptInterpreter and StructuredData ↵Pavel Labath2021-10-2829-159/+76
| | | | plugin names
* [Test] Regenerate checks using auto-update scriptMax Kazantsev2021-10-282-20/+65
|
* [Driver][AArch64]Add driver support for neoverse-512tvb targetCaroline Concatto2021-10-289-3/+38
| | | | | | | | | | | The support for neoverse-512tvb mirrors the same option available in GCC[1]. There is no functional effect for this option yet. This patch ensures the driver accepts "-mcpu=neoverse-512tvb", and enough plumbing is in place to allow the new option to be used in the future. [1]https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html Differential Revision: https://reviews.llvm.org/D112406
* [lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated structMichał Górny2021-10-287-130/+87
| | | | Differential Revision: https://reviews.llvm.org/D112629
* [flang] runtime: Read environment variables directlyDiana Picus2021-10-286-35/+56
| | | | | | | | | | | | | | | Add support for reading environment variables directly, via std::getenv. This needs to allocate a C-style string to pass into std::getenv. If the memory allocation for that fails, we terminate. This also changes the interface for EnvVariableLength to receive the source file and line so we can crash gracefully. Note that we are now completely ignoring the envp pointer passed into ProgramStart, since that could go stale if the environment is modified during execution. Differential Revision: https://reviews.llvm.org/D111785
* [Support] [Windows] Manually clean up temp files if not setting delete ↵Martin Storsjö2021-10-283-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disposition Since D81803 / 79657e2339b58bc01fe1b85a448bb073d57d90bb, temp files created on network shares don't set "Disposition.DeleteFile = true". This flag normally takes care of removing the temp file both if the process exits abnormally (either crashing or killed externally), and when the file is closed cleanly. For network shares, we voluntarily choose to not set the flag, and if the operation to inspect the file handle (as a prerequisite to setting the flag since 79657e2339b58bc01fe1b85a448bb073d57d90bb) fails we also error out. In both of these cases, we can at least make sure to remove the temp files when they are closed cleanly. Adjust the semantics of "OF_Delete" to not set the delete disposition, but only set the access mode for allowing deletion. Move the call to setDeleteDisposition into TempFile::create, where we can check if it failed, and if it did, set a flag noting that the file should be removed manually at the end. This does leak files on crash, but at least doesn't leak files in regular successful runs. (Technically, the alternative codepath could use the RemoveFileOnSignal function, but that might complicate the TempFile implementation further.) This fixes https://github.com/mstorsjo/llvm-mingw/issues/233 and https://bugs.llvm.org/show_bug.cgi?id=52080. Differential Revision: https://reviews.llvm.org/D111875
* [clang] [MinGW] Rename the 'Arch' member to 'SubdirName'. NFC.Martin Storsjö2021-10-282-20/+23
| | | | | | | | This string isn't a plain architecture name, but contains the whole subdir name used for the sysroot, which often is equal to the target triple. Differential Revision: https://reviews.llvm.org/D112387
* [clang][MIPS] Fix search path for Debian multilib O32YunQiang Su2021-10-2815-4/+27
| | | | | | | | In the situation of multilib, the gcc objects are in a /32 directory. On Debian, the libraries is under /libo32 to avoid confliction. This patch enables clang find gcc in /32, and C lib in /libo32. Differential Revision: https://reviews.llvm.org/D112158
* [clangd] Avoid expensive checks of buffer names in IncludeCleanerSam McCall2021-10-283-27/+42
| | | | | | | | | | | | This changes the handling of special buffers (<command-line> etc) that SourceManager treats as files but FileManager does not. We now include them in findReferencedFiles() and drop them as part of translateToHeaderIDs(). This pairs more naturally with the data representations we're using, and so avoids a bunch of converting between representations for filtering. Differential Revision: https://reviews.llvm.org/D112652
* [CSSPGO] Trim cold base profiles for the CS preinliner.Hongtao Yu2021-10-276-13/+38
| | | | | | | | Adding support to the CS preinliner to trim cold base profiles. This makes trimming consistent with the inline decision made by the preinliner. Also disable the existing profile merger when preinliner is on unless explicitly specified. Reviewed By: wenlei, wlei Differential Revision: https://reviews.llvm.org/D112489
* [RISCV] Sync Zvlsseg register order as the same as vector registers.Hsiangkai Wang2021-10-2814-29561/+29585
| | | | | | | | Sync the order of Zvlsseg registers with vector registers to avoid unnecessary register copies between vector instructions and zvlsseg instructions. Differential Revision: https://reviews.llvm.org/D110250
* Add unix signal hit counts to the target statistics.Greg Clayton2021-10-275-13/+59
| | | | | | | | | | | | | | | | | Android and other platforms make wide use of signals when running applications and this can slow down debug sessions. Tracking this statistic can help us to determine why a debug session is slow. The new data appears inside each target object and reports the signal hit counts: "signals": [ { "SIGSTOP": 1 }, { "SIGUSR1": 1 } ], Differential Revision: https://reviews.llvm.org/D112683
* [mlir][GPUtoNVVM] Relax restriction on wmma op loweringthomasraoux2021-10-274-70/+92
| | | | | | | Allow lowering of wmma ops with 64bits indexes. Change the default version of the test to use default layout. Differential Revision: https://reviews.llvm.org/D112479
* [AMDGPU] Remove unused declaration findNumUsedRegistersSI (NFC)Kazu Hirata2021-10-271-3/+0
|
* [Test] Add test showing missing simplifycfg opportunity for Phi with undef ↵Max Kazantsev2021-10-281-0/+38
| | | | inputs
* [X86] Add a dependency breaking xor before any gathers with an undef ↵Phoebe Wang2021-10-285-123/+182
| | | | | | | | | | | | | | | | | | | | passthru value. In the instruction encoding, the passthru register is always tied to the destination register. The CPU scheduler has to wait for the last writer of this register to finish executing before the gather can start. This is true even if the initial mask is all ones so that the passthru will never be used. By explicitly zeroing the register we can break the false dependency. The zero idiom is executed completing by the register renamer and so is immedately considered ready. Authored by Craig. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D112505
* [RISCV] Use vmv.v.[v|i] if we know COPY is under the same vl and vtype.Hsiangkai Wang2021-10-28104-1966/+2483
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we know the source operand of COPY is defined by a vector instruction with tail agnostic and the same LMUL and there is no vsetvli between COPY and the define instruction to change the vl and vtype, we could use vmv.v.v or vmv.v.i to copy vector registers to get better performance than the whole vector register move instructions. If the source of COPY is from vmv.v.i, we could use vmv.v.i for the COPY. This patch only considers all these instructions within one basic block. Case 1: ``` bb.0: ... VSETVLI # The first VSETVLI before COPY and VOP. ... # Use this VSETVLI to check LMUL and tail agnostic. ... vy = VOP va, vb # Define vy. ... # There is no vsetvli between VOP and COPY. vx = COPY vy ``` Case 2: ``` bb.0: ... VSETVLI # The first VSETVLI before VOP. ... # Use this VSETVLI to check LMUL and tail agnostic. ... vy = VOP va, vb # Define vy. ... # There is no vsetvli to change vl between VOP and COPY. ... VSETVLI # The first VSETVLI before COPY. ... # This VSETVLI does not change vl and vtype. ... vx = COPY vy ``` Co-Authored-by: Zakk Chen <zakk.chen@sifive.com> Co-Authored-by: Kito Cheng <kito.cheng@sifive.com> Differential Revision: https://reviews.llvm.org/D103510