- Feb 24, 2022
-
-
Jinsong Ji authored
The unique_ptr_ret and weak_ptr_ret tests are not expected to pass on AIX. These tests check that unique_ptr and weak_ptr are returned by value, but on AIX, all structs are always returned by reference. ``` 3.9.6 Function Return Values ... Note: Structures of any length and character strings longer than four bytes are returned in a storage buffer allocated by the caller. The address of this buffer is passed as a hidden first argument in GPR3, which causes the first explicit argument word to be passed in GPR4. This hidden argument is treated as a formal argument and corresponds to the first word of the argument area. ``` Reviewed By: #powerpc, daltenty, #libc, Quuxplusone, philnik Differential Revision: https://reviews.llvm.org/D119952
-
Augie Fackler authored
Prior to this change, LLVM would attempt to optimize an aligned_alloc(33, ...) call to the stack. This flunked an assertion when trying to emit the alloca, which crashed LLVM. Avoid that with extra checks. Differential Revision: https://reviews.llvm.org/D119604
-
Arjun P authored
Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D120339
-
Vitaly Buka authored
There should be 1-bit unused field between tid field and is_atomic field of Shadow. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D119417
-
William S. Moses authored
Given a cmpf of either uitofp or sitofp and a constant, attempt to canonicalize it to a cmpi. This PR rewrites equivalent code within LLVM to now apply to MLIR arith. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D117257
-
Valentin Clement authored
This patch introduce basic function/subroutine calls. Because of the state of lowering only simple scalar arguments can be used in the calls. This will be enhanced in follow up patches with arrays, allocatable, pointer ans so on. ``` subroutine sub1() end subroutine sub2() call sub1() end ``` This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: schweitz Differential Revision: https://reviews.llvm.org/D120419 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
V Donaldson <vdonaldson@nvidia.com>
-
Simon Pilgrim authored
-
Jessica Paquette authored
This reverts commit d97f997e. This commit was not NFC. (See: https://reviews.llvm.org/rGd97f997eb79d91b2872ac13619f49cb3a7120781)
-
Eugene Zhulenev authored
+ compare block size with the unrollable inner dimension + reduce nesting in the code and simplify a bit IR building Reviewed By: cota Differential Revision: https://reviews.llvm.org/D120075
-
Fangrui Song authored
In GNU ld, the definition precedence is: regular symbol assignment > relocatable object definition > `PROVIDE` symbol assignment. GNU ld's internal linker scripts define the non-reserved (by C and C++) edata/end/etext with `PROVIDE` so the relocatable object definition takes precedence. This makes sense because `int end;` is valid. We currently redefine such symbols if they are COMMON, but not if they are regular definitions, so `int end;` with -fcommon is essentially a UB in ld.lld. Fix this (also improve consistency and match GNU ld) by using the `isDefined` code path for `isCommon`. In GNU ld, reserved identifiers like `__ehdr_start` do not use `PROVIDE`, while we treat them all as `PROVIDE`, this seems fine. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D120389
-
wlei authored
Support to load debug info from dwarf split file, like .dwo, .dwp files. Leverage the `getNonSkeletonUnitDIE(false)` API to achieve this. Add test cause to make sure all the ranges is well retrieved by the loader. Reviewed By: ayermolo, hoy, wenlei Differential Revision: https://reviews.llvm.org/D115973
-
Arthur Eubanks authored
-
Simon Pilgrim authored
[X86] combineX86ShufflesRecursively - don't both widening inputs before calling combineX86ShuffleChain combineX86ShuffleChain no longer has to assume that the shuffle inputs are the right size, so don't create unnecessary nodes messing up oneuse limits as detailed on Issue #45319
-
LLVM GN Syncbot authored
-
Sanjay Patel authored
This is a fix for a regression discussed in: https://github.com/llvm/llvm-project/issues/53829 We cleared more high multiplier bits with 995d400f, but that can lead to worse codegen because we would fail to recognize the now disguised multiplication by neg-power-of-2 as a shift-left. The problem exists independently of the IR change in the case that the multiply already had cleared high bits. We also convert shl+sub into mul+add in instcombine's negator. This patch fills in the high-bits to see the shift transform opportunity. Alive2 attempt to show correctness: https://alive2.llvm.org/ce/z/GgSKVX The AArch64, RISCV, and MIPS diffs look like clear wins. The x86 code requires an extra move register in the minimal examples, but it's still an improvement to get rid of the multiply on all CPUs that I am aware of (because multiply is never as fast as a shift). There's a potential follow-up noted by the TODO comment. We should already convert that pattern into shl+add in IR, so it's probably not common: https://alive2.llvm.org/ce/z/7QY_Ga Fixes #53829 Differential Revision: https://reviews.llvm.org/D120216
-
Arthur Eubanks authored
This reverts commit 70ff6fbe. Breaks bots, e.g. http://45.33.8.238/linux/69375/step_12.txt.
-
Valentin Clement authored
This patch removes unused or obsolete code in the ConvertType.h and ConvertType.cpp files. These files were landed together with the initial flang upstreaming. This cleanup will help future upstreaming effort from fir-dev and keep only used code. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D120405
-
Daniel Resnick authored
This eliminates the requirement that pass-related strings outlive pass instances, which will facilitate future work enabling dynamic passes written in other languages. Differential Revision: https://reviews.llvm.org/D120341
-
Valentin Clement authored
Add ability to lower complex constant. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D120402 Co-authored-by:
Kiran Chandramohan <kiran.chandramohan@arm.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Sam McCall authored
The TokenStream class is the representation of the source code that will be fed into the GLR parser. This patch allows a "raw" TokenStream to be built by reading source code. It also supports scanning a TokenStream to find the directive structure. Next steps (with placeholders in the code): heuristically choosing a path through #ifs, preprocessing the code by stripping directives and comments. These will produce a suitable stream to feed into the parser proper. Differential Revision: https://reviews.llvm.org/D119162
-
Augie Fackler authored
Prior to this change, LLVM would attempt to optimize an aligned_alloc(33, ...) call to the stack. This flunked an assertion when trying to emit the alloca, which crashed LLVM. Avoid that with extra checks. Differential Revision: https://reviews.llvm.org/D119604
-
Philip Reames authored
This cap was first added in 848c1aa4 (back in 2015). Per the original commit message, the purpose was to avoid a compile time explosion in long basic blocks. The algorithmic problem in scheduling has now been fixed in 0539a26d. In the meantime, the code has rotten fairly badly. Some intermediate refactoring caused the size to only be incremented if *both* iterators advance in the window search. This causes the size to be badly undercounted when near one end of a basic block. We no longer have any test which exercises the logic in an intentional way; there's one test which differs with this change, but the changes appear fairly orthoganol to the purpose of the test file. Unfortunately, we no longer have the original motivating example, so it's possible that it also hits some other issue. I tested locally with a large example, but even at it's worst, that one doesn't demonstrate anything too extreme even without the algorithmic fix. It's clearly faster with, but only by ~20% which doesn't seem in line with the original commit message. If regressions with this patch are seen, please file a bug and I'll try to fix any other algorithmic problems which fall out.
-
Philipp Stephani authored
In an indirect buffer, buffer-file-name is nil, so check the base buffer instead. This works fine in direct buffers where buffer-base-buffer returns nil. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D120408
-
- Feb 23, 2022
-
-
Malhar Jajoo authored
Adds new optimization remarks when loop vectorization fails due to the compiler being unable to find bound of an array access inside a loop Differential Revision: https://reviews.llvm.org/D115873
-
Simon Pilgrim authored
[X86] combineX86ShuffleChainWithExtract - don't both widening inputs after peeking through ISD::EXTRACT_SUBVECTOR nodes combineX86ShuffleChain no longer has to assume that the shuffle inputs are the right size, so don't create unnecessary nodes messing up oneuse limits as detailed on Issue #45319 Removing widening from combineX86ShufflesRecursively will be the next step, followed by removing combineX86ShuffleChainWithExtract entirely
-
Nikita Popov authored
This resolves one of the type ID propagation TODOs.
-
Emilio Cota authored
Its number of optional parameters has grown too large, which makes adding new optional parameters quite a chore. Fix this by using an options struct. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D120380
-
Nikita Popov authored
This new pointer element type use snuck in via D118632.
-
Arjun P authored
Use an `MLIRContext` declared in a single place in the `parsePoly` function that almost all Presburger unit tests use for parsing sets. This function is only used in tests. This saves us from having to declare and pass a new `MLIRContext` in every test. Reviewed By: bondhugula, mehdi_amini Differential Revision: https://reviews.llvm.org/D119251
-
Jay Foad authored
Split out f32 buffer, f64 buffer and image atomics. This just makes it easier to test subtargets that only have some of these instructions. Differential Revision: https://reviews.llvm.org/D120407
-
Nikita Popov authored
This complements the existing fold for selects. This fold is a bit more conservative, requiring one-use. The other folds here should probably also be subjected to a one-use restriction. https://alive2.llvm.org/ce/z/Q9eCDU https://alive2.llvm.org/ce/z/8YK2CJ
-
Nikita Popov authored
-
Stefan Pintilie authored
Add the Power 10 instruction LXVKQ. This patch was taken from an original patch by: Yi-Hong Lyu Reviewed By: lei Differential Revision: https://reviews.llvm.org/D117507
-
Jan Svoboda authored
The dependency scanner already generates canonical -cc1 command lines that can be used to compile discovered modular dependencies. For translation unit command lines, the scanner only generates additional driver arguments the build system is expected to append to the original command line. While this works most of the time, there are situations where that's not the case. For example with `-Wunused-command-line-argument`, Clang will complain about the `-fmodules-cache-path=` argument that's not being used in explicit modular builds. Combine that with `-Werror` and the build outright fails. To prevent such failures, this patch changes the dependency scanner to return the full driver command line to compile the original translation unit. This gives us more opportunities to massage the arguments into something reasonable. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D118986
-
Jan Svoboda authored
In D113473, the dependency scanner stopped emitting "-fmodule-map-file=" arguments. Potential build systems are expected to not add any such arguments on their own. This commit removes mentions of such arguments to avoid confusion.
-
Rainer Orth authored
As requested in D107955 <https://reviews.llvm.org/D107955>, this patch splits off the `MC` and `CodeGen` parts and adds a testcase. Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D120318
-
Rainer Orth authored
Instead of the GNU extension `SHF_GNU_RETAIN`, Solaris provides equivalent functionality with `SHF_SUNW_NODISCARD`. This patch implements the necessary support. Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D107955
-
Nikita Popov authored
Rather than queuing up actions, have one function that does the log2() fold in the obvious way, but with a flag that allows us to check whether the fold will succeed without actually performing it.
-
Aaron Ballman authored
-
Sanjay Patel authored
In D111530, I suggested that we add some relatively basic pattern-matching folds for shifts and funnel shifts and avoid a more specialized solution if possible. We can start by implementing at least one of these in IR because it's easier to write the code and verify with Alive2: https://alive2.llvm.org/ce/z/qHpmNn This will need to be adapted/extended for SDAG to handle the motivating bug ( #49541 ) because the patterns only appear later with that example (added some tests: bb850d42) This can be extended within InstSimplify to handle cases where we 'and' with a shift too (in that case, kill the funnel shift). We could also handle patterns where the shift and funnel shift directions are inverted, but I think it's better to canonicalize that instead to avoid pattern-match case explosion. Differential Revision: https://reviews.llvm.org/D120253
-