- Jun 18, 2020
-
-
mydeveloperday authored
Update Clang-Formatted Formatted status
-
Yonghong Song authored
In BTF, pointee type pruning is used to reduce cluttering too many unused types into prog BTF. For example, struct task_struct { ... struct mm_struct *mm; ... } If bpf program does not access members of "struct mm_struct", there is no need to bring types for "struct mm_struct" to BTF. This patch fixed a bug where an incorrect pruning happened. The test case like below: struct t; typedef struct t _t; struct s1 { _t *c; }; int test1(struct s1 *arg) { ... } struct t { int a; int b; }; struct s2 { _t c; } int test2(struct s2 *arg) { ... } After processing test1(), among others, BPF backend generates BTF types for "struct s1", "_t" and a placeholder for "struct t". Note that "struct t" is not really generated. If later a direct access to "struct t" member happened, "struct t" BTF type will be generated properly. During processing test2(), when processing member type "_t c", BPF backend sees type "_t" already generated, so returned. This caused the problem that "struct t" BTF type is never generated and eventually causing incorrect type definition for "struct s2". To fix the issue, during DebugInfo type traversal, even if a typedef/const/volatile/restrict derived type has been recorded in BTF, if it is not a type pruning candidate, type traversal of its base type continues. Differential Revision: https://reviews.llvm.org/D82041 -
Richard Smith authored
outer levels as retained rather than omitting their arguments. This better reflects what's going on (we're performing a substitution while still inside a template). In theory this is also more correct, but I've not found a testcase where it matters in practice (largely because we don't allow alias templates to be declared inside a function).
-
Richard Smith authored
templated class. When a defaulted operator<=> results in the injection of a defaulted operator==, that operator== can be named by unqualified name within the same class, even if the class is templated. To make this work, perform the transform from defaulted operator<=> to defaulted operator== in the template definition context instead of the template instantiation context. This results in our substituting into a declaration from a context where we don't have a full list of template arguments (or indeed any), for which we are now more careful to not spuriously instantiate declarations that are not dependent on the arguments we're substituting.
-
George Mitenkov authored
Added support of simple logical ops: `LogicalAnd`, `LogicalOr`, `LogicalEqual` and `LogicalNotEqual`. Added a missing conversion for `UMod` op. Also, implemented SPIR-V cast ops conversion. There are 4 simple case where there is a clear equivalent in LLVM (e.g. `ConvertFToS` is `fptosi`). For `FConvert`, `SConvert` and `UConvert` we distinguish between truncation and extension based on the bit width of the operand. Differential Revision: https://reviews.llvm.org/D81812
-
Eric Christopher authored
used in debug only code. This reverts commit 07a17490.
-
Eric Schweitz authored
Differential revision: https://reviews.llvm.org/D82050
-
Eric Christopher authored
-
Stephan Herhut authored
Summary: Parallel loop tiling did not properly compute the updated loop indices when tiling, which lead to wrong results. Differential Revision: https://reviews.llvm.org/D82013
-
Christopher Tetreault authored
Summary: Assume all usages of this function are explicitly fixed-width operations and cast to FixedVectorType Reviewers: efriedma, sdesmalen, c-rhodes, majnemer, dblaikie Reviewed By: sdesmalen Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80262
-
Christopher Tetreault authored
Summary: Fix invalid usages of getNumElements identified by test case LLVM.Transforms/InstCombine::vscale_extractelement.ll. changesLength: Since the length of the llvm::SmallVector shufflemask is related to the minimum number of elements in a scalable vector, it is fine to just get the Min field of the ElementCount isIdentityWithExtract: Since it is not possible to express the mask needed for this pattern for scalable vectors, we can just bail before calling getNumElements() Reviewers: efriedma, sdesmalen, fpetrogalli, gchatelet, yrouban, craig.topper Reviewed By: sdesmalen Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81969
-
Rahul Joshi authored
- Also use functions in Region instead of Region::getBlocks() where possible. Differential Revision: https://reviews.llvm.org/D82032
-
Muhammad Omair Javaid authored
Summary: This patch aims to remove multiple copies of GetByteOrder() and ConvertRegisterKindToRegisterNumber used in various versions of RegisterContextPOSIX_*. Both register implementations are move to RegisterContext class which is parent of RegisterContextPOSIX_* classes. Built and tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabihf targets. Reviewers: labath Reviewed By: labath Subscribers: wuzish, nemanjai, kristof.beyls, kbarton, atanasyan, lldb-commits Differential Revision: https://reviews.llvm.org/D80104
-
Huihui Zhang authored
clang/lib/CodeGen/CGNonTrivialStruct.cpp:330:7: warning: suggest braces around initialization of subobject [-Wmissing-braces] Address(CGF->Builder.CreateLoad(CGF->GetAddrOfLocalVar(Args[Ints])), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { -
Fangrui Song authored
-
Roman Lebedev authored
I don't have any testcases showing it happening, and i haven't succeeded in creating one, but i'm also not positive it can't ever happen, and i recall having something that looked like that in the very beginning of Negator creation. But since we now already have a negation cache, we can now detect such cases practically for free. Let's do so instead of "relying" on stack overflow :D
-
Roman Lebedev authored
It is possible that we can try to negate the same value multiple times. For example, PHI nodes may happen to have multiple incoming values (all of which must be the same value) for the same incoming basic block. It may happen that we try to negate such a PHI node, and succeed, and that might result in having now-different incoming values.. To avoid that, and in general to reduce the amount of duplicated work we might be doing, let's introduce a cache where we'll track results of negating each value. The added test was previously failing -verify after -instcombine. Fixes https://bugs.llvm.org/show_bug.cgi?id=46362
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Thomas Lively authored
Summary: This commit fixes a bug in the FixBrTables pass in which an unconditional branch from the switch header block to the jump table block was not removed before the blocks were combined. The result was an invalid CFG in the MachineFunction. This commit also switches from using bespoke branch analysis and deletion code to using the standard utilities for the same. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81909
-
Ronak Chauhan authored
-
Ronak Chauhan authored
-
Benjamin Kramer authored
-
Tim Keith authored
Replace two MLIR dependencies with MLIRLinalgOps. Differential Revision: https://reviews.llvm.org/D82038
-
Shilei Tian authored
This reverts commit ee1bf45e.
-
Nick Desaulniers authored
Summary: This invariant is being violated in the test case https://reviews.llvm.org/D77849, related to the use of the relatively new ability for callbr to have return values, and MachineBasicBlocks with INLINEASM_BR terminators to emit live out register defs. As noted in the comment, this triggers invariant violations in MachineVerifier via `llc -verify-machineinstrs` or `llc -verify-regalloc`, since only MachineInstrs that are terminators are allowed to follow the first terminator. https://reviews.llvm.org/D75098 may rework this very assertion if we're spilling via a (proposed) TCOPY MachineInstr. Reviewers: void, efriedma, arsenm Reviewed By: efriedma Subscribers: qcolombet, wdng, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D78166
-
Nathan James authored
Refactor out the double lookup in `IncludeInserter` when trying to get the `IncludeSorter` for a specified `FileID`. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D82004
-
Nick Desaulniers authored
Summary: llvm::SplitEdge was failing an assertion that the BasicBlock only had one successor (for BasicBlocks terminated by CallBrInst, we typically have multiple successors). It was surprising that the earlier call to SplitCriticalEdge did not handle the critical edge (there was an early return). Removing that triggered another assertion relating to creating a BlockAddress for a BasicBlock that did not (yet) have a parent, which is a simple order of operations issue in llvm::SplitCriticalEdge (a freshly constructed BasicBlock must be inserted into a Function's basic block list to have a parent). Thanks to @nathanchance for the report. Fixes: https://github.com/ClangBuiltLinux/linux/issues/1018 Reviewers: craig.topper, jyknight, void, fhahn, efriedma Reviewed By: efriedma Subscribers: eli.friedman, rnk, efriedma, fhahn, hiraditya, llvm-commits, nathanchance, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D81607
-
aartbik authored
Summary: Two integration tests focused on i1 vectors, which exposed omissions in the llvm backend which have since then been fixed. Note that this also exposed an inaccuracy for print_i1 which has been fixed in this CL: for a pure C ABI, int should be used rather than bool. Reviewers: nicolasvasilache, ftynse, reidtatge, andydavis1, bkramer Reviewed By: bkramer Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes Tags: #mlir Differential Revision: https://reviews.llvm.org/D81957
-
Siva Chandra Reddy authored
Summary: To get the target order correct, the benchmarks directory has been moved one level higher. Previously, it was living in the utils directory. The utils directory is a collection of utils which are to be used by the tests and implementations. However, benchmarks *use* the implementations. So, moving it out of utils helps us setup proper target level dependencies. Reviewers: gchatelet Differential Revision: https://reviews.llvm.org/D81910
-
Julian Lettner authored
Let's have one canonical place to define ResultCode instances and their labels. Also make ResultCode's `__init__` function self-registering to better support custom ResultCodes.
-
Shilei Tian authored
DeviceID is added for some cases that we only have the __tgt_async_info but do not know its corresponding device id. However, to communicate with target plugins, we need that information. Event is added for another way to synchronize.
-
Zequan Wu authored
Summary: Rename --elf-cg-profile to --cg-profile and keep --elf-cg-profile as an alias of --cg-profile. Reviewers: jhenderson, MaskRay, espindola, hans Reviewed By: jhenderson, MaskRay Subscribers: emaste, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81855
-
Davide Italiano authored
When the zext gets promoted, it used to retain the original location, which pessimizes the debugging experience causing an unexpected jump in stepping at -Og. Fixes https://bugs.llvm.org/show_bug.cgi?id=46120 (which also contains a full C repro). Differential Revision: https://reviews.llvm.org/D81437
-
Ian Levesque authored
Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patching. Minor additions to compiler-rt support per-function patching without the index. Reviewers: dberris, MaskRay, johnislarry Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D81995
-
Alexandre Ganea authored
In order to support hot-patching, we need to make sure the first emitted instruction in a function is a two-byte+ op. This is already the case on x86_64, which seems to always emit two-byte+ ops. However on 32-bit targets this wasn't the case. PATCHABLE_OP now lowers to a XCHG AX, AX, (66 90) like MSVC does. However when targetting pentium3 (/arch:SSE) or i386 (/arch:IA32) targets, we generate MOV EDI,EDI (8B FF) like MSVC does. This is for compatiblity reasons with older tools that rely on this two byte pattern. Differential Revision: https://reviews.llvm.org/D81301
-
Alexandre Ganea authored
This is to support https://reviews.llvm.org/D81301.
-
Fangrui Song authored
Test cases are restored from a3bed4bd
-
Jonas Devlieghere authored
Now that the log file is included in the reproducers, the path needs to be remapped for the test to find the new file in the reproducer.
-
Michał Górny authored
Fix various tool libraries not to link to clang's .a libraries and dylib simultaneously. This may cause breakage, in particular through duplicate command-line option declarations. Differential Revision: https://reviews.llvm.org/D81967
-