- Mar 08, 2023
-
-
Justin Cady authored
The `REVERSE` keyword is described here: https://sourceware.org/bugzilla/show_bug.cgi?id=27565 It complements `SORT` by allowing the order of input sections to be reversed. This is particularly useful for order-dependent sections such as .init_array, where `REVERSE` can be used to either detect static initialization order fiasco issues or as a mechanism to maintain .ctors element order while transitioning to the modern .init_array. Such a transition is described here: https://discourse.llvm.org/t/is-it-possible-to-manually-specify-init-array-order/68649 Differential Revision: https://reviews.llvm.org/D145381
-
Ethan Luis McDonough authored
Implements HLFIR lowering for %im and %re. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D145005
-
Craig Topper authored
We can form a MU TU operation and remove the merge if they use the same merge value. My primary interest was a case involving VP intrinsics from our downstream, but it requires another optimization that isn't in upstream yet. So I've used RVV intrinsics to get the desired instructions. Co-authored-by:
Nitin John Raj <nitin.raj@sifive.com> Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D145272
-
Mariya Podchishchaeva authored
This results in expressions that appear in default function argument not being checked for being actual constant expressions. This aligns clang's behavior with the standard and fixes one of the examples from https://wg21.link/P1073R3. Reviewed By: shafik, cor3ntin Differential Revision: https://reviews.llvm.org/D145251
-
Saleem Abdulrasool authored
Add a set of `-Xmicrosoft` flags to control the Windows SDK and VisualC tools directories. This allows control over the selection of the SDK and tools when using the GNU driver. Differential Revision: https://reviews.llvm.org/D145007 Reviewed By: mstorjo
-
Mariya Podchishchaeva authored
https://wg21.link/p1937 proposes that in unevaluated contexts, consteval functions should not be immediately evaluated. Clang implemented p1937 a while ago, its behavior is correct and the test needs an update. Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D145362
-
Nikolas Klauser authored
Fixes #61160 Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D145287
-
John Brawn authored
GNU line marker directives are not recognised when preprocessing assembly files, meaning they can't be used in the predefines file meaning macros defined on the command line are reported as being built-in. Change this to permit line markers but only in the predefines file, so we can correctly report command line macros as coming from the command line. Differential Revision: https://reviews.llvm.org/D145397
-
Florian Hahn authored
At the moment, proveNoWrapViaConstantRanges is only used when creating SCEV[Zero,Sign]ExtendExprs. We can get significant improvements by strengthening flags after creating the AddRec. I'll also share a follow-up patch that removes the code to strengthen flags when creating SCEV[Zero,Sign]ExtendExprs. Modifying AddRecs while creating those can lead to surprising changes. Compile-time looks neutral: https://llvm-compile-time-tracker.com/compare.php?from=94676cf8a13c511a9acfc24ed53c98964a87bde3&to=aced434e8b103109104882776824c4136c90030d&stat=instructions:u Reviewed By: mkazantsev, nikic Differential Revision: https://reviews.llvm.org/D144050
-
Viktoriia Bakalova authored
Differential Revision: https://reviews.llvm.org/D143496
-
Krzysztof Drewniak authored
Converting tosa.reshape to tensor.expand_shape and tensor.collapse_shape logically belongs in the tosa-to-tensor conversion process. In addition, we (rocMLIR downstream) want to use the reshape -> expand/collapse_shape logic to simplify parts of our Tosa integration without using the full tosa-to-linalg flow, further motivating moving these patterns. The downside to this change is that it means you need to run tosa-to-tensor after tosa-to-linalg, which is probably a breaking change. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D145119
-
- Mar 07, 2023
-
-
Mariya Podchishchaeva authored
https://reviews.llvm.org/D130791 added an improvement that in case array element has a trivial constructor, it is evaluated once and the result is re-used for remaining elements. Make sure the constructor is evaluated for single-elements arrays too. Fixes https://github.com/llvm/llvm-project/issues/60803 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D145486
-
Michael Buch authored
Differential Revision: https://reviews.llvm.org/D145487
-
Simon Pilgrim authored
With suitable BooleanContent handling we could move this to TargetLowering::expandIntMINMAX, but this is good enough for X86 Fixes #61225
-
Michael Buch authored
Differential Revision: https://reviews.llvm.org/D145487
-
Sander de Smalen authored
This patch adds the builtin type __SVCount_t to Clang, which is an opaque scalable type defined in the SME2 C and C++ Language Extensions. The type maps to the `target("aarch64.svcount")` LLVM IR type. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D136864 -
Simon Pilgrim authored
-
Nikita Popov authored
-
Aaron Ballman authored
This addresses the issue found by: https://lab.llvm.org/buildbot/#/builders/57/builds/25217 https://lab.llvm.org/buildbot/#/builders/36/builds/31018
-
Ingo Müller authored
One FileCheck line was hard-coding variable names. Another line mis-indented the second line of a function header. Reviewed By: akuegel Differential Revision: https://reviews.llvm.org/D145498
-
Michael Buch authored
This patch adds a test for formatting of member function pointers. This was split from https://reviews.llvm.org/D145242, which caused this test case to fail on Windows buildbots. I split this out in order to make sure that this indeed works on Windows without the D145242 patch. Differential Revision: https://reviews.llvm.org/D145487
-
Zain Jaffal authored
[ConstraintElimination] Decompose or instruction if the constant operand < 2^known_zero_bits of the first operand. The or operation can be represented as an add instruction. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D142546
-
Nikita Popov authored
I regularly try and fail to use this while debugging.
-
Louis Dionne authored
This provides a single place for downstream to customize (or turn off) printing information to stderr within the test suite. Differential Revision: https://reviews.llvm.org/D145405
-
Simon Pilgrim authored
Make it more obvious what order the narrowing types are in.
-
Guillaume Chatelet authored
This broke build bots with MPFR issue. This reverts commit 5916decf.
-
Igor Kushnir authored
TempPCHFile::create() calls llvm::sys::fs::createTemporaryFile() to create a file named preamble-*.pch in a system temporary directory. This commit allows overriding the directory where these often many and large preamble-*.pch files are stored. The referenced bug report requests the ability to override the temporary directory path used by libclang. However, overriding the return value of llvm::sys::path::system_temp_directory() was rejected during code review as improper and because it would negatively affect multithreading performance. Finding all places where libclang uses the temporary directory is very difficult. Therefore this commit is limited to override libclang's single known use of the temporary directory. This commit allows to override the preamble storage path only during CXIndex construction to avoid multithreading issues and ensure that all preambles are stored in the same directory. For the same multithreading and consistency reasons, this commit deprecates clang_CXIndex_setGlobalOptions() and clang_CXIndex_setInvocationEmissionPathOption() in favor of specifying these options during CXIndex construction. Adding a new CXIndex constructor function each time a new initialization argument is needed leads to either a large number of function parameters unneeded by most libclang users or to an exponential number of overloads that support different usage requirements. Therefore this commit introduces a new extensible struct CXIndexOptions and a general function clang_createIndexWithOptions(). A libclang user passes a desired preamble storage path to clang_createIndexWithOptions(), which stores it in CIndexer::PreambleStoragePath. Whenever clang_parseTranslationUnit_Impl() is called, it passes CIndexer::PreambleStoragePath to ASTUnit::LoadFromCommandLine(), which stores this argument in ASTUnit::PreambleStoragePath. Whenever ASTUnit::getMainBufferWithPrecompiledPreamble() is called, it passes ASTUnit::PreambleStoragePath to PrecompiledPreamble::Build(). PrecompiledPreamble::Build() forwards the corresponding StoragePath argument to TempPCHFile::create(). If StoragePath is not empty, TempPCHFile::create() stores the preamble-*.pch file in the directory at the specified path rather than in the system temporary directory. The analysis below proves that this passing around of the PreambleStoragePath string is sufficient to guarantee that the libclang user override is used in TempPCHFile::create(). The analysis ignores API uses in test code. TempPCHFile::create() is called only in PrecompiledPreamble::Build(). PrecompiledPreamble::Build() is called only in two places: one in clangd, which is not used by libclang, and one in ASTUnit::getMainBufferWithPrecompiledPreamble(). ASTUnit::getMainBufferWithPrecompiledPreamble() is called in 3 places: ASTUnit::LoadFromCompilerInvocation() [analyzed below]. ASTUnit::Reparse(), which in turn is called only from clang_reparseTranslationUnit_Impl(), which in turn is called only from clang_reparseTranslationUnit(). clang_reparseTranslationUnit() is never called in LLVM code, but is part of public libclang API. This function's documentation requires its translation unit argument to have been built with clang_createTranslationUnitFromSourceFile(). clang_createTranslationUnitFromSourceFile() delegates its work to clang_parseTranslationUnit(), which delegates to clang_parseTranslationUnit2(), which delegates to clang_parseTranslationUnit2FullArgv(), which delegates to clang_parseTranslationUnit_Impl(), which passes CIndexer::PreambleStoragePath to the ASTUnit it creates. ASTUnit::CodeComplete() passes AllowRebuild = false to ASTUnit::getMainBufferWithPrecompiledPreamble(), which makes it return nullptr before calling PrecompiledPreamble::Build(). Both ASTUnit::LoadFromCompilerInvocation() overloads (one of which delegates its work to another) call ASTUnit::getMainBufferWithPrecompiledPreamble() only if their argument PrecompilePreambleAfterNParses > 0. LoadFromCompilerInvocation() is called in: ASTBuilderAction::runInvocation() keeps the default parameter value of PrecompilePreambleAfterNParses = 0, meaning that the preamble file is never created from here. ASTUnit::LoadFromCommandLine(). ASTUnit::LoadFromCommandLine() is called in two places: CrossTranslationUnitContext::ASTLoader::loadFromSource() keeps the default parameter value of PrecompilePreambleAfterNParses = 0, meaning that the preamble file is never created from here. clang_parseTranslationUnit_Impl(), which passes CIndexer::PreambleStoragePath to the ASTUnit it creates. Therefore, the overridden preamble storage path is always used in TempPCHFile::create(). TempPCHFile::create() uses PreambleStoragePath in the same way as LibclangInvocationReporter() uses InvocationEmissionPath. The existing documentation for clang_CXIndex_setInvocationEmissionPathOption() does not specify ownership, encoding, separator or relative vs absolute path requirements. So the documentation for CXIndexOptions::PreambleStoragePath doesn't either. The assumptions are: no ownership transfer; UTF-8 encoding; native separators. Both relative and absolute paths are supported. The added API works as expected in KDevelop: https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/283 Fixes: https://github.com/llvm/llvm-project/issues/51847 Differential Revision: https://reviews.llvm.org/D143418
-
Guillaume Chatelet authored
In the same vein as https://reviews.llvm.org/D141553 Enable the feature globally to ensure layering and catch circular dependencies (https://llvm.org/docs/CodingStandards.html#library-layering). Differential Revision: https://reviews.llvm.org/D143678
-
Matt Devereau authored
This check is checking for the cc1 flag but this test has been seen to fail when FILEPATHVAL has contained cc1 in generated SHAs
-
Guillaume Chatelet authored
-
David Green authored
See D145184.
-
Florian Hahn authored
This helps to reduce the diff of a follow-up change and improves readability of the existing code.
-
Jay Foad authored
-
Zain Jaffal authored
Reviewed By: fpetrogalli Differential Revision: https://reviews.llvm.org/D145300
-
Mel Chen authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D144455
-
Graham Hunter authored
Since AArch64 has sqrt instructions, we want to use those instead of calls to vector math routines for llvm sqrt intrinsics (since those don't imply some of the constraints that libm calls might have) so we just remove the mappings. Code originally written by mgabka Reviewed By: danielkiss, paulwalker-arm Differential Revision: https://reviews.llvm.org/D145392
-
Michael Buch authored
Reverting because Xcode requires this to be handled elsewhere. The global variable list gets constructed using the SBAPI This reverts commit de10c1a8.
-
Michael Buch authored
Reverted because dependecy had to be reverted. This reverts commit 4d909c55.
-
Michael Buch authored
Reverted because Windows buildbot started failing This reverts commit b642fd5e.
-
Michael Buch authored
Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers" Reverted because Windows buildbot started failing This reverts commit 6bd46e71.
-