- Apr 04, 2020
-
-
Eli Friedman authored
(See also D76269.)
-
Eric Christopher authored
NFC.
-
Walter Erquinigo authored
Summary: @labath mentioned to me that test files shouldn't have a license header. I saw this one some days ago, so I'm doing some cleaning. Reviewers: labath, clayborg Subscribers: lldb-commits, labath Tags: #lldb Differential Revision: https://reviews.llvm.org/D77328
-
Jim Ingham authored
Also turn on the command trace unconditionally for TestThreadPlanCommands.py as the tests for the Ubuntu bot don't seem to run with -t making it hard to see why this is failing remotely.
-
LLVM GN Syncbot authored
-
Craig Topper authored
This reverts commit c74dd640. Reverting to address coding standard issues raised in post-commit review.
-
Craig Topper authored
This reverts commit 62c42e29 Reverting to address coding standard issues raised in post-commit review.
-
Reid Kleckner authored
An enum may be considered to be a complete type if it was forward declared. It may be declared with a fixed underlying type, or, in MSVC compatiblity mode, with no type at all. Previously, the code was written with special handling for fixed enums. I generalized the code to check if the underlying integer type is known, which should be the case when targetting the MSVC C++ ABI. Fixes PR45409
-
Joerg Sonnenberger authored
Always depend on the compiler to have a correct implementation of max_align_t in stddef.h and don't provide a fallback. For pre-C++11, require __STDCPP_NEW_ALIGNMENT__ in <new> as provided by clang in all standard modes. Adjust test cases to avoid testing or using max_align_t in pre-C++11 mode and also to better deal with alignof(max_align_t)>16. Document requirements of the alignment tests around natural alignment of power-of-two-sized types. Differential revision: https://reviews.llvm.org/D73245
-
Volodymyr Sapsai authored
When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a type argument. As a result, in the added test case it was causing errors like > type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T' We are already checking that type parameters should be consistent everywhere (see `checkTypeParamListConsistency`) and update `ObjCTypeParamDecl` to have correct underlying type. And when we use the type parameter as a method return type or a method parameter type, it is substituted to the bounded type. But when we use the type parameter as a type argument, we check `ObjCTypeParamType` that wasn't updated and remains `id`. Fix by updating not only `ObjCTypeParamDecl` UnderlyingType but also TypeForDecl as we use the underlying type to create a canonical type for `ObjCTypeParamType` (see `ASTContext::getObjCTypeParamType`). This is a different approach to fixing the issue. The previous one was 02c2ab3d which was reverted in 4c539e8d. The problem with the previous approach was that `ObjCTypeParamType::desugar` was returning underlying type for `ObjCTypeParamDecl` without applying any protocols stored in `ObjCTypeParamType`. It caused inconsistencies in comparing types before and after desugaring. rdar://problem/54329242 Reviewed By: erik.pilkington Differential Revision: https://reviews.llvm.org/D72872 -
Francis Visoiu Mistrih authored
clang with -flto does not handle -foptimization-record-path=<path> This dulicates the code from ToolChains/Clang.cpp with modifications to support everything in the same fashion.
-
Paula Toth authored
Summary: Switched to using the new memcpy implementation. Reviewers: sivachandra, abrachet, gchatelet Reviewed By: abrachet, gchatelet Subscribers: mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D77277
-
Jan Kratochvil authored
Apparently the intention was to copy the condition above: if (types.GetSize() >= max_matches) break; So that if the iteration stopped because of too many matches we do not add even more matches in this 'Clang modules' block downward. It was implemented by: SymbolFileDWARF: Unconditionally scan through clang modules. NFCish fe9eaadd Differential Revision: https://reviews.llvm.org/D77336 -
Paula Toth authored
Summary: This should fix the call to a non internal libc function. Reviewers: sivachandra, abrachet Reviewed By: sivachandra Subscribers: xbolva00, mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D77279
-
Jim Ingham authored
that were not reported by the OS plugin. To facilitate this, move adding/updating the ThreadPlans for a Thread to the ThreadPlanStackMap. Also move dumping thread plans there as well. Added some tests for "thread plan list" and "thread plan discard" since I didn't seem to have written any originally. Differential Revision: https://reviews.llvm.org/D76814
-
Jim Ingham authored
Differential Revision: https://reviews.llvm.org/D75880
-
Jim Ingham authored
Differential Revision: https://reviews.llvm.org/D75720
-
Jim Ingham authored
Differential Revision: https://reviews.llvm.org/D75711
-
Louis Dionne authored
-
Alex Zinenko authored
Summary: A recent extension allowed the `loop.if` operation to return results yielded by its regions. However, such operations could not be lowered to a CFG of standard operations because it would have required to modify the argument list of a block, which is not allowed in a conversion pattern. Now that the conversion infrastructure supports block creation, use it to create a block with an argument list that dominates the operations following the `loop.if` and forward the results as arguments of this block. Depends On D77416 Differential Revision: https://reviews.llvm.org/D77418
-
Sanjay Patel authored
-
Nico Weber authored
When clang is built against a prebuilt LLVM, LLVM_SOURCE_DIR is empty, which due to a cmake quirk caused list lengths to get out of sync. Add a workaround.
-
Nick Desaulniers authored
Summary: Prior to landing D76961, preprocess via: $ llvm/utils/update_llc_test_checks.py \ llvm/test/CodeGen/X86/callbr-asm-outputs.ll Reviewers: void, MaskRay Reviewed By: void, MaskRay Subscribers: MaskRay, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D77356 -
Scott Constable authored
After finding all such gadgets in a given function, the pass minimally inserts LFENCE instructions in such a manner that the following property is satisfied: for all SOURCE+SINK pairs, all paths in the CFG from SOURCE to SINK contain at least one LFENCE instruction. The algorithm that implements this minimal insertion is influenced by an academic paper that minimally inserts memory fences for high-performance concurrent programs: http://www.cs.ucr.edu/~lesani/companion/oopsla15/OOPSLA15.pdf The algorithm implemented in this pass is as follows: 1. Build a condensed CFG (i.e., a GadgetGraph) consisting only of the following components: -SOURCE instructions (also includes function arguments) -SINK instructions -Basic block entry points -Basic block terminators -LFENCE instructions 2. Analyze the GadgetGraph to determine which SOURCE+SINK pairs (i.e., gadgets) are already mitigated by existing LFENCEs. If all gadgets have been mitigated, go to step 6. 3. Use a heuristic or plugin to approximate minimal LFENCE insertion. 4. Insert one LFENCE along each CFG edge that was cut in step 3. 5. Go to step 2. 6. If any LFENCEs were inserted, return true from runOnFunction() to tell LLVM that the function was modified. By default, the heuristic used in Step 3 is a greedy heuristic that avoids inserting LFENCEs into loops unless absolutely necessary. There is also a CLI option to load a plugin that can provide even better optimization, inserting fewer fences, while still mitigating all of the LVI gadgets. The plugin can be found here: https://github.com/intel/lvi-llvm-optimization-plugin, and a description of the pass's behavior with the plugin can be found here: https://software.intel.com/security-software-guidance/insights/optimized-mitigation-approach-load-value-injection. Differential Revision: https://reviews.llvm.org/D75937
-
Reid Kleckner authored
See rational here: https://reviews.llvm.org/D76173#1922916 Time to compile Attr.h in isolation goes from 2.6s to 1.8s. Original patch by Johannes, plus some additions from Reid to fix some clang tooling targets. Effect on transitive includes is marginal, though: $ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sort -nr 104 - /usr/local/google/home/rnk/llvm-project/clang/include/clang/AST/OpenMPClause.h 87 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Frontend/OpenMP/OMPContext.h 19 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/ADT/SmallSet.h 19 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/ADT/SetVector.h 14 - /usr/include/c++/9/set ... Differential Revision: https://reviews.llvm.org/D76184
-
Nicolas Vasilache authored
Summary: Linalg makes it possible to interface codegen with externally precompiled HPC libraries. The mechanism to allow such interop uses a normalized ABI and the emission of C interface wrappers. The mechanism controlling these C interface emission is too aggressive and makes it very easy to obtained undefined symbols for external function (e.g. the ones coming from libm). This revision uses the newly introduced llvm.emit_c_interface function attribute which allows controlling this behavior at a function granularity. As a consequence LinalgToLLVM does not need to activate the C wrapper emission when adding the StdToLLVM patterns. Differential Revision: https://reviews.llvm.org/D77364
-
LLVM GN Syncbot authored
-
Julian Lettner authored
Graceful lit shutdown on user keyboard interrupt [Ctrl+C] was a longstanding goal of mine. After a few refactorings this revision finally enables it. We use the following strategy to deal with KeyboardInterrupt: https://noswap.com/blog/python-multiprocessing-keyboardinterrupt Printing of a helpful summary for interrupted runs (just as the one for completed runs) will be tackled in future revisions. Reviewed By: serge-sans-paille, rnk Differential Revision: https://reviews.llvm.org/D77365
-
Scott Constable authored
Adds a new data structure, ImmutableGraph, and uses RDF to find LVI gadgets and add them to a MachineGadgetGraph. More specifically, a new X86 machine pass finds Load Value Injection (LVI) gadgets consisting of a load from memory (i.e., SOURCE), and any operation that may transmit the value loaded from memory over a covert channel, or use the value loaded from memory to determine a branch/call target (i.e., SINK). Also adds a new target feature to X86: +lvi-load-hardening The feature can be added via the clang CLI using -mlvi-hardening. Differential Revision: https://reviews.llvm.org/D75936
-
Jan Kratochvil authored
It is an obvious part of D77326. It removes some needless deep indentation and some redundant statements. It prepares the code for a more clean next patch - DWARF index callbacks in D77327.
-
LLVM GN Syncbot authored
-
Kevin P. Neal authored
Revert "[PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins" The new test case causes bot failures. This reverts commit ba87430c.
-
Andrew Ng authored
See discussion on https://reviews.llvm.org/D77184.
-
Paul Robinson authored
-
Lang Hames authored
-
Kevin P. Neal authored
Differential Revision: https://reviews.llvm.org/D76949
-
Alina Sbirlea authored
Summary: This patch includes two extensions: 1. It extends the GraphDiff to also keep the original list of updates after legalization, not just the deletes/insert vectors. It also provides an API to pop the first update (the updates are store in reverse, such that the first update is at the end of the list) 2. It adds a bool to mark whether the given updates should be applied as given, or applied in reverse. This moves the task of reversing the updates (when the caller needs this) to a functionality inside GraphDiff, versus having the caller do this. The two changes could be split into two patches, but they seemed reasonably small to be reviewed together. Reviewers: kuhar, dblaikie Subscribers: hiraditya, george.burgess.iv, mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77167
-
Scott Constable authored
Adding a pass that replaces every ret instruction with the sequence: pop <scratch-reg> lfence jmp *<scratch-reg> where <scratch-reg> is some available scratch register, according to the calling convention of the function being mitigated. Differential Revision: https://reviews.llvm.org/D75935
-
Andrew Wock authored
[PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins This patch adds a test for the PowerPC fma compiler builtins, some variations of which negate inputs and outputs. The code to generate IR for these builtins was untested before this patch. Originally, the code used the outdated method of subtracting floating point values from -0.0 as floating point negation. This patch remedies that. Patch by: Drew Wock <drew.wock@sas.com> Differential Revision: https://reviews.llvm.org/D76949
-
Riyaz V Puthiyapurayil authored
Summary: This patch fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38025 | PR38025 ]]: Wrong ABI used when building compiler-rt Differential Revision: https://reviews.llvm.org/D74133
-