- Sep 08, 2022
-
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133390
-
Joseph Huber authored
This patch replaces the dependency on `libelf` with LLVM's ELF support. With this patch the user no-longer needs to have `libelf` on their system to build and configure OpenMP offloading. The replacement is mostly mechanical, with the exception of the hash table support which was added in D131309. Depends on D131309 Reviewed By: JonChesterfield, saiislam Differential Revision: https://reviews.llvm.org/D131401
-
Joseph Huber authored
The `SHT_HASH` sections in an ELF are used to look up a symbol in the symbol table using a symbol's name. This is done by obtaining the `SHT_HASH` section and using its `sh_link` attribute to access the associated symbol table, from which we can access the string table containing the associated name. We can then search for the symbol using the hash of the name and the buckets and chains in the hash table itself This patch adds utility functions that allow us to look up a symbol in an ELF file by name. It will first attempt to look through the hash tables, and then search the section tables manually if failed. This allows us to pull out constants necessary for setting up offloading without first loading the object. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D131309
-
Florian Hahn authored
-
Craig Topper authored
-
Argyrios Kyrtzidis authored
[Lex/DependencyDirectivesScanner] Keep track of the presence of tokens between the last scanned directive and EOF Directive `dependency_directives_scan::tokens_present_before_eof` is introduced to indicate there were tokens present before the last scanned dependency directive and EOF. This is useful to ensure we correctly identify the macro guards when lexing using the dependency directives. Differential Revision: https://reviews.llvm.org/D133357
-
Jon Chesterfield authored
Currently LDS variables are removed by the lower module pass if they have a use which is caught by the replace with struct control flow. This makes tests brittle to changes to that control flow which induces noise when trying to improve lowering. Some tests already check that variables are removed, while others checked that they are not removed. LDS variables are not (currently) externally accessible, and if that changes the machinery which makes them externally accessible will look like a use. This change therefore breaks no applications. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D133028
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D133382
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D133385
-
LLVM GN Syncbot authored
-
Mark de Wever authored
Removes <cstdarg> transitive include from <locale> in C++23. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D133254
-
Florian Hahn authored
Add test coverage to make sure tbl expansion isn't used when optimizing for size or when the zext is only executed conditionally in a loop.
-
yronglin authored
Avoid __builtin_assume_aligned crash when the 1st arg is array type (or string literal). Fixes Issue #57169 Differential Revision: https://reviews.llvm.org/D133202
-
Mark de Wever authored
This implements the enabled specializaton template<class charT> struct formatter<chrono::day, charT>; and template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const day& d); Implements: - LWG 3241 chrono-spec grammar ambiguity in §[time.format] Partially implements: - P1361 Integration of chrono with text formatting Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D128577 -
Mark de Wever authored
During the discussion on the SG-10 mailinglist regarding the format feature-test macros voted in during the last plenary it turns out libc++ can't mark the format feature-test macro as implemented. According to https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#__cpp_lib_format the not yet implemented paper P1361R2 Integration of chrono with text formatting affects the feature test macro. Note that P1361R2 doesn't mention the feature-test macro nor is there an LWG-issue to address the issue. The reporter of the issue didn't recall where this requirement exactly has been decided. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D133271
-
Philip Reames authored
This is a minimalist implementation which simply adds the extension (in the experimental namespace since its not ratified), and wires up the setting of the required ELF header flag. Future changes will include codegen changes to exploit the stronger memory model. This is intended to implement v0.1 of the proposed specification which can be found in Chapter 25 of https://github.com/riscv/riscv-isa-manual/releases/download/draft-20220723-10eea63/riscv-spec.pdf. Differential Revision: https://reviews.llvm.org/D133239
-
- Sep 07, 2022
-
-
Sanjay Patel authored
The original commit ( fe1f3cfc ) was reverted because it could crash / assert when trying to fold a value that was replaced by a constant. In that case, there might not be an entry for the constant in the solver yet. This version adds a check for that possibility along with tests to exercise that pattern (they used to crash). Original commit message: This extends the transform added with D81756 to handle div/rem opcodes. For example: https://alive2.llvm.org/ce/z/cX6za6 This replicates part of what CVP already does, but the motivating example from issue #57472 demonstrates a phase ordering problem - we convert branches to select before CVP runs and miss the transform. Differential Revision: https://reviews.llvm.org/D133198
-
Joe Loser authored
LLVM contains a helpful function for getting the size of a C-style array: `llvm::array_lengthof`. This is useful prior to C++17, but not as helpful for C++17 or later: `std::size` already has support for C-style arrays. Change call sites to use `std::size` instead. Differential Revision: https://reviews.llvm.org/D133387
-
Qingyuan Zheng authored
This patch adds macro expansion preview to hover info. Basically, the refactor infrastructure for expanding macro is used for this purpose. The following steps are added to getHoverContents for macros: 1. calling AST.getTokens().expansionStartingAt(...) to get expanded tokens 2. calling reformat(...) to format expanded tokens Some opinions are wanted: 1. Should we present macro expansion before definition in the hover card? 2. Should we truncate/ignore macro expansion if it's too long? For performance and presentation reason, it might not be a good idea to expand pages worth of tokens in hover card. If so, what's the preferred threshold? Also, some limitation applies: 1. Expansion isn't available in macro definition/arguments as the refactor code action isn't either. Differential Revision: https://reviews.llvm.org/D127082
-
Eric Schweitz authored
on the flang project. Ownership reverts to Steve Scalpone for now.
-
Georg Kotheimer authored
When pretty printing the value of an expression, we cannot infer from the type of the expression the type of the constant that the expression evaluates to, as the expression might contain a type cast.
-
Sam McCall authored
17 vs 14 have different ASTs, this causes D131465 to have to touch this test. While here, make sure we're being clear about *which* nodes we're matching. Differential Revision: https://reviews.llvm.org/D133423
-
Sam McCall authored
This speeds up clangd's buildAST() (i.e. parsing with a preamble) by 5% on clangd/AST.cpp, by avoiding filling up the diagnostic state map with entries for all the files where templates are being instantiated from. (I would assume it has a similar effect on PCH and modules compiles). This approach is obviously pretty fragile, and we should find ways to make isIgnored() cheaper instead. But these changes in particular don't seem to make the code worse in any case. Differential Revision: https://reviews.llvm.org/D129683
-
Johannes Reifferscheid authored
Currently, one-shot-bufferize crashes as soon as there's a mixture of tensor and non-tensor arguments. This seems to happen for no good reason. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D133419
-
Kai Sasaki authored
Canonicalization for complex.sub adding same numbers. This canonicalization supports the case like complex.sub(complex.add(a, b), b) -> a. Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D133397
-
jacquesguan authored
Use roundToIntegral instead roundeven of libm to avoid window build failed. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D133402
-
Sanjay Patel authored
This transform came up as a potential DAGCombine in D133282, so I wanted to see how it escaped in IR too. We do general folds in InstCombiner::SimplifySelectsFeedingBinaryOp() by checking if either arm of a select simplifies when the trailing binop is threaded into the select. So as long as one side simplifies, it's a good fold to combine a negate and add into 1 subtract. This is an example with a zero arm in the select: https://alive2.llvm.org/ce/z/Hgu_Tj And this models the tests with a cancelling 'not' op: https://alive2.llvm.org/ce/z/BuzVV_ Differential Revision: https://reviews.llvm.org/D133369
-
Sanjay Patel authored
-
Aaron Kogon authored
Currently, instructions in the preheader of the second of two fusion candidates are sunk and hoisted whenever possible, to try to allow the loops to fuse. Memory instructions are skipped, and are never sunk or hoisted. This change adds memory instructions for sinking/hoisting consideration. This change uses DependenceAnalysis to check if a mem inst in the preheader of FC1 depends on an instruction in FC0's header, across which it will be hoisted, or FC1's header, across which it will be sunk. We reject cases where the dependency is a data hazard. Differential Revision: https://reviews.llvm.org/D131606
-
Oleg Shyshkov authored
CombiningKind was implemented before EnumAttr, so it reimplements the same behaviour with the custom code. Except for a few places, EnumAttr is a drop-in replacement. Reviewed By: nicolasvasilache, pifon2a Differential Revision: https://reviews.llvm.org/D133343
-
Andrea Di Biagio authored
This patch mostly reverts commit 70b37f4c which fixed PR50725. In case of explicit consumption of multiple partially overlapping group resources, the ResourceManager was not correctly checking pipeline esources availability. The fix for PR50725 only partially addressed a few instances of that issue. This is a more general (although, technically slower) fix for that same issue. It also fixes Issue #57548 Thanks to Haohai Wen for the small reproducible.
-
Tom Praschan authored
Fixes https://github.com/clangd/clangd/issues/706 Differential Revision: https://reviews.llvm.org/D132797
-
Simon Pilgrim authored
For the few non type based intrinsic cases we can just check for !isTypeBasedOnly() to access the args directly. I don't think we have a need to keep getTypeBasedIntrinsicInstrCost in BasicTTIImpl.h any more and can do a similar merge there as well - but it's a messier refactor and will take a while.
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133350
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133353
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133356
-
Nikita Popov authored
While vectors use insertelement, structs and arrays should use insertvalue.
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133205
-
Nikita Popov authored
We can't use an IR input once the relevant constant expressions are no longer supported. Use a bitcode file instead, which will be auto-upgraded (the whole point of this code...)
-
Jay Foad authored
-