- Jan 02, 2021
-
-
Kazu Hirata authored
-
Kazu Hirata authored
The last use of this function was removed on Jan 4, 2018 in commit commit 90ecac01.
-
Fangrui Song authored
On many targets the matched line is `define dso_local i32 @main` while on ppc64 it is `define dso_local signext i32 @main`.
-
Sanjay Patel authored
This is almost all mechanical search-and-replace and no-functional-change-intended (NFC). Having a single enum makes it easier to match/reason about the reduction cases. The goal is to remove `Opcode` from reduction matching code in the vectorizers because that makes it harder to adapt the code to handle intrinsics. The code in RecurrenceDescriptor::AddReductionVar() is the only place that required closer inspection. It uses a RecurrenceDescriptor and a second InstDesc to sometimes overwrite part of the struct. It seem like we should be able to simplify that logic, but it's not clear exactly which cmp+sel patterns that we are trying to handle/avoid.
-
Sanjay Patel authored
-
Alexey Bataev authored
-
Nikita Popov authored
This is additional test coverage for D93820.
-
- Jan 01, 2021
-
-
Nikita Popov authored
LVI previously handled "if (L && R)" conditions, but not "if (L || R)" conditions. The latter case can still produce useful information if L and R both constrain the same variable. This adds support for handling the "if (L || R)" case as well. The only difference is that we take the union instead of the intersection of the lattice values.
-
Nikita Popov authored
We currently handle intersected conditions, but not unioned conditions.
-
Paul C. Anagnostopoulos authored
This pass includes LLVM and MLIR files. Differential Revision: https://reviews.llvm.org/D93864
-
Florian Hahn authored
-
Florian Hahn authored
-
Florian Hahn authored
-
Florian Hahn authored
If DoExtraAnalysis is true (e.g. because remarks are enabled), we continue with the analysis rather than exiting. Update code to conditionally check if the ExitBB has phis or not a single predecessor. Otherwise a nullptr is dereferenced with DoExtraAnalysis.
-
Juneyoung Lee authored
-
Yang Fan authored
Differential Revision: https://reviews.llvm.org/D93961
-
Yang Fan authored
In implicitly movable test, a two-stage overload resolution is performed. If the first overload resolution selects a deleted function, Clang directly performs the second overload resolution, without checking whether the deleted function matches the additional criteria. This patch fixes the above problem. Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D92936
-
Andrew Litteken authored
We add an extra check to make sure that we do not outline calls to indirect functions, but outline whatever the IRSimilarityIdentifier finds with respect to calls. Tests: Removing test/Transforms/IROutliner/illegal-calls.ll Adding test/Transforms/IROutliner/outlining-calls.ll Adding test/Transforms/IROutliner/illegal-indirect-calls.ll Excluding DebugInfo this is the last patch for the initial implementation of the IROutliner! Reviewers: jroelofs, paquette Differential Revision: https://reviews.llvm.org/D87314
-
Andrew Litteken authored
Here we let non-intrinsic calls be considered legal and valid for similarity only if the call is not indirect, and has a name. For two calls to be considered similar, they must have the same name, the same function types, and the same set of parameters, including tail calls and calling conventions. Tests are found in unittests/Analysis/IRSimilarityIdentifierTest.cpp. Reviewers: jroelofs, paquette Differential Revision: https://reviews.llvm.org/D87312
-
Roman Lebedev authored
This pretty much concludes patch series for updating SimplifyCFG to preserve DomTree. All 318 dedicated `-simplifycfg` tests now pass with `-simplifycfg-require-and-preserve-domtree=1`. There are a few leftovers that apparently don't have good test coverage. I do not yet know what gaps in test coverage will the wider-scale testing reveal, but the default flip might be close.
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Andrew Litteken authored
We outline what the IRSimilarityIdentifier deems GEP Instructions to be similar. In this case, the types must be the same, and the operand values after the first indexing operand must be the exact same. Tests: Removing test/Transforms/IROutliner/illegal-gep.ll Adding test/Transforms/IROutliner/outlining-gep.ll Reviewers: jroelofs, paquette Differential Revision: https://reviews.llvm.org/D87317
-
Jacques Pienaar authored
Enable querying shape function library ops from the module. Currently supports singular or array of them (as long as array has all unique ops in mappings). The preferred canonical form would have one library, but given the invariant on the mapping, this can easily be achieved by a simple merging pass. Preferred the attribute approach vs naming convention as these could be added in multiple different ways.
-
Sanjay Patel authored
This might also make it easier to adapt if we want to match min/max intrinsics rather than cmp+sel idioms. The 'const' part is to potentially avoid confusion in calling code. There's some surprising and possibly wrong behavior related to matching min/max reductions differently than other reductions.
-
Fangrui Song authored
Refactor how -fno-semantic-interposition sets dso_local on default visibility external linkage definitions The idea is that the CC1 default for ELF should set dso_local on default visibility external linkage definitions in the default -mrelocation-model pic mode (-fpic/-fPIC) to match COFF/Mach-O and make output IR similar. The refactoring is made available by 2820a2ca. Currently only x86 supports local aliases. We move the decision to the driver. There are three CC1 states: * -fsemantic-interposition: make some linkages interposable and make default visibility external linkage definitions dso_preemptable. * (default): selected if the target supports .Lfoo$local: make default visibility external linkage definitions dso_local * -fhalf-no-semantic-interposition: if neither option is set or the target does not support .Lfoo$local: like -fno-semantic-interposition but local aliases are not used. So references can be interposed if not optimized out. Add -fhalf-no-semantic-interposition to a few tests using the half-based semantic interposition behavior.
-
Fangrui Song authored
ELF -cc1 -mrelocation-model pic will default to no semantic interposition plus setting dso_local on default visibility external linkage definitions, so that COFF, Mach-O and ELF output will be similar. This patch makes tests immune to the differences.
-
Andrew Litteken authored
Causing multiple different buildbots to fail with similar errors to: http://lab.llvm.org:8011/#/builders/84/builds/3719/ http://lab.llvm.org:8011/#/builders/21/builds/5863/ This reverts commit a2513cb8.
-
Juneyoung Lee authored
-
Andrew Litteken authored
GetElementPtr instructions require the extra check that all operands after the first must only be constants and be exactly the same to be considered similar. Tests are found in unittests/Analysis/IRSimilarityIdentifierTest.cpp.
-
Nuno Lopes authored
-
Juneyoung Lee authored
Recently a few patches are made to move towards using select i1 instead of and/or i1 to represent "a && b"/"a || b" in C/C++. "a && b" in C/C++ does not evaluate b if a is false whereas 'and a, b' in IR evaluates b and uses its result regardless of the result of a. This is problematic because it can cause miscompilation if b was an erroneous operation (https://llvm.org/pr48353). In C/C++, the result is simply false because b is not evaluated, but in IR the result is poison. The discussion at D93065 has more context about this. This patch makes two branch-splitting optimizations (one in SelectionDAGBuilder, one in CodeGenPrepare) recognize select form of and/or as well using m_LogicalAnd/Or. Since it is CodeGen, I think this is semantically ok (at least as safe as what codegen already did). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D93853
-
Juneyoung Lee authored
This patch makes SCEV recognize 'select A, B, false' and 'select A, true, B'. This is a performance improvement that will be helpful after unsound select -> and/or transformation is removed, as discussed in D93065. SCEV's answers for the select form should be a bit more conservative than the equivalent `and A, B` / `or A, B`. Take this example: https://alive2.llvm.org/ce/z/NsP9ue . To check whether it is valid for SCEV's computeExitLimit to return min(n, m) as ExactNotTaken value, I put llvm.assume at tgt. It fails because the exit limit becomes poison if n is zero and m is poison. This is problematic if e.g. the exit value of i is replaced with min(n, m). If either n or m is constant, we can revive the analysis again. I added relevant tests and put alive2 links there. If and is used instead, this is okay: https://alive2.llvm.org/ce/z/K9rbJk . Hence the existing analysis is sound. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D93882
-
Atmn authored
This test has %clang in the run line when it should have %clang_cc1. This should prevent future release test failures. Differential Revision: https://reviews.llvm.org/D93952
-
Andrew Litteken authored
When combining extracted functions, they may have different function attributes. We want to make sure that we do not make any assumptions, or lose any information. This attempts to make sure that we consolidate function attributes to their most general case. Tests: llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll llvm/test/Transforms/IROutliner/outlining-compatible-or-attribute-transfer.ll Reviewers: jdoefert, paquette Differential Revision: https://reviews.llvm.org/D87301
-