- Jan 26, 2021
-
-
Wolfgang Pieb authored
-
Duncan P. N. Exon Smith authored
Change `SourceManager::getOrCreateContentCache` to take a `FileEntryRef` and update call sites (mostly internal to SourceManager.cpp). In a couple of cases this temporarily relies on `FileEntry::getLastRef`, but those can be cleaned up once other APIs switch over. The one change outside of SourceManager.cpp is in ASTReader.cpp, which stops relying on the auto-degrade-to-`FileEntry*` behaviour from `InputFile::getFile` since it now needs a `FileEntryRef`. No functionality change here. Differential Revision: https://reviews.llvm.org/D92983
-
Duncan P. N. Exon Smith authored
Change `SourceManager::createFileID(const FileEntry*)` to defer to `SourceManager::createFileID(FileEntryRef)`. This fixes an unexercised bug where the latter gained support for named pipes and the former didn't, but since we're trying to remove all calls to the former it doesn't really make sense to test this explicitly now that the implementation is hollowed out. This is a belated follow-up to 245218bb, which sunk named pipe support into FileManager and SourceManager. The original version of that patch was based on top of https://reviews.llvm.org/D92984, which removed the `FileEntry` overload of `createFileID()`, and I missed the subtle difference when it was rebased.
-
Lang Hames authored
-
Eugene Zhulenev authored
Instead of using llvm.call operations to call LLVM coro intrinsics use Coro operations from the LLVM dialect. (This was reviewed as a part of https://reviews.llvm.org/D94923 but was lost in arc land from local branch) Differential Revision: https://reviews.llvm.org/D95405
-
Duncan P. N. Exon Smith authored
Migrate to the `FileEntryRef` overload of `SourceManager::createFileID` (using `FileManager::getOptionalFileRef`) in `ClangExpressionParser::ParseInternal`. No functionality change here. Differential Revision: https://reviews.llvm.org/D92957
-
Craig Topper authored
[TargetLowering][RISCV] Don't transform (seteq/ne (sext_inreg X, VT), C1) -> (seteq/ne (zext_inreg X, VT), C1) if the sext_inreg is cheaper RISCV has to use 2 shifts for (i64 (zext_inreg X, i32)), but we can use addiw rd, rs1, x0 for sext_inreg. We already understood this when type legalizing i32 seteq/ne on rv64. But this transform in SimplifySetCC would sometimes undo it. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D95289
-
Arthur O'Dwyer authored
LWG reflector consensus is that this was a bug in libc++. (In particular, MSVC also will fix it in their STL, soon.) Bug originally discovered by Logan Smith. Also fix `std::function<const void()>`, which should work the same way as `std::function<void()>` in terms of allowing "conversions" from non-void types. Differential Revision: https://reviews.llvm.org/D94452
-
David Blaikie authored
DebugInfo: Generalize the .debug_addr minimization flag to pave the way for including other strategies
-
Mitch Phillips authored
This reverts commit 554b3211. Differential Revision: https://reviews.llvm.org/D95035
-
Craig Topper authored
This pattern can occur when an unsigned is used to index an array on RV64. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D95290
-
Changpeng Fang authored
Summary: RPTracker::reset(MI) is a very expensive call when the number of virtual registers is huge. We observed a long compilation time issue when RPT::reset() is called once for each cluster. In this work, we call RPT.reset() only at the first seen cluster, and use advance() to get the register pressure for the later clusters in the same basic block. This could effectively reduce the number of the expensive calls and thus reduce the compile time. Reviewers: rampitec Fixes: SWDEV-239161 Differential Revision: https://reviews.llvm.org/D95273
-
Jez Ng authored
Not sure what the difference is, but using the latter appears to cause issues in standalone builds. See llvm.org/PR48853. Reviewed By: #lld-macho, compnerd Differential Revision: https://reviews.llvm.org/D95359
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D95249
-
Stanislav Mekhanoshin authored
-
Pedro Tammela authored
Adds support for running a Lua function when a breakpoint is hit. Example: breakpoint command add -s lua -F abc The above runs the Lua function 'abc' passing 2 arguments. 'frame', 'bp_loc' and 'extra_args'. A third parameter 'extra_args' is only present when there is structured data declared in the command line. Example: breakpoint command add -s lua -F abc -k foo -v bar Differential Revision: https://reviews.llvm.org/D93649
-
modimo authored
This change leverages the work done in D83743 to replay in the SampleProfile inliner to also be used in the CGSCC inliner. NOTE: currently restricted to non-ML advisors only. The added switch `-cgscc-inline-replay=<remarks file>` will replay the inlining decisions in that file where the remarks file is generated via `-Rpass=inline`. The aim here is to make it easier to analyze changes that would modify inlining heuristics to be separated from this behavior. Doing so allows easier examination of assembly and runtime behavior compared to the baseline rather than trying to dig through the large churn caused by inlining. In LTO compilation, since inlining is done twice you can separately specify replay by passing the flag to the FE (`-cgscc-inline-replay=`) and to the linker (`-Wl,cgscc-inline-replay=`) with the remarks generated from their respective places. Testing on mysqld by comparing the inline decisions between base (generates remarks.txt) and diff (replay using identical input/tools with remarks.txt) and examining the inlining sites with `diff` shows 14,000 mismatches out of 247,341 for a ~94% replay accuracy. I believe this gap can be narrowed further though for the general case we may never achieve full accuracy. For my personal use, this is close enough to be representative: I set the baseline as the one generated by the replay on identical input/toolset and compare that to my modified input/toolset using the same replay. Testing: ninja check-llvm newly added test correctly replays CGSCC inlining decisions Reviewed By: mtrofin, wenlei Differential Revision: https://reviews.llvm.org/D94334
-
Shilei Tian authored
`omp_is_initial_device` in device code was implemented as a builtin function in D38968 for a better performance. Therefore there is no chance that this function will be called to `deviceRTLs`. As we're moving to build `deviceRTLs` with OpenMP compiler, this function can lead to a compilation error. This patch just simply removes it. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D95397
-
Leonard Chan authored
We're choosing to take an opt-in approach for landing Relative VTables, so we'll need asan-equivalent multilibs with relative vtables enabled. Afterwards, we can just flip the switch in our build. Differential Revision: https://reviews.llvm.org/D95253
-
Duncan P. N. Exon Smith authored
Refactor the duplicated canonicalize-path logic in `FileCollector` and `ModulesDependencyCollector` into a new utility called `PathCanonicalizer` that's shared. This popped up when tracking down a bug common to both in https://reviews.llvm.org/D95202. As drive-bys, update a few names and comments to better reflect the effect of the code, delay removal of `..`s to avoid an unnecessary extra string copy, and leave behind a couple of FIXMEs for future consideration. Differential Revision: https://reviews.llvm.org/D95279
-
David Blaikie authored
-
Walter Erquinigo authored
Caused by https://reviews.llvm.org/D93951 This feature is not needed on ARM, so let's just disable the tests on ARM.
-
Harald van Dijk authored
As noted in D91913, MSVC implements the GNU behavior for , ## __VA_ARGS__ as well. Do the same when `-fms-compatibility` is used. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D95392
-
Jim Ingham authored
When you pass in a bogus ArchSpec, TargetList.CreateTarget makes a target with the arch of the executable. That wasn't the case with a bogus triple, so this change caused one of the bogus input data tests to fail. So check that the ArchSpec is valid before passing it to CreateTarget.
-
Sam McCall authored
This allows for more flexibility than -compile-commands-dir or ancestor discovery. See https://github.com/clangd/clangd/issues/116 Differential Revision: https://reviews.llvm.org/D95057
-
Nikita Popov authored
When LSR converts a branch on the pre-inc IV into a branch on the post-inc IV, the nowrap flags on the addition may no longer be valid. Previously, a poison result of the addition might have been ignored, in which case the program was well defined. After branching on the post-inc IV, we might be branching on poison, which is undefined behavior. Fix this by discarding nowrap flags which are not present on the SCEV expression. Nowrap flags on the SCEV expression are proven by SCEV to always hold, independently of how the expression will be used. This is essentially the same fix we applied to IndVars LFTR, which also performs this kind of pre-inc to post-inc conversion. I believe a similar problem can also exist for getelementptr inbounds, but I was not able to come up with a problematic test case. The inbounds case would have to be addressed in a differently anyway (as SCEV does not track this property). Fixes https://bugs.llvm.org/show_bug.cgi?id=46943. Differential Revision: https://reviews.llvm.org/D95286
-
Fraser Cormack authored
Original patch by @rogfer01. This patch adds support for insertelt and extractelt operations on scalable vectors. Special care must be taken on RV32 when dealing with i64 vectors as there are no straightforward ways to insert a 64-bit element without a register of that size. To that end, both are custom-lowered to different sequences. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Fraser Cormack <fraser@codeplay.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94615
-
Walter Erquinigo authored
This fails on Windows because std::future<llvm::Error> fail to compile. Now switching to SBError as a workaround. Failed buildbot: http://lab.llvm.org:8011/#/builders/83/builds/3021
-
Eugene Zhulenev authored
[mlir:Async] Add intermediate async.coro and async.runtime operations to simplify Async to LLVM lowering [NFC] No new functionality, mostly a cleanup and one more abstraction level between Async and LLVM IR. Instead of lowering from Async to LLVM coroutines and Async Runtime API in one shot, do it progressively via async.coro and async.runtime operations. 1. Lower from async to async.runtime/coro (e.g. async.execute to function with coro setup and runtime calls) 2. Lower from async.runtime/coro to LLVM intrinsics and runtime API calls Intermediate coro/runtime operations will allow to run transformations on a higher level IR and do not try to match IR based on the LLVM::CallOp properties. Although async.coro is very close to LLVM coroutines, it is not exactly the same API, instead it is optimized for usability in async lowering, and misses a lot of details that are present in @llvm.coro intrinsic. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D94923
-
Quentin Chateau authored
This allows quick tasks without dependencies that need to run fast to run ASAP. This is mostly useful for code formatting. ---------------------------- This fixes something that's been annoying me: - Open your IDE workspace and its 20 open files - Clangd spends 5 minutes parsing it all - In the meantime you start to work - Save a file, trigger format-on-save, which hangs because clangd is busy - You're stuck waiting until clangd is done parsing your files before the formatting and save takes place Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D94875
-
Cassie Jones authored
Implement widening for G_SADDO and G_SSUBO. Add legalize-add/sub tests for narrow overflowing add/sub on AArch64. Differential Revision: https://reviews.llvm.org/D95034
-
Richard Smith authored
This reverts commit 53176c16, which introduceed a layering violation. LLVM's IR library can't include headers from Analysis.
-
peter klausler authored
Some parameters of 128-bit IEEE floating-point numbers were incorrect, leading to a failure to define REAL128 to 16. Differential Revision: https://reviews.llvm.org/D95387
-
peter klausler authored
Make the #include "file" preprocessing directive begin its search in the same directory as the file containing the directive, as other preprocessors and our Fortran INCLUDE statement do. Avoid current working directory for all source files after the original. Differential Revision: https://reviews.llvm.org/D95388
-
Jonas Devlieghere authored
Don't emit an output dash for an empty sequence. Take emitting a vector of strings for example: std::vector<std::string> Strings = {"foo", "bar"}; LLVM_YAML_IS_SEQUENCE_VECTOR(std::string) yout << Strings; This emits the following YAML document. --- - foo - bar ... When the vector is empty, this generates the following result: --- - [] ... Although this is valid YAML, it does not match what we meant to emit. The result is a one-element sequence consisting of an empty list. Indeed, if we were to try to read this again we get an error: YAML:2:4: error: not a mapping - [] The problem is the output dash before the empty list. The correct output would be: --- [] ... This patch fixes that by not emitting the output dash for an empty sequence. Differential revision: https://reviews.llvm.org/D95280 -
Julian Lettner authored
A bot owner contacted me. I will re-land after confirming that this doesn't break anyone (since it's low priority). This reverts commit 9946b169.
-
Walter Erquinigo authored
This test fails on ARM, but this feature won't be used on ARM, so we can disable it for that architecture.
-
Konstantin Zhuravlyov authored
This reverts commit dd8ae426. This commit causes infinite loop when compiling rocThrust and hipCUB. Differential Revision: https://reviews.llvm.org/D95389
-
Jim Ingham authored
The API docs in SBDebugger.i claim this should work but it doesn't. This should fix it. Differential Revision: https://reviews.llvm.org/D95164
-
Walter Erquinigo authored
Depends on D93874. runInTerminal was using --wait-for, but it was some problems because it uses process polling looking for a single instance of the debuggee: - it gets to know of the target late, which renders breakpoints in the main function almost impossible - polling might fail if there are already other processes with the same name - polling might also fail on some linux machine, as it's implemented with the ps command, and the ps command's args and output are not standard everywhere As a better way to implement this so that it works well on Darwin and Linux, I'm using now the following process: - lldb-vscode notices the runInTerminal, so it spawns lldb-vscode with a special flag --launch-target <target>. This flags tells lldb-vscode to wait to be attached and then it execs the target program. I'm using lldb-vscode itself to do this, because it makes finding the launcher program easier. Also no CMAKE INSTALL scripts are needed. - Besides this, the debugger creates a temporary FIFO file where the launcher program will write its pid to. That way the debugger will be sure of which program to attach. - Once attach happend, the debugger creates a second temporary file to notify the launcher program that it has been attached, so that it can then exec. I'm using this instead of using a signal or a similar mechanism because I don't want the launcher program to wait indefinitely to be attached in case the debugger crashed. That would pollute the process list with a lot of hanging processes. Instead, I'm setting a 20 seconds timeout (that's an overkill) and the launcher program seeks in intervals the second tepmorary file. Some notes: - I preferred not to use sockets because it requires a lot of code and I only need a pid. It would also require a lot of code when windows support is implemented. - I didn't add Windows support, as I don't have a windows machine, but adding support for it should be easy, as the FIFO file can be implemented with a named pipe, which is standard on Windows and works pretty much the same way. The existing test which didn't pass on Linux, now passes. Differential Revision: https://reviews.llvm.org/D93951
-