- Jul 21, 2021
-
-
Nikita Popov authored
When adding noalias/alias.scope metadata, we analyze the instructions of the original callee, and then place metadata on the corresponding inlined instructions in the caller as provided by VMap. However, this assumes that this actually a clone of the instruction, rather than the result of simplification. If simplification occurred, the instruction that VMap points to may not have any relationship as far as ModRef behavior is concerned. Fix this by tracking simplified instructions during cloning and then only processing instructions that have not been simplified. This is done with an additional map form original to cloned instruction, into which we only insert if no simplification is performed. The mapping in VMap can then be compared to this map. If they're the same, the instruction hasn't been simplified. (I originally wanted to only track a set of simplified instructions, but that wouldn't work if the instruction only gets simplified afterwards, e.g. based on rewritten phis.) Fixes https://bugs.llvm.org/show_bug.cgi?id=50589. Differential Revision: https://reviews.llvm.org/D106242
-
Fangrui Song authored
-
Mark de Wever authored
-
Jacques Pienaar authored
Allows for grouping OpTraits with list of OpTrait to make it easier to group OpTraits together without needing to use list concats (e.g., enable using `[Traits, ..., UsefulGroupOfTraits, Others, ...]` instead of `[Traits, ...] # UsefulGroupOfTraits # [Others, ...]`). Flatten in construction of Operation. This recurses here as the expectation is that these aren't expected to be deeply nested (most likely only 1 level of nesting). Differential Revision: https://reviews.llvm.org/D106223
-
Sami Tolvanen authored
Create an internal alias with the original name for static functions that are renamed in promoteInternals to avoid breaking inline assembly references to them. This version uses module inline assembly to avoid issues with LowerTypeTestsModule. Relands commmit 8e3b5cb3 with arch specific tests fixed. Link: https://github.com/ClangBuiltLinux/linux/issues/1354 Reviewed By: nickdesaulniers, pcc Differential Revision: https://reviews.llvm.org/D104058
-
Arthur Eubanks authored
Sometimes a transformation can change the name of some IR (e.g. an SCC with functions added/removed). This can be confusing when debug logging doesn't match the post-transformation name. The specific example I came across was that --print-after-all said the inliner was working on an SCC that only contained one function, but calls in multiple functions were getting inlined. After all inlining, the current SCC only contained one function. Piggyback off of the existing logic to handle invalidated IR + --print-module-scope. Simply always store the IR description and use that. Reviewed By: jamieschmeiser Differential Revision: https://reviews.llvm.org/D106290
-
Nancy Wang authored
This PR to fix a few test cases related to class https://en.cppreference.com/w/cpp/locale/codecvt , as mentioned in document, class is converting UTF16 and UTF8 or UTF32 and UTF8, character type is deprecated in c++20 and it needs explicitly specify it is UTF8 string literal. Current test cases assume 1 byte character is ASCII or Unicode character which is not true on z/OS platform. UTF8/16/32 information can be found in https://naveenr.net/unicode-character-set-and-utf-8-utf-16-utf-32-encoding/ and EBCDIC and ASCII character value can be found in http://www.simotime.com/asc2ebc1.htm Differential Revision: https://reviews.llvm.org/D106153
-
Nancy Wang authored
This PR is to fix a few UTF16 and UTF32 related test cases that are testing member functions for https://en.cppreference.com/w/cpp/locale/codecvt class , functions are converting from UTF16, UTF32 to UTF8 or vise visa. Test cases need to explicitly specify it is UNICODE character for UTF16/32 type in order to be valid tests to match type in documentation. it assumes it will be ASCII or UTF8 type for 1 byte character ( value range from 1 to 127 ), which is not true on z/OS in EBCDIC mode. For information related to UTF16/32 , please see https://naveenr.net/unicode-character-set-and-utf-8-utf-16-utf-32-encoding/ , and EBCDIC/ASCII character value can be found in http://www.simotime.com/asc2ebc1.htm Differential Revision: https://reviews.llvm.org/D106151
-
Giorgis Georgakoudis authored
SPMDization in D102307 does not change the RequiresFullRuntime argument of kmpc_target_init/deinit calls. However, the constraints of SPMDization detection for converting a target region to SPMD mode should guarantee that the region does not require full runtime support. Hence, this patch sets RequiresFullRuntime to false for improved execution performance. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105556
-
Joseph Huber authored
Summary: Change the name for targeting AMD offloading.
-
Rahul Joshi authored
- Change walkReturnOperations() to be a non-template and look at block terminator for ReturnLike trait. - Clarify description of validateSupportedControlFlow - Eliminate unused argument in Backedges::recurse. - Eliminate repeated calls to getFunction() - Fix wording for non-SCF loop failure Differential Revision: https://reviews.llvm.org/D106373
-
Joseph Huber authored
Fixes the documentation hyperlinks not showing the header. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D106374
-
Fangrui Song authored
-
Shimin Cui authored
This patch extends the OptimizeGlobalAddressOfMalloc to handle the null check of global pointer variables. It is disabled with https://reviews.llvm.org/rGb7cd291c1542aee12c9e9fde6c411314a163a8ea. This PR is to reenable it while fixing the original problem reported. The fix is to set the store value correctly when creating store for the new created global init bool symbol. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D102711
-
Craig Topper authored
[RISCV] Teach RISCVMatInt about cases where it can use LUI+SLLI to replace LUI+ADDI+SLLI for large constants. If we need to shift left anyway we might be able to take advantage of LUI implicitly shifting its immediate left by 12 to cover part of the shift. This allows us to use more bits of the LUI immediate to avoid an ADDI. isDesirableToCommuteWithShift now considers compressed instruction opportunities when deciding if commuting should be allowed. I believe this is the same or similar to one of the optimizations from D79492. Reviewed By: luismarques, arcbbb Differential Revision: https://reviews.llvm.org/D105417
-
Craig Topper authored
-
Fangrui Song authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=50303 Differential Revision: https://reviews.llvm.org/D106119
-
Quinn Pham authored
This patch is in a series of patches to provide builtins for compatibility with the XL compiler. This patch adds semachecking for an already implemented builtin, `__icbt`. `__icbt` is only valid for Power8 and up. Reviewed By: #powerpc, nemanjai Differential Revision: https://reviews.llvm.org/D105834
-
- Jul 20, 2021
-
-
Craig Topper authored
Replace some existing isel patterns that are covered by the new code. SLLIUWPat has been removed in favor of folding its root case into the new code. The other uses in isel patterns for shXadd.uw have been switched to using hardcoded AND masks. This is based on the original version of D49585 from ARM. The final version of that was made a DAG combine, but I've chosen to keep it as custom isel. I'm not convinced DAG combine is as good with shift pairs as it is with and+shift. I saw some issues optimizing the shifts created by vscale lowering if an and isn't created for from a shift pair. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D106230
-
Stefan Pintilie authored
ACC registers are a combination of four consecutive vector registers. If the vector registers are assigned first this often forces a number of copies to appear just before the ACC register is created. If the ACC register is assigned first then fewer copies are generated when the vector registers are assigned. This patch tries to force the register allocator to assign the ACC registers first and then the UACC registers and then the vector pair registers. It does this by changing the priority of the register classes. This patch also adds hints to help the register allocator assign UACC registers from known ACC registers and vector pair registers from known UACC registers. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D105854
-
Sterling Augustine authored
This is a follow-up to https://reviews.llvm.org/D103935 A Twine's internal layout should not depend on which version of the C++ standard is in use. Dynamically linking binaries compiled with two different layouts (eg, --std=c++14 vs --std=c++17) ends up problematic. This change avoids that issue by immediately converting a string_view to a pointer-and-length at the cost of an extra eight-bytes in Twine. Differential Revision: https://reviews.llvm.org/D106186
-
Craig Topper authored
I don't think the semantics of the llvm masked gather intrinsic care about the order the elements are loaded. For example, type legalization by splitting will chain them in parallel. This is different than scatter which we do chain in order. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D106025
-
David Green authored
Currently the Instruction cost of getReductionPatternCost returns an Invalid cost to specify "did not find the pattern". This changes that to return an Optional with None specifying not found, allowing Invalid to mean an infinite cost as is used elsewhere. Differential Revision: https://reviews.llvm.org/D106140
-
Geoffrey Martin-Noble authored
Update Bazel build configuration for https://github.com/llvm/llvm-project/commit/bc1a2979fc70 by adding missing dep to clang tooling unit tests.
-
Joel E. Denny authored
For example, in OpenMP offload codegen tests, global variables like `.offload_maptypes*` are much easier to read in hex. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D104743
-
Joel E. Denny authored
`--check-globals` activates checks for all global values, and `--global-value-regex` filters them. For example, I'd like to use it in OpenMP offload codegen tests to check only global variables like `.offload_maptypes*`. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D104742
-
LLVM GN Syncbot authored
-
zoecarver authored
Differential Revision: https://reviews.llvm.org/D103335
-
Kazu Hirata authored
The last use was removed on Jan 22, 2021 in commit c9cd9a00.
-
Rahul Joshi authored
Differential Revision: https://reviews.llvm.org/D106326
-
Melanie Blower authored
-
Caroline Concatto authored
[NFC][LoopVectorizer] Remove VF.isScalable() assertion from collectInstsToScalarize and getInstructionCost This patch removes the assertion when VF is scalable and replaces getKnownMinValue() by getFixedValue(), so it still guards the code against scalable vector types. The assertions were used to guarantee that getknownMinValue were not used for scalable vectors. Differential Revision: https://reviews.llvm.org/D106359
-
Anirudh Prasad authored
- This patch adds in the GOFF format to the file magic identification logic in LLVM - Currently, for the object file support, GOFF is marked as having as an error - However, this is only temporary until https://reviews.llvm.org/D98437 is merged in Reviewed By: abhina.sreeskantharajan Differential Revision: https://reviews.llvm.org/D105993
-
Quinn Pham authored
This patch fixes `__builtin_ppc_recipdivf`, `__builtin_ppc_recipdivd`, `__builtin_ppc_rsqrtf`, and `__builtin_ppc_rsqrtd`. FastMathFlags are set to fast immediately before emitting these builtins. Now the flags are restored to their previous values after the builtins are emitted. Reviewed By: nemanjai, #powerpc Differential Revision: https://reviews.llvm.org/D105984
-
Simon Pilgrim authored
We currently use an unsigned value for our CostTblEntry and TypeConversionCostTblEntry cost tables which is limiting depending on how the target wishes to handle various CostKinds etc. For instance, targets might wish to store separate instruction count, latency or throughput values etc. On D46276 we have been investigating storing a code snippet to improve latency/throughput cost calculations. There is a slight problem in that template argument deduction was struggling to match the now templatized Costs[] tables in a ArrayRef constructor - I've added helper wrappers for CostTableLookup/ConvertCostTableLookup which avoids us having to update all existing calls with a template hint. Differential Revision: https://reviews.llvm.org/D106351
-
Johannes Doerfert authored
-
Bradley Smith authored
Instead move them to the instcombine that happens in AArch64TargetTransformInfo. Differential Revision: https://reviews.llvm.org/D106144
-
Florian Hahn authored
-
Florian Hahn authored
This patch adds a VPFirstOrderRecurrencePHIRecipe, to further untangle VPWidenPHIRecipe into distinct recipes for distinct use cases/lowering. See D104989 for a new recipe for reduction phis. This patch also introduces a new `FirstOrderRecurrenceSplice` VPInstruction opcode, which is used to make the forming of the vector recurrence value explicit in VPlan. This more accurately models def-uses in VPlan and also simplifies code-generation. Now, the vector recurrence values are created at the right place during VPlan-codegeneration, rather than during post-VPlan fixups. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D105008
-
Nico Weber authored
-