- Mar 15, 2021
-
-
Simonas Kazlauskas authored
-
Jan Kratochvil authored
D98289 was erroneously reporting `invalid range list offset 0x20110` instead of `invalid range list table index 0`. Differential Revision: https://reviews.llvm.org/D98589
-
Ricky Taylor authored
This fixes some issues with bit masking when emitting instructions (including one TODO). Differential Revision: https://reviews.llvm.org/D98527
-
Ricky Taylor authored
This makes M68k match other platforms in this regard. This was done as part of the AsmParser/Disassembler work since the entry functions of those modules usually reference `getTheXXXTarget()`. Differential Revision: https://reviews.llvm.org/D98517
-
Ricky Taylor authored
read_raw_stdin() was opening a file in binary mode, but Popen was being told to use text mode (universal_newlines). This is benign on Python 2 but an error on Python 3. Differential Revision: https://reviews.llvm.org/D98428
-
Nico Weber authored
This reverts commit 5123327e. d627a27d was reverted in e0f70a8a.
-
Nikita Popov authored
Breaks the build ... somehow: https://llvm-compile-time-tracker.com/show_error.php?commit=77f7d2be214a1de29d583c75739f563593991fc3 FAILED: tools/clang/include/clang/Tooling/NodeIntrospection.inc cd /root/llvm-compile-time-tracker/llvm-project-build/tools/clang/lib/Tooling && /usr/bin/cmake -E make_directory /root/llvm-compile-time-tracker/llvm-project-build/tools/clang/lib/Tooling/generated/ && /root/llvm-compile-time-tracker/llvm-project/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py --json-input-path /root/llvm-compile-time-tracker/llvm-project-build/ASTNodeAPI.json --output-file generated/NodeIntrospection.inc --empty-implementation 0 && /usr/bin/cmake -E copy_if_different /root/llvm-compile-time-tracker/llvm-project-build/tools/clang/lib/Tooling/generated/NodeIntrospection.inc /root/llvm-compile-time-tracker/llvm-project-build/tools/clang/include/clang/Tooling/NodeIntrospection.inc /bin/sh: 1: /root/llvm-compile-time-tracker/llvm-project/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py: not found This reverts commit cefe7111. This reverts commit f72f122f. This reverts commit 970c21e3. This reverts commit 77f7d2be.
-
- Mar 14, 2021
-
-
Stephen Kelly authored
-
Nikita Popov authored
Shows a miscompile with FastISel.
-
Stephen Kelly authored
Wrap to 80 cols, introduce main() function and use argparse instead of optparse.
-
Stephen Kelly authored
-
David Green authored
-
Simonas Kazlauskas authored
This is an alternative to D98120. Herein, instead of deleting the transformation entirely, we check that the underlying objects are both the same and therefore this transformation wouldn't incur a provenance change, if applied. https://alive2.llvm.org/ce/z/SYF_yv Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D98588
-
Matt Arsenault authored
This saves a little bit of padding.
-
Nico Weber authored
This only merges the no-op generator part for now.
-
David Green authored
This test was apparently disabled in 6fcd4e08, without any sign of how it was going to be reenabled. This patch rewrites the test to use update_cc_test_checks, with midend optimizations other that mem2reg disabled. The first attempt of this patch in 5ae949a9 failed on bots even though it worked locally. I've attempted to adjust the RUN lines and made the test AArch64/ARM specific. Differential Revision: https://reviews.llvm.org/D98510
-
Stephen Kelly authored
Generate a json file containing descriptions of AST classes and their public accessors which return SourceLocation or SourceRange. Use the JSON file to generate a C++ API and implementation for accessing the source locations and method names for accessing them for a given AST node. This new API can be used to implement 'srcloc' output in clang-query: http://ce.steveire.com/z/m_kTIo In this first version of this feature, only the accessors for Stmt classes are generated, not Decls, TypeLocs etc. Those can be added after this change is reviewed, as this change is mostly about infrastructure of these code generators. Differential Revision: https://reviews.llvm.org/D93164
-
Luo, Yuanke authored
The load/store instruction will be transformed to amx intrinsics in the pass of AMX type lowering. Prohibiting the pointer cast make that pass happy. Differential Revision: https://reviews.llvm.org/D98247
-
Saleem Abdulrasool authored
Adjust the Win64 calling convention for Swift to pass self in R13, which is traditionally a CSR. This makes the behaviour similar to the SysV CC for Swift as well. This should improve the argument passing on Windows, although it comes at a high cost of ABI incompatibility. Fortunately in this case, there is no guarantee of ABI stability, and so we can make this incompatible change.
-
Siva Chandra Reddy authored
-
Philip Reames authored
Change was reverted in commit 8d20f2c2 because it was causing an infinite loop. 9228f2f3 fixed the root issue in the code structure, this change just reapplies the original change w/adaptation to the new code structure.
-
Philip Reames authored
This fixes the bug demonstrated by the test case in the commit message of 8d20f2c2 (which was a revert of cf82700a). The root issue was that we have two transforms which are inverses of each other. We use one for simple induction variables (where we can use the post-inc form), and the other for everything else. The problem was that the two transforms could disagree about whether something was an induction variable. The reverted commit made a change to one of the matcher routines which was used for one of the two transforms without updating the other matcher. However, it's worth noting the existing code w/o the reverted change also has cases where the decision could differ between the two paths. The fix is simply to consolidate the code such that two paths must agree by construction, and to add an assert to catch any potential future re-divergence. Triggering the infinite loop requires side stepping the SunkAddrs cache. The SunkAddrs cache has the effect of suppressing the iteration in the common case, but there are codepaths through CGP which restart iteration and clear this cache. Unfortunately, I have not been able to construct a standalone IR test case for this. The original test case is a c++ program which when compiled by clang demonstrates the infinite loop, but all of my attempts at extracting an IR test case runnable through opt/llc have failed to reproduce. (Including capturing the IR at point of the transform itself!) I have no idea what weird state clang is creating here. I also tried creating a test case by hand, but gave up after about an hour of trying to find the right combination to dance through multiple transforms to create the end result needed to trip the bug.
-
Arnamoy Bhattacharyya authored
[flang][OpenMP] Add support for getting parent context and clauses and modify the relevant sema checks to use the new functions. Differential Revision: https://reviews.llvm.org/D98580
-
Jez Ng authored
They were previously in SyntheticSections.h, but now there are a bunch of non-synthetic section names in the list. Also renamed `__functionStarts` to `__func_starts` for uniformity with other section names + keeps the name under 16 characters (in case we ever want to write it out as a real section). Reviewed By: #lld-macho, compnerd Differential Revision: https://reviews.llvm.org/D98586
-
Simonas Kazlauskas authored
Adds a test for D98588 and updates the test checks.
-
Nikita Popov authored
-
Martin Storsjö authored
Previously, that configuration only used the generic sources, in addition to the couple specifically chosen arm/mingw files. Differential Revision: https://reviews.llvm.org/D98547
-
Nikita Popov authored
This fixes a regression from the MemDep-based implementation: MemDep completely ignores lifetime.start intrinsics that aren't MustAlias -- this is probably unsound, but it does mean that the MemDep based implementation successfully eliminated memcpy's from lifetime.start if the memcpy happens at an offset, rather than the base address of the alloca. Add a special case for the case where the lifetime.start spans the whole alloca (which is pretty much the only kind of lifetime.start that frontends ever emit), as we don't need to figure out our exact aliasing relationship in that case, the whole alloca is dead prior to the call. If this doesn't cover all practically relevant cases, then it would be possible to make use of the recently added PartialAlias clobber offsets to make this more precise.
-
Nikita Popov authored
-
Craig Topper authored
A 1-bit smulo overflows is both inputs are -1 since the result should be +1 which can't be represented in a signed 1 bit value. We can detect this with an AND and a setcc. The multiply result can also use the same AND. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D97634
-
- Mar 13, 2021
-
-
Stefan Gränitz authored
-
kuterd authored
Remove the check that is causing compilation issues in some build configurations.
-
Sanjay Patel authored
The structure of this fold is suspect vs. most of instcombine because it creates instructions and tries to delete them immediately after. If we don't have the operand types for the icmps, then we are not behaving as assumed. And as shown in PR49475, we can inf-loop.
-
Roman Lebedev authored
This reverts commit 329aeb5d, and relands commit 61f006ac. This is a continuation of D89456. As it was suggested there, now that SCEV models `PtrToInt`, we can try to improve SCEV's pointer handling. In particular, i believe, i will need this in the future to further fix `SCEVAddExpr`operation type handling. This removes special handling of `ConstantPointerNull` from `ScalarEvolution::createSCEV()`, and add constant folding into `ScalarEvolution::getPtrToIntExpr()`. This way, `null` constants stay as such in SCEV's, but gracefully become zero integers when asked. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D98147
-
Roman Lebedev authored
The added test case crashes before this fix: ``` opt: /repositories/llvm-project/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5172: BasicBlock::iterator (anonymous namespace)::LSRInstance::AdjustInsertPositionForExpand(BasicBlock::iterator, const (anonymous namespace)::LSRFixup &, const (anonymous namespace)::LSRUse &, llvm::SCEVExpander &) const: Assertion `!isa<PHINode>(LowestIP) && !LowestIP->isEHPad() && !isa<DbgInfoIntrinsic>(LowestIP) && "Insertion point must be a normal instruction"' failed. ``` This is fully analogous to the previous commit, with the pointer constant replaced to be something non-null. The comparison here can be strength-reduced, but the second operand of the comparison happens to be identical to the constant pointer in the `catch` case of `landingpad`. While LSRInstance::CollectLoopInvariantFixupsAndFormulae() already gave up on uses in blocks ending up with EH pads, it didn't consider this case. Eventually, `LSRInstance::AdjustInsertPositionForExpand()` will be called, but the original insertion point it will get is the user instruction itself, and it doesn't want to deal with EH pads, and asserts as much. It would seem that this basically never happens in-the-wild, otherwise it would have been reported already, so it seems safe to take the cautious approach, and just not deal with such users.
-
https://reviews.llvm.org/D98147#2623549Roman Lebedev authored
With that patch, this test fails with an assertion ``` opt: /repositories/llvm-project/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5169: BasicBlock::iterator (anonymous namespace)::LSRInstance::AdjustInsertPositionForExpand(BasicBlock::iterator, const (anonymous namespace)::LSRFixup &, const (anonymous namespace)::LSRUse &, llvm::SCEVExpander &) const: Assertion `!isa<PHINode>(LowestIP) && !LowestIP->isEHPad() && !isa<DbgInfoIntrinsic>(LowestIP) && "Insertion point must be a normal instruction"' failed. ```
-
George Rokos authored
This patch adds the infrastructure for allocator support for target memory. Three allocators are introduced for device, host and shared memory. The corresponding API functions have the llvm_ prefix temporarily, until they become part of the OpenMP standard. Differential Revision: https://reviews.llvm.org/D97883
-
Nikita Popov authored
Rather than checking for simple equality, check for MustAlias, as we do in other transforms. This catches equivalent GEPs.
-
Nikita Popov authored
If a memset destination is overwritten by a memcpy and the sizes are exactly the same, then the memset is simply dead. We can directly drop it, instead of replacing it with a memset of zero size, which is particularly ugly for the case of a dynamic size.
-
Nikita Popov authored
-