- Sep 18, 2022
-
-
Nikolas Klauser authored
This removes a lot of boilerplate code. Reviewed By: ldionne, #libc Spies: EricWF, libcxx-commits Differential Revision: https://reviews.llvm.org/D128081
-
- Sep 17, 2022
-
-
Evgeny Shulgin authored
Implements paper P2324R2 https://wg21.link/p2324r2 https://github.com/cplusplus/papers/issues/1006 Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D133887
-
Dmitry Polukhin authored
After compilation errors, expression a transformation result may not be usable. It triggers an assert in RemoveNestedImmediateInvocation and SIGSEGV in case of builds without asserts. This issue significantly affects clangd because source may not be valid during typing. Tests cases that I attached was reduce from huge C++ translation unit. Test Plan: check-clang Differential Revision: https://reviews.llvm.org/D133948
-
Florian Hahn authored
f213128b didn't account for the possibility that the result of decompose may be empty. Fix that by explicitly checking. Use a newly introduced helper to also reduce some duplication. Thanks @bjope for finding the issue!
-
Shivam Gupta authored
-
Aaron Ballman authored
It may help users to better understand the change by showing them a contrived code example which demonstrates the difference in behavior.
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: libcxx-commits, jeroen.dobbelaere Differential Revision: https://reviews.llvm.org/D133196
-
Aaron Ballman authored
Uses double backticks where appropriate, changes some instances of GH12345 to be Issue 12345, etc.
-
Aaron Ballman authored
The test is failing because it lacks a target triple, so the number of diagnostics differs between Windows and Linux targets. This should correct the issue found by: https://lab.llvm.org/buildbot/#/builders/109/builds/46804
-
Aaron Ballman authored
We would diagnose use of `long long` as an extension in C89 and C++98 modes when the user spelled the type `long long` or used the `LL` literal suffix, but failed to diagnose when the literal had no suffix but required a `long long` to represent the value.
-
Christian Sigg authored
Wrap implicit dependencies in Label() so that they refer to @llvm-project, see https://bazel.build/rules/lib/Label#Label. This change allows lit_test() to be used from other bazel repositories.
-
Filipp Zhinkin authored
Baseline tests for D131786
-
Daniel Bertalan authored
-
Xiang Li authored
-
Alex Zinenko authored
One of the vector transformation patterns has been indiscriminately converting layouts to affine maps. Leverage the strided form when possible. Reviewed By: nicolasvasilache, dcaballe Differential Revision: https://reviews.llvm.org/D134047
-
Alex Zinenko authored
All relevant operations have been switched to primarily use the strided layout, but still support the affine map layout. Update the relevant tests to use the strided format instead for compatibility with how ops now print by default. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D134045
-
Emmmer authored
Add: - RVM and RVA instructions sets. - corresponding unittests. Further work: - implement RVC, RVF, RVD, and RVV extension. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D133670
-
Kazu Hirata authored
This reverts commit 01ffe31c. A build breakage with GCC 7.3 has been reported: https://reviews.llvm.org/D132311#3797053 FWIW, GCC 7.5 is OK according to Pavel Chupin. I also personally tested GCC 8.4.0.
-
Vladislav Dzhidzhoev authored
Use salvageDebugInfo for instructions erased as trivially dead in GlobalISel. It would be helpful to implement support of G_PTR_ADD and G_FRAME_INDEX in salvageDebugInfo in future in order to preserve more variable location. Reviewed by: arsenm Differential Revision: https://reviews.llvm.org/D133986
-
Maksim Panchenko authored
Reviewed By: ayermolo Differential Revision: https://reviews.llvm.org/D134094
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D134090
-
Matheus Izvekov authored
Extend clang's SubstTemplateTypeParm to represent the pack substitution index. Fixes PR56099. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D128113
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D134059
-
Michael Jones authored
Now libc headers can be installed separately from installing the rest of the libc. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D133960
-
Kazu Hirata authored
DefaultInlineOrder was largely an exercise in generalizing the traversal order of call sites within the inliner. Now that the module inliner is starting to form its shape, there is no point in sharing DefaultInlineOrder between the module inliner and the CGSCC inliner. DefaultInlineOrder and all the other inline orders are mutually exclusive in the following sense: - The use of DefaultInlineOrder doesn't make sense in the module inliner because there is no priority inherent in the order in which call sites are added to the list of call sites -- SmallVector. - The use of any other inline order doesn't make sense in the CGSCC inliner because little prioritization can be done within one CGSCC. This patch essentially reverts the addition of DefaultInlineOrder so that the loop structure of Inliner.cpp looks like the state just before we started working on the module inliner (circa June 2021). At the same time, ww remove the choice of DefaultInlineOrder from UseInlinePriority. Differential Revision: https://reviews.llvm.org/D134080
-
Jacques Pienaar authored
Use auto-compression-mode to read bytecode files in human readable manner. Differential Revision: https://reviews.llvm.org/D133879
-
Alexey Bataev authored
Added the mask and the analysis of the buildvector sequence in the isUndefVector function, improves codegen and cost estimation. Metric: SLP.NumVectorInstructions Program SLP.NumVectorInstructions results results0 diff test-suite :: External/SPEC/CFP2017rate/526.blender_r/526.blender_r.test 27362.00 27360.00 -0.0% Metric: size..text Program size..text results results0 diff test-suite :: External/SPEC/CFP2017rate/508.namd_r/508.namd_r.test 805299.00 806035.00 0.1% 526.blender_r - some extra code is vectorized. 508.namd_r - some extra code is optimized out. Differential Revision: https://reviews.llvm.org/D133891 -
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D134065
-
Siva Chandra Reddy authored
-
Chris Bieneman authored
Some HLSL functionality is gated on the target shader model version. Enabling the use of availability markup allows us to diagnose availability issues easily in the frontend. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D134067
-
Sotiris Apostolakis authored
This is a follow-up to D133777, which resolved a use-after-free case but did not cover all possible memory bugs due to misplacement of loads. In short, the overall problem was that sinked loads could be moved after state-modifying instructions leading to memory bugs. The solution is to restrict load sinking unless it is found to be sound. i) Within a basic block (to-be-sinked load and select-user are in the same BB), loads can be sinked only if there is no intervening state-modifying instruction. This is a conservative approach to avoid resorting to alias analysis to detect potential memory overlap. ii) Across basic blocks, sinking of loads is avoided. This is because going over multiple basic blocks looking for memory conflicts could be computationally expensive and also unlikely to allow loads to sink. Further, experiments showed that not sinking these loads has a slight positive performance effect. Maybe for some of these loads, having some separation allows enough time for the load to be executed in time for its user. This is not the case for floating point operations that benefit more from sinking. The solution in D133777 was essentially undone in this patch, since the latter is a complete solution to the observed problem. Overall, the performance impact of this patch is minimal. Tested on two internal Google workloads with instrPGO. Search application showed <0.05% perf difference, while the database one showed a slight improvement, but not statistically significant. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D133999
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D134016
-
Teresa Johnson authored
This fixes https://github.com/llvm/llvm-project/issues/57616. Type test lowering in ThinLTO modules relies on having type id summaries set up for the referenced types, which provide the type test resolution. If there is no summary, the type tests are lowered to false. At the very least, a default type id summary gives the type tests a resolution of Unknown, which is handled correctly (ignored by the first invocation of LTT, and lowered to true by the second). WPD sets up the type id summaries (with a default type test resolution) as it is processing the type tests, but only does this for the patterns handled by WPD, which is a type test directly feeding an assume. In the case of type tests feeding an assume via a phi, the type id summary was not being set up, leading to the type tests being lowered to false incorrectly. Fix this by adding the default type id summary entries for all type ids used on globals during index-only WPD. This is not an issue for hybrid (split-lto-unit) LTO, as in that case the type test resolution is determined and set up during LTT, since the type definitions are in the regular LTO split module, and exported via the summary to the ThinLTO split module. Differential Revision: https://reviews.llvm.org/D134012
-
Lang Hames authored
If we want to be able to close and then re-open a library then we need to reset the data section states when the library is closed. This commit updates MachOPlatform and the ORC runtime to track __data and __common sections, and reset the state in MachOPlatformRuntimeState::dlcloseDeinitialize. This is only a first step to full support -- there are other data sections that we're not capturing, and we'll probably want a more efficient representation for the sections (rather than passing their string name over IPC), but this is a reasonable first step. This commit also contains a fix to MapperJITLinkMemoryManager that prevents it from calling OnDeallocated twice in the case of an error.
-
Maksim Panchenko authored
When we derive EFMM from SectionMemoryManager, it brings into EFMM extra functionality, such as the registry of exception handling sections, page permission management, etc. Such functionality is of no use to llvm-bolt and can even be detrimental (see https://github.com/llvm/llvm-project/issues/56726). Change the base class of ExecutableFileMemoryManager to MemoryManager, avoid registering EH sections, and skip memory finalization. Fixes #56726 Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D133994
-
Maksim Panchenko authored
In non-relocation mode, every function is emitted in its own section. If a function is empty, RuntimeDyld will still allocate 1-byte section for the function and initialize it with zero. As a result, we will overwrite the first byte of the original function contents with zero. Such scenario can happen when the input function had only NOP instructions which BOLT removes by default. Even though such functions likely cause undefined behavior, it's better to preserve their contents. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D133978
-
Jessica Paquette authored
This is a partial port of the code used by the SelectionDAGBuilder to translate selects. In particular, see matchSelectPattern in ValueTracking.cpp. This is a GISel-equivalent of the portion which handles fminnum/fmaxnum/fminimum/fmaximum. I tried to set it up so it'd be easy to add the non-FP cases. Those are simpler. On the AArch64-end, it seems like the FP cases are more important for perf right now, so I bit the bullet and went at the more complicated problem. :) I elected to do this as a post-legalize combine rather than in the IRTranslator because Deciding which fmax/fmin to use can depend on legalization rules Philosophically-speaking (TM), putting it in a combine just feels cleaner Being able to enable/disable the combine is handy Another option would be to use the ValueTracking code in the IRTranslator and match what SelectionDAGBuilder::visitSelect does. I think that may be somewhat annoying since we'd need to write lowerings back into the selects in the legalizer. I'm not strongly opposed to the approach. We'd also want to be careful with vector selects once that's implemented, which explicitly check if a vector select is legal on the target. That'd probably need a hook. From what I can tell, doing this as a combine is probably a cleaner option long-term. Differential Revision: https://reviews.llvm.org/D116702
-
Pengxuan Zheng authored
Currently, it can become extremely costly to compute MayIncreasePressure if the size of CSUses turns out to be very large. In that case, it's no longer cost effective to keep computing MayIncreasePressure. Therefore, to limit the amount of time spent in isProfitableToCSE, we simply conservatively assume MayIncreasePressure if the size of CSUses is too large. This can reduce overall compile time by 30% for some benchmarks. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D134003
-
Craig Topper authored
I want to default all VP operations to Expand. These 2 were blocking because VE doesn't support them and the tests were expecting them to fail a specific way. Using Expand caused them to fail differently. Seemed better to emulate them using operations that are supported. @simoll mentioned on Discord that VE has some expansion downstream. Not sure if its done like this or in the VE target. Reviewed By: frasercrmck, efocht Differential Revision: https://reviews.llvm.org/D133514
-
Xing Xue authored
Summary: This patch enables libc++ LIT test case last_write_time.pass.cpp for AIX. Because system call utimensat() of AIX which is used in the libc++ implementation of last_write_time() does not accept the times parameter with a negative tv_sec or tv_nsec field, testing of setting file time to before epoch time is excluded for AIX. Reviewed by: ldionne, libc++ Differential Revision: https://reviews.llvm.org/D133124
-