- Oct 21, 2020
-
-
Fangrui Song authored
-
Cyndy Ishida authored
It appears for Swift there was confusing errors when trying to parse APINotes, when libAPINotes and libInterfaceStub are linked, they both export symbol `__ZN4llvm4yaml7yamlizeINS_12VersionTupleEEENSt3__19enable_ifIXsr16has_ScalarTraitsIT_EE5valueEvE4typeERNS0_2IOERS5_bRNS0_12EmptyContextE`, and discovered same symbol defined within llvm-ifs. This consolidates the boilerplate into YAMLTraits and defers the specific validation in reading the whole input. fixes: rdar://problem/70450563 Reviewed By: phosek, dblaikie Differential Revision: https://reviews.llvm.org/D89764
-
Duncan P. N. Exon Smith authored
As suggested in the review for https://reviews.llvm.org/D89430, simplify the logic for marking the buffer as invalid in the early return paths. Differential Revision: https://reviews.llvm.org/D89722
-
Jonas Devlieghere authored
The framework build will run dsymutil after LLDB.framework is installed.
-
Peter Steinfeld authored
When processing declarations in resolve-names.cpp, we were returning a symbol that had SubprogramName details to PushSubprogramScope(), which expects a symbol with Subprogram details. I adjusted the code and added a test. Differential Revision: https://reviews.llvm.org/D89829
-
Duncan P. N. Exon Smith authored
This changes `ContentCache::Buffer` to use `std::unique_ptr<MemoryBuffer>` instead of the `PointerIntPair`. It drops the (mostly unused) `DoNotFree` bit, instead creating a (new) non-owning `MemoryBuffer` instance when passed a `MemoryBufferRef`. Differential Revision: https://reviews.llvm.org/D67030
-
Hubert Tong authored
Comparing 32-bit `ptrdiff_t` against 32-bit `unsigned` results in `-Wsign-compare` warnings for both GCC and Clang. The warning for the cases in question appear to identify an issue where the `ptrdiff_t` value would be mutated via conversion to an unsigned type. The warning is resolved by using the usual arithmetic conversions to safely preserve the value of the `unsigned` operand while trying to convert to a signed type. Host platforms where `unsigned` has the same width as `unsigned long long` will need to make a different change, but using an explicit cast has disadvantages that can be avoided for now. Reviewed By: dantrushin Differential Revision: https://reviews.llvm.org/D89612
-
Richard Smith authored
when instantiating the enclosing class. We'll build new lambda closure types if and when we instantiate the default member initializer, and instantiating the closure type by itself can go wrong in cases where we fully-instantiate nested classes (in explicit instantiations of the enclosing class and when the enclosing class is a local class) -- we will instantiate the 'operator()' as a regular function rather than as a lambda call operator, so it doesn't get to use its captures, has the wrong 'this' type, etc.
-
Austin Kerbow authored
Passes that are run after the post-RA scheduler may insert instructions like waitcnt which eliminate the need for certain noops. After this patch the scheduler is still aware of possible latency from hazards but noops will not be inserted until the dedicated hazard recognizer pass is run. Depends on D89753. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D89754
-
Austin Kerbow authored
If a target can encode multiple wait-states into a noop allow emitting such instructions directly. Reviewed By: rampitec, dmgreen Differential Revision: https://reviews.llvm.org/D89753
-
Richard Smith authored
Permitting non-standards-driven "do the best you can" constant-folding of array bounds is permitted solely as a GNU compatibility feature. We should not be doing it in any language mode that is attempting to be conforming. From https://reviews.llvm.org/D20090 it appears the intent here was to permit `__constant int` globals to be used in array bounds, but the change in that patch only added half of the functionality necessary to support that in the constant evaluator. This patch adds the other half of the functionality and turns off constant folding for array bounds in OpenCL. I couldn't find any spec justification for accepting the kinds of cases that D20090 accepts, so a reference to where in the OpenCL specification this is permitted would be useful. Note that this change also affects the code generation in one test: because after 'const int n = 0' we now treat 'n' as a constant expression with value 0, it's now a null pointer, so '(local int *)n' forms a null pointer rather than a zero pointer. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D89520
-
Sriraman Tallam authored
With -fbasicblock-sections=, let the front-end handle the case where the file doesnt exist. The driver only checks if the option syntax is right. Differential Revision: https://reviews.llvm.org/D89500
-
Duncan P. N. Exon Smith authored
Move a flag out of the `MemoryBuffer*` to unblock changing it to a `unique_ptr`. There are plenty of bits available in the bitfield below. Differential Revision: https://reviews.llvm.org/D89431
-
Michael Kruse authored
Recursively traversing the operand tree leads to an exponential blowup if instructions are used multiple times due to every path leading to an additional copy of the instructions after forwarding. This problem was marked as a TODO in the code and was reported as a bug in llvm.org/PR47340. Fix by caching already visited instructions and returning the cached version when already visited. Instead of calling forwardTree() twice, return a ForwardingAction structure that contains a lambda which will carry-out the forwarding when requested. The lambdas are executed in reverse-postorder to mimic the previous recursive calls unless there is a reuse. Fixes llvm.org/PR47340
-
Kostya Kortchinsky authored
Few changes wrt utilities: - split `Check` into a platform agnostic condition test and a platform specific termination, for which we introduce the function `die`. - add a platform agnostic `utilities.cpp` that gets the allocation alignment functions original in the platform specific file, as they are reusable by all platforms. Differential Revision: https://reviews.llvm.org/D89811
-
Tony authored
Change waitcnt insertion to check the memory operand tokens to see if flat memory operations access VMEM in the same way it does to check if accessing LDS. This avoids adding waitcnt for counters for address spaces that are not accessed. In addition, only generate the pessimistic waitcnt 0 if a flat memory operation appears to access both VMEM and LDS. This benefits flat memory operations that explicitly specify the address space as GLOBAL or LOCAL. Differential Revision: https://reviews.llvm.org/D89618
-
Craig Topper authored
Instead of handling before parsing, just fix it after parsing.
-
Craig Topper authored
[X86] Move 's{hr,ar,hl} , <op>' to 'shift <op>' optimization in the assembler into processInstruction. Instead of detecting the mnemonic and hacking the operands before parsing. Just fix it up after parsing.
-
Louis Dionne authored
-
Duncan P. N. Exon Smith authored
Inline `Source::getBufferPointer` into its only remaining caller, `getBufferOrNone`. No functionality change. Differential Revision: https://reviews.llvm.org/D89430
-
Kazu Hirata authored
This patch teaches BasicBlock::print to construct an instance of SlotTracker with the containing function. Without this patch, we dump: *** IR Dump After LoopInstSimplifyPass *** ; Preheader: br label %1 ; Loop: <badref>: ; preds = %1, %0 br label %1 Note "<badref>" above. This happens because BasicBlock::print calls: SlotTracker SlotTable(this->getModule()); Note that this constructor does not add the contents of functions to the slot table. That is, basic blocks are left unnumbered. This patch fixes the problem by switching to: SlotTracker SlotTable(this->getParent()); which does add the contents of the Module and the function, this->getParent(), to the slot table. Differential Revision: https://reviews.llvm.org/D89567
-
- Oct 20, 2020
-
-
Federico Lebrón authored
Differential Revision: https://reviews.llvm.org/D89825
-
Christopher Tetreault authored
getVectorPtrTy is private to VectorBlockGenerator, and all uses query the address space from the passed-in pointer prior to calling it. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D89745
-
David Goldman authored
Nullability annotations are implmented using attributes; previusly clangd would skip over AttributedTypeLoc since their location points to the attribute instead of the modified type. Also add some test cases for this. Differential Revision: https://reviews.llvm.org/D89579
-
Vitaly Buka authored
-
Evgenii Stepanov authored
2Gb is unreasonably low on devices with 12Gb RAM and more. Differential Revision: https://reviews.llvm.org/D89750
-
Duncan P. N. Exon Smith authored
Replace `SourceManager::getMemoryBufferForFile`, which returned a dereferenceable `MemoryBuffer*` and had a `bool*Invalid` out parameter, with `getMemoryBufferForFileOrNone` (returning `Optional<MemoryBufferRef>`) and `getMemoryBufferForFileOrFake` (returning `MemoryBufferRef`). Differential Revision: https://reviews.llvm.org/D89429
-
Louis Dionne authored
For a modest loss of debugability in the tests, this allows more tests to run on platforms that do not have support for <iostream>.
-
Jonas Devlieghere authored
rdar://70274446 Differential revision: https://reviews.llvm.org/D89763
-
Peter Collingbourne authored
In D86000 we added a new sanitizer to the integer group without adding it to the trapping group. This broke usage of -fsanitize=integer -fsanitize-trap=integer or -fsanitize=integer -fsanitize-minimal-runtime. I think we can reasonably expect any new integer sanitizers to be compatible with trapping and the minimal runtime, so add them to the trapping group automatically. Also add a test to ensure that any future additions of sanitizers to the integer group will most likely result in test failures which would lead to updates to the minimal runtime if necessary. For this particular sanitizer no updates are required because it uses the existing shift_out_of_bounds callback function. Differential Revision: https://reviews.llvm.org/D89766
-
Paul C. Anagnostopoulos authored
Differential Revision: https://reviews.llvm.org/D89796
-
Louis Dionne authored
-
Louis Dionne authored
-
Shimin Cui authored
This is to simplify icmp instructions in the form like: %cmp = icmp eq i32 (i8*, i8*)* bitcast (i32 (i32**, i32**)* @f32 to i32 %(i8*, i8*)), bitcast (i32 (i64**, i64**) @f64 to i32 (i8*, i8*)*) Here @f32 and @f64 are two functions. Differential Revision: https://reviews.llvm.org/D87850
-
Jonas Devlieghere authored
In a discussion with Jim last week we came to the realization that often we get asked about things that might not be documented on the website, but that have been pretty well explained elsewhere. In those situations it's often easier to quickly answer the question than searching for that presentation you gave 3 years ago if you remember at all. This often results in us having to answer the same questions over and over again. We could add the questions and their answer to the website, but that means we (1) have to duplicate the work and (2) now have to maintain it. A more efficient solution is to add a page with external resources with the caveat that they might be outdated. That's exactly the purpose of this patch. I've added a few links that came to mind, but I don't want to be the arbiter of what should and should not be included. I'd hope that over time the community can crowd-source the best resources. Differential revision: https://reviews.llvm.org/D89215
-
Mircea Trofin authored
Using Register instead of unsigned. Also added isStack to mirror the other members, and eventually remove the static testers. Differential Revision: https://reviews.llvm.org/D89718
-
David Stenberg authored
When generating the use-list order, also consider value uses that are operands which are wrapped in metadata; e.g. llvm.dbg.value operands. This fixes PR36778. The test case is based on the reproducer from that report. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D53758
-
LLVM GN Syncbot authored
-
Nicolai Hähnle authored
Avoid having to instantiate and compile a subset of the dominator tree logic separately for each node type. More importantly, this allows generic algorithms to be built on top of dominator trees without writing them as templates -- such algorithms can now use opaque CfgBlockRef and CfgInterface instead. A type-erased implementation of dominator trees could be written in terms of CfgInterface as well, but doing so would change the current trade-off: it would slightly reduce code size at the cost of a slight runtime overhead. This patch does not change the trade-off, as it only does type-erasure where basic blocks can be treated in a fully opaque way, i.e. it only moves methods that don't require iteration over CFG successors and predecessors. v5: - rename generic_{begin,end,children} back without the generic_ prefix and refer explictly to base class methods in NewGVN, which wants to mutate the order of dominator tree node children directly v6: - style change: iDom -> idom; it's arguable whether this is really invalid, since it is actually standard camelCase, but clang-tidy complains about it so... *shrug* - rename {to,from}Generic -> {wrap,unwrap}Ref Change-Id: Ib860dc04cf8bb093d8ed00be7def40d662213672 Differential Revision: https://reviews.llvm.org/D83089
-
Duncan P. N. Exon Smith authored
I missed these two lldb users before deleting the `UnownedTag` API for `createFileID` in 51d1d585. This should fix the build.
-