- Apr 07, 2023
-
-
LiaoChunyu authored
The result of sub + setcc is 0 or 1 for all bits. The sra instruction get the same result. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147538
-
Ben Shi authored
Optimize "(mul r, c)" to "(SLLI (ALSL r, r, i0), i1)", in which "c = (1 + (1 << i0)) << i1". Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D147428
-
Ben Shi authored
Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D147427
-
Michael Buch authored
Describes changes made in D145803. Differential Revision: https://reviews.llvm.org/D147695
-
Michael Buch authored
Add some tests to make sure we're formatting structures with preferred names correctly. Differential Revision: https://reviews.llvm.org/D145832
-
Michael Buch authored
With this patch, whenever we emit a `DW_AT_type` for some declaration and the type is a template class with a `clang::PreferredNameAttr`, we will emit the typedef that the attribute refers to instead. I.e., ``` 0x123 DW_TAG_variable DW_AT_name "var" DW_AT_type (0x123 "basic_string<char>") 0x124 DW_TAG_structure_type DW_AT_name "basic_string<char>" ``` ...becomes ``` 0x123 DW_TAG_variable DW_AT_name "var" DW_AT_type (0x124 "std::string") 0x124 DW_TAG_structure_type DW_AT_name "basic_string<char>" 0x125 DW_TAG_typedef DW_AT_name "std::string" DW_AT_type (0x124 "basic_string<char>") ``` We do this by returning the preferred name typedef `DIType` when we create a structure definition. In some cases, e.g., with `-gmodules`, we don't complete the structure definition immediately but do so later via `completeClassData`, which overwrites the `TypeCache`. In such cases we don't actually want to rewrite the cache with the preferred name. We handle this by returning both the definition and the preferred typedef from `CreateTypeDefinition` and let the callee decide what to do with it. Essentially we set up the types as: ``` TypeCache[Record] => DICompositeType ReplaceMap[Record] => DIDerivedType(baseType: DICompositeType) ``` For now we keep this behind LLDB tuning. **Testing** - Added clang unit-test - `check-llvm`, `check-clang` pass - Confirmed that this change correctly repoints `basic_string` references in some of my test programs. - Will add follow-up LLDB API tests Differential Revision: https://reviews.llvm.org/D145803 -
Alex Langford authored
This is unused Differential Revision: https://reviews.llvm.org/D147746
-
Caslyn Tonelli authored
Introduce `strxfrm` and unit tests. The current implementation is introduced without locale support. The simplified function performs a `memcpy` if the `n` value is large enough to store the source len + '\0', otherwise `dest` is unmodified. Ticket: https://fxbug.dev/124217 Differential Revision: https://reviews.llvm.org/D147478
-
Lang Hames authored
4c7f53b9 changed the debug logging for GDB registration. This testcase just needed to be updated to look for the new string.
-
Alexey Bataev authored
Make adjustExtracts/needToDelay lambdas members of ShuffleInstructionBuilder to allow to overload them later for cost model. Differential Revision: https://reviews.llvm.org/D147730
-
Michael Maitland authored
The original loop has O(MxN) since `is_contained` iterates over all incoming values. This change makes it so only the phis which use the value as an incoming value are iterated over so it is now O(M). Differential Revision: https://reviews.llvm.org/D146999
-
Richard Smith authored
This re-lands commit db987b95, previously reverted in commit 1e070916, with a fix for a pre-existing bug in how we write constructor names into lookup tables that was exposed by that change. As yet, we've been unable to produce a reduced testcase for this bug, but we understand the problem: if we write out a lookup table for a class which has two constructor names, and we only have local lookup results for one of those constructor names, then we will write out a lookup table where the "all the constructors" lookup result contains results for only one of the constructor names.
-
Jonas Devlieghere authored
Add an LLDB_DEPRECATED macro similar to LLVM_DEPRECATED. We cannot directly reuse the LLVM one, because it's defined in Compiler.h which is not something we can include in the SB API. For the SB API, the macro is undef'd if: 1. We're building the SWIG bindings. We might still want to expose deprecated methods to our scripting users. 2. We're targeting anything older than C++14 as the [[deprecated]] attribute was added for C++14 and the SB API can be used by projects compiling against an older language version. Differential revision: https://reviews.llvm.org/D147736 -
Shafik Yaghmour authored
There may be cases in which we want to diagnose a type as unavailable but it may not be complete at the time. Setting MeaningfulToClassTemplateDefinition fixes this issue. This fixes: https://github.com/llvm/llvm-project/issues/61815 Differential Revision: https://reviews.llvm.org/D147495
-
Dave Lee authored
The name `module.modulemap` is convention. > Clang will also search for a file named `module.map`. This behavior is deprecated and > we plan to eventually remove it.
-
Florian Hahn authored
Conditionally setting MaskForGaps is only needed for loads. This avoid re-computing MaskForGaps for stores. Suggested as independent cleanup in D147467.
-
max authored
Without explicitly unregistering you will get ``` 'cuMemHostRegister(ptr, sizeBytes, 0)' failed with 'CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED' ``` in CUDA (for example) after repeated runs (e.g., during benchmarking the same kernel). Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D147277
-
Alexey Bataev authored
reevaluate it.
-
Robert Suderman authored
The math arithmetic expansions do not support vectorized types. Updated the lowerings so that they support vectorized types. This includes a different implementation for `math.ctlz` to be a binary search and not have variable termination time. Reviewed By: jpienaar, NatashaKnk Differential Revision: https://reviews.llvm.org/D147289
-
Anna Thomas authored
-
Robert Suderman authored
bf16 has a trivial truncation/extension behavior with F32 that can be described in elementary arith operations. Include some expansions to efficiently convert including rounding towards infinity for f32 to bf16 truncation. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D147585
-
Min-Yih Hsu authored
Note that technically both M68000/010 can use M68881, despite the fact that usually only M68020 and newer ISAs are equipped with M68881/2. M68040 and newer processors have builtin M68882. Differential Revision: https://reviews.llvm.org/D147479
-
Alex Brachet authored
Differential Revision: https://reviews.llvm.org/D147503
-
Jonas Devlieghere authored
Currently, SBTarget::SetModuleLoadAddress does not accept large slides needed to load images in high memory. This function should always have taken an unsigned as the slide, as it immediately passes it to Target::SetSectionLoadAddress which takes an unsigned. This patch adds an overload and exposes that to SWIG instead of the signed variant. I've marked the signed variant as deprecated and added check that the slide is positive. rdar://101355155 Differential revision: https://reviews.llvm.org/D147482
-
Alexey Bataev authored
If the value is used in the expression, need to adjust the mask before applying the mask. Plus, need to fix the analysis of the phi nodes for reused scalars.
-
Ilya Biryukov authored
This also reverts 282cae0b as the particular crash is now handled by the new code. Before this change Clang would always leave declarations inside the type-locs as `null` if the declarator had an invalid type. This patch populates declarations even for invalid types if the structure of the type and the type-locs match. There are certain cases that may still cause crashes. These happen when Clang recovers the type in a way that is not reflected in the declarator's structure, e.g. adding a pointer when it was not present in the code for ObjC interfaces or ignoring pointers written in the code in C++ with auto return type (`auto* foo() -> int`). Those cases look fixable with a better recovery strategy and I plan to follow up with more patches to address those. The first attempt caused 31 tests from `check-clang` to crash due to different structure of the types and type-locs after certain errors. The good news is that the failure is localized and mismatch in structures is discovered by assertions inside `DeclaratorLocFiller`. Some notable cases caught by existing tests: - Invalid chunks when type is fully ignored and replace with int or now. Crashed in `C/C2x/n2838.c`. - Invalid return types in lambdas. Crashed in `CXX/drs/dr6xx.cpp`. - Invalid member pointers. Crashed in `CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3-generic-lambda-1y.cpp` - ObjC recovery that adds pointers. Crashed in `SemaObjC/blocks.m` This change also updates the output of `Index/complete-blocks.m`. Not entirely sure what causes the change, but the new function signature is closer to the source code, so this seems like an improvement. Reviewed By: aaron.ballman, erichkeane Differential Revision: https://reviews.llvm.org/D146971
-
Keith Smiley authored
As of Xcode 14.3 it passes -reproducible by default to ld64. It seems this flag was added in ld64 with Xcode 14.0, but it is not documented. Through my testing the only thing I have seen it do is the same as ZERO_AR_DATE, but it's possible it does more, or will do more in the future. Since we already default to this option, this is more about handling the command line flag to maintain Xcode compatibility than anything else. Differential Revision: https://reviews.llvm.org/D147663
-
aabhinavg authored
Differential Revision: https://reviews.llvm.org/D146898
-
Jacques Pienaar authored
Breaks bot. This reverts commit d4c873b0.
-
Luke Lau authored
Loads of fixed length vectors with irregular element counts are sometimes emitted as a scalar load + scalar_to_vector. Previously the scalar_to_vector wasn't legal and so was scalarized further. This patch handles it by lowering it to a vmv.s.x. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147608
-
Luke Lau authored
I was investigating why getMemoryOpCost was so expensive for these fixed length vector types, so I've added these tests to see what was going on. It looks like there's some room for codegen improvement before we adjust the cost model. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147607
-
Nikita Popov authored
Due to an improvement to name preservation, a lot of InstCombine tests now show spurious diffs when regenerated. Rather than regenerating individual files when they get touched, mass-regenerate all UTC-based InstCombine tests. I have then reset a number of files showing suspicious diffs where the UTC output has clearly been manually adjusted. I apologize if I missed anything in the mass of changes.
-
Nico Weber authored
This reverts commit 3c42a58c. Breaks tests on mac, see https://reviews.llvm.org/rG3c42a58c4f20ae3b621733bf5ee6d57c912994a9#1191724
-
Fabian Mora authored
Implementation of Pass and Dialect Plugins that mirrors LLVM Pass Plugin implementation from the new pass manager. Currently the implementation only supports using the pass-pipeline option for adding passes. This restriction is imposed by the `PassPipelineCLParser` variable in mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:114 that loads the parse options statically before parsing the cmd line args. ``` mlir-opt stanalone-plugin.mlir --load-dialect-plugin=lib/libStandalonePlugin.so --pass-pipeline="builtin.module(standalone-switch-bar-foo)" ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D147053
-
Craig Topper authored
This lets tablegen generated the code and avoids a string lookup of the CSR name at runtime.
-
Lang Hames authored
ORC's ELF platform support prefers the newer libunwind registration functions (__unw_add_dynamic_eh_frame_section, __unw_remove_dynamic_eh_frame_section) when they're available, and falls back to the older registration functions (__register_frame, __deregister_frame) when they're not. Until now the choice of registration functions has been made on the controller side in ELFNixPlatform: The platform JITDylib was searched for the registration functions and aliases set depending on which ones were found. This patch drops that selection logic from ELFNixPlatform and instead uses weak imports of the registration functions in elfnix_platform.cpp to identify which ones are available and choose which ones to use. This has a few small benefits: (1) The registration functions don't need to be defined in the same JITDylib as the ORC runtime -- it's sufficient for them to be defined in a JITDylib that the ORC runtime's JITDylib links against. (2) THe elfnix_platfrom code is more readable, as we don't have to dig into ELFNixPlatform.cpp on the controller side to discover the definition of the registration aliases. (3) We may save a separate round-trip to look up the registration APIs (the lookup will be folded into the ordinary external symbol lookup when linking the runtime).
-
Nico Weber authored
-
Mahesh Ravishankar authored
Currently the use of bare pointer calling convention is controlled globally through use of an option in the `LLVMTypeConverter`. To allow more fine-grained control use an attribute on a function to drive the calling convention to use. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D147494
-
Alexey Bataev authored
Made the condition for the erasing of the gathered extractelements stricter, remove it only if it has single vectorized use, otherwise leave it for instcombiner/instsimplify analysis.
-
Philip Reames authored
-