- Oct 15, 2020
-
-
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
-
Jacques Pienaar authored
Migrates a bit more from the old/to be deprecated form.
-
Christopher Di Bella authored
clang --target arm-none-eabi --print-libgcc-file-name --rtlib=compiler-rt used to print `/path/to/lib/clang/version/lib/libclang_rt.builtins-arm.a` but should print `/path/to/lib/clang/version/lib/baremetal/libclang_rt.builtins-arm.a`. Similarly, --target armv7m-none-eabi should print libclang_rt.builtins-armv7m.a This matches the compiler-rt file name used at link time in the baremetal driver. Reviewed By: manojgupta Differential Revision: https://reviews.llvm.org/D89327
-
Craig Topper authored
[X86] Add test case to demonstrate a Log2_32_Ceil that can just be Log2_32 in SimplifySetCC ctpop combine. This combine can look through (trunc (ctpop X)). When doing this it tries to make sure the trunc doesn't lose any information from the ctpop. It does this by checking that the truncated type has more bits that Log2_32_Ceil of the ctpop type. The Ceil is unnecessary and pessimizes non-power of 2 types. For example, ctpop of i256 requires 9 bits to represent the max value of 256. But ctpop of i255 only requires 8 bits to represent the max result of 255. Log2_32_Ceil of 256 and 255 both return 8 while Log2_32 returns 8 for 256 and 7 for 255.
-
Simon Pilgrim authored
Revert rG25a97c3a - "[InstCombine] visitCallInst - retain undefs in vector funnel shift amounts" This reverts commit 25a97c3a. We have other constant folds that fold undef funnel shift amounts to 0 - so we need to be consistent. If we end up with regressions where we lose a splat shift amount pattern we'll have to investigate other canonicalizations, but matchFunnelShift currently protects us from that.
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D89076
-
Matt Arsenault authored
Preserve the alignment and metadata. Atomic loads are skipped for this, but pass along the properties for consistency.
-
Matt Arsenault authored
This was broken by 16295d52, when instructions started being handled and not just constant expressions. This was re-inserting an equivalent bitcast to the original memcpy operand, which made a non-functional IR change on every iteration. This also fixes a secondary problem where it was inserting addrspacecasts which may not have been legal (i.e. it changed the source address space). Start visiting all pointer users and fail out if we can't process them. Also start handling the relevant memory intrinsic users. These cases can be dealt with by running InferAddressSpaces separately.
-
Louis Dionne authored
This was dropped when I split the tests into individual source files to make sure they would actually run (in 2908eb20).
-
Florian Hahn authored
This reverts the revert commit 710aceb6 and includes a fix for a memsan failure. Original message: This patch turns VPMemoryInstructionRecipe into a VPValue and uses it during VPlan construction and codegeneration instead of the plain IR reference where possible.
-
Simon Pilgrim authored
-
Mark Schimmel authored
Polly incorrectly dropped the address space specified for a load instruction when it vectorized the code. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D88907
-
Kadir Cetinkaya authored
-
Irina Dobrescu authored
Differential Revision: https://reviews.llvm.org/D87684
-
Louis Dionne authored
-
Louis Dionne authored
Also, some tests had multiple death tests in them, so split them into separate tests instead. The second death test would obviously never get run, because the first one would kill the program before.
-
- Oct 14, 2020
-
-
jasonliu authored
Summary: This patch does the following: 1. Make InitTargetOptionsFromCodeGenFlags() accepts Triple as a parameter, because some options' default value is triple dependant. 2. DataSections is turned on by default on AIX for llc. 3. Test cases change accordingly because of the default behaviour change. 4. Clang Driver passes in -fdata-sections by default on AIX. Reviewed By: MaskRay, DiggerLin Differential Revision: https://reviews.llvm.org/D88737
-
Simon Pilgrim authored
Match the canonicalization code that was added to matchFunnelShift at rG02295e6d
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D89328
-
Konstantin Zhuravlyov authored
-
Michael Liao authored
-
Kevin Petit authored
The buffers are used as source or destination of transfer commands so always add VK_BUFFER_USAGE_TRANSFER_{DST,SRC}_BIT to their usage flags. Signed-off-by:Kevin Petit <kevin.petit@arm.com>
-
Guillaume Chatelet authored
-
Simon Pilgrim authored
m_SpecificInt doesn't accept undef elements in a vector splat value - tweak specific_intval to optionally allow undefs and add the m_SpecificIntAllowUndef variants. Allows us to remove the m_APIntAllowUndef + comparison hack inside matchFunnelShift
-