- Jun 07, 2023
-
-
Fangrui Song authored
64666d46 incorrectly removed REQUIRES. 2 RUN lines do need x86-registered-target.
-
Matt Arsenault authored
Also introduce __builtin_ldexpf16.
-
Matt Arsenault authored
AMDGPU has native instructions and target intrinsics for this, but these really should be subject to legalization and generic optimizations. This will enable legalization of f16->f32 on targets without f16 support. Implement a somewhat horrible inline expansion for targets without libcall support. This could be better if we could introduce control flow (GlobalISel version not yet implemented). Support for strictfp legalization is less complete but works for the simple cases.
-
Matt Arsenault authored
-
Nikolas Klauser authored
This simplifies the usage of `__less` by making the class not depend on the types compared, but instead the `operator()`. We can't remove the template completely because we explicitly instantiate `std::__sort` with `__less<T>`. Reviewed By: ldionne, #libc Spies: arichardson, EricWF, libcxx-commits, mgrang Differential Revision: https://reviews.llvm.org/D145285
-
Fangrui Song authored
-f{constexpr,macro,template}-backtrace-limit=, -fspell-checking-limit=, -ftemplate-depth= -
Amir Ayupov authored
Parametrize SampleProfileInference and SampleProfileLoaderBaseImpl by function type (Function/MachineFunction) instead of block type (BasicBlock/MachineBasicBlock). Move out specializations to appropriate locations. This change makes it possible to use GraphTraits instead of a custom TypeMap and make SampleProfileInference not dependent on LLVM types, paving the way for generalizing SampleProfileInference interfaces to BOLT IR types (BinaryFunction/BinaryBasicBlock) in stale profile matching (D144500). Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D152187
-
Benjamin Kramer authored
-
Benjamin Kramer authored
-
Louis Dionne authored
Back in 2020 [1], we went very close to enabling Filesystem on MSVC by disabling int128_t, but decided to wait because MSVC support for int128_t was supposed to come shortly after. Since it's not there yet, I propose turning off int128_t support by default on MSVC. This will make <filesystem> available by default on MSVC, and most importantly will open the possibility for changing LIBCXX_ENABLE_FILESYSTEM to mean "the system doesn't have support for a filesystem" instead of simply "don't build the std::filesystem library", which is what I'm really after with this change. In a way, this is a resurection of D91139. [1]: https://reviews.llvm.org/D91139#2429595 Differential Revision: https://reviews.llvm.org/D134912
-
Craig Topper authored
This requires Zbkb. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D152293
-
Louis Dionne authored
Instead of guarding header tests using #ifdefs inside the tests, use Lit markup to mark all the tests as unsupported. This is simpler but also provides better feedback about which tests are being run when running the test suite. Differential Revision: https://reviews.llvm.org/D151893
-
Craig Topper authored
This avoids checking the size of the sequence repeatedly for each special case. Especially on RV32 where none of the special cases apply. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D152300
-
Arthur Eubanks authored
findFile returns null if we've already seen the file, make that clearer. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D152292
-
Noah Goldstein authored
This is dead as of: D145341 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D152181
-
Noah Goldstein authored
There are some new cases if the division is `exact`: 1: If `TZ(LHS) == TZ(RHS)` then the result is always Odd 2: If `TZ(LHS) > TZ(RHS)` then the `TZ(LHS)-TZ(RHS)` bits of the result are zero. Proofs: https://alive2.llvm.org/ce/z/3rAZqF As well, return zero in known poison cases to be consistent rather than just working about the bits we are changing. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150923 -
Noah Goldstein authored
It seems consistent to always return zero for known poison rather than varying the value. We do the same elsewhere. Differential Revision: https://reviews.llvm.org/D150922
-
Noah Goldstein authored
Chronically misspelled 'denominator' as 'denuminator' and a few other cases. On the logic side, no longer require `RHS` to be strictly positive in `sdiv`. This in turn means we need to handle a possible zero `denom` in the APInt division. Differential Revision: https://reviews.llvm.org/D150921
-
David Green authored
As pointed out in D149968 vselect predicate patterns could do with a one-use check to prevent multiple operations being created. This updates the EitherVSelectOrPassthruPatFrags pattern frags used in creating predicates min/max. Differential Revision: https://reviews.llvm.org/D151080
-
Fangrui Song authored
Close https://github.com/llvm/llvm-project/issues/63084 Unlike AArch32, RISC-V defines PT_RISCV_ATTRIBUTES to include the SHT_RISCV_ATTRIBUTES section. There is no real-world use case yet. We place PT_RISCV_ATTRIBUTES after PT_GNU_STACK, similar to PT_ARM_EXIDX. GNU ld places PT_RISCV_ATTRIBUTES earlier, but the placement should not matter. Link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/71 Reviewed By: asb Differential Revision: https://reviews.llvm.org/D152065
-
Jonas Devlieghere authored
LLDB's logging infrastructure supports prepending log messages with the name of the file and function that generates the log (see help log enable). Therefore it's unnecessary to include the current __FUNCTION__ in the log message itself. This patch removes __FUNCTION__ from log messages in the Host library. Differential revision: https://reviews.llvm.org/D151762
-
Stanislav Mekhanoshin authored
The future patch will carry additional info there. Differential Revision: https://reviews.llvm.org/D152302
-
Guozhi Wei authored
This patch implements the enhancement proposed by https://github.com/llvm/llvm-project/issues/59312. Suppose we have following code v0 = load %addr br %LoadBB LoadBB: v1 = load %addr ... PredBB: ... br %cond, label %LoadBB, label %SuccBB SuccBB: v2 = load %addr ... Instruction v1 in LoadBB is partially redundant, edge (PredBB, LoadBB) is a critical edge. SuccBB is another successor of PredBB, it contains another load v2 which is identical to v1. Current GVN splits the critical edge (PredBB, LoadBB) and inserts a new load in it. A better method is move the load of v2 into PredBB, then v1 can be changed to a PHI instruction. If there are two or more similar predecessors, like the test case in the bug entry, current GVN simply gives up because otherwise it needs to split multiple critical edges. But we can move all loads in successor blocks into predecessors. Differential Revision: https://reviews.llvm.org/D141712
-
Ellis Hoag authored
In https://reviews.llvm.org/D147812 I introduced the class `BalancedPartitioning` and it seemed to trigger a warning in flang ``` C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\llvm\include\llvm/Support/BalancedPartitioning.h(89): warning C4305: 'initializing': truncation from 'double' to 'float' ``` For good measure, I converted all double literals to floats. This should be a NFC.
-
Joseph Huber authored
-
Aart Bik authored
Even though this feature was deprecated in release 11.2, any library before this version still supports the feature, which is why we are making it available under a macro. Reviewed By: K-Wu Differential Revision: https://reviews.llvm.org/D152290
-
Joseph Huber authored
We should more consistently use inline assembly using the LIBC wrappers. It's much safer to mark all of these volatile as well. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D152294
-
Jonas Devlieghere authored
LLDB's logging machinery supports prepending log messages with the name of the file and function that generates the log. However, currently this functionality is limited to the LLDB_LOG macro. I meant to do this as a follow up to D65128 but never got around to it. Differential revision: https://reviews.llvm.org/D151764
-
Jessica Clarke authored
Otherwise subsequent .option arch, +foo directives (but not -, since those have their own separate validation) fail the parseFeatureBits check, leading to cascading errors. Reviewed By: luismarques, MaskRay Differential Revision: https://reviews.llvm.org/D152273
-
spupyrev authored
BOLT often has to deal with profiles collected on binaries built from several revisions behind release. As a result, a certain percentage of functions is considered stale and not optimized. This diff adds an ability to match profile to functions that are not 100% binary identical, which increases the optimization coverage and boosts the performance of applications. The algorithm consists of two phases: matching and inference: - At the matching phase, we try to "guess" as many block and jump counts from the stale profile as possible. To this end, the content of each basic block is hashed and stored in the (yaml) profile. When BOLT optimizes a binary, it computes block hashes and identifies the corresponding entries in the stale profile. It yields a partial profile for every CFG in the binary. - At the inference phase, we employ a network flow-based algorithm (profi) to reconstruct "realistic" block and jump counts from the partial profile generated at the first stage. In practice, we don't always produce proper profile data but the majority (e.g., >90%) of CFGs get the correct counts. This is a first part of the change; the next stacked diff extends the block hashing and provides perf evaluation numbers. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D144500
-
Eric Li authored
Elaborated types are sugar that represent how the type was spelled in the original source. When printing a type outside of that original context, the qualifiers as saved in the elaborated type will be incorrect. Additionally, their existence also inhibits the use of `PrintingCallbacks::isScopeVisible` as a customization point. Differential Revision: https://reviews.llvm.org/D149677
-
Fangrui Song authored
to decrease the number of unsupported tests on other platforms.
-
Ellis Hoag authored
In [0] we described an algorithm called //BalancedPartitioning// (bp) to consume function traces [1] and compute a function order that reduces the number of page faults during startup. This patch adds the `order` command to the `llvm-profdata` tool which uses bp to output a function order that can be passed to the linker via `--symbol-ordering-file=`. Special thanks to Sergey Pupyrev and Julian Mestre for designing this balanced partitioning algorithm. [0] https://discourse.llvm.org/t/rfc-temporal-profiling-extension-for-irpgo/68068 [1] https://reviews.llvm.org/D147287 Reviewed By: spupyrev Differential Revision: https://reviews.llvm.org/D147812
-
Craig Topper authored
Where C is a simm32. This costs an extra temporary register, but avoids a constant pool. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D152236
-
Peter Klausler authored
12.10.2.17 defines that a INQUIRE statement's NEXTREC=n output value for a unit that is not connected for direct access becomes undefined, but the current I/O runtime can fail in a confusing manner by trying to return uninitialized stack garbage. Reported on Slack by Tarun Prabhu as an intermittent failure in the gfortran regression test inquire_pre.f90. Differential Revision: https://reviews.llvm.org/D152295
-
Simon Pilgrim authored
Reduces diff in a future commit
-
Andrey Portnoy authored
The call to 'multiply_transpose' in the initialization of the variable 'f' was intended to have a shape mismatch. However the variable 'a' has shape <2, 3> and the variable 'c' has shape <3, 2>, so the arguments 'transpose(a)' and 'c' have in fact compatible shapes (<3, 2> both), the opposite of what is wanted here. This commit removes the transpose so that arguments 'a' and 'c' have incompatible shapes <2, 3> and <3, 2>, respectively. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D151897
-
Jacques Pienaar authored
Serves as rather self-contained documentation for using the generator from https://reviews.llvm.org/D144820. Differential Revision: https://reviews.llvm.org/D152118
-
Alex Langford authored
Re-apply "Revert "[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract"" This reverts commit 11d61c07 to re-apply 6836a47b with modifications. Specifically, the errors in DWARFAbbreviationDeclaration::extract needed to be moved as they are returned to ensure the right Error constructor is selected.
-
Arthur Eubanks authored
Follow up to D151815. Or else we properly handle the first instance of a file, then error out on the second instance of the same file. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D152198
-