- Oct 16, 2020
-
-
Max Kazantsev authored
Variable ExtendOperExpr only exists to check whether it is a SCEV ext. We create it as SCEV ext right here, so semantically this check is trivially true. In theory, it may fail if SCEV is smart enough and can simplify the expression. However, no matter whether it is an ext or not, we never use this fact for further reasoning. So this code is currently useless and in theory may become harmful with SCEV's development. We do not expect any behavior changes with removing it. If it caused negative changes, the patch should be reverted.
-
Sebastian Neubauer authored
-
Max Kazantsev authored
Some facts have already been checked in widenWithVariantUse and then checked again in widenWithVariantUseCodegen. The latter is redundant, we can replace it with asserts.
-
Max Kazantsev authored
It was reverted because of negative compile time impact. In this version, less powerful proof methods are used (non-recursive reasoning only), and scope limited to constant End values to avoid explision of complex proofs. Differential Revision: https://reviews.llvm.org/D89381
-
Cullen Rhodes authored
TypeSize comparisons using overloaded operators should be replaced by the new isKnownXY comparators when the operands can be fixed-length or scalable vectors. In ValueTracking there are several uses of the overloaded operators in `isKnownNonZero` and `ComputeMultiple`. In the former we already bail out on scalable vectors since we currently have no way to represent DemandedElts, and the latter is operating on scalar integers, so we can assume fixed-size in both instances. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D89387
-
Simon Pilgrim authored
Prep work for PR35155 - renamed narrowRotate to narrowFunnelShift, rewrote some comments and adjusted code to collect separate shift values, although we bail if they don't match (still only rotations are only actually folded). I'm trying to match matchFunnelShift as much as possible in case we finally get to merge these one day.
-
Caroline Concatto authored
This patch makes sure that the instance of TypeSize comparison operator is done with a fixed type size. Differential Revision: https://reviews.llvm.org/D89312
-
Simon Pilgrim authored
Support vector cases for folding: (iszero(A & K1) | iszero(A & K2)) -> (A & (K1 | K2)) != (K1 | K2) (!iszero(A & K1) & !iszero(A & K2)) -> (A & (K1 | K2)) == (K1 | K2)
-
Dávid Bolvanský authored
Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D89321
-
Florian Hahn authored
-
Tony authored
-
Florian Hahn authored
After investigation by @asbirlea, the issue that caused the revert appears to be an issue in the original source, rather than a problem with the compiler. This patch enables MemorySSA DSE again. This reverts commit 915310bf.
-
Konstantin Schwarz authored
This test was failing in our CI environment, because Jenkins mounts the workspaces into Docker containers using their full path, i.e. /home/jenkins/workspaces/llvm-build. We've seen permission denied errors because /home/jenkins is mounted with root permissions and the default cache directory under Linux is $HOME/.cache. The fix is to explicitly provide the -fmodules-cache-path, which the other tests already seem to provide. Reviewed By: akyrtzi Differential Revision: https://reviews.llvm.org/D89453
-
Nikita Popov authored
This reverts commit 905101c3. This causes a large compile-time regression: https://llvm-compile-time-tracker.com/compare.php?from=cc175c2cc8e638462bab74e0781e06f9b6eb5017&to=905101c36025fe1c8ecdf9a20cd59db036676073&stat=instructions
-
Mikael Holmen authored
-
Georgii Rymar authored
This is a follow-up for D89039 patch, which adds a support for `Content`/`Size` for all sections. Assuming that all of sections have a support of these 2 fields, we can simplify and generalize the code. Depends on D89039 Differential revision: https://reviews.llvm.org/D89120
-
Max Kazantsev authored
We plan to introduce more advanced ways of dealing with different types.
-
Fangrui Song authored
-
Kito Cheng authored
- The goal of this patch is improve option compatible with RISCV-V GCC, -mcpu support on GCC side will sent patch in next few days. - -mtune only affect the pipeline model and non-arch/extension related target feature, e.g. instruction fusion; in td file it called TuneFeatures, which is introduced by X86 back-end[1]. - -mtune accept all valid option for -mcpu and extra alias processor option, e.g. `generic`, `rocket` and `sifive-7-series`, the purpose is option compatible with RISCV-V GCC. - Processor alias for -mtune will resolve according the current target arch, rv32 or rv64, e.g. `rocket` will resolve to `rocket-rv32` or `rocket-rv64`. - Interaction between -mcpu and -mtune: * -mtune has higher priority than -mcpu for pipeline model and TuneFeatures. [1] https://reviews.llvm.org/D85165 Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D89025 -
Zequan Wu authored
`/dev/null` is treated as regualar file on Windows. native_separators.c line 11 used relative path which was not correct but worked before because when `SourceFiles` is empty, it add all source files into `SourceFiles`.
-
Max Kazantsev authored
We can sharpen the range of a AddRec if we know that it does not self-wrap and know the symbolic iteration count in the loop. If we can evaluate the value of AddRec on the last iteration and prove that at least one its intermediate value lies between start and end, then no-wrap flag allows us to conclude that all of them also lie between start and end. So the estimate of range can be improved to union of ranges of start and end. Differential Revision: https://reviews.llvm.org/D89381 Reviewed By: efriedma
-
Alexander Kornienko authored
Update IncludeSorter/IncludeInserter to support objective-c google style (part 1): 1) Correctly consider .mm/.m extensions 2) Correctly categorize category headers. 3) Add support for generated files to go in a separate section of imports Reviewed By: alexfh, gribozavr2 Patch by Joe Turner. Differential Revision: https://reviews.llvm.org/D89276
-
Stella Laurenzo authored
* Also fixes the const-ness of the various DenseElementsAttr construction functions. * Both issues identified when trying to use the DenseElementsAttr functions. Differential Revision: https://reviews.llvm.org/D89517
-
Zequan Wu authored
When all provided source files are filtered out either due to `--ignore-filename-regex` or not part of binary, don't generate coverage reults for all source files. Because if users want to generate coverage results for all source files, they don't even need to provid selected source files or `--ignore-filename-regex`. Differential Revision: https://reviews.llvm.org/D89359
-
Rob Suderman authored
Missing .str() makes gcc5 unable to infer the template to use. Differential Revision: https://reviews.llvm.org/D89516
-
Richard Smith authored
folding to not constant folding. Constant folding of ICEs is done as a GCC compatibility measure, but new code was picking it up, presumably by accident, due to the bad default. While here, also switch the flag from a bool to an enum to make it more obvious what it means at call sites. This highlighted a couple of places where our behavior is different between C++11 and C++14 due to switching from checking for an ICE to checking for a converted constant expression (where there is no 'fold' codepath).
-
Rob Suderman authored
Added an underlying matcher for generic constant ops. This included a rewriter of RewriterGen to make variable use more clear. Differential Revision: https://reviews.llvm.org/D89161
-
Vedant Kumar authored
This patch adds -f[no-]split-cold-code CC1 options to clang. This allows the splitting pass to be toggled on/off. The current method of passing `-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose correctly (say, with `-O0` or `-Oz`). To implement the -fsplit-cold-code option, an attribute is applied to functions to indicate that they may be considered for splitting. This removes some complexity from the old/new PM pipeline builders, and behaves as expected when LTO is enabled. Co-authored by: Saleem Abdulrasool <compnerd@compnerd.org> Differential Revision: https://reviews.llvm.org/D57265 Reviewed By: Aditya Kumar, Vedant Kumar Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
-
Jessica Paquette authored
Simplify emitIntegerCompare and improve comments + asserts. Mostly making the code a little easier to follow. Also, this code is only used for G_ICMP. The legalizer ensures that the LHS/RHS for every G_ICMP is either a s32 or s64. So, there's no need to handle anything else. This lets us remove a bunch of checks for whether or not we successfully emitted the compare. Differential Revision: https://reviews.llvm.org/D89433
-
Amara Emerson authored
It's probably better to split these into separate G_FADD/G_FMUL + G_VECREDUCE operations in the translator rather than carrying the scalar around. The majority of the time it'll get simplified away as the scalars are probably identity values. Differential Revision: https://reviews.llvm.org/D89150
-
Thomas Raoux authored
Adding unroll support for transfer read and transfer write operation. This allows to pick the ideal size for the memory access for a given target. Differential Revision: https://reviews.llvm.org/D89289
-
David Blaikie authored
-
Fangrui Song authored
rL131311 added `asm()` support for builtin functions, but `asm()` for builtins with specialized emitting (e.g. memcpy, various math functions) still do not work. This patch makes these functions work for `asm()` and `#pragma redefine_extname`. glibc uses `asm()` to redirect internal libc function calls to hidden aliases. Limitation: such a function is a builtin in clang, but will not be recognized as a libcall in optimization passes because Clang does not annotate the renamed function as a libcall. In GCC -O1 or above, `abs` can be optimized out but we can't. Additionally, we cannot redirect `__builtin_sin` to `real_sin` in the following example: double sin(double x) asm("real_sin"); double f(double d) { return __builtin_sin(d); } --- According to @rsmith, the following three statements cannot be simultaneously true: (1) The frontend function foo has known, builtin semantics X. (2) The symbol foo has known, builtin semantics X. (3) It's not correct to lower a call to the frontend function foo to the symbol foo. People do want (1) (if it is profitable to expand a memcpy, do it). This also means that people do not want to add -fno-builtin-memcpy. People do want (3): that is why they use asm("__GI_memcpy") in the first place. So unfortunately we make a compromise by not refuting (2) (see the limitation above). For most libcalls, there is a small loss because compilers don't synthesize them. For the few glibc cares about, it uses `asm("memcpy = __GI_memcpy");` to make the assembly level redirection. (Changing function names (e.g. `__memcpy`) is a hit to ergonomics which is not acceptable). Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D88712 -
Reid Kleckner authored
The documentation rules indicate that instance methods should return large, trivially copyable aggregates via X1/X0 and not X8 as is normally done when returning such structs from free functions: https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#return-values Fixes PR47836, a bug in the initial implementation of these rules. I tried to simplify the logic a bit as well while I'm here. Differential Revision: https://reviews.llvm.org/D89362
-
Jim Ingham authored
Differential Revision: https://reviews.llvm.org/D89358
-
Kazushi (Jam) Marukawa authored
Add VGT/VSC/PFCHV vector instructions and regression tests. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89471
-
Kazushi (Jam) Marukawa authored
VE doesn't have instruction for fabs/fcos/fsin/fsqrt, so expand them. Add regression tests also. Update fcopysign regression test, also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89457
-
Yaxun (Sam) Liu authored
This reverts commit 187658b8 due to AMDGPU backend issues.
-
Leonard Chan authored
This reverts commits 683b308c and 8487bfd4. We will go for a more restricted approach that does not give freedom to everyone to change ABIs on whichever platform. See the discussion on https://reviews.llvm.org/D85802.
-
Thomas Lively authored
As proposed at https://github.com/WebAssembly/simd/pull/379. Use a target builtin and intrinsic rather than normal codegen patterns to make the instruction opt-in until it is merged to the proposal and stabilized in engines. Differential Revision: https://reviews.llvm.org/D89446
-