- Apr 25, 2024
-
-
Chuanqi Xu authored
Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely used in AST and all around the clang project via classes like `LazyPtrDecl` or calling `ExternalASTSource::getExernalDecl()`. All such uses are via the raw underlying type of `DeclID` as `uint32_t`. This is not pretty good. This patch moves the DeclID class family to a new header `AST/DeclID.h` so that the whole project can use the wrapped class `DeclID`, `GlobalDeclID` and `LocalDeclID` instead of the raw underlying type. This can improve the readability and the type safety.
-
Vassil Vassilev authored
Should fix the failure seen in the pre-merge infrastructure of #89804.
-
Nikita Popov authored
A case where still performing the fold is clearly profitable.
-
Nikita Popov authored
-
Owen Pan authored
Fixes #89759.
-
Nikita Popov authored
Also drop irrelevant function attributes from tests.
-
Amir Ayupov authored
-
Nathan Lanza authored
This adds no real content, it just incrementally adds some scaffolding necessary to enable a future patch to just add our first few ops. Test Plan: ``` $ cmake -Sllvm -Bbuild -DCLANG_ENABLE_CIR=1 \ -DLLVM_ENABLE_PROJECTS='clang;mlir' \ -DCMAKE_BUILD_TYPE=Release -GNinja $ ninja -C build check-clang $ ninja -C build MLIRCIROpsIncGen $ ninja -C build MLIRCIR ``` Reviewers: AaronBallman, erichkeane, bcardosolopes Reviewed By: erichkeane, AaronBallman, bcardosolopes Pull Request: https://github.com/llvm/llvm-project/pull/86080
-
Mircea Trofin authored
-
Chelsea Cassanova authored
-
Kai Luo authored
This is to address the issue in https://lab.llvm.org/buildbot/#/builders/54. `SmallSetVector` interfaces as set and can be iterated in a deterministic order.
-
Chen Zheng authored
This reverts commit 29c7d1a6. The store forwarding patch https://github.com/llvm/llvm-project/pull/87465 is closed.
-
zhongyunde 00443407 authored
Change the costmodel to lower a = b * C where C = (1 + 2^m) * 2^n + 1 to add w8, w0, w0, lsl #m add w0, w0, w8, lsl #n Note: The latency of add can vary depending on the shirt amount They are cheap as a move when the shift amounts is 4 or less. Fix part of https://github.com/llvm/llvm-project/issues/89430 -
zhongyunde 00443407 authored
Accord D152827, when the shift amounts is 4 or less, they are cheap as a move.
-
Nathan Ridge authored
Fixes https://github.com/clangd/clangd/issues/1821
-
Fangrui Song authored
Temporary symbols generated for .eh_frame and .debug_line have an empty name, which appear in .symtab in the presence of RISC-V style linker relaxation and will not be discarded by ld/objcopy --discard-locals (-X). In contrast, GNU assembler's riscv port assigns a fake name ".L0 " (with a trailing space) to these symbols so that will be discarded by ld/objcopy --discard-locals. This patch matches the GNU behavior. Since Clang's RISC-V targets pass -X to ld, and GNU ld defaults to -X for RISC-V targets, these ".L0 " symbols will be discarded after linking by default, as expected by users. The llvm-symbolizer special case for RISC-V `SF_FormatSpecific` symbols https://reviews.llvm.org/D98669 needs to be adjusted. Note: `"":` in assembly currently crashes.
-
Kazu Hirata authored
Curently, the compiler only uses several fields of MemoryInfoBlock. Serializing all fields into the indexed MemProf file simply wastes storage. This patch limits the schema down to four fields for Version2 by default. It retains the old behavior of serializing all fields via: llvm-profdata merge --memprof-version=2 --memprof-full-schema This patch reduces the size of the indexed MemProf profile I have by 40% (1.6GB down to 1.0GB).
-
Yinying Li authored
1. Explicit value means the non-zero value in a sparse tensor. If explicitVal is set, then all the non-zero values in the tensor have the same explicit value. The default value Attribute() indicates that it is not set. 2. Implicit value means the "zero" value in a sparse tensor. If implicitVal is set, then the "zero" value in the tensor is equal to the implicit value. For now, we only support `0` as the implicit value but it could be extended in the future. The default value Attribute() indicates that the implicit value is `0` (same type as the tensor element type). Example: ``` #CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed), posWidth = 64, crdWidth = 64, explicitVal = 1 : i64, implicitVal = 0 : i64 }> ``` Note: this PR tests that implicitVal could be set to other values as well. The following PR will add verifier and reject any value that's not zero for implicitVal. -
Jeremy Kun authored
Reverts bad part of one line from https://github.com/llvm/llvm-project/commit/ae22ac95354629baca45d979038d73a4ce40d081#diff-9b538219c38ed73e193087a031284f10c62de8692ccc0efbe8c670fe9bfe868f
-
Mehdi Amini authored
Reverts llvm/llvm-project#89693 This broke the premerge bot (bolt tests failing)
-
Peter Klausler authored
The NCOPIES= argument to the intrinsic function REPEAT must be a scalar integer. Fixes https://github.com/llvm/llvm-project/issues/89851.
-
Peter Klausler authored
When prescanning a Fortran source file with preprocessing enabled in free source form, interpret a line-ending backslash as a source line continuation marker as a C preprocessor would. This usage isn't completely portable, but it is supported by GNU Fortran and appears in the source for FPM package manager.
-
Peter Klausler authored
List-directed output editing of REAL values will minimize the number of digits that are emitted by calculating a decimal value that, if read back in to a REAL variable of the same kind, would compare equal. This behavior is causing some confusion when applied to list-directed output of large REAL(2) values. Specifically, the value HUGE(0._2) (which is 0x7bff in hex) is exactly 65504, but is edited to 65500. by list-directed output, which selects F0 editing, minimizes the value to 6.55e4, and then formats it without the exponent. This small patch changes that behavior for cases where the output of digit-minimized F editing has no digits after the decimal point and zeroes need to be emitted before it due to the decimal exponent. Digit minimization is disabled in this case and the exact digits are emitted instead.
-
Peter Klausler authored
We support 'A' output editing for INTEGER and REAL as an extension; it turns out to be used as well for LOGICAL in application code.
-
Peter Klausler authored
…grams The parser only recognizes compiler directives that appear within internal / module subprograms, not those that might appear between them. Extend to allow them between subprograms as well.
-
Peter Klausler authored
When the interface of a procedure is implicit at the point of call, don't perform actual argument type conversion to the types of the dummy arguments. This was inadvertently taking place in a case where the procedure has an implicit interface but was also defined in the same source file, so that its characteristics were known.
-
Jeff Niu authored
This adds explanations and instructions on how to set up a dialect for sharded op definitions to the MLIR documentation.
-
Jeff Niu authored
This PR uses the new op sharding mechanism in tablegen to shard the test dialect's op definitions. This breaks the definition of ops into multiple source files, speeding up compile time of the test dialect dramatically. This improves developer cycle times when iterating on the test dialect.
-
Jeff Niu authored
Adds an option to `mlir-tblgen -gen-op-defs` `op-shard-count=N` that divides the op class definitions and op list into N segments, e.g. ``` // mlir-tblgen -gen-op-defs -op-shard-count=2 void FooDialect::initialize() { addOperations< >(); addOperations< >(); } ``` When split across multiple source files, this can help significantly improve dialect compile time for dialects with a large opset. -
Peter Klausler authored
Don't call SetBindNameOn() from DeclareUnknownEntity() unless there is an explicit BIND(C) attribute. Fixes https://github.com/llvm/llvm-project/issues/89439 and https://github.com/llvm/llvm-project/issues/89558.
-
Vitaly Buka authored
Reopens #87534. Breaks multiple bots: https://lab.llvm.org/buildbot/#/builders/168/builds/20028 https://lab.llvm.org/buildbot/#/builders/74/builds/27773 And reproducer in a61f9fe3. This reverts commit a61f9fe3.
-
Jeremy Kun authored
Fixes the bazel build. Note the addition of the Arith dependency created duplicate arith enum declarations in the two dialects, so it had to be spit into its own build rule. This matches what the cmake build does for this dialect.
-
Chao Chen authored
-
Peter Klausler authored
Add code to the runtime support library for the SELECTED_CHAR_KIND and SELECTED_LOGICAL_KIND intrinsic functions. These are usually used with constant folding in constant expressions, but the are available for use with dynamic arguments as well. Lowering support remains to be implemented.
-
Maksim Panchenko authored
When we rewrite dynamic relocations, there could be cases where they reference code locations inside functions that were rewritten. When this happens, we need to precisely map old address to a new one. Until we can reliably perform the mapping, detect such condition and issue an error refusing to write a broken binary.
-
Peiming Liu authored
-
Fangrui Song authored
-
Mircea Trofin authored
They weren't run before as part of `check-compiler-rt`. Verified by adding a `EXPECT_TRUE(false)` in both and observing test failure.
-
Fangrui Song authored
Temporary symbols generated for .eh_frame and .debug_line have an empty name, which appear in .symtab in the presence of RISC-V style linker relaxation and will not be discarded by ld/objcopy --discard-locals (-X). In contrast, GNU assembler's riscv port assigns a fake name ".L0 " (with a trailing space) to these symbols so that will be discarded by ld/objcopy --discard-locals. This patch matches the GNU behavior. Since Clang's RISC-V targets pass -X to ld, and GNU ld defaults to -X for RISC-V targets, these ".L0 " symbols will be discarded after linking by default, as expected by users. The llvm-symbolizer special case for RISC-V `SF_FormatSpecific` symbols https://reviews.llvm.org/D98669 needs to be adjusted. Note: `"":` in assembly currently crashes.
-
AtariDreams authored
-