- Oct 28, 2021
-
-
Nikita Popov authored
Base the implementation on the APInt smul_sat() implementation, which is much more efficient than performing calculations in double the bitwidth.
-
Jez Ng authored
Otherwise tools like codesign_allocate will choke. We were already handling this correctly for the other DYLD_INFO sections. Doing this correctly is a bit subtle: we don't know if export_size will be zero until we have run `ExportSection::finalizeContents()`. However, we must still add the ExportSection to the `__LINKEDIT` segment in order that it gets sorted during `sortSectionsAndSegments()`. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D112589
-
Nikita Popov authored
GEP decomposition currently checks whether the multiplication of the linear expression offset and GEP scale overflows. However, if everything else works correctly, this overflow check is both unnecessary and dangerously misleading. While it will avoid an overflow in Scale * Offset in particular, other parts of the calculation (including those on dynamic values) may still overflow. The code working on the decomposed GEPs is responsible for ensuring that it remains correct in the presence of overflow. D112611 fixes the last issue of that kind that I'm aware of (in fact, the overflow check was originally introduced to work around precisely that issue). Differential Revision: https://reviews.llvm.org/D112618
-
Danil Stefaniuc authored
This diff adds a data formatter for libstdcpp's set. Besides, it unifies the tests for set for libcxx and libstdcpp for maintainability. Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D112537
-
Roman Lebedev authored
-
Nick Desaulniers authored
A constant complaint we get is that the __typeid__ symbols in the CFI jump tables causes confusing stack traces in applications. Emit the more readable cfi_jt aliases regardless of function export (LTO vs Thin LTO). Reviewed By: pcc, tejohnson Differential Revision: https://reviews.llvm.org/D107934
-
Roman Lebedev authored
There's precedent for that in `CreateOr()`/`CreateAnd()`. The motivation here is to avoid bloating the run-time check's IR in `SCEVExpander::generateOverflowCheck()`. Refs. https://reviews.llvm.org/D109368#3089809
-
Roman Lebedev authored
-
Philip Reames authored
This method parallels the dropPoisonGeneratingFlags on Instruction, but is hoisted to operator to handle constant expressions as well. This is mostly code movement, but I did go ahead and add the inrange constexpr gep case. This had been discussed previously, but apparently never followed up o.
-
Alexey Bataev authored
This reverts commit 64d1617d to fix test non-stability.
-
Michael Jones authored
strdup was being included even if malloc wasn't and that was causing a build failure. Differential Revision: https://reviews.llvm.org/D112641
-
Douglas Yung authored
This test was failing on the PS4 bot because the test attempts to link, but the PS4 platform requires an external linker that is not present, causing the test to fail. This should get the PS4 bot green again.
-
Nico Weber authored
WordLiteralSection dedupes literals by content. WordLiteralInputSection::getOffset() used to read a literal at the passed-in offset and look up this value in the deduping map to find the offset of the deduped value. But it's possible that (e.g.) a 16-byte literal's value is accessed 4 bytes in. To get the offset at that address, we have to get the deduped value at offset 0 and then apply the offset 4 to the result. (See also WordLiteralSection::finalizeContents() which fills in those maps.) Only a problem on arm64 because in x86_64 the offset is part of the instruction instead of a separate ARM64_RELOC_ADDEND relocation. (See bug for more details.) Fixes PR51999. Differential Revision: https://reviews.llvm.org/D112584
-
Alexandre Rames authored
This was deprecated as part of a54f4eae. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D112638
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D112590
-
Kirill Bobyrev authored
Doing otherwise leads to crashing. Way to reproduce: open "gmock/gmock.h" in the LLVM source tree. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D112608
-
Michael Jones authored
Add an implementation for strdup. Reviewed By: lntue, sivachandra Differential Revision: https://reviews.llvm.org/D111584
-
Michael Jones authored
malloc, calloc, realloc, and free are all functions that other libc functions depend on, but are pulled from external sources, instead of having an internal implementation. This patch adds a way to include functions like that as entrypoints in the list of external entrypoints, and includes the malloc functions using this new path. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D112104
-
Michael Liao authored
- Both LLVM_REQUIRES_RTTI and LLVM_REQUIRES_EH are internal flags that individual targets can use to force RTTI/EH. Turning off LLVM_REQUIRES_RTTI should honor if that variable is set explicitly for an individual target.
-
Fangrui Song authored
For `InputSection` `.foo`, its `InputBaseSection::{areRelocsRela,firstRelocation,numRelocation}` basically encode the information of `.rel[a].foo`. However, one uint32_t (the relocation section index) suffices. See the implementation of `relsOrRelas`. This change decreases sizeof(InputSection) from 184 to 176 on 64-bit Linux. The maximum resident set size linking a large application (1.2G output) decreases by 0.39%. Differential Revision: https://reviews.llvm.org/D112513 -
Roman Lebedev authored
It's a no-op, no overflow happens ever: https://alive2.llvm.org/ce/z/Zw89rZ While generally i don't like such hacks, we have a very good reason to do this: here we are expanding a run-time correctness check for the vectorization, and said `umul_with_overflow` will not be optimized out before we query the cost of the checks we've generated. Which means, the cost of run-time checks would be artificially inflated, and after https://reviews.llvm.org/D109368 that will affect the minimal trip count for which these checks are even evaluated. And if they aren't even evaluated, then the vectorized code certainly won't be run. We could consider doing this in IRBuilder, but then we'd need to also teach `CreateExtractValue()` to look into chain of `insertvalue`'s, and i'm not sure there's precedent for that. Refs. https://reviews.llvm.org/D109368#3089809
-
Fangrui Song authored
Similar to D100544 for AArch64. Reviewed By: arichardson Differential Revision: https://reviews.llvm.org/D112592
-
Kazu Hirata authored
This function seems to be unused for at least one year.
-
Kazu Hirata authored
This field seems to be unused for at least one year.
-
Kazu Hirata authored
This field seems to be unused for at least one year.
-
Dmitry Vyukov authored
Commit D112602 ("sanitizer_common: tighten on_print hook test") changed fopen to open in this test. fopen created the file if if does not exist, but open does not. This was unnoticed during local testing because lit is not hermetic and reuses files from previous runs, but it started failing on bots. Fix the open call. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112630
-
- Oct 27, 2021
-
-
Mikhail Dvorskiy authored
Reviewed By: nadiasvertex, ldionne Differential Revision: https://reviews.llvm.org/D112125
-
Alexey Bataev authored
Gathered loads/extractelements/extractvalue instructions should be checked if they can represent a vector reordering node too and their order should ve taken into account for better graph reordering analysis/ Also, if the gather node has reused scalars, they must be reordered instead of the scalars themselves. Differential Revision: https://reviews.llvm.org/D112454
-
Raphael Isemann authored
-
Djordje Todorovic authored
-
Aaron Ballman authored
When reaching the end of a function body, we need to ensure that the ExitFunctionBodyRAII object is destroyed before we pop the declaration context for the function. Exiting the function body causes us to handle immediate invocations, which involves template transformations that need to know the correct type for this. This addresses PR48235.
-
Gabor Marton authored
We can reuse the "adjustment" handling logic in the higher level of the solver by calling `State->assume`. Differential Revision: https://reviews.llvm.org/D112296
-
David Sherwood authored
This patch changes the definition of getStepVector from: Value *getStepVector(Value *Val, int StartIdx, Value *Step, ... to Value *getStepVector(Value *Val, Value *StartIdx, Value *Step, ... because: 1. it seems inconsistent to pass some values as Value* and some as integer, and 2. future work will require the StartIdx to be an expression made up of runtime calculations of the VF. In widenIntOrFpInduction I've changed the code to pass in the value returned from getRuntimeVF, but the presence of the assert: assert(!VF.isScalable() && "scalable vectors not yet supported."); means that currently this code path is only exercised for fixed-width VFs and so the patch is still NFC. Differential revision: https://reviews.llvm.org/D111882
-
Roman Lebedev authored
Refs. https://reviews.llvm.org/D109368#3089809
-
Roman Lebedev authored
There is no guarantee that the constant is on RHS here, we have to handle both cases. Refs. https://reviews.llvm.org/D109368#3089809
-
Roman Lebedev authored
While we could emit such a tautological `select`, it will stick around until the next instsimplify invocation, which may happen after we count the cost of this redundant `select`. Which is precisely what happens with loop vectorization legality checks, and that artificially increases the cost of said checks, which is bad. There is prior art for this in `IRBuilderBase::CreateAnd()`/`IRBuilderBase::CreateOr()`. Refs. https://reviews.llvm.org/D109368#3089809
-
Roman Lebedev authored
-
Gabor Marton authored
Initiate the reorganization of the equality information during symbol simplification. E.g., if we bump into `c + 1 == 0` during simplification then we'd like to express that `c == -1`. It makes sense to do this only with `SymIntExpr`s. Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D111642
-
OCHyams authored
D109833 makes the flags `--builder` and `--binary` mutually exclusive, which caused some regression tests to fail. Add a new substitution `%dexter_regression_base` that doesn't include the `--builder`, `--cflags` or `--ldflags` flags and use that for tests that use the `--binary` flag. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D112624
-