- Aug 01, 2022
-
-
Vladislav Dzhidzhoev authored
Salvage debug info of instruction that is about to be deleted as dead in Combiner pass. Currently supported instructions are COPY and G_TRUNC. It allows to salvage debug info of some dead arguments of functions, by putting DWARF expression corresponding to the instruction being deleted into related DBG_VALUE instruction. Here is an example of missing variables location https://godbolt.org/z/K48osb9dK. We see that arguments x, y of function foo are not available in debugger, and corresponding DBG_VALUE instructions have undefined register operand instead of variables locaton after Aarch64PreLegalizerCombiner pass. The reason is that registers where variables are located are removed as dead (with instruction G_TRUNC). We can use salvageDebugInfo analogue for gMIR to preserve debug locations of dead variables. Statistics of llvm object files built with vs without this commit on -O2 optimization level (CMAKE_BUILD_TYPE=RelWithDebInfo, -fglobal-isel) on Aarch64 (macOS): Number of variables with 100% of parent scope covered by DW_AT_location has been increased by 7,9%. Number of variables with 0% coverage of parent scope has been decreased by 1,2%. Number of variables processed by location statistics has been increased by 2,9%. Average PC ranges coverage has been increased by 1,8 percentage points. Coverage can be improved by supporting more instructions, or by calling salvageDebugInfo for instructions that are deleted during Combiner rules exection. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D129909
-
Alex Bradbury authored
-
Guillaume Chatelet authored
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion. Differential Revision: https://reviews.llvm.org/D130760
-
Mehdi Amini authored
e1795322 removed the Type field from attributes and arith::ConstantOp argument is now a TypedAttrInterface which isn't supported by the python generator. This patch temporarily restore the functionality for arith.constant but won't generalize: we need to work on the generator instead. Differential Revision: https://reviews.llvm.org/D130878
-
Florian Hahn authored
Adds more extra tests for D119661. Also update the test to use opaque pointers.
-
Guillaume Chatelet authored
This is a reland of https://reviews.llvm.org/D130773
-
Guillaume Chatelet authored
This reverts commit 7add0e5f.
-
Guillaume Chatelet authored
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion. Differential Revision: https://reviews.llvm.org/D130773
-
Frederic Cambus authored
Similar to D110763.
-
Fangrui Song authored
[ELF] EhInputSection::getParentOffset: fix out-of-bounds access for symbols relative to a non-empty .eh_frame This has unclear semantics and can be considered invalid. Return an arbitrary value.
-
Chuanqi Xu authored
Closing https://github.com/llvm/llvm-project/issues/56803. The root cause for this bug is that we lack a good method to detect the language mdoe when parsing the command line. There is a FIXME too. Dut to we lack a good solution now, keep the workaround.
-
Serge Pavlov authored
BinaryOperator::getFPFeatures get parameter, which is not used. Similar methods of other AST nodes do not have any parameter.
-
Nikita Popov authored
This reverts commit 7b0f6378. As commented on the review, this patch has a correctness issue regarding the modelling of memory effects.
-
David Green authored
__ARM_ARCH >= 8 is implied by defined(__aarch64__), so we don't need to guard against both together.
-
Siva Chandra Reddy authored
-
WANG Xuerui authored
Differential Revision: https://reviews.llvm.org/D130821
-
WANG Xuerui authored
Necessary for native builds on LoongArch. Only Linux is added for now, matching upstream config.git changes. Unfortunately, the upstream config.guess is GPLv3+ since 2012, and LLVM is without autoconf support for a long time, so the script's licensing exception no longer works and a bump could not be trivially done. This is the same as the [upstream commit adding LoongArch](https://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=c8ddc8472f8efcadafc1ef53ca1d863415fddd5f), but rewritten to match the 2011 style that our script is holding on to. Differential Revision: https://reviews.llvm.org/D130820
-
Momchil Velikov authored
SimplifyCFG does some common code hoisting, which is limited to hoisting a sequence of identical instruction in identical order and stops at the first non-identical instruction. This patch allows hoisting instruction pairs over same-length sequences of non-matching instructions. The linear asymptotic complexity of the algorithm stays the same, there's an extra parameter `simplifycfg-hoist-common-skip-limit` serving to limit compilation time and/or the size of the hoisted live ranges. The patch improves SPECv6/525.x264_r by about 10%. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D129370
-
Siva Chandra Reddy authored
This allows users of the IntegerToString class to size their buffers appropriately at compile time.
-
Fangrui Song authored
Older Darwin does not support thread_local: error: thread-local storage is not supported for the current target thread_local int j = 0;
-
jacquesguan authored
This patch adds constant folder for ExpM1Op which only supports single and double precision floating-point. Differential Revision: https://reviews.llvm.org/D130567
-
Fangrui Song authored
Linux Standard Base Core Specification says that CIE/FDE is padded to an addressing unit size boundary, but in practice GNU assembler/LLVM integrated assembler pad FDE/CIE to 4 and the last FDE to 8 on 64-bit systems. In addition, GNU ld doesn't pad to 8, so let's drop excess padding, too. If the assembler provides aligned pieces, the output will be aligned. Noticed .eh_frame size reduction for 3 executables: 0.3% (chrome), 4.7% (clang), 7.6% (an internal program).
-
Nikita Popov authored
This is unnecessary, as AA result chaining is implemented at a higher level now.
-
Nikita Popov authored
Intersecting with ModRef is a no-op, as these are the only two possible values.
-
Chuanqi Xu authored
-
Siva Chandra Reddy authored
-
Nikita Popov authored
Without the "must" state, this function is pointless, because we can just directly create a ModRef instead.
-
Nikita Popov authored
-
Nikita Popov authored
After fffabd53, the v2 and v3 versions produce poison instead of undef. Also adjust the v1 version, as well as the test expectations, to make the example pass again.
-
Nikita Popov authored
getModRefInfo() queries currently track whether the result is a MustAlias on a best-effort basis. The only user of this functionality is the optimized memory access type in MemorySSA -- which in turn has no users. Given that this functionality has not found a user since it was introduced five years ago (in D38862), I think we should drop it again. The context is that I'm working to separate FunctionModRefBehavior to track mod/ref for different location kinds (like argmem or inaccessiblemem) separately, and the fact that ModRefInfo also has an unrelated Must flag makes this quite awkward, especially as this means that NoModRef is not a zero value. If we want to retain the functionality, I would probably split getModRefInfo() results into a part that just contains the ModRef information, and a separate part containing a (best-effort) AliasResult. Differential Revision: https://reviews.llvm.org/D130713
-
Chuanqi Xu authored
Fill up the title underline in rst file to avoid the CI error.
-
Chuanqi Xu authored
This is successor for D125291. This revision would try to use @llvm.threadlocal.address in clang to access TLS variable. The reason why the OpenMP tests contains a lot of change is that they uses utils/update_cc_test_checks.py to update their tests. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D129833
-
Fangrui Song authored
-
Chuanqi Xu authored
This belongs to a series of patches which try to solve the thread identification problem in coroutines. See https://discourse.llvm.org/t/address-thread-identification-problems-with-coroutine/62015 for a full background. The problem consists of two concrete problems: TLS variable and readnone functions. This patch tries to convert the TLS problem to readnone problem by converting the access of TLS variable to an intrinsic which is marked as readnone. The readnone problem would be addressed in following patches. Reviewed By: nikic, jyknight, nhaehnle, ychen Differential Revision: https://reviews.llvm.org/D125291
-
Fangrui Song authored
-
Jez Ng authored
Previously we only supporting using the system pointer size (aka the `absptr` encoding) because `llvm-mc`'s CFI directives always generate EH frames with that encoding. But libffi uses 4-byte-encoded, hand-rolled EH frames, so this patch adds support for it. Fixes #56576. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D130804
-
Sunho Kim authored
We don't have proper exception support in LLJIT on windows yet. We have to xfail windows machine, but the previous check missed out some targets.
-
Jeff Niu authored
This patch removes the `type` field from `Attribute` along with the `Attribute::getType` accessor. Going forward, this means that attributes in MLIR will no longer have types as a first-class concept. This patch lays the groundwork to incrementally remove or refactor code that relies on generic attributes being typed. The immediate impact will be on attributes that rely on `Attribute` containing a type, such as `IntegerAttr`, `DenseElementsAttr`, and `ml_program::ExternAttr`, which will now need to define a type parameter on their storage classes. This will save memory as all other attribute kinds will no longer contain a type. Moreover, it will not be possible to generically query the type of an attribute directly. This patch provides an attribute interface `TypedAttr` that implements only one method, `getType`, which can be used to generically query the types of attributes that implement the interface. This interface can be used to retain the concept of a "typed attribute". The ODS-generated accessor for a `type` parameter automatically implements this method. Next steps will be to refactor the assembly formats of certain operations that rely on `parseAttribute(type)` and `printAttributeWithoutType` to remove special handling of type elision until `type` can be removed from the dialect parsing hook entirely; and incrementally remove uses of `TypedAttr`. Reviewed By: lattner, rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D130092
-
Fangrui Song authored
* Inline getReloc * Fold the UINT32_MAX length check into the section size check. This transformation is valid because we don't support .eh_frame input sections larger than 32-bit (unrealistic even for large code models).
-
Fangrui Song authored
This simplifies code, removes a read32 (for id==0 check), and makes it feasible to combine some operations in EhInputSection::split and EhFrameSection::addRecords. Mostly NFC, but fixes "Relocation not in any piece" assertion failure in an erroneous case when a relocation offset precedes all CIE/FDE pices.
-