- Jun 19, 2021
-
-
LLVM GN Syncbot authored
-
Louis Dionne authored
This is a fairly mechanical change, it just moves each algorithm into its own header. This is intended to be a NFC. This commit re-applies 7ed7d4cc, which was reverted in 692d7166 because the Modules build got broken. The modules build has now been fixed, so we're re-committing this. Differential Revision: https://reviews.llvm.org/D103583 Attribution note ---------------- I'm only committing this. This commit is a mix of D103583, D103330 and D104171 authored by: Co-authored-by:
Christopher Di Bella <cjdb@google.com> Co-authored-by:
zoecarver <z.zoelec2@gmail.com>
-
Markus Böck authored
Follow up on rGc70b0e80 /Zc:strictStrings is an alias to an option part of the -W group. When the driver tries to render the option back to a string for the cc1 invocation, it sadly gets rendered with the original spelling instead of the alias, causing issues reported here: https://reviews.llvm.org/D103773#inline-989447 I am thinking it's the best to revert this part of the patch until I figured out how to correctly add the arg and until /Zc:strictStrings- exists/is needed.
-
Melanie Blower authored
This patch changes the ffp-model=precise to enables -ffp-contract=on (previously -ffp-model=precise enabled -ffp-contract=fast). This is a follow-up to Andy Kaylor's comments in the llvm-dev discussion "Floating Point semantic modes". From the same email thread, I put Andy's distillation of floating point options and floating point modes into UsersManual.rst Differential Revision: https://reviews.llvm.org/D74436
-
Marius Brehler authored
This upstreams the EmitC dialect and the corresponding Cpp target, both initially presented with [1], from [2] to MLIR core. For the related discussion, see [3]. [1] https://reviews.llvm.org/D76571 [2] https://github.com/iml130/mlir-emitc [3] https://llvm.discourse.group/t/emitc-generating-c-c-from-mlir/3388 Co-authored-by:
Jacques Pienaar <jpienaar@google.com> Co-authored-by:
Simon Camphausen <simon.camphausen@iml.fraunhofer.de> Co-authored-by:
Oliver Scherf <oliver.scherf@iml.fraunhofer.de> Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D103969
-
Nikita Popov authored
Currently, UnrollLoop() is passed an AllowRuntime flag and decides itself whether runtime unrolling should be used or not. This patch pushes the decision into the caller and allows us to eliminate the ULO.TripCount and ULO.TripMultiple parameters. Differential Revision: https://reviews.llvm.org/D104487
-
Ben Shi authored
This patch does the following optimization. Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry) Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry) Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry) Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry) Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry) Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D104588
-
Ben Shi authored
These tests will show the following optimization by future patches. Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry) Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry) Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry) Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry) Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry) Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry) Rx * (3 << C) => (SLLI (SH1ADD Rx, Rx), C) Rx * (5 << C) => (SLLI (SH2ADD Rx, Rx), C) Rx * (9 << C) => (SLLI (SH3ADD Rx, Rx), C) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D104507
-
Lang Hames authored
-
Matthias Springer authored
Only high padding is supported at the moment. Low padding will be added in a separate commit. Differential Revision: https://reviews.llvm.org/D104357
-
Jez Ng authored
This reverts commit c9b241ef, which was a backout diff to fix the buildbots. The real culprit of the crash is https://github.com/llvm/llvm-project/commit/1d31fb8d122b1117cf20a9edc09812db8472e930, which is being reverted. Differential Revision: https://reviews.llvm.org/D104353
-
Jez Ng authored
This reverts commit 1d31fb8d. Making `rerootPath` return a temporary std::string caused a use-after-free: https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1608/overview
-
Liqiang Tao authored
This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining. The callsite which size is smaller would have a higher priority. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D104028
-
Lang Hames authored
This patch was derived from Valentin Churavy's work in https://reviews.llvm.org/D104480. It adds support for setting the transform on an IRTransformLayer, and for accessing the IRTransformLayer in LLJIT. It also adds access to the ThreadSafeModule::withModuleDo method for thread-safe access to modules. A new example has been added to show how to use these APIs to optimize a module during materialization. Thanks Valentin! Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D103855
-
Lang Hames authored
-
George Balatsouras authored
These have been broken by https://reviews.llvm.org/D104494. However, `lib/fuzzer/dataflow/` is unused (?) so addressing this is not a priority. Added TODOs to re-enable them in the future. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D104568
-
Guozhi Wei authored
In patch https://reviews.llvm.org/D72396, it doesn't check DoTransform before transforming the code, and generates wrong result for the attached test case. Differential Revision: https://reviews.llvm.org/D104567
-
Nico Weber authored
This reverts commit 24706cd7. Test seems to fail flakily. See comments on https://reviews.llvm.org/D104353 for a hypothesis for why.
-
Fangrui Song authored
On ELF, the D1003372 optimization can apply to more cases. There are two prerequisites for making `__profd_` private: * `__profc_` keeps `__profd_` live under compiler/linker GC * `__profd_` is not referenced by code The first is satisfied because all counters/data are in a section group (either `comdat any` or `comdat noduplicates`). The second requires that the function does not use value profiling. Regarding the second point: `__profd_` may be referenced by other text sections due to inlining. There will be a linker error if a prevailing text section references the non-prevailing local symbol. With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`) clang is 4.2% smaller (1-169620032/177066968). `stat -c %s **/*.o | awk '{s+=$1}END{print s}' is 2.5% smaller. Reviewed By: davidxl, rnk Differential Revision: https://reviews.llvm.org/D103717 -
peter klausler authored
One of the buildbots uses a compiler (can't tell which) that doesn't approve of a "default:" in a switch statement whose cases appear to completely cover all possible values of an enum class. But this switch is in raw data dumping code that needs to allow for incorrect values in memory. So rewrite it as a cascade of if statements; performance doesn't matter here.
-
Fangrui Song authored
-
Matt Arsenault authored
We were not reporting isFNegFree for v2f32, although it is effectively free after legalization. The generic combine was pulling fneg out of the fma source operands, and the AMDGPU combine was doing the opposite.
-
Nico Weber authored
This reverts commit 76f1baa7. Also reverts 2 follow-ups: 1. Revert "DirectoryWatcher: also wait for the notifier thread" This reverts commit 527a1821. 2. Revert "DirectoryWatcher: close a possible window of race on Windows" This reverts commit a6948da8. Makes tests hang, see comments on https://reviews.llvm.org/D88666
-
Matt Arsenault authored
These get added (redundantly) to the bundle expanded for indirect register accesses. We hit this path only when there is a call in the function.
-
Shilei Tian authored
`bug49334.cpp` cannot detect data race in `libomptarget` efficiently. It is reported that with `N = 256` and `BS = 16`, the data race can be reproduced more steadily. The next coming pathces will fix it so this patch is expected to fail now. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D104552
-
Hongtao Yu authored
As a follow-up to https://reviews.llvm.org/D104129, I'm cleaning up the danling probe related code in both the compiler and llvm-profgen. I'm seeing a 5% size win for the pseudo_probe section for SPEC2017 and 10% for Ciner. Certain benchmark such as 602.gcc has a 20% size win. No obvious difference seen on build time for SPEC2017 and Cinder. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D104477
-
peter klausler authored
A recent patch changed a struct into a class, but missed a forward definition. GCC didn't warn, but clang does. Fix.
-
Nick Desaulniers authored
193e41c9 which reportedly fails on the mac builds.
-
Stella Laurenzo authored
Deadlocks have been found in several downstream projects as noted on the original patch: https://reviews.llvm.org/D104207 Disabling pending full root cause analysis. Differential Revision: https://reviews.llvm.org/D104570
-
Nikita Popov authored
Remove dependence on ULO.TripCount/ULO.TripMultiple from ORE and debug code. For debug code, print information about all exits. For optimization remarks, only include the unroll count and the type of unroll (complete, partial or runtime), but omit detailed information about exit folding, now that more than one exit may be folded. Differential Revision: https://reviews.llvm.org/D104482
-
Hongtao Yu authored
We were using 0 as an indicator of invalid offset when computing disjoint ranges. In reality, 0 can be an valid code offset which stands for the first function in .text section. I'm using UINT64_MAX as an invalid code offset instead. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D104497
-
River Riddle authored
This revision adds support for passing a functor to SourceMgrDiagnosticHandler for filtering out FileLineColLocs when emitting a diagnostic. More specifically, this can be useful in situations where there may be large CallSiteLocs with locations that aren't necessarily important/useful for users. For now the filtering support is limited to FileLineColLocs, but conceptually we could allow filtering for all locations types if a need arises in the future. Differential Revision: https://reviews.llvm.org/D103649
-
Nick Desaulniers authored
Similar to D104475, the Linux kernel would like to avoid compiler generated code in certain functions. The no_profile function attribute can be used in C to generate the the noprofile fn attr in IR. Respect that from GCOVProfiling. Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/ Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D104257
-
Nick Desaulniers authored
noprofile IR attribute already exists to prevent profiling with PGO; emit that when a function uses the newly added no_profile function attribute. The Linux kernel would like to avoid compiler generated code in functions annotated with such attribute. We already respect this for libcalls to fentry() and mcount(). Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/ Reviewed By: MaskRay, void, phosek, aaron.ballman Differential Revision: https://reviews.llvm.org/D104475
-
Leonard Chan authored
Once D104553 lands, CreateCurrentThread will be able to accept optional parameters for initializing the hwasan thread object. On fuchsia, we can get stack info in the platform-specific InitThreads and pass it through CreateCurrentThread. On linux, this is a no-op. Differential Revision: https://reviews.llvm.org/D104561
-
Jez Ng authored
findLibrary() returned a StringRef while findFramework & other helper functions returned std::strings. Standardize on std::string. (I initially tried making the helper functions all return StringRefs, but I realized we shouldn't return input StringRefs since their lifetimes would not be obvious from the calling code.)
-
Jez Ng authored
Previously, we asserted that such a case was invalid, but in fact `ld -r` can emit such symbols if the input contained a (true) private extern, or if it contained a symbol started with "L". Non-extern symbols marked as private extern are essentially equivalent to regular TU-scoped symbols, so no new functionality is needed. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D104502
-
Arnamoy Bhattacharyya authored
This patch adds the following nesting check for `barrier` constructs: ``` A barrier region may not be closely nested inside a worksharing, loop, task, taskloop, critical, ordered, atomic, or master region. ``` Also adds a test case for the check, Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D99888
-
Arthur O'Dwyer authored
P1518 does the following in C++23 but we'll just do it in C++17 as well: - Stop requiring `Alloc` to be an allocator on some container-adaptor deduction guides - Stop deducing from `Allocator` on some sequence container constructors - Stop deducing from `Allocator` on some other container constructors (libc++ already did this) The affected constructors are the "allocator-extended" versions of constructors where the non-allocator arguments are already sufficient to deduce the allocator type. For example, std::pmr::vector<int> v1; std::vector v2(v1, std::pmr::new_delete_resource()); std::stack s2(v1, std::pmr::new_delete_resource()); Differential Revision: https://reviews.llvm.org/D97742 -
Felix Berger authored
[clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer. This fixes false positive cases where a reference is initialized outside of a block statement and then its initializing variable is modified. Another case is when the looped over container is modified. Differential Revision: https://reviews.llvm.org/D103021 Reviewed-by: ymandel
-