summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [𝘀𝗽𝗿] initial versionupstream/users/MaskRay/spr/driver-support-wa-fdpic-for-arm-fdpic-abiFangrui Song2024-02-1823-12/+178
|\ | | | | | | Created using spr 1.3.4
| * [𝘀𝗽𝗿] changes to main this commit is based onupstream/users/MaskRay/spr/main.driver-support-wa-fdpic-for-arm-fdpic-abiFangrui Song2024-02-1818-12/+156
|/ | | | | | Created using spr 1.3.4 [skip ci]
* [clang][Interp][NFC] Make Record::{Base,Field} member pointers constTimm Bäder2024-02-183-11/+11
|
* [clang][Interp] Not all record bases are of RecordTypeTimm Bäder2024-02-182-16/+38
| | | | See the attached test case.
* [libc++] Fixes istream::sync. (#76467)Mark de Wever2024-02-182-5/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two issues. The return value ---------------- Based on the wording [istream.unformatted]/37 Effects: Behaves as an unformatted input function (as described above), except that it does not count the number of characters extracted and does not affect the value returned by subsequent calls to gcount(). After constructing a sentry object, if rdbuf() is a null pointer, returns -1. [istream.unformatted]/1 ... It then creates an object of class sentry with the default argument noskipws (second) argument true. If the sentry object returns true, when converted to a value of type bool, the function endeavors to obtain the requested input. ... It could be argued the current behaviour is correct, however constructing a istream rdbuf() == nullptr creates a sentry that returns false; its state is always bad in this case. As mentioned in the bug report, after this change the 3 major implementations behave the same. The setting of the state ------------------------ When pubsync returned -1 it updated the local __state variable and returned. This early return caused the state up the istream not to be updated to the new state. Fixes: https://github.com/llvm/llvm-project/issues/51497 Fixes: https://github.com/llvm/llvm-project/issues/51499 --------- Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
* [mlir][linalg] Add pattern to propagate pack up through tensor.pad (#82035)Quinn Dawkins2024-02-182-389/+538
| | | | | | | This mirrors the existing pattern for pushing unpack down through padding, restricting to cases where the padded dimensions aren't tiled by the pack. Additionally reformats the propagation test to make it easier to read.
* [AMDGPU] fixes duplicate expressions in if stmnts in SIISelLowering.cpp (#82018)Nick Anderson2024-02-181-2/+2
| | | fixes #81766
* [clang][Interp] Classify correct type for compound shiftsTimm Bäder2024-02-182-1/+10
| | | | | RT must be the type of the RHS, otherwise this later fails when we set the RHS value to the temporary variable.
* [clang] Differentiate between identifier and string EnumArgument (#68550)Sergei Barannikov2024-02-1811-62/+122
| | | | | | | | | | | | | | | | | EnumArgument may be a string or an identifier. If it is a string, it should be parsed as unevaluated string literal. Add IsString flag to EnumArgument so that the parser can choose the correct parsing method. Target-specific attributes that share spelling may have different attribute "prototypes". For example, ARM's version of "interrupt" attribute accepts a string enum, while MSP430's version accepts an unsigned integer. Adjust ClangAttrEmitter so that the generated `attributeStringLiteralListArg` returns the correct mask depending on target triple. It is worth noting that even after this change some string arguments are still parsed as identifiers or, worse, as expressions. This is because of some special logic in `ParseAttributeArgsCommon`. Fixing it is out of scope of this patch.
* [clang-tidy] Fixes to readability-implicit-bool-conversion (#72050)Piotr Zegar2024-02-183-4/+31
| | | | | | | | - Fixed issue with invalid code being generated when static_cast is put into fix, and no space were added before it. - Fixed issue with duplicate parentheses being added when double implicit cast is used. Closes #71848
* [MC][AsmParser] Make `MatchRegisterName` return `MCRegister` (NFC) (#81408)Sergei Barannikov2024-02-188-34/+39
| | | `MCRegister` is preferred over `unsigned` nowadays.
* [mlir][arith] Align shift Ops with LLVM instructions on allowed shift ↵Felix Schneider2024-02-183-11/+44
| | | | | | | | | | | amounts (#82133) This patch aligns the shift Ops in `arith` with respective LLVM instructions. Specifically, shifting by an amount equal to the bitwidth of the operand is now defined to return poison. Relevant discussion: https://discourse.llvm.org/t/some-question-on-the-semantics-of-the-arith-dialect/74861/10 Relevant issue: https://github.com/llvm/llvm-project/issues/80960
* [MLIR][OpenMP] Add `private` clause to `omp.parallel` (#81452)Kareem Ergawy2024-02-187-67/+255
| | | | | | | | | | | | | | | | | Extends the `omp.parallel` op by adding a `private` clause to model [first]private variables. This uses the `omp.private` op to map privatized variables to their corresponding privatizers. Example `omp.private` op with `private` variable: ``` omp.parallel private(@x.privatizer %arg0 -> %arg1 : !llvm.ptr) { ^bb0(%arg1: !llvm.ptr): // ... use %arg1 ... omp.terminator } ``` Whether the variable is private or firstprivate is determined by the attributes of the corresponding `omp.private` op.
* [C++20] [Modules] Don't import non-inline function bodies even if it is ↵Chuanqi Xu2024-02-182-5/+4
| | | | | | | | | | | | | | | marked as always_inline Close https://github.com/llvm/llvm-project/issues/80949 Previously, I thought the always-inline function can be an exception to enable optimizations as much as possible. However, it looks like it breaks the ABI requirement we discussed later. So it looks better to not import non-inline function bodies at all even if the function bodies are marked as always_inline. It doesn't produce regressions in some degree since the always_inline still works in the same TU.
* [mlir][spirv] Replace hardcoded strings with op methods (#81443)SahilPatidar2024-02-174-13/+23
| | | | | | | | Progress towards #77627 --------- Co-authored-by: SahilPatidar <patidarsahil@2001gmail.com> Co-authored-by: Lei Zhang <antiagainst@gmail.com>
* Revert "Report only loaded debug info in statistics dump (#81706)" (#82150)Jonas Devlieghere2024-02-1724-346/+21
| | | | | | | This reverts commit 21ddd7ff2b166c5e133b460b1a09ee8adb786ccd because it breaks a bunch of tests: https://lab.llvm.org/buildbot/#/builders/68/builds/69018 https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/16273
* [lldb] Don't rely on ScriptInterpreterPythonImpl::Initialize in the unit ↵Jonas Devlieghere2024-02-171-21/+5
| | | | | | | | | | | | | | | | | | | | | | tests (#82096) The unit tests only test the Python objects and don't actually use anything from the LLDB module. That means that all the additional complexity in ScriptInterpreterPythonImpl::Initialize is overkill. By doing the initialization by hand, we avoid the annoying ModuleNotFoundError. Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'lldb' The error is the result of us stubbing out the SWIG (specifically `PyInit__lldb`) because we cannot link against libLLDB from the unit tests. The downside of doing the initialization manually is that we do lose a bit of test coverage. For example, issue #70453 also manifested itself in the unit tests.
* [gn] port d332d88b919f (tzdb.cpp)Nico Weber2024-02-172-1/+9
|
* [NFC][llvm-exegesis] Clean up BenchmarkRunner commentsAiden Grossman2024-02-171-9/+10
| | | | | | | There were a couple things in the comments of BenchmarkRunner.cpp (and maybe other files, I can't really remember) that were bugging me. This patch fixes a couple of minor issues specifically in BenchmarkRunner like typos and makes a couple instances more clear.
* [lldb] Call Import_AppendInittab before Py_Initialize (#82095)Jonas Devlieghere2024-02-171-14/+18
| | | | | | | | | | | | | | | | | | | | The Python documentation [1] says that `PyImport_AppendInittab` should be called before `Py_Initialize()`. Starting with Python 3.12, this is enforced with a fatal error: Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be called after Py_Initialize() This commit ensures we only modify the table of built-in modules if Python hasn't been initialized. For Python embedded in LLDB, that means this happen exactly once, before the first call to `Py_Initialize`, which becomes a NO-OP after. However, when lldb is imported in an existing Python interpreter, Python will have already been initialized, but by definition, the lldb module will already have been loaded, so it's safe to skip adding it (again). This fixes #70453. [1] https://docs.python.org/3.12/c-api/import.html#c.PyImport_AppendInittab
* Apply clang-tidy fixes for llvm-namespace-comment in ↵Mehdi Amini2024-02-171-1/+1
| | | | TestDialectInterfaces.cpp (NFC)
* Apply clang-tidy fixes for modernize-use-equals-default in ↵Mehdi Amini2024-02-171-2/+1
| | | | TestLinalgDropUnitDims.cpp (NFC)
* Apply clang-tidy fixes for performance-unnecessary-value-param in ↵Mehdi Amini2024-02-171-1/+1
| | | | TestReifyValueBounds.cpp (NFC)
* Apply clang-tidy fixes for modernize-use-equals-default in ↵Mehdi Amini2024-02-171-2/+1
| | | | TestDecomposeAffineOps.cpp (NFC)
* Apply clang-tidy fixes for llvm-qualified-auto in RegionUtils.cpp (NFC)Mehdi Amini2024-02-171-1/+1
|
* [mlir][docs] Fix broken links to traits documentation (#82131)mlevesquedion2024-02-176-11/+11
| | | | | | It seems the `Traits.md` file was turned into `Traits/_index.md` in https://reviews.llvm.org/D153291, causing links to `Traits.md` to no longer work (instead, `Traits` needs to be used).
* [mlir] Handle cycles and back edges in --view-op-graph (#82002)Artem Tyurin2024-02-173-3/+86
| | | | Fixes #62128.
* [TargetParser] Expose Triple::getArchPointerBitWidth. (#82086)Lang Hames2024-02-173-2/+26
| | | | | The getArchPointerBitWidth method provides direct access to the pointer size for arithmetic or switch statements, instead of requiring clients to use the isArch16Bit / isArch32Bit / isArch64Bit predicates.
* [BOLT][DWARF] Remove redundant code (#82118)Alexander Yermolovich2024-02-171-6/+1
| | | Removed some redundant code. Should be NFC change.
* [mlir][sparse] deallocate tmp coo buffer generated during stage-spars… ↵Peiming Liu2024-02-175-14/+35
| | | | | (#82017) …e-ops pass.
* Revert "[Support] Introduce formatv variant of createStringError" (#82126)Alex Langford2024-02-172-27/+0
| | | | | | Reverts llvm/llvm-project#80493 This increased clang compile times by 0.5%. I'll figure out a less expensive way to achieve this.
* Report only loaded debug info in statistics dump (#81706)Wanyi2024-02-1724-21/+346
| | | | | | | | | Currently running `statistics dump` will trigger lldb to load debug info that's not yet loaded (eg. dwo files). Resulted in a delay in the command return, which, can be interrupting. This patch also added a new option `--load-all-debug-info` asking statistics to dump all possible debug info, which will force loading all debug info available if not yet loaded.
* [lldb] Use PyBytes and PyByteArray in Python Data Objects unittest (#82098)Jonas Devlieghere2024-02-171-12/+18
| | | | | | | | Use a Python Bytes and ByteArray object instead of Integers for TestOwnedReferences and TestBorrowedReferences. These two tests were failing when building against Python 3.12 because these Integer objects had a refcount of 4294967296 (-1). I didn't dig into it, but I suspect the Python runtime has adopted an optimization to decrease refcounting traffic for these simple objects.
* [DAGCombiner] Allow tryToFoldExtOfLoad to use a sextload for zext nneg. (#81714)Craig Topper2024-02-172-10/+57
| | | | | If the load is used by any signed setccs, we can use a sextload instead of zextload. Then we don't have to give up on extending the load.
* [llvm][misexpect][NFC] Fix typos in comments (#82124)Paul Kirth2024-02-171-4/+4
|
* [NFC] Trim trailing whitespaceDanny Mösch2024-02-171-1/+1
|
* [VPlan] Simplify addCanonicalIVRecipes by using VPBuilder (NFC).Florian Hahn2024-02-171-12/+7
| | | | | Use VPBuilder to construct VPInstructions, which means there's no need to manually inserting recipes.
* [libc++] simplify the midpoint function (#81717)rilysh2024-02-171-8/+10
| | | | | Right now we've a nested ternary for the midpoint function, but this can be simplified a bit more, using if statements. This also slightly increases the readability of that function.
* [Support/ELF] Add OpenBSD PT_OPENBSD_SYSCALLS constant.Frederic Cambus2024-02-171-0/+1
| | | | Reference: https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h
* [ValueTracking] Fix computeKnownFPClass for fpext (#81972)Yingwei Zheng2024-02-173-3/+70
| | | | | | This patch adds the missing `subnormal -> normal` part for `fpext` in `computeKnownFPClass`. Fixes the miscompilation reported by https://github.com/llvm/llvm-project/pull/80941#issuecomment-1947302100.
* [NFC][libc++] Requests PR at GitHub instead of Phabricator.Mark de Wever2024-02-172-6/+7
|
* [VPlan] Turn private members of VPlanTransforms to static funcs (NFC)Florian Hahn2024-02-172-47/+34
| | | | | Private members of VPlanTransforms are only used inside VPlanTransforms.cpp, just make them static.
* [libc++][chrono] Loads tzdata.zi in tzdb. (#74928)Mark de Wever2024-02-1747-242/+2619
| | | | | | | | | | | | | | | | | | | | | | This implements the loading of the tzdata.zi file and store its contents in the tzdb struct. This adds all required members except: - the leap seconds, - the locate_zone, and - current_zone. The class time_zone is incomplete and only contains the parts needed for storing the parsed data. The class time_zone_link is fully implemented including its non-member functions. Implements parts of: - P0355 Extending <chrono> to Calendars and Time Zones - P1614 The Mothership has Landed Implements: - P1982 Rename link to time_zone_link
* [AMDGPU] Set predicates more consistently for BUF instructions (#81865)Jay Foad2024-02-172-232/+217
| | | | | | Set DecoderNamespace and AssemblerPredicate in the base class for Real instructions for each subtarget. This avoids some ad hoc "let" around groups of instructions definitions, and fixes some missed cases like BUFFER_GL0_INV_gfx10 which was missing DecoderNamespace.
* [docs] README: Switch link to clang.llvm.org to use HTTPS.Frederic Cambus2024-02-171-1/+1
|
* [AArch64][GlobalISel] Improve and expand fcopysign lowering (#71283)David Green2024-02-177-419/+454
| | | | | | | | | | This alters the lowering of G_COPYSIGN to support vector types. The general idea is that we just lower it to vector operations using and/or and a mask, which are now converted to a BIF/BIT/BSP. In the process the existing AArch64LegalizerInfo::legalizeFCopySign can be removed, replying on expanding the scalar versions to vector instead, which just needs a small adjustment to allow widening scalars to vectors.
* [mlir][sparse] Fix memory leaks (part 2) (#81979)Matthias Springer2024-02-179-1/+39
| | | | | | | | This commit fixes memory leaks in sparse tensor integration tests by adding `bufferization.dealloc_tensor` ops. Note: Buffer deallocation will be automated in the future with the ownership-based buffer deallocation pass, making `dealloc_tensor` obsolete (only codegen path, not when using the runtime library).
* [AArch64][GlobalISel] Fail legalization for unknown libcalls. (#81873)David Green2024-02-172-0/+138
| | | | If, like powi on windows, the libcall is unavailable we should fall back to SDAG. Currently we try and generate a call to "".
* [AMDGPU] Use HasClamp instead of HasIntClamp in VOP3_Pseudo. NFC. (#82020)Stanislav Mekhanoshin2024-02-171-1/+1
| | | There is no real reason to differentiate.
* [mlir] Introduce `trailingNDimsContiguous` for MemRefs (#78247)Andrzej Warzyński2024-02-173-29/+46
| | | | | | | Extracts logic from `vector::isContiguousSlice` to check whether the trailing dim of a memref are contiguous into a dedicated hook in BuiitinTypes.{h|cpp}. Follow-up for https://github.com/llvm/llvm-project/pull/76848.