- Jul 26, 2020
-
-
Craig Topper authored
We don't handle these yet and D83630 won't improve that, but at least we'll have the tests.
-
Roman Lebedev authored
We can happily turn function definitions into declarations, thus obscuring their argument from being elided by this pass. I don't believe there is a good reason to just ignore declarations. likely even proper llvm intrinsics ones, at worst the input becomes uninteresting. The other question here is that all these transforms are all-or-nothing. In some cases, should we be treating each use separately? The main blocker here seemed to be that llvm::CloneFunctionInto() does `&OldFunc->front()`, which inserts a nullptr into a densemap, which is not happy about it and asserts.
-
Roman Lebedev authored
replaceFunctionCalls() is very non-exhaustive, it only handles CallInst's. Which means, by the time we drop old function, there may still be uses of it lurking around. Let's instead whack-a-mole them by all by replacing with undef. I'm not sure this is the best handling, especially for calls, but IMO poorly reduced input is much better than crashing reduction tool. A (previously-crashing!) test added. Fixes https://bugs.llvm.org/show_bug.cgi?id=46819
-
Roman Lebedev authored
Terminator may have returned value, so we need to replace uses, and in general handle invoke as a branch inst. I'm not sure this is the best handling, but IMO poorly reduced input is much better than crashing reduction tool. A (previously-crashing!) test added. Fixes https://bugs.llvm.org/show_bug.cgi?id=46818
-
Lang Hames authored
The new names, DylibHandle and loadDylib, are more concise and make clear that these utilities are for loading dynamic libraries, not static ones.
-
Lang Hames authored
Subclasses will commonly gather that information from a remote during construction, in which case they won't have meaningful values to pass to TargetProcessControl's constructor.
-
Frederik Gossen authored
Re-landing with dependent change landed and error condition relaxed. Beyond the change to error condition exactly https://reviews.llvm.org/D84445.
-
Jacques Pienaar authored
Based on https://reviews.llvm.org/D84439 but less restrictive, else we don't allow shape_of to be able to produce a ranked output and doesn't allow for iterative refinement here. We can consider making it more restrictive later.
-
Jacques Pienaar authored
This reverts commit 55ced04d. Forgot to submit depend change first.
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D84445
-
Philip Reames authored
(Disabled under flag for the moment) This is part of a larger project wherein we are finally integrating lowering of gc live operands with the register allocator. Today, we force spill all operands in SelectionDAG. The code to do so is distinctly non-optimal. The approach this patch is working towards is to instead lower the relocations directly into the MI form, and let the register allocator pick which ones get spilled and which stack slots they get spilled to. In terms of performance, the later part is actually more important as it avoids redundant shuffling of values between stack slots. This particular change adds ISEL support to produce the variadic def STATEPOINT form required by the above. In particular, the first N are lowered to variadic tied def/use pairs. So new statepoint looks like this: reloc1,reloc2,... = STATEPOINT ..., base1, derived1<tied-def0>, base2, derived2<tied-def1>, ... N is limited by the maximal number of tied registers machine instruction can have (15 at the moment). The current patch is restricted to handling relocations within a single basic block. Cross block relocations (e.g. invokes) are handled via the legacy mechanism. This restriction will be relaxed in future patches. Patch By: dantrushin Differential Revision: https://reviews.llvm.org/D81648
-
Craig Topper authored
[X86] Add llvm.roundeven test cases. Add f80 tests cases for constrained intrinsics that lower to libcalls. NFC
-
Craig Topper authored
The type is called x86_fp80, but when it is printed in the intrinsic name it should be f80. The parser doesn't seem to care that the name was wrong.
-
Fangrui Song authored
Many driver options are neither 'DriverOption' nor 'LinkerInput'. When gcc is used for linking, these options get forwarded even if they don't have anything to do with linking. Among these options, clang-specific ones can cause gcc to error. Just use 'OPT_Link_Group' and a new flag 'LinkOption' for options which already have a group. gfortran support apparently bit rots (which does not seem to make much sense). XFAIL the test.
-
LLVM GN Syncbot authored
-
Roman Lebedev authored
ReduceFunctions could do it, but it also replaces *all* calls with undef, so if any of undef replacements makes reduction uninteresting, it won't work. ReduceBasicBlocks also could do it, but well, it may take many guesses for all the blocks of a function to happen to be out-of-chunk, which is not a very efficient way to go about it. So let's just do this first.
-
- Jul 25, 2020
-
-
Adrian Prantl authored
This cleanup patch unifies all methods called GetByteSize() in the ValueObject hierarchy to return an optional, like the methods in CompilerType do. This means fewer magic 0 values, which could fix bugs down the road in languages where types can have a size of zero, such as Swift and C (but not C++). Differential Revision: https://reviews.llvm.org/D84285
-
Florian Hahn authored
This test seems to take quite a long time with EXPENSIVE_CHECKS. Remove it.
-
Nikita Popov authored
Pass the Value* instead of the operand number, rename I to CxtI. This makes the function a bit more generally useful.
-
Matt Arsenault authored
Just fallback for now. Really tablegen needs to generate all of the subregister index handling we need.
-
Nikita Popov authored
-
Nikita Popov authored
Reapply 5db5b4bc.
-
Nikita Popov authored
Reapply with DTU update moved after CFG update, which is a requirement of the API. ----- Non-feasible control-flow edges are currently removed by replacing the branch condition with a constant and then calling ConstantFoldTerminator. This happens in a rather roundabout manner, by inspecting the users (effectively: predecessors) of unreachable blocks, and further complicated by the need to explicitly materialize the condition for "forced" edges. I would like to extend SCCP to discard switch conditions that are non-feasible based on range information, but this is incompatible with the current approach (as there is no single constant we could use.) Instead, this patch explicitly removes non-feasible edges. It currently only needs to handle the case where there is a single feasible edge. The llvm_unreachable() branch will need to be implemented for the aforementioned switch improvement. Differential Revision: https://reviews.llvm.org/D84264
-
Simon Pilgrim authored
We include TargetLibraryInfo.h so don't need to forward declare it, and we don't need to include TargetLibraryInfo.h in SimplifyLibCalls.cpp as well.
-
Simon Pilgrim authored
Minor tidyup for some upcoming shuffle combine improvements.
-
Simon Pilgrim authored
-
Florian Hahn authored
This patch updates IPSCCP to drop argmemonly and inaccessiblemem_or_argmemonly if it replaces a pointer argument. Fixes PR46717. Reviewers: efriedma, davide, nikic, jdoerfert Reviewed By: efriedma, jdoerfert Differential Revision: https://reviews.llvm.org/D84432
-
Nathan James authored
Apparantly a constexpr value isn't a compile time constant under certain versions of MSVC.
-
Simon Pilgrim authored
If we don't care about an entire LHS/RHS of the PACK op, then can just treat it the same as undef (we don't care if it saturates) and is safe to treat as a shuffle. This can happen if we attempt to decode as a faux shuffle before SimplifyDemandedVectorElts has been called on the PACK which should replace the source with UNDEF entirely.
-
Nathan James authored
Adds a range-based version of `std::move`, the version that moves a range, not the one that creates r-value references. Reviewed By: dblaikie, gamesh411 Differential Revision: https://reviews.llvm.org/D83902
-
Jessica Paquette authored
Very minor code size improvements (hits 8 times in Bullet at -O3), but still something. Also very minor NFC change to make sure we only search for a 0 constant when selecting a store. Before, we'd do this for loads as well. Differential Revision: https://reviews.llvm.org/D84573
-
Kuba Mracek authored
Differential Revision: https://reviews.llvm.org/D84082
-
Amy Kwan authored
This patch aims to exploit the following vector multiply high instructions on Power10. vmulhsw VRT, VRA, VRB vmulhsd VRT, VRA, VRB vmulhuw VRT, VRA, VRB vmulhud VRT, VRA, VRB Differential Revision: https://reviews.llvm.org/D82584
-
Adrian Prantl authored
-
Rong Xu authored
Function entry count might be zero after the profile counts reset and before reentry to the function. Zero profile entry count is very bad as the profile count from BFI will be wrong. A simple fix is to set the profile entry count to 1 if there are non-zero profile counts in this function. Differential Revision: https://reviews.llvm.org/D84378
-
Rong Xu authored
Skip profile count promotion if any of the ExitBlocks contains a ret instruction. This is to prevent dumping of incomplete profile -- if the the loop is a long running loop and dump is called in the middle of the loop, the result profile is incomplete. ExitBlocks containing a ret instruction is an indication of a long running loop -- early exit to error handling code. Differential Revision: https://reviews.llvm.org/D84379
-
Amy Kwan authored
This patch implements the `vec_xst_trunc` function in altivec.h in order to utilize the Store VSX Vector Rightmost [byte | half | word | doubleword] Indexed instructions introduced in Power10. Differential Revision: https://reviews.llvm.org/D82467
-