aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-05-22[𝘀𝗽𝗿] changes introduced through rebaseusers/wangpc-pp/spr/main.aarch64-remove-usage-of-postraschedulerAmir Ayupov1030-27285/+34018
Created using spr 1.3.6-beta.1 [skip ci]
2024-05-21[BOLT] Use getLocationName in YAMLProfileWriter (#92493)Amir Ayupov5-8/+24
Disambiguate local functions using the containing file symbol in BAT mode. Make local function naming consistent across BAT fdata and YAML profiles. Test Plan: updated register-fragments-bolt-symbols.s
2024-05-21[BOLT] Process cross references between ignored functions in BAT mode (#92484)Amir Ayupov6-2/+62
To align YAML and fdata profiles produced in BAT mode, lift two restrictions applied in non-relocation mode when BAT is present: 1) register secondary entry points from ignored functions, 2) treat functions with secondary entry points as simple. This allows constructing CFG for non-simple functions in non-relocation mode and emitting YAML profile for them, which can then be used for optimizations in relocation mode. Test Plan: added test ignored-interprocedural-reference.s
2024-05-21[clang-format] Correctly annotate C++ alternative operators in C (#92880)Owen Pan3-4/+73
PR #90161 uncovered a bug that annotates C++ xor as UnaryOperator if followed by a binary operator. This patch fixes that and all other C++ alternative operator keywords when followed by a binary operator in C. Fixes #92688.
2024-05-22[sanitizers] Bump malloc limit to 1TB for MSAN, LSAN & DFSAN (#89728)Wu Yingcong3-3/+3
We already have `const uptr kMaxAllowedMallocSize = 1ULL << 40;` set for ASAN, HWASAN, memprof, TSAN. This patch bumps the malloc limit for MSAN, LSAN and DFSAN to 1TB as well. 8GB is simply not enough nowadays.
2024-05-21[Coroutines][NFC] Remove @llvm.coro.id.async intrinsics from CoroElide (#92956)Yuxuan Chen1-5/+1
2024-05-21[BOLT] Report adjusted program stats from perf2bolt in BAT mode (#91683)Amir Ayupov4-4/+22
2024-05-22[llvm][ScheduleDAG] SUnit::biasCriticalPath() does not find the critical ↵csstormq2-1/+243
path consistently (#92368) Fix https://github.com/llvm/llvm-project/issues/38037
2024-05-21Revert "[clang-repl] Extend the C support. (#89804)"Jason Molenda3-39/+5
This reverts commit 253c28fa829cee0104c2fc59ed1a958980b5138c. This commit is causing failures on the lldb CI bots, e.g. https://ci.swift.org/view/all/job/llvm.org/view/LLDB/job/as-lldb-cmake/4307/ On my local macOS desktop build, ``` bin/lldb-dotest -p TestImportBuiltinFileID.py Assertion failed: (D->getLexicalDeclContext() == this && "Decl inserted into wrong lexical context"), function addHiddenDecl, file DeclBase.cpp, line 1692. 6 libsystem_c.dylib 0x0000000185f0b8d0 abort + 128 7 libsystem_c.dylib 0x0000000185f0abc8 err + 0 8 liblldb.19.0.0git.dylib 0x00000001311e5800 clang::DeclContext::addHiddenDecl(clang::Decl*) + 120 9 liblldb.19.0.0git.dylib 0x00000001311e5978 clang::DeclContext::addDecl(clang::Decl*) + 32 10 liblldb.19.0.0git.dylib 0x000000012f617b48 clang::Sema::ActOnStartTopLevelStmtDecl(clang::Scope*) + 64 11 liblldb.19.0.0git.dylib 0x000000012eaf76c8 clang::Parser::ParseTopLevelStmtDecl() + 208 12 liblldb.19.0.0git.dylib 0x000000012ec051fc clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 3412 13 liblldb.19.0.0git.dylib 0x000000012ec03274 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 2020 14 liblldb.19.0.0git.dylib 0x000000012eaca860 clang::ParseAST(clang::Sema&, bool, bool) + 604 15 liblldb.19.0.0git.dylib 0x000000012e8554c0 clang::ASTFrontendAction::ExecuteAction() + 308 16 liblldb.19.0.0git.dylib 0x000000012e854c78 clang::FrontendAction::Execute() + 124 17 liblldb.19.0.0git.dylib 0x000000012e76dcfc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 984 18 liblldb.19.0.0git.dylib 0x000000012e784500 compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, llvm::StringRef, clang::FrontendInputFile, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (clang::CompilerInstance&)>, llvm::function_ref<void (clang::CompilerInstance&)>)::$_1::operator()() const + 52 ``` Reverting until Vassil has a chance to look int oit.
2024-05-21[llvm][Support] ListeningSocket::accept returns operation_canceled if FD is ↵Connor Sughrue2-25/+17
set to -1 (#89479) If `::poll` returns and `FD` equals -1, then `ListeningSocket::shutdown` has been called. So, regardless of any other information that could be gleaned from `FDs.revents` or `PollStatus`, it is appropriate to return `std::errc::operation_canceled`. `ListeningSocket::shutdown` copies `FD`'s value to `ObservedFD` then sets `FD` to -1 before canceling `::poll` by calling `::close(ObservedFD)` and writing to the pipe.
2024-05-21[MDBuilder] `mergeCallbackEncodings` fails due to inspecting the wrong node ↵Joachim Meyer2-7/+46
(#92466) Given the following metadata as, with `!6` as `ExistingCallbacks` and `!8` as `NewCB`: ``` !6 = !{!7} !7 = !{i64 0, i1 false} !8 = !{i64 2, i64 3, i1 false} ``` The merge function should add `!8` to the list of `!6`, i.e. `!6 = !{!7,!8}`. However, at the moment the check if this is legal, tries to interpret `!7` as integer instead of it's operand.
2024-05-21[hwasan] Remove memory attrs from instrumented functions. (#92974)Evgenii Stepanov2-0/+23
HWASan instrumentation makes writeonly attribute on function parameters, as well as most memory(*) attributes invalid. This causes miscompilations with LTO, when more optimizations are run after the HWASan pass.
2024-05-21[gn build] Port 42ba740afffaLLVM GN Syncbot1-0/+2
2024-05-21Revert "Set ObjectFile's assignment operator to also be deleted like its ↵Thomas Fransham1-1/+0
copy constructor" (#92973) Reverts llvm/llvm-project#92942
2024-05-21[BOLT][NFC] Remove dead initialization code (#92952)Heewon Cho1-3/+1
Addressing #81441
2024-05-21[clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (#92854)Matheus Izvekov27-127/+144
This is an enabler for a future patch. This allows an type-parameter default argument to be set as an arbitrary TemplateArgument, not just a type. This allows template parameter packs to have default arguments in the AST, even though the language proper doesn't support the syntax for it. This will be used in a later patch which synthesizes template parameter lists with arbitrary default arguments taken from template specializations. There are a few places we used SubsType, because we only had a type, now we use SubstTemplateArgument. SubstTemplateArgument was missing arguments for setting Instantiation location and entity names. Adding those is needed so we don't regress in diagnostics.
2024-05-21[BOLT][NFC] Use const reference in range-based for loop (#92932)Heewon Cho1-2/+2
Addressing #91195
2024-05-21[libc] Fix scudo integration test (#92967)Michael Jones1-0/+4
When scudo is built with LLVM-libc's headers, certain functions also need to be linked from LLVM-libc. This patch adds those functions to the list to be linked into the specific scudo test, which uses a minimal subset of libc. Fixes #92861 and #59453
2024-05-21[libc++] Implement C++20 atomic_ref (#76647)Damien L-G46-30/+3888
Implement the std::atomic_ref class template by reusing atomic_base_impl. Based on the work from https://reviews.llvm.org/D72240
2024-05-21[lldb] Set ObjectFile's assignment operator to also be deleted like its copy ↵Thomas Fransham1-0/+1
constructor (#92942) This will also fix a warning when ObjectFile is dllexport'ed on Windows for my GSOC project for adding support Clang plugins on windows with @vgvassilev and @compnerd.
2024-05-21[libc][__support] move CndVar to __support (#89329)Nick Desaulniers (paternity leave)11-169/+215
We should be able to reuse this between the implementation of C11 cnd_t condition variables and POSIX pthread_cond_t condition variables. The current implementation is hyper linux specific, making use of Futex. That obviously wont work outside of linux, so split the OS specific functions off into their own source outside of the header. Modifies the return values of the to-be-shared impl to return 0 on success and -1 on error. This pattern was shamelessly stolen from Bionic's [__bionic_thrd_error](https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/threads_inlines.h#41). Fixes: #88580 Link: #88583
2024-05-21[libc] Provide __libc_{init,fini}_array for baremetal (#90828)Petr Hosek6-3/+78
These are provided by newlib and many baremetal projects assume they're available rather than providing their own implementation.
2024-05-21[libunwind][WebAssembly] Make libunwind compilable (#92192)Heejin Ahn5-7/+12
This tries to make Wasm compilable in LLVM tree with CMake for non-Emscripten platform. This - Adds `-D__USING_WASM_EXCEPTIONS__` when you compile with `-fwasm-exceptions` (like other EH options) in Clang - Exclude `UnwindLevel1.c`, `UnwindRegistersSave.S`, and `UnwindRegistersRestore.S` when compiling with Wasm - Changed some `__USING_WASM_EXCEPTIONS__` to `__wasm__`; they should be applied when compiling with Wasm w/o exceptions. - Define some unused macros to make it compile Fixes #72771.
2024-05-21[libc++] Refactor flaky tests for std::shared_lock (#91779)Louis Dionne3-165/+242
This makes the tests non-flaky.
2024-05-22[clang][NFC] Refactor `Sema::TagUseKind` (#92689)Vlad Serebrennikov7-150/+160
This patch makes `TagUseKind` a scoped enumeration, and moves it outside of `Sema` class, making it eligible for forward declaring.
2024-05-21[DFSan] Fix recvmsg wrapper to support MSG_TRUNC flag. (#92599)Andrew Browne2-28/+65
The MSG_TRUNC flag makes recvmsg return the real length of the packet, even if it was too big to fit in the provided buffer. This is commonly used together with MSG_PEEK. Without this patch, dfsan's clear_msghdr_labels expects the return value of recvmsg (size recieved) to be less than or equal to the iov buffer length where recvmsg writes data, resulting in a crash.
2024-05-21Revert "[msan] Increase kNumStackOriginDescrs constant (#92838)"Thurston Dang1-5/+1
This reverts commit 57a507930b50c445140feb68bffe1c21af53319e. Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/57/builds/35160)
2024-05-21Revert "[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)"Amir Ayupov2-9/+4
This reverts commit 9f2313829fd210f9923375e93bc11fe9685c26d5. Creates a dependency cycle: lib/Rewrite depends on lib/Profile.
2024-05-21[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)shaw young2-4/+9
2024-05-21[AArch64][PAC][NFC] Make checkAuthenticatedRegister() return void (#92507)Igor Kudrin2-13/+9
The return value is not used. This change simplifies the upcoming fix
2024-05-22Disable compiling and testing Flang on Clang changes (#92740)Vlad Serebrennikov1-1/+1
This patch aims to rectify the Windows CI situation by decoupling Clang changes from Flang test suite, which is causing Windows CI to "pause" for 20 minutes (details can be found [here](https://discourse.llvm.org/t/flang-tests-are-extremely-slow-on-windows/78591/11)). This even seems desirable in the long run, because it was highlighted that the only part of Clang that Flang depends on is Driver ([Discourse post](https://discourse.llvm.org/t/flang-tests-are-extremely-slow-on-windows/78591/14)). Importantly, this patch leaves the question of _entirely_ disabling Flang tests on Windows CI out of scope.
2024-05-21[X86] Return true for opaque constants in hasAndNotCompare. (#92944)Craig Topper2-1/+22
This is the X86 equivalent of #92926
2024-05-21[flang][cuda] Accept constant as src for cuf.data_tranfer (#92951)Valentin Clement (バレンタイン クレメン)4-11/+24
Assignment of a constant (host) to a device variable is a special case that can be further lowered to `cudaMemset` or similar functions. This patch update the lowering to avoid the creation of a temporary when we assign a constant to a device variable.
2024-05-21[msan] Increase kNumStackOriginDescrs constant (#92838)Thurston Dang1-1/+5
This increases the constant size of kNumStackOriginDescrs to 4M (64GB of BSS across two arrays), which ought to be enough for anybody. This is the easier alternative suggested by eugenis@ in https://github.com/llvm/llvm-project/pull/92826.
2024-05-21[libcxx] [test] Detect mingw-w64 headers compatible with C++ module builds ↵Martin Storsjö1-1/+34
(#92893) This fixes running the tests/CI with a newer mingw toolchain that has been fixed to work with building libc++ as a module.
2024-05-21Fix another diagnostic wording for style; NFCAaron Ballman2-29/+29
2024-05-21Fix another diagnostic for style; NFCAaron Ballman2-6/+6
2024-05-21Reword a diagnostic for style; NFCAaron Ballman3-25/+25
2024-05-21MachineScheduler: Add parameter name commentsMatt Arsenault1-2/+4
2024-05-21[clang-tidy] Rename out-of-line function definitions (#91954)Edwin Vane3-1/+35
Member function templates defined out-of-line were resulting in conflicting naming failures with overlapping usage sets. With this change, out-of-line definitions are treated as a usage of the failure which is the inline declaration.
2024-05-21[clang] Fix crash passing function pointer without prototype. (#90255)lolloz982-7/+26
Fixes use-after-free iterating over the uses of the function. Closes #88917
2024-05-21InstCombine: Stop handling bitcast in PointerReplacer (#92937)Matt Arsenault1-10/+1
These should be irrelevant since opaque pointers.
2024-05-21Fix diagnostic wording style; NFCAaron Ballman2-5/+5
2024-05-21[flang][cuda][NFC] Silence warning triggered in buildbotValentin Clement1-2/+2
2024-05-21RegisterPressure: Add parameter name commentMatt Arsenault1-2/+2
2024-05-21[flang][cuda] Enable data transfer for descriptors (#92804)Valentin Clement (バレンタイン クレメン)4-19/+58
Remove the TODO when data transfer is done with descriptor variables.
2024-05-21X86: Add regression test from issue #76416Matt Arsenault2-0/+123
Also add another testcase reported at the same regression commit. Make sure this assert is fixed when the patch is eventually reapplied.
2024-05-21[clangd] Fix directory separators in `infinite-instantiation.test`Vlad Serebrennikov1-1/+1
Fixing https://lab.llvm.org/buildbot/#/builders/123/builds/26934 caused by #92888. Third time the charm!
2024-05-21[PowerPC][AIX] 64-bit large code-model support for toc-data (#90619)Zaara Syeda8-44/+104
This patch adds support for toc-data for 64-bit large code-model on AIX. The sequence ADDIStocHA8/ADDItocL8 is used to access the data directly from the TOC. When emitting the instruction ADDIStocHA8, we check if the symbol has toc-data attribute before creating a toc entry for it. When emitting the instruction ADDItocL8, we use the LA8 instruction to load the address.
2024-05-21[llvm-driver] Add driver alias for c++filt (#92803)Jordan Rupprecht3-0/+7
Similar to 9d955a63c7b0d2d547a63d4074e03cd5ebd1f162, this allows the driver to respond to `c++filt`.