- Aug 05, 2022
-
-
Fangrui Song authored
A const reference is preferred over a non-null const pointer. `Type *` is kept as is to match the other overload. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D131197
-
Corentin Jabot authored
This fixes a regression introduced in 127bf443 Differential Revision: https://reviews.llvm.org/D131202
-
Ben Langmuir authored
The __swif5_proto and __swift5_protos sections had their meaning inverted. Fix, and rename the arrays so it is more obvious which is which. Differential Revision: https://reviews.llvm.org/D131206
-
Sanjay Patel authored
This matches the caller code naming scheme and avoids the potentially confusing transition from left/right to A/B.
-
Craig Topper authored
When folding (sra (add (shl X, 32), C1), 32 - C) -> (shl (sext_inreg (add X, C1), i32), C) it's possible that the add is used by multiple sras. We should allow the combine if all the SRAs will eventually be updated. After transforming all of the sras, the shls will share a single (sext_inreg (add X, C1), i32). This pattern occurs if an sra with 32 is used as index in multiple GEPs with different scales. The shl from the GEPs will be combined with the sra before we get a chance to match the sra pattern.
-
Sanjay Patel authored
This copies the implementation of the subsequent match with constants.
-
Louis Dionne authored
It's not supported anyways, and now Clang complains about it since we didn't support -stdlib=libc++ back then.
-
Aart Bik authored
We were checking real-part twice, not real/imag-part. The new test only passes after the bug fix. Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D131190
-
Arthur Eubanks authored
COFF has a verifier check that private global variables don't have a comdat of the same name. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D131043
-
Mingming Liu authored
[AArch64][TTI][NFC] Overload method 'getVectorInstrCost' to provide vector instruction itself, as a context information for cost estimation. 1) Overloaded (instruction-based) method is a wrapper around the current (opcode-based) method. 2) This patch also changes a few callsites (VectorCombine.cpp, SLPVectorizer.cpp, CodeGenPrepare.cpp) to call the overloaded method. 3) This is a split of D128302. Differential Revision: https://reviews.llvm.org/D131114
-
Mats Petersson authored
Find calls to FortranASum{Real8,Integer4}, check for dim and mask arguments being absent - then produce an inlineable simple version of the sum function. (No longer a prototype, please review for push to llvm/main - not sure how to make Phabricator update the review with actual commit message) Reviewed By: peixin, awarzynski Differential Revision: https://reviews.llvm.org/D125407 -
David Green authored
-
Johannes Doerfert authored
In contrast to AAPotentialValues, the constant values version can contain implicit `undef` in the set. We had an assertion that could misfire before. Handle it properly now.
-
Krzysztof Drewniak authored
As a percaution, truncate memory addresses passed to kernels to 48 bits, since bits 48-63 of the buffer descriptor are used for the stride field and, on gfx10, to control swizzling. Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D131016
-
Nico Weber authored
Follow-up to commit 51d84737.
-
Marc Auberer authored
Replaces ``` // ``` with ``` /// ``` for some code lines to make it visible in the auto-generated documentation. Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D131152
-
Tue Ly authored
Prevent overflow from intermediate results when adding UInt<N> values. Reviewed By: orex Differential Revision: https://reviews.llvm.org/D131095
-
Sanjay Patel authored
-
Alex Langford authored
This reverts commit befa77e5. Looks like this broke a SymbolFileNativePDB test. I'll investigate and resubmit with a fix soon.
-
Shilei Tian authored
-
Mehdi Amini authored
This reverts commit 07aaa35f. This breaks the Windows bot, and while the fix addressed the `char`/`int8_t` case, it does not make sense for other cases like `float`.
-
Fangrui Song authored
This implements the last step of https://discourse.llvm.org/t/parallel-input-file-parsing/60164 for the ELF port. For an ELF object file, we previously did: parse, (parallel) initializeLocalSymbols, (parallel) postParseObjectFile. Now we do: parse, (parallel) initSectionsAndLocalSyms, (parallel) postParseObjectFile. initSectionsAndLocalSyms does most of input section initialization. The sequential `parse` does SHT_ARM_ATTRIBUTES/SHT_RISCV_ATTRIBUTES/SHT_GROUP initialization for now. Performance linking some programs with --threads=8 (glibc 2.33 malloc and mimalloc): * clang: 1.05x as fast with glibc malloc, 1.03x as fast with mimalloc * chrome: 1.04x as fast with glibc malloc, 1.03x as fast with mimalloc * internal search program: 1.08x as fast with glibc malloc, 1.05x as fast with mimalloc Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D130810
-
Shilei Tian authored
We will add some simple implementation of libc functions starting from this patch, and the first one is `memcmp`, which is reported in #56929. Note that `malloc` and `free` are not included in this patch because of the use of `declare variant`. In the near future we will implement the two functions w/o using any vendor provided function. This fixes #56929. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D131182
-
LLVM GN Syncbot authored
-
Craig Topper authored
When folding (sra (add (shl X, 32), C1), 32 - C) -> (shl (sext_inreg (add X, C1), C) ignore the use count on the (shl X, 32). The sext_inreg after the transform is free. So we're only making 2 new instructions, the add and the shl. So we only need to be concerned with replacing the original sra+add. The original shl can have other uses. This helps if there are multiple different constants being added to the same shl.
-
Alex Langford authored
Context: When setting a breakpoint by name, we invoke Module::FindFunctions to find the function(s) in question. However, we use a Module::LookupInfo to first process the user-provided name and figure out exactly what we're looking for. When we actually perform the function lookup, we search for the basename. After performing the search, we then filter out the results using Module::LookupInfo::Prune. For example, given a::b::foo we would first search for all instances of foo and then filter out the results to just names that have a::b::foo in them. As one can imagine, this involves a lot of debug info processing that we do not necessarily need to be doing. Instead of doing one large post-processing step after finding each instance of `foo`, we can filter them as we go to save time. Some numbers: Debugging LLDB and placing a breakpoint on llvm::itanium_demangle::StringView::begin without this change takes approximately 70 seconds and resolves 31,920 DIEs. With this change, placing the breakpoint takes around 30 seconds and resolves 8 DIEs. Differential Revision: https://reviews.llvm.org/D129682
-
Arjun P authored
Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D131186
-
Arjun P authored
[MLIR][Presburger] fourier-motzkin: check if all LCMs are 1 using a bool instead of by multiplying them This can easily overflow and it is possible for these unsigned overflows to result in incorrect results. For example, the two LCMs could be 641 and 6700417, which multiply to 2^32 + 1, which overflows to 1. Unsigned overflows already occur in the existing tests. Also, when switching to arbitrary-precision arithmetic, this results in a many large integer multiplications resulting in a significant slowdown. Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D131184
-
Fangrui Song authored
makeThreadLocal/makeThreadLocalN are moved from D130810 ([ELF] Parallelize input section initialization) here to make D130810 more focused on the refactor: * COFF has some needs for multiple linker contexts. D108850 partially removed global states from lldCommon but left the global variable `lctx`. * To the best of my knowledge, all multiple-linker-context feature requests to ELF are more from user convenience, with no very strong argument. * In practice, ELF port is very difficult to remove global states without introducing significant performance regression/hurting code readability. * Per-thread allocators from D122922/D123879 are too expensive and will not really benefit ELF. This patch adds a simple thread_local based makeThreadLocal to lld/Common/Memory.h. It will enable further optimization in ELF.
-
Louis Dionne authored
This partially reverts commit 7d855bb8. The comments were actually not outdated, they were simply unclear.
-
Louis Dionne authored
-
Konstantin Varlamov authored
Evaluating `contiguous_iterator` on an iterator that satisfies all the constraints except the `to_address` constraint and doesn't have `operator->` defined results in a hard error. This is because instantiating `to_address` ends up instantiating templates dependent on the given type which might lead to a hard error even in a SFINAE context. Differential Revision: https://reviews.llvm.org/D130835
-
Nikolas Klauser authored
Co-authored-by:
Konstantin Varlamov <varconst@apple.com> Differential Revision: https://reviews.llvm.org/D127194
-
Zakk Chen authored
We will switch all UndefValue to PoisonValue in follow up patches. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D126750
-
Sam Estep authored
This patch adds the ability to context-sensitively analyze method bodies, by moving `ThisPointeeLoc` from `DataflowAnalysisContext` to `Environment`, and adding code in `pushCall` to set it. Reviewed By: ymandel, sgatev, xazax.hun Differential Revision: https://reviews.llvm.org/D131170
-
lorenzo chelini authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D131080
-
Petr Hosek authored
This should provide a more intuitive usage consistent with other tools. Differential Revision: https://reviews.llvm.org/D130226
-
Sam Estep authored
This patch adds a `ReturnLoc` field to the `Environment`, serving a similar to the `ThisPointeeLoc` field in the `DataflowAnalysisContext`. It then uses that (along with a new `VisitReturnStmt` method in `TransferVisitor`) to handle non-`void`-returning functions in context-sensitive analysis. Reviewed By: ymandel, sgatev Differential Revision: https://reviews.llvm.org/D130600
-
David Green authored
We would like to make the ACLE NEON and SVE intrinsics more useable by gating them on the target, not by ifdef preprocessor macros. In order to do this the types they use need to be available. This patches makes __bf16 always available under AArch64 not just when the bf16 architecture feature is present. This bringing it in-line with GCC. In subsequent patches the NEON bfloat16x8_t and SVE svbfloat16_t types (along with bfloat16_t used in arm_sve.h) will be made unconditional too. The operations valid on the types are still very limited. They can be used as a storage type, but the intrinsics used for convertions are still behind an ifdef guard in arm_neon.h/arm_bf16.h. Differential Revision: https://reviews.llvm.org/D130973
-
Fangrui Song authored
Close #56885: WG14 N2630 added %b to fprintf/fscanf and recommended %B for fprintf. This patch teaches -Wformat %b for the printf/scanf family of functions and %B for the printf family of functions. glibc 2.35 and latest Android bionic added %b/%B printf support. From https://www.openwall.com/lists/libc-coord/2022/07/ no scanf support is available yet. Like GCC, we don't test library support. GCC 12 -Wformat -pedantic emits a warning: > warning: ISO C17 does not support the ‘%b’ gnu_printf format [-Wformat=] The behavior is not ported. Note: `freebsd_kernel_printf` uses %b differently. Reviewed By: aaron.ballman, dim, enh Differential Revision: https://reviews.llvm.org/D131057
-