- Dec 02, 2022
-
-
Dave Lee authored
`GetNumCompileUnits` has fast execution, and is high firing. Fast and frequent functions are not good candidates for timers. In a recent profile, `GetNumCompileUnits` was called >>10k times with an average duration of 1 microsecond. Differential Revision: https://reviews.llvm.org/D138878
-
Shafik Yaghmour authored
Currently Sema::BuildCXXTypeConstructExpr asserts that list initialization must mean we have an InitListExpr as well. We have several cases of valid code the result in CXXTemporaryObjectExpr in the AST instead for list initialization. Commit 1ae689c2 seems to indicate that this is not unexpected, although may be a design issue This fixes: https://github.com/llvm/llvm-project/issues/58302 https://github.com/llvm/llvm-project/issues/58753 https://github.com/llvm/llvm-project/issues/59100 Differential Revision: https://reviews.llvm.org/D138947
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Jez Ng authored
If we have two files with the same weak symbol like so: ``` ltmp0: _weak: <contents> ``` and ``` ltmp1: _weak: <contents> ``` Linking them together should leave only one copy of `<contents>`, not two. Previously, we would keep around both copies because of the private-label `ltmp<N>` symbols (i.e. symbols that start with `l`) -- we would not coalesce those, so we would treat them as retaining the contents. This matters for more than just size -- we are depending upon this behavior internally for emitting a certain file format. This file format's header is repeated in each object file, but we want it to appear just once in our output. Why can't we not emit those aliases to `_weak`, or reference the `ltmp<N>` symbols instead of `_weak`? Well, MC actually adds `ltmp<N>` symbols as part of the assembly-to-binary translation step. So any codegen at the clang level can't access them. All that said... this solution is actually kind of hacky. Here, we avoid creating the private-label symbols at parse time. This is acceptable since we never emit those symbols in our output. However, in ld64, any aliasing temporary symbols (ignored or otherwise) won't retain coalesced data. But implementing this is harder -- we would have to create those symbols first (so we can emit their names later), but we would have to ensure the linker correctly shuffles them around when their aliasees get coalesced. Additionally, ld64 treats these temporary symbols as functionally equivalent to the weak symbols themselves -- that is, it will emit weak binds when those non-weak temporary aliases are referenced. We have imitated this behavior for private-label symbols, but implementing it for local aliases in general seems substantially more difficult. I'm not sure if any programs actually depend on this behavior though, so maybe it's a moot point. Finally, ld64 does all this regardless of whether `.subsections_via_symbols` is specified. We don't. But again, given how rare the lack of that directive is (I've only seen it from hand-written assembly inputs), I don't think we need to worry about it. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D139069
-
Florian Hahn authored
This slightly simplifies the code and addresses a correctness issue where the index scaling for the precondition was not considered properly. Thanks to @nikic for pointing that out in D137840.
-
Jean Perier authored
Add hlfir.associate and hlfir.end_associate codegen. To properly allow reusing the bufferized expression storage for the newly created variable, bufferization of hlfir.expr has to be updated so that hlfir.expr are translated to a variable and a boolean to indicate if the variable storage needs to be freed after the expression was used. That way the responsibility to free the bufferized expression can be passed to the variable user, and applied in the hlfir.end_associate. Right now, not of the bufferized expression are heap allocated, so generating the conditional freemem in hlfir.end_associate is left as a TODO for when it can be tested. Differential Revision: https://reviews.llvm.org/D139020
-
Alex Richardson authored
I just tried to build all experimental targets and noticed that DirectX did not build with -DBUILD_SHARED_LIBS=ON. Differential Revision: https://reviews.llvm.org/D138431
-
Florian Hahn authored
Extend test coverage for chained GEPs.
-
Jean Perier authored
Differential Revision: https://reviews.llvm.org/D139117
-
Jean Perier authored
Only lower operations when the operands are scalar for now. Differential Revision: https://reviews.llvm.org/D139108
-
Nicolai Hähnle authored
Given a list of test files, this utility will run (optionally in parallel) the corresponding update_*_test_checks tool for all given tests that have automatically generated assertions. Differential Revision: https://reviews.llvm.org/D139100
-
Guillaume Chatelet authored
-
Jakub Kuderski authored
Allow the integer dot product cabailities to be used in SPIR-V <1.6 when the SPV_KHR_integer_dot_product extension is available. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D139063
-
- Dec 01, 2022
-
-
Tomas Matheson authored
-
Tomas Matheson authored
Re-land with constexpr StringRef::substr(): The TargetParser depends heavily on a collection of macros and enums to tie together information about architectures, CPUs and extensions. Over time this has led to some pretty awkward API choices. For example, recently a custom operator-- has been added to the enum, which effectively turns iteration into a graph traversal and makes the ordering of the macro calls in the header significant. More generally there is a lot of string <-> enum conversion going on. I think this shows the extent to which the current data structures are constraining us, and the need for a rethink. Key changes: - Get rid of Arch enum, which is used to bind fields together. Instead of passing around ArchKind, use the named ArchInfo objects directly or via references. - The list of all known ArchInfo becomes an array of pointers. - ArchKind::operator-- is replaced with ArchInfo::implies(), which defines which architectures are predecessors to each other. This allows features from predecessor architectures to be added in a more intuitive way. - Free functions of the form f(ArchKind) are converted to ArchInfo::f(). Some functions become unnecessary and are deleted. - Version number and profile are added to the ArchInfo. This makes comparison of architectures easier and moves a couple of functions out of clang and into AArch64TargetParser. - clang::AArch64TargetInfo ArchInfo is initialised to Armv8a not INVALID. - AArch64::ArchProfile which is distinct from ARM::ArchProfile - Give things sensible names and add some comments. Differential Revision: https://reviews.llvm.org/D138792
-
Phoebe Wang authored
Under the emulation situation, we lack native fmin/fmax instruction support. Fixes #59258 Reviewed By: skan, spatel Differential Revision: https://reviews.llvm.org/D139078
-
Oleksandr "Alex" Zinenko authored
The `====` underline is for h1, we actually need h4. This makes TOC look bad.
-
Paul Robinson authored
This allows grepping for ps4 or ps5 to continue to work.
-
Sander de Smalen authored
Phabricator review for this patch was D138791
-
Sander de Smalen authored
This reverts commit 06846596.
-
Lorenzo Chelini authored
This reverts commit dd0de4dc. Build on mlir-windows fails: Step 6 (build-check-mlir-build-only) failure: build (failure) C:\buildbot\mlir-x64-windows-ninja\build\tools\mlir\test\lib\Dialect\Test\TestOps.cpp.inc(928): error C2220: the following warning is treated as an error C:\buildbot\mlir-x64-windows-ninja\build\tools\mlir\test\lib\Dialect\Test\TestOps.cpp.inc(928): warning C4804: '>': unsafe use of type 'bool' in operation C:\buildbot\mlir-x64-windows-ninja\build\tools\mlir\test\lib\Dialect\Test\TestOps.cpp.inc(7419): warning C4804: '>': unsafe use of type 'bool' in operation
-
Lorenzo Chelini authored
-
Valentin Clement authored
This line should not have made it to the final patch.
-
Vlad Serebrennikov authored
P1787: "CWG360 is resolved by applying access control to using-declarations." [[ http://eel.is/c++draft/class.access#general-4.sentence-3 | class.access.general#4 ]]: "When a using-declarator is named, access control is applied to it, not to the declarations that replace it." Reviewed By: #clang-language-wg, aaron.ballman Differential Revision: https://reviews.llvm.org/D139090
-
Lorenzo Chelini authored
pack(unpack(x)) -> x Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D138917
-
Lorenzo Chelini authored
- `DenseArrayStrictlyPositive` all elements are required to be > 0. Returns true if the range is empty. - `DenseArrayNonNegative` all elements are required to be >= 0. Returns true if the range is empty. Both constraints will simplify verifier logic as we move from using `I64ArrayAttr` to `DenseI64ArrayAttr`. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D138988
-
Simon Pilgrim authored
Reported by D138359 - the overrides matched the base class schedule definition (its been flagged as WriteMicrocoded instead of WriteSystem but the models define both the same)
-
Anton Sidorenko authored
To check reassociation correctness for RISCV, we must ensure that the root and it's sibling have equal rounding modes (for floating point instructions). `hasReassociableSibling` is a good place to make additional target-dependend checks. This patch allows us to enable default machine combiner mechanism to gather reassociation candidates on RISCV. Differential Revision: https://reviews.llvm.org/D138302
-
Valentin Clement authored
Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D138989
-
Tomas Matheson authored
Buildbots unhappy about constexpr function. This reverts commit 450de800.
-
Tomas Matheson authored
The TargetParser depends heavily on a collection of macros and enums to tie together information about architectures, CPUs and extensions. Over time this has led to some pretty awkward API choices. For example, recently a custom operator-- has been added to the enum, which effectively turns iteration into a graph traversal and makes the ordering of the macro calls in the header significant. More generally there is a lot of string <-> enum conversion going on. I think this shows the extent to which the current data structures are constraining us, and the need for a rethink. Key changes: - Get rid of Arch enum, which is used to bind fields together. Instead of passing around ArchKind, use the named ArchInfo objects directly or via references. - The list of all known ArchInfo becomes an array of pointers. - ArchKind::operator-- is replaced with ArchInfo::implies(), which defines which architectures are predecessors to each other. This allows features from predecessor architectures to be added in a more intuitive way. - Free functions of the form f(ArchKind) are converted to ArchInfo::f(). Some functions become unnecessary and are deleted. - Version number and profile are added to the ArchInfo. This makes comparison of architectures easier and moves a couple of functions out of clang and into AArch64TargetParser. - clang::AArch64TargetInfo ArchInfo is initialised to Armv8a not INVALID. - AArch64::ArchProfile which is distinct from ARM::ArchProfile - Give things sensible names and add some comments. Differential Revision: https://reviews.llvm.org/D138792
-
Tomas Matheson authored
Differential Revision: https://reviews.llvm.org/D138753
-
Tomas Matheson authored
Differential Revision: https://reviews.llvm.org/D138754
-
Simon Pilgrim authored
Reported by D138359 - the overrides matched the base class schedule definition (its been flagged as WriteMicrocoded instead of WriteSystem but the models define both the same)
-
Simon Pilgrim authored
Reported by D138359 - the overrides matched the base class schedule definition (in the case of VPERMDYrr it was entirely replacing uses of WriteVarShuffle256 so could that could be adjusted directly)
-
Simon Pilgrim authored
Reported by D138359 - the overrides matched the base class schedule definition
-
Sam McCall authored
Really we want these to be shown to the client, but the path to do so involves storing them in Bandaid for https://github.com/clangd/clangd/issues/1408 See https://github.com/clangd/clangd/issues/1399 for motivation Differential Revision: https://reviews.llvm.org/D139088
-
Florian Hahn authored
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D139094
-
Florian Hahn authored
This keeps a clearer separation between tests and avoids growing the libcalls.ll test too large.
-