- Jul 28, 2020
-
-
Bruno Ricci authored
-
Serge Pavlov authored
This is recommit of f51bc4fb, reverted in 8577595e, because the function `flock` is not available on Solaris. In this variant `flock` was replaced with `fcntl`, which is a POSIX function. New functions `lockFile`, `tryLockFile` and `unlockFile` implement simple file locking. They lock or unlock entire file. This must be enough to support simulataneous writes to log files in parallel builds. Differential Revision: https://reviews.llvm.org/D78896
-
Bruno Ricci authored
Background: ----------- There are two related argument types which can be sent into a diagnostic to display the name of an entity: DeclarationName (ak_declarationname) or NamedDecl* (ak_nameddecl) (there is also ak_identifierinfo for IdentifierInfo*, but we are not concerned with it here). A DeclarationName in a diagnostic will just be streamed to the output, which will directly result in a call to DeclarationName::print. A NamedDecl* in a diagnostic will also ultimately result in a call to DeclarationName::print, but with two customisation points along the way: The first customisation point is NamedDecl::getNameForDiagnostic which is overloaded by FunctionDecl, ClassTemplateSpecializationDecl and VarTemplateSpecializationDecl to print the template arguments, if any. The second customisation point is NamedDecl::printName. By default it just streams the stored DeclarationName into the output but it can be customised to provide a user-friendly name for an entity. It is currently overloaded by DecompositionDecl and MSGuidDecl. What this patch does: --------------------- For many diagnostics a DeclarationName is used instead of the NamedDecl*. This bypasses the two customisation points mentioned above. This patches fix this for diagnostics in Sema.cpp, SemaCast.cpp, SemaChecking.cpp, SemaDecl.cpp, SemaDeclAttr.cpp, SemaDecl.cpp, SemaOverload.cpp and SemaStmt.cpp. I have only modified diagnostics where I could construct a test-case which demonstrates that the change is appropriate (either with this patch or the next one). Reviewed By: erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D84656
-
Bruno Ricci authored
The underlying ABI forces FormatToken to have a lot of padding. Currently (on x86-64 linux) `sizeof(FormatToken) == 288`. After this patch `sizeof(FormatToken) == 232`. No functional changes. Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D84306
-
Joachim Protze authored
Also add $BUILD/lib to the LIBRARY_PATH to fix https://bugs.llvm.org/show_bug.cgi?id=46836. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D84557
-
Simon Pilgrim authored
An initial backend patch towards fixing the various poor HADD combines (PR34724, PR41813, PR45747 etc.). This extends isHorizontalBinOp to check if we have per-element horizontal ops (odd+even element pairs), but not in the expected serial order - in which case we build a "post shuffle mask" that we can apply to the HOP result, assuming we have fast-hops/optsize etc. The next step will be to extend the SHUFFLE(HOP(X,Y)) combines as suggested on PR41813 - accepting more post-shuffle masks even on slow-hop targets if we can fold it into another shuffle. Differential Revision: https://reviews.llvm.org/D83789
-
serge-sans-paille authored
All analysis are preserved if there's no local change, and thanks to 3667d87a this property is enforced for all passes. Skipping the dependency computation improves the performance when there's a lot of small functions, where only a few change happen. Thanks to Nikita Popov who provided this numbers (extract below) https://llvm-compile-time-tracker.com/compare.php?from=183342c0a9850e60dd7a004b651c83dfb3a7d25e&to=f2f91e6a2743070471cc9471e4e8c646e50c653c&stat=instructions O3: (number of instructions) Benchmark Old New kimwitu++ 60783M 59968M (-1.34%) sqlite3 73200M 73083M (-0.16%) consumer-typeset 52776M 52712M (-0.12%) Bullet 133709M 132940M (-0.58%) tramp3d-v4 123864M 123186M (-0.55%) mafft 55534M 55477M (-0.10%) ClamAV 76292M 76164M (-0.17%) lencod 103190M 103061M (-0.13%) SPASS 64068M 63713M (-0.55%) 7zip 197332M 196308M (-0.52%) geomean 85750M 85389M (-0.42%) Differential Revision: https://reviews.llvm.org/D80707
-
Georgii Rymar authored
Currently, when dumping section headers, llvm-readelf prints "RELR" for SHT_ANDROID_RELR/SHT_RELR sections. The behavior was introduced in D47919 and revealed in D84330. But "SHT_ANDROID_RELR" has a different value from "SHT_RELR". Also, "SHT_ANDROID_REL/SHT_ANDROID_RELA" are printed as "ANDROID_REL/ANDROID_RELA", what makes the handling of the "SHT_ANDROID_RELR" inconsistent. This patch makes llvm-readelf to print "ANDROID_RELR" instead of "RELR". Differential revision: https://reviews.llvm.org/D84393
-
Kristina Bessonova authored
[clang][cmake] Force CMAKE_LINKER for multistage build in case of BOOTSTRAP_LLVM_ENABLE_LLD and MSVC The issue with LLVM_ENABLE_LLD is that it just passes -fuse-ld=lld to compiler/linker options which makes sense only for those platforms where cmake invokes a compiler driver for linking. On Windows (MSVC) cmake invokes the linker directly and requires CMAKE_LINKER to be specified otherwise it defaults CMAKE_LINKER to be link.exe. This patch allows BOOTSTRAP_LLVM_ENABLE_LLD to set CMAKE_LINKER in two cases: * if building for host Windows, * if crosscompiling for target Windows. It also skips adding '-fuse-ld=lld' to make lld-link not warning about 'unknown argument'. This fixes build with `clang/cmake/caches/DistributionExample.cmake` on Windows. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D80873
-
Chen Zheng authored
-
Roman Lebedev authored
While this doesn't appear to help with the perf issue being exposed by D84108, the function as-is is very weird, convoluted, and what's worse, recursive. There was no need for `SpeculativelyAvaliableAndUsedForSpeculation`, tri-state choice is enough. We don't even ever check for that state. The basic idea here is that we need to perform a depth-first traversal of the predecessors of the basic block in question, either finding a preexisting state for the block in a map, or inserting a "placeholder" `SpeculativelyAvaliable`, If we encounter an `Unavaliable` block, then we need to give up search, and back-propagate the `Unavaliable` state to the each successor of said block, more specifically to the each `SpeculativelyAvaliable` we've just created. However, if we have traversed entirety of the predecessors and have not encountered an `Unavaliable` block, then it must mean the value is fully available. We could update each inserted `SpeculativelyAvaliable` into a `Avaliable`, but we don't need to, as assertion excersizes, because we can assume that if we see an `SpeculativelyAvaliable` entry, it is actually `Avaliable`, because during the time we've produced it, if we would have found that it has an `Unavaliable` predecessor, we would have updated it's successors, including this block, into `Unavaliable` Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D84181
-
Ehsan Toosi authored
Address a few remaining comments in copy removal transform. Differential Revision: https://reviews.llvm.org/D84529
-
Artem Dergachev authored
Possibly a linker bug but I'm in a hurry to fix a buildbot. Differential Revision: https://reviews.llvm.org/D84453
-
Craig Topper authored
[X86] Detect if EFLAGs is live across XBEGIN pseudo instruction. Add it as livein to the basic blocks created when expanding the pseudo XBEGIN causes several based blocks to be inserted. If flags are live across it we need to make eflags live in the new basic blocks to avoid machine verifier errors. Fixes PR46827 Reviewed By: ivanbaev Differential Revision: https://reviews.llvm.org/D84479
-
Craig Topper authored
By default we pick a 1 byte displacement and let relaxation enlarge it if necessary. The GNU assembler supports a pseudo prefix to basically pre-relax the instruction the larger size. I plan to add {disp8} and {disp32} support for memory operands in another patch which is why I've included the parsing code and enum for {disp8} pseudo prefix as well. Reviewed By: echristo Differential Revision: https://reviews.llvm.org/D84709
-
Craig Topper authored
In 16-bit mode we can encode a 32-bit address using 0x67 prefix. We were failing to do this when the index register was a 32-bit register, the base register was not present, and the displacement fit in 16-bits. Fixes PR46866.
-
Wei Mi authored
PGO profile is usually more precise than sample profile. However, PGO profile needs to be collected from loadtest and loadtest may not be representative enough to the production workload. Sample profile collected from production can be used as a supplement -- for functions cold in loadtest but warm/hot in production, we can scale up the related function in PGO profile if the function is warm or hot in sample profile. The implementation contains changes in compiler side and llvm-profdata side. Given an instr profile and a sample profile, for a function cold in PGO profile but warm/hot in sample profile, llvm-profdata will either mark all the counters in the profile to be -1 or scale up the max count in the function to be above hot threshold, depending on the zero counter ratio in the profile. The assumption is if there are too many counters being zero in the function profile, the profile is more likely to cause harm than good, then llvm-profdata will mark all the counters to be -1 indicating the function is hot but the profile is unaccountable. In compiler side, if a function profile with all -1 counters is seen, the function entry count will be set to be above hot threshold but its internal profile will be dropped. In the long run, it may be useful to let compiler support using PGO profile and sample profile at the same time, but that requires more careful design and more substantial changes to make two profiles work seamlessly. The patch here serves as a simple intermediate solution. Differential Revision: https://reviews.llvm.org/D81981
-
Richard Smith authored
name annotation. Instead, defer forming the member access expression or DeclRefExpr until we build the use of ClassifyName's result. Just build an UnresolvedLookupExpr to track the LookupResult until we're ready to consume it. This also reverts commit 2f7269b6 (other than its testcase). That change was an attempted workaround for the same problem.
-
Xing GUO authored
This patch helps teach llvm-readelf to emit a correct number spaces when dumping in hex format. Before this patch, when the hex data doesn't fill the 4th column, some spaces are missing. ``` Hex dump of section '.sec': 0x00000000 00000000 00000000 00000000 00000000 ................ 0x00000010 00000000 00000000 00000000 0000 .............. ``` After this patch: ``` Hex dump of section '.sec': 0x00000000 00000000 00000000 00000000 00000000 ................ 0x00000010 00000000 00000000 00000000 0000 .............. ``` Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D84640
-
Matt Arsenault authored
Attempt to fix address sanitizer bots when building ARM.
-
Alina Sbirlea authored
Summary: Refactor Succ/Pred maps to have a single map lookup when constructing children. The preivous desing made sense when used by GraphTraits. This more closely matches the previous approach in DomTree. Reviewers: dblaikie Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D84567
-
Alina Sbirlea authored
-
Fred Riss authored
Summary: Initially, Apple simulator binarie triples didn't use a `-simulator` environment and were just differentiated based on the architecture. For example, `x86_64-apple-ios` would obviously be a simualtor as iOS doesn't run on x86_64. With Catalyst, we made the disctinction explicit and today, all simulator triples (even the legacy ones) are constructed with an environment. This is especially important on Apple Silicon were the architecture is not different from the one of the simulated device. This change makes the simulator part of the environment always part of the criteria to detect whether 2 `ArchSpec`s are equal or compatible. Reviewers: aprantl Subscribers: inglorion, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D84716
-
Petr Hosek authored
This way, downstream projects don't have to invoke find_package(ZLIB) reducing the amount of boilerplate. Differential Revision: https://reviews.llvm.org/D84691
-
Joel E. Denny authored
-
Alina Sbirlea authored
Summary: Use getChildren() method in GraphDiff instead of GraphTraits. This simplifies the code and allows for refactorigns inside GraphDiff. All usecase need not have a light-weight/copyable range. Clean GraphTraits implementation. Reviewers: dblaikie Subscribers: hiraditya, llvm-commits, george.burgess.iv Tags: #llvm Differential Revision: https://reviews.llvm.org/D84562
-
Matt Arsenault authored
-
Matt Arsenault authored
These aren't implemented and we're still relying on the AtomicExpand pass, but mark these as lower to eliminate a few of the few remaining no rules defined cases.
-
Matt Arsenault authored
-
Jonas Devlieghere authored
The CMAKE_BUILD_TYPE is only meaningful to single-configuration generators (such as make and Ninja). For multi-configuration generators like Xcode and MSVC this variable won't be set, resulting in a CMake error.
-
Matt Arsenault authored
The DAG behavior allows matchching input patterns with a single result to the first result of an output instruction that defines multiple results. The remaining defs are implicitly dead. This starts to fix using manual selection for AMDGPU add/sub (although it's still needed, mostly because it's also still needed for G_PTR_ADD).
-
Francesco Petrogalli authored
Reviewers: c-rhodes, efriedma, sdesmalen Subscribers: huihuiz, tschuett, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77251
-
peter klausler authored
A comma is not required between a scale factor and a following data edit descriptor (C1302). Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D84369
-
- Jul 27, 2020
-
-
Arthur Eubanks authored
Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D84704
-
Fred Riss authored
-
Sridhar Gopinath authored
The move constructor of MachineModuleInfo currently does not copy the MachineFunctions map. This commit fixes this issue. Patch by Sridhar Gopinath. Thanks! Differential Revision: https://reviews.llvm.org/D84274
-
Jinsong Ji authored
This reverts commit adffce71. This is breaking test-suite, revert while investigation.
-
Guillaume Chatelet authored
-
Sergej Jaskiewicz authored
The commit 8372d505 has been reverted (eafeb8af) because it broke asan tests on green dragon buildbots. The underlying issue has been fixed in 4dd5c2be.
-
Arthur Eubanks authored
For readability and consistency with other thumb2 passes like "thumb2-it". Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D84696
-