- Oct 15, 2020
-
-
Duncan P. N. Exon Smith authored
Update `clang/lib/CodeGen` to use a `MemoryBufferRef` from `getBufferOrNone` instead of `MemoryBuffer*` from `getBuffer`. No functionality change here. Differential Revision: https://reviews.llvm.org/D89411
-
Duncan P. N. Exon Smith authored
Update clang/lib/Frontend to use a `MemoryBufferRef` from `getBufferOrFake` instead of `MemoryBuffer*` from `getBuffer`, with the exception of `FrontendInputFile`, which I'm leaving for later. Differential Revision: https://reviews.llvm.org/D89409
-
Jonas Devlieghere authored
dsymutil was incorrectly ignoring aliases to private extern symbols in the MachODebugMapParser. This resulted in spurious warnings about not being able to find symbols. rdar://49652389 Differential revision: https://reviews.llvm.org/D89444
-
Duncan P. N. Exon Smith authored
Update clang/lib/Basic to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` or `getBufferOrFake` instead of `getBuffer`. Differential Revision: https://reviews.llvm.org/D89394
-
Luqman Aden authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=46473 LLD wasn't previously specifying any specific alignment in the TLS table's Characteristics field so the loader would just assume the default value (16 bytes). This works most of the time except if you have thread locals that want specific higher alignments (e.g. 32 as in the bug) *even* if they specify an alignment on the thread local. This change updates LLD to take the max alignment from tls section. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D88637
-
Luqman Aden authored
-
Luqman Aden authored
-
Luqman Aden authored
-
Luqman Aden authored
-
Luqman Aden authored
Differential Revision: https://reviews.llvm.org/D88637
-
Tony authored
-
Petr Hosek authored
This reverts commit 287c3186 which broke sanitizer tests that use C++ standard library.
-
Petr Hosek authored
While sanitizers don't use C++ standard library, we could still end up accidentally including or linking it just by the virtue of using the C++ compiler. Pass -nostdinc++ and -nostdlib++ to avoid these accidental dependencies. Differential Revision: https://reviews.llvm.org/D88922
-
Richard Smith authored
callee in constant evaluation. We previously made a deep copy of function parameters of class type when passing them, resulting in the destructor for the parameter applying to the original argument value, ignoring any modifications made in the function body. This also meant that the 'this' pointer of the function parameter could be observed changing between the caller and the callee. This change completely reimplements how we model function parameters during constant evaluation. We now model them roughly as if they were variables living in the caller, albeit with an artificially reduced scope that covers only the duration of the function call, instead of modeling them as temporaries in the caller that we partially "reparent" into the callee at the point of the call. This brings some minor diagnostic improvements, as well as significantly reduced stack usage during constant evaluation.
-
Kazushi (Jam) Marukawa authored
Add vector registers and vector load/store instructions. Add regression tests for vector load/store instructions too. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89183
-
Dave Lee authored
This broke the GreenDragon build, due to the following error while running TestImportBuiltinFileID: ``` Ignored/unknown shouldn't get here UNREACHABLE executed at tools/clang/include/clang/Sema/AttrSpellingListIndex.inc:13! ``` See http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/24213/ This reverts commit 73c6beb2. This reverts https://reviews.llvm.org/D89318
-
Kazushi (Jam) Marukawa authored
VE doesn't have SHL_PARTS/SRA_PARTS/SRL_PARTS instructions, so need to expand them. Add regression tests too. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89396
-
Amara Emerson authored
These cause problems for later optimizations, just using an unused vreg like SelectionDAG generates better code in the end, and obviates the need for some GISel specific flag optimizations. Differential Revision: https://reviews.llvm.org/D89419
-
Reid Kleckner authored
AlignedCharArrayUnion is really only needed to handle the "union" case when we need memory of suitable size and alignment for multiple types. SmallVector only needs storage for one type, so use that directly.
-
Leonard Chan authored
-
Ben Hamilton authored
The argument passed to the preprocessor macros `NS_SWIFT_NAME(x)` and `CF_SWIFT_NAME(x)` is stringified before passing to `__attribute__((swift_name("x")))`. ClangFormat didn't know about this stringification, so its custom parser tried to parse the argument(s) passed to the macro as if they were normal function arguments. That means ClangFormat currently incorrectly inserts whitespace between `NS_SWIFT_NAME` arguments with colons and dots, so: ``` extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter:MyHelper.mainWindow()); ``` becomes: ``` extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter : MyHelper.mainWindow()); ``` which clang treats as a parser error: ``` error: 'swift_name' attribute has invalid identifier for context name [-Werror,-Wswift-name-attribute] ``` Thankfully, D82620 recently added the ability to treat specific macros as "whitespace sensitive", meaning their arguments are implicitly treated as strings (so whitespace is not added anywhere inside). This diff adds `NS_SWIFT_NAME` and `CF_SWIFT_NAME` to `WhitespaceSensitiveMacros` so their arguments are implicitly treated as whitespace-sensitive. Test Plan: New tests added. Ran tests with: % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D89425 -
Adrian Prantl authored
-
MaheshRavishankar authored
The current fusion on tensors fuses reshape ops with generic ops by linearizing the indexing maps of the fused tensor in the generic op. This has some limitations - It only works for static shapes - The resulting indexing map has a linearization that would be potentially prevent fusion later on (for ex. tile + fuse). Instead, try to fuse the reshape consumer (producer) with generic op producer (consumer) by expanding the dimensionality of the generic op when the reshape is expanding (folding). This approach conflicts with the linearization approach. The expansion method is used instead of the linearization method. Further refactoring that changes the fusion on tensors to be a collection of patterns. Differential Revision: https://reviews.llvm.org/D89002
-
Benjamin Kramer authored
-
Duncan P. N. Exon Smith authored
Remove `ContentCache::getBuffer`, which always returned a dereferenceable `MemoryBuffer*` and had a `bool*Invalid` out parameter, and replace it with: - `ContentCache::getBufferOrNone`, which returns `Optional<MemoryBufferRef>`. This is the new API that consumers should use. Later it could be renamed to `getBuffer`, but intentionally using a different name to root out any unexpected callers. - `ContentCache::getBufferPointer`, which returns `MemoryBuffer*` with "optional" semantics. This is `private` to avoid growing callers and `SourceManager` has temporarily been made a `friend` to access it. Later paches will update the transitive callers to not need a raw pointer, and eventually this will be deleted. No functionality change intended here. Differential Revision: https://reviews.llvm.org/D89348
-
Snehasish Kumar authored
Based on internal testing at Google we found that setting the profile summary cutoff threshold to 999950 yields the best results in terms of itlb and icache metrics (as observed on Intel CPUs). *default* = Split out code if no profile count available for block *size-%* = The fraction of bytes split out of .text and .text.hot *itlb* = Misses per kilo instructions (MPKI) for itlb *icache* = Misses per kilo instructions (MPKI) for L1 icache Search1 | cutoff | size-% | itlb | icache | |---------|---------|-----------|---------| | default | 42.5861 | 0.0822151 | 2.46363 | | 999999 | 44.9350 | 0.0767194 | 2.44416 | | 999950 | 50.0660 | 0.075744 | 2.4091 | | 999500 | 56.9158 | 0.082564 | 2.4188 | | 995000 | 63.8625 | 0.0814927 | 2.42832 | | 990000 | 71.7314 | 0.106906 | 2.57785 | Search2 | cutoff | size-% | itlb | icache | |---------|--------|----------|---------| | default | 2.8845 | 0.626712 | 4.73245 | | 999999 | 3.3291 | 0.602309 | 4.70045 | | 999950 | 3.8577 | 0.587842 | 4.71632 | | 999500 | 4.4170 | 0.63577 | 4.68351 | | 995000 | 5.1020 | 0.657969 | 4.82272 | | 990000 | 5.7153 | 0.719122 | 5.39496 | Differential Revision: https://reviews.llvm.org/D89085
-
Sean Silva authored
That change was a pure move, so split out the stylistic changes into this patch. Differential Revision: https://reviews.llvm.org/D89272
-
Sean Silva authored
Part of the refactor discussed in: https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17 Differential Revision: https://reviews.llvm.org/D89271
-
Sean Silva authored
Now BufferPlacement.cpp doesn't depend on Bufferize.h. Part of the refactor discussed in: https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17 Differential Revision: https://reviews.llvm.org/D89268
-
Sean Silva authored
Once we have tensor_to_memref ops suitable for type materializations, this pass can be split into a generic type conversion pattern. Part of the refactor discussed in: https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17 Differential Revision: https://reviews.llvm.org/D89258
-
Sean Silva authored
Part of the refactor discussed in: https://llvm.discourse.group/t/what-is-the-strategy-for-tensor-memref-conversion-bufferization/1938/17 Differential Revision: https://reviews.llvm.org/D89261
-
Leonard Chan authored
This implements the flag proposed in RFC http://lists.llvm.org/pipermail/cfe-dev/2020-August/066437.html. The goal is to add a way to override the default target C++ ABI through a compiler flag. This makes it easier to test and transition between different C++ ABIs through compile flags rather than build flags. In this patch: - Store `-fc++-abi=` in a LangOpt. This isn't stored in a CodeGenOpt because there are instances outside of codegen where Clang needs to know what the ABI is (particularly through ASTContext::createCXXABI), and we should be able to override the target default if the flag is provided at that point. - Expose the existing ABIs in TargetCXXABI as values that can be passed through this flag. - Create a .def file for these ABIs to make it easier to check flag values. - Add an error for diagnosing bad ABI flag values. Differential Revision: https://reviews.llvm.org/D85802
-
Snehasish Kumar authored
After using this for a while, we find that it is generally useful to have it set to .text.split. by default, removing the need for an additional -mllvm option. Differential Revision: https://reviews.llvm.org/D88997
-
Guozhi Wei authored
Currently we add individual BB to BlockFilterSet if its frequency satisfies LoopFreq / Freq <= LoopToColdBlockRatio LoopFreq is edge frequency from outside to loop header. LoopToColdBlockRatio is a command line parameter. It doesn't make sense since we always layout whole chain, not individual BBs. It may also cause a tricky problem. Sometimes it is possible that the LoopFreq of an inner loop is smaller than LoopFreq of outer loop. So a BB can be in BlockFilterSet of inner loop, but not in BlockFilterSet of outer loop, like .cold in the test case. So it is added to the chain of inner loop. When work on the outer loop, .cold is not added to BlockFilterSet, so the edge to successor .problem is not counted in UnscheduledPredecessors of .problem chain. But other blocks in the inner loop are added BlockFilterSet, so the whole inner loop chain can be layout, and markChainSuccessors is called to decrease UnscheduledPredecessors of following chains. markChainSuccessors calls markBlockSuccessors for every BB, even it is not in BlockFilterSet, like .cold, so .problem chain's UnscheduledPredecessors is decreased, but this edge was not counted on in fillWorkLists, so .problem chain's UnscheduledPredecessors becomes 0 when it still has an unscheduled predecessor .pred! And it causes problems in following various successor BB selection algorithms. Differential Revision: https://reviews.llvm.org/D89088
-
Pavel Labath authored
XFAIL nodefaultlib.cpp on darwin - the test does not pass there XFAIL TestGdbRemoteMemoryAllocation on windows - memory is allocated with incorrect permissions
-
Andrzej Warzynski authored
Recent patch that improved Flang's compatibility with respect to how LLVM dynamic libraries should be linked (and specified in CMake recipes), introduced a bug in the definition of `flang-new`: * https://reviews.llvm.org/D87893 More specifically, `add_flang_tool` does not support the `LINK_COMPONENTS` CMake argument. Instead, one should set `LLVM_LINK_COMPONENTS` before calling `add_flang_tool`. This patch reverts the change for `flang-new` from https://reviews.llvm.org/D87893, and instead: * sets `LLVM_LINK_COMPONENTS` * calls `clang_target_link_libraries` to add Clang dependencies Differential Revision: https://reviews.llvm.org/D89403
-
Justin Lebar authored
NVPTXLowerArgs works as follows. * Create a regular alloca with alignment identical to arg. * Copy arg from param space (and ASC'ing it from generic AS first) to the alloca (it's still in generic AS). * Replace loads of arg with loads of alloca. The bug here is that we did not preserve the arg's alignment when loading from the alloca. The impact of this bug is that sometimes param loads would be lowered as a series of u8 loads, because we're incorrectly assuming everything has alignment 1. Differential Revision: https://reviews.llvm.org/D89404 -
rdzhabarov authored
This CL allows user to specify the same name for the operands in the source pattern which implicitly enforces equality on operands with the same name. E.g., Pat<(OpA $a, $b, $a) ... > would create a matching rule for checking equality for the first and the last operands. Equality of the operands is enforced at any depth, e.g., OpA ($a, $b, OpB($a, $c, OpC ($a))). Example usage: Pat<(Reshape $arg0, (Shape $arg0)), (replaceWithValue $arg0)> Note, this feature only covers operands but not attributes. Current use cases are based on the operand equality and explicitly add the constraint into the pattern. Attribute equality will be worked out on the different CL. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D89254
-
Michał Górny authored
Add a framework for reading/writing extended register sets via PT_GETXSTATE/PT_GETXSTATE_INFO/PT_SETXSTATE, and use it to support YMM0..YMM15. The code is prepared to handle arbitrary XSAVE extensions, including correct offset handling. This fixes Shell/Register/*ymm* tests. Differential Revision: https://reviews.llvm.org/D89193
-
Krzysztof Parzyszek authored
-