- Mar 07, 2023
-
-
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.
-
Michael Buch authored
Reverted because dependecies had to be reverted. This reverts commit 96e39fdb.
-
Nikita Popov authored
-
sgokhale authored
AArch64/reg-usage.ll has an issue with the output ordering due to use of unordered container. This was discovered by -DLLVM_REVERSE_ITERATION:BOOL=ON cmake option. This patch tries to address it by making use of ordered container. Differential Revision: https://reviews.llvm.org/D145472/
-
Tomas Matheson authored
D145206 changed value() to value_or(0), removing the assert that checks that there is a minor version. Add it back explicitly. Differential Revision: https://reviews.llvm.org/D145371
-
pvanhout authored
We previously only matched (min (max ...)) Depends on D144728 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D145159
-
Florian Hahn authored
If all stores only store the initializer value of a global, consider it as not stored in the heuristic. GlobalOpt will remove such stores later on. Depends on D129857. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D144476
-
pvanhout authored
Differential Revision: https://reviews.llvm.org/D144728
-
wangpc authored
Like what has been done in AArch64 (D125335). We enable this under `-O2` to show the codegen diffs here but we may only do this under `-O3` like AArch64. There are two cases that we may produce these eliminable copies: 1. ISel of `FrameIndex`. Like `rvv/fixed-vectors-calling-conv.ll`. 2. Tail duplication. Like `select-optimize-multiple.ll`. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D144535
-
wangpc authored
SchedWrites are relevant to LMUL for most instructions, so we have to enumerate all defined SchedWrites when defining ReadAdcance. This patch adds some classes to simplify these definitions. Reviewed By: michaelmaitland Differential Revision: https://reviews.llvm.org/D145041
-
Nikita Popov authored
This patch enables --function-signature by default under --version 2 and makes --version 2 the default. This means that all newly created tests will check the function signature, while leaving old tests alone. There's two motivations for this change: * Without --function-signature, the generated check lines may fail in a very hard to understand way if the test both includes a function definition and a call to that function. (Though we could address this by making the CHECK-LABEL stricter, without checking the full signature.) * This actually checks that uses of the arguments in the function body use the correct argument, instead of matching against any variable. This is a replacement for D139006 and D140212 based on the --version mechanism. I did not include an opt-out flag --no-function-signature because I'm not sure we need it. Would be happy to include it though, if desired. Differential Revision: https://reviews.llvm.org/D145149
-
Anonymous authored
run-clang-tidy.py should only search for the clang-apply-replacements if really needed. Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D145477
-
Dmitry Makogon authored
-
sgokhale authored
This forms the base for upcoming patch to generate pseudo instructions for MLA/MAD/MLS/MSB. Differential Revision: https://reviews.llvm.org/D142998
-
Jean Perier authored
I missed `addCharSymbol` in the patch adding the hlfir.declare in internal procedures for "captured" entities (https://reviews.llvm.org/D143481). Differential Revision: https://reviews.llvm.org/D145361
-
Siva Chandra Reddy authored
-
danix800 authored
If ignored, the subexpr is a UnaryOperator (&) which cannot be evaluated (assertion failed). #define offsetof(type,memb) ((unsigned long)&((type*)0)->memb) Patch By danix800! Differential Revision: https://reviews.llvm.org/D144780
-
Chuanqi Xu authored
definition correctly Close https://github.com/llvm/llvm-project/issues/61067 Previously we will only handle the defaulted member functions as discardable ODR. But we need to handle defaulted friend function in this way too. Otherwise we may run into the problems the above issue report mentions.
-
Mehdi Amini authored
The concept of the ActionManager acts as a sort of "Hub" that can receive various types of action and dispatch them to a set of registered handlers. One handler will handle the action or it'll cascade to other handlers. This model does not really fit the current evolution of the Action tracing and debugging: we can't foresee a good case where this behavior compose with the use-case behind the handlers. Instead we simplify it with a single callback installed on the Context. Differential Revision: https://reviews.llvm.org/D144811
-
Adrian Kuegel authored
-
Fangrui Song authored
-