- Sep 16, 2020
-
-
Jessica Paquette authored
These functions were extremely similar: - `emitADD` - `emitADDS` - `emitCMN` Refactor them a little, introducing a more generic `emitInstr` function to do most of the work. Also add support for the immediate + shifted register addressing modes in each of them. Update select-uaddo.mir to show that selecing ADDS now supports folding immediates + shifts. (I don't think this can impact CMN, because the CMN checks require a G_SUB with a non-constant on the RHS.) This is around a 0.02% code size improvement on CTMark at -O3. Differential Revision: https://reviews.llvm.org/D87529
-
Arthur Eubanks authored
When adding a new function via addNewFunctionIntoRefSCC(), it creates a new node and immediately populates the edges. Since populateSlow() calls G->get() on all referenced functions, it will create a node (but not populate it) for functions that haven't yet been added. If we add two mutually recursive functions, the assert that the node should never have been created will fire when the second function is added. So here we remove that assert since the node may have already been created (but not yet populated). createNode() is only called from addNewFunctionInto{,Ref}SCC(). https://bugs.llvm.org/show_bug.cgi?id=47502 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D87623 -
Volkan Keles authored
test/CodeGen/AArch64/GlobalISel/combine-trunc.mir was failing due to the different order for evaluating function arguments. This patch updates the related code to fix the issue.
-
Alexandre Ganea authored
Differential Revision: https://reviews.llvm.org/D87609
-
Wenlei He authored
~~D65060 uncovered that trying to use BFI in loop passes can lead to non-deterministic behavior when blocks are re-used while retaining old BFI data.~~ ~~To make sure BFI is preserved through loop passes a Value Handle (VH) callback is registered on blocks themselves. When a block is freed it now also wipes out the accompanying BFI entry such that stale BFI data can no longer persist resolving the determinism issue. ~~ ~~An optimistic approach would be to incrementally update BFI information throughout the loop passes rather than only invalidating them on removed blocks. The issues with that are:~~ ~~1. It is not clear how BFI information should be incrementally updated: If a block is duplicated does its BFI information come with? How about if it's split/modified/moved around? ~~ ~~2. Assuming we can address these problems the implementation here will be a massive undertaking. ~~ ~~There's a known need of BFI in LICM analysis which requires correct but not incrementally updated BFI data. A follow-up change can register BFI in all loop passes so this preserved but potentially lossy data is available to any loop pass that wants it.~~ See: D75341 for an identical implementation of preserving BFI via VH callbacks. The previous statements do still apply but this change no longer has to be in this diff because it's already upstream
😄 . This diff also moves BFI to be a part of LoopStandardAnalysisResults since the previous method using getCachedResults now (correctly!) statically asserts (D72893) that this data isn't static through the loop passes. Testing Ninja check Reviewed By: asbirlea, nikic Differential Revision: https://reviews.llvm.org/D86156 -
Aditya Nandakumar authored
https://reviews.llvm.org/D87668 Patch adds two new GICombinerRules, one for G_MUL(X, 1) and another for G_MUL(X, -1). G_MUL(X, 1) is an identity combine, and G_MUL(X, -1) gets replaced with G_SUB(0, X). Patch additionally adds new combiner tests for the AArch64 target to test these new combiner rules, as well as updates AMDGPU GISel tests. Patch by mkitzan
-
Mircea Trofin authored
This will embed bitcode after (Thin)LTO merge, but before optimizations. In the case the thinlto backend is called from clang, the .llvmcmd section is also produced. Doing so in the case where the caller is the linker doesn't yet have a motivation, and would require plumbing through command line args. Differential Revision: https://reviews.llvm.org/D87636
-
Jan Korous authored
Differential Revision: https://reviews.llvm.org/D86231
-
-
Stanislav Mekhanoshin authored
We have a single noret intrinsic an a lot of special handling around it. Declare it just as any other but do not define rtn instructions itself instead. Differential Revision: https://reviews.llvm.org/D87719
-
Xun Li authored
Call instructions with musttail tag must be optimized as a tailcall, otherwise could lead to incorrect program behavior. When TSAN is instrumenting functions, it broke the contract by adding a call to the tsan exit function inbetween the musttail call and return instruction, and also inserted exception handling code. This happend throguh EscapeEnumerator, which adds exception handling code and returns ret instructions as the place to insert instrumentation calls. This becomes especially problematic for coroutines, because coroutines rely on tail calls to do symmetric transfers properly. To fix this, this patch moves the location to insert instrumentation calls prior to the musttail call for ret instructions that are following musttail calls, and also does not handle exception for musttail calls. Differential Revision: https://reviews.llvm.org/D87620
-
Joseph Huber authored
Summary: This patch adds additonal support for priting infromation from Libomptarget for already existing maps and printing the final data mapped on the device at device destruction. Reviewers: jdoerfort gkistanova Subscribers: guansong openmp-commits sstefan1 yaxunl Tags: #OpenMP Differential Revision: https://reviews.llvm.org/D87722
-
Alexey Bataev authored
Need to map the component as TO instead of the literal, because need to pass a reference to a component if the pointer is overaligned. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D84887
-
Diego Caballero authored
Rename 'setInsertionPointAfter(Value)' API to avoid ambiguity with 'setInsertionPointAfter(Operation *)' for SingleResult operations which implicitly convert to Value (see D86756). Differential Revision: https://reviews.llvm.org/D87155
-
Guillaume Chatelet authored
They don't seem to gain much in real apps and its better to favor less branches and smaller code.
-
Saleem Abdulrasool authored
Extend the semantic attributes that clang processes for Swift to include `swift_bridged_typedef`. This attribute enables typedefs to be bridged into Swift with a bridged name. This is based on the work of the original changes in https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c Differential Revision: https://reviews.llvm.org/D87396 Reviewed By: Aaron Ballman
-
Guillaume Chatelet authored
-
Huihui Zhang authored
For scalable type, the aggregated size is unknown at compile-time. Skip instructions with scalable type to ensure the list of instructions for vectorizeSimpleInstructions does not contains any scalable-vector instructions. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D87550
-
Guillaume Chatelet authored
-
Stephen Hines authored
Add the implementation of __isOSVersionAtLeast for Android. Currently, only the major version is checked against the API level of the platform which is an integer. The API level is retrieved by reading the system property ro.build.version.sdk (and optionally ro.build.version.codename to see if the platform is released or not). Patch by jiyong@google.com Bug: 150860940 Bug: 134795810 Test: m Reviewed By: srhines Differential Revision: https://reviews.llvm.org/D86596
-
Ta-Wei Tu authored
Building LLVM with -DEXPENSIVE_CHECKS fails with the following error message with libstdc++ in debug mode: Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)). The patch fixes the comparison function SizeOrder by returning false when comparing two equal items.
-
Matt Arsenault authored
Invalid IR in unreachable code is technically valid IR. In this case, the address space of the value was never inferred, and we tried to rewrite it with an invalid address space value which would assert.
-
Snehasish Kumar authored
This patch adds a command line flag for the machine function splitter (added in rG94faadac). -fsplit-machine-functions Split machine functions using profile information (x86 ELF). On other targets an error is emitted. If profile information is not provided a warning is emitted notifying the user that profile information is required. Differential Revision: https://reviews.llvm.org/D87047
-
Muhammad Asif Manzoor authored
Add the functionality to lower fsqrt for passthru variant Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D87707
-
Albion Fung authored
This patch implements __int128 vector divide operations for ISA3.1. Differential Revision: https://reviews.llvm.org/D85453
-
Zequan Wu authored
Differential Revision: https://reviews.llvm.org/D87425
-
Jonas Toth authored
The analysis for const-ness of local variables required a view generally useful matchers that are extracted into its own patch. They are decompositionDecl and forEachArgumentWithParamType, that works for calls through function pointers as well. This is a reupload of https://reviews.llvm.org/D72505, that already landed, but had to be reverted due to a GCC crash on powerpc (https://reviews.llvm.org/rG4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4) Because this took a long time to adress, i decided to redo this patch and have a clean workflow. I try to coordinate with someone that has a PPC to apply this patch and test for the crash. If everything is fine, I intend to just commit. If the crash is still happening, i hope to at least find the cause. Differential Revision: https://reviews.llvm.org/D87588
-
Louis Dionne authored
The test was not allocating the right number of bytes. This is my fault, not Marshall's, as I was the one to write the tests for 39c87951.
-
Arthur Eubanks authored
-analyze isn't supported in NPM. All affected tests have corresponding NPM RUN line.
-
Arthur Eubanks authored
All tests have corresponding NPM RUN lines. -analyze doesn't work under NPM.
-
Greg Clayton authored
Code was added that used llvm error checking to parse .debug_aranges, but the error check after parsing the DWARFDebugArangesSet was reversed and was causing no error to be returned with no valid address ranges being actually used. This meant we always would fall back onto creating out own address ranges by parsing the compile unit's ranges. This was causing problems for cases where the DW_TAG_compile_unit had a single address range by using a DW_AT_low_pc and DW_AT_high_pc attribute pair (not using a DW_AT_ranges attribute), but the .debug_aranges had correct split ranges. In this case we would end up using the single range for the compile unit that encompassed all of the ranges from the .debug_aranges section and would cause address resolving issues in LLDB where address lookups would fail for certain addresses. Differential Revision: https://reviews.llvm.org/D87626
-
LLVM GN Syncbot authored
-
Florian Hahn authored
This patch is a first draft of a new pass that adds a more flexible way to eliminate compares based on more complex constraints collected from dominating conditions. In particular, it aims at simplifying conditions of the forms below using a forward propagation approach, rather than instcomine-style ad-hoc backwards walking of def-use chains. if (x < y) if (y < z) if (x < z) <- simplify or if (x + 2 < y) if (x + 1 < y) <- simplify assuming no wraps The general approach is to collect conditions and blocks, sort them by dominance and then iterate over the sorted list. Conditions are turned into a linear inequality and add it to a system containing the linear inequalities that hold on entry to the block. For blocks, we check each compare against the system and see if it is implied by the constraints in the system. We also keep a stack of processed conditions and remove conditions from the stack and the constraint system once they go out-of-scope (= do not dominate the current block any longer). Currently there still are the least the following areas for improvements * Currently large unsigned constants cannot be added to the system (coefficients must be represented as integers) * The way constraints are managed currently is not very optimized. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D84547 -
Arthur Eubanks authored
Bugpoint has lots of assumptions and hacks around the legacy PM, put off migrating it to NPM until later. Fixes tests under BugPoint under NPM. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D87655
-
Craig Topper authored
[X86] Use Align in reduceMaskedLoadToScalarLoad/reduceMaskedStoreToScalarStore. Correct pointer info. If we offset the pointer, we also need to offset the pointer info Differential Revision: https://reviews.llvm.org/D87593
-
Louis Dionne authored
Otherwise, we're declaring a non-static member function, and that gives errors in C++11 because of the change of semantics between C++11 and C++14 for non-const constexpr member functions. This was always intended to be a friend declaration.
-
Arthur Eubanks authored
Each test has a legacy PM pinned to legacy PM and a NPM RUN line. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D87660
-
Arthur Eubanks authored
Was missing MODULE_ALIAS_ANALYSIS, previously only FUNCTION_ALIAS_ANALYSIS was taken into account. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D87664
-
Arthur Eubanks authored
Pin RUN lines with -analyze to legacy PM, add corresponding NPM RUN line if missing. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D87658
-
Arthur Eubanks authored
All tests had corresponding NPM lines, simply pin non-NPM lines to legacy PM. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D87665
-