- Jul 09, 2020
-
-
Florian Hahn authored
Currently SCCP does not combine the information of conditions joined by AND in the true branch or OR in the false branch. For branches on AND, 2 copies will be inserted for the true branch, with one being the operand of the other as in the code below. We can combine the information using intersection. Note that for the OR case, the copies are inserted in the false branch, where using intersection is safe as well. define void @foo(i32 %a) { entry: %lt = icmp ult i32 %a, 100 %gt = icmp ugt i32 %a, 20 %and = and i1 %lt, %gt ; Has predicate info ; branch predicate info { TrueEdge: 1 Comparison: %lt = icmp ult i32 %a, 100 Edge: [label %entry,label %true] } %a.0 = call i32 @llvm.ssa.copy.140247425954880(i32 %a) ; Has predicate info ; branch predicate info { TrueEdge: 1 Comparison: %gt = icmp ugt i32 %a, 20 Edge: [label %entry,label %false] } %a.1 = call i32 @llvm.ssa.copy.140247425954880(i32 %a.0) br i1 %and, label %true, label %false true: ; preds = %entry call void @use(i32 %a.1) %true.1 = icmp ne i32 %a.1, 20 call void @use.i1(i1 %true.1) ret void false: ; preds = %entry call void @use(i32 %a.1) ret void } Reviewers: efriedma, davide, mssimpso, nikic Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D77808 -
Benjamin Kramer authored
-
Kirill Bobyrev authored
Reviewers: sammccall Reviewed By: sammccall Subscribers: ormris, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82938
-
Xing GUO authored
Functions in DWARFYML::FixupVisitor are declared as virtual functions in its base class DWARFYAML::Visitor. We should use the mordern "override" keyword instead of "virtual" for virtual functions in subclasses for better safety. Besides, the visibility is changed from private to protected to make it consistent with DWARFYAML::FixupVisitor class and DWARFYAML::Visitor class. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D83452
-
Paul Walker authored
When adding support for scalable vector masked loads and stores we accidently opened up likewise for fixed length vectors. This patch restricts support to scalable vectors only, thus ensuring fixed length vectors are treated the same regardless of SVE support. Differential Revision: https://reviews.llvm.org/D83341
-
Paul Walker authored
Fixed length vector code generation for SVE does not yet custom lower BUILD_VECTOR and instead relies on expansion. At the same time custom lowering for VECTOR_SHUFFLE is also not available so this patch updates isShuffleMaskLegal to reject vector types that require SVE. Related to this it also prevents the merging of stores after legalisation because this only works when BUILD_VECTOR is either legal or can be elminated. When this is not the case the code generator enters an infinite legalisation loop. Differential Revision: https://reviews.llvm.org/D83408
-
Georgii Rymar authored
This allows to propagate an error and report a warning properly. Differential revision: https://reviews.llvm.org/D83393
-
Simon Pilgrim authored
Avoids unnecessary copies and silences clang tidy warning.
-
Nathan James authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D83379
-
Simon Pilgrim authored
Avoids unnecessary APInt copies and silences clang tidy warning.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Avoids unnecessary copies and silences clang tidy warning.
-
Dmitry Polukhin authored
Summary: New line duplication logic introduced in https://reviews.llvm.org/D63482 has two issues: (1) there is no logic that removes duplicate newlines when clang-apply-replacment reads YAML and (2) in general such logic should be applied to all strings and should happen on string serialization level instead in YAML parser. This diff changes multiline strings quotation from single quote `'` to double `"`. It solves problems with internal newlines because now they are escaped. Also double quotation solves the problem with leading whitespace after newline. In case of single quotation YAML parsers should remove leading whitespace according to specification. In case of double quotation these leading are internal space and they are preserved. There is no way to instruct YAML parsers to preserve leading whitespaces after newline so double quotation is the only viable option that solves all problems at once. Test Plan: check-all Reviewers: gribozavr, mgehre, yvvan Subscribers: xazax.hun, hiraditya, cfe-commits, llvm-commits Tags: #clang-tools-extra, #clang, #llvm Differential Revision: https://reviews.llvm.org/D80301
-
Tres Popp authored
Summary: Added canonicalization and folding was: - Folding when either input is an attribute indicating a scalar input which can always be broadcasted. - Canonicalization where it can be determined that either input shape is a scalar. - Canonicalization where the partially specified input shapes can be proven to be broadcastable always. Differential Revision: https://reviews.llvm.org/D83194
-
serge-sans-paille authored
`Changed` should reflect all possible changes. Differential Revision: https://reviews.llvm.org/D83459
-
Oliver Stannard authored
This adds the --debug-vars option to llvm-objdump, which prints locations (registers/memory) of source-level variables alongside the disassembly based on DWARF info. A vertical line is printed for each live-range, with a label at the top giving the variable name and location, and the position and length of the line indicating the program counter range in which it is valid. Differential revision: https://reviews.llvm.org/D70720
-
Kadir Cetinkaya authored
Summary: We've been testing this internally for a couple weeks now and it seems to be stable enough. Let's flip the flag before branch cut to increase testing coverage and have enough time to revert if need be. Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83290
-
Florian Hahn authored
OriginalOp of a predicate always refers to the original IR value that was renamed. So for nested predicates of the same value, it will always refer to the original IR value. For the use in SCCP however, we need to find the renamed value that is currently used in the condition associated with the predicate. This patch adds a new RenamedOp field to do exactly that. NewGVN currently relies on the existing behavior to merge instruction metadata. A test case to check for exactly that has been added in 195fa4bf. Reviewers: efriedma, davide, nikic Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D78133
-
Lucas Prates authored
Summary: When legalizing a biscast operation from an fp16 operand to an i16 on a target that requires both input and output types to be promoted to 32-bits, an assertion can fail when building the new node due to a mismatch between the the operation's result size and the type specified to the node. This patches fix the issue by making sure the bit width of the types match for the FP_TO_FP16 node, covering the difference with an extra ANYEXTEND operation. Reviewers: ostannard, efriedma, pirama, jmolloy, plotfi Reviewed By: efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82552
-
Shengchen Kan authored
Replace mutiple `if else` clauses with a `switch` clause and remove redundant checks. Before this patch, we need to add a statement like `if(!isa<MCxxxFragment>(Frag)) ` here each time we add a new kind of `MCEncodedFragment` even if it has no fixups. After this patch, we don't need to do that. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D83366
-
serge-sans-paille authored
Correctly reflect change in the return status. Differential Revision: https://reviews.llvm.org/D83457
-
Sam McCall authored
Summary: A few things were broken: - use of Document::parseBlockNode() is incorrect and prevents moving to the next doc in error cases. Use getRoot() instead. - bailing out in the middle of iterating over a list/dict isn't allowed, unless you are going to throw away the parser: the next skip() asserts. Always consume all items. - There were two concepts of fatal errors: error-diagnostics and drop-fragment. (The latter is the "return false" case in the parser). They didn't coincide. Now, parser errors and explicitly emitted error diagnostics are fatal. Fixes https://github.com/clangd/clangd/issues/452 Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83436
-
Kai Luo authored
On PPC64, for a variadic function, if va_start is not called, it won't access any variadic argument on stack, thus we can save stores of registers used to pass arguments. Differential Revision: https://reviews.llvm.org/D82361
-
Vitaly Buka authored
It's follow up for D80908 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D82941
-
Craig Topper authored
This seems to be leftover copied from an older implementation of getHostCPUName where we needed this to check the name of CPU vendor. We don't check the CPU vendor at all in getHostCPUFeatures so this union and the variable are unneeded.
-
Douglas Yung authored
-
Johannes Doerfert authored
To avoid linkage errors we have to ensure the linkage allows multiple definitions of these compiler inserted functions. Since they are on the cold path of complex computations, we want to avoid `inline`. Instead, we opt for `weak` and `noinline` for now.
-
Louis Dionne authored
-
Lang Hames authored
Asynchronous resolution is a better fit for handling reentry over IPC/RPC where we want to avoid blocking a communication handler/thread.
-
Xing GUO authored
In this change, `parseDWARFYAML()` is refactored to be able to parse YAML decription into different data structures. We don't have to craft the whole DWARF structure for a small test in the future. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D83220
-
Eric Christopher authored
-
Stella Laurenzo authored
Summary: * This allows these flags to be passed on the command line with normal CMake bool-interpreted values like ON/OFF instead of requiring 0/1. * As-is, if passing ON/OFF, these will cause a parse error in lit.site.cfg.py because Python tries to interpret the string literally. Reviewers: stephenneuendorffer Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, Kayjukh, jurahul, msifontes Tags: #mlir Differential Revision: https://reviews.llvm.org/D83451
-
Qiu Chaofan authored
This should be a typo introduced in D69275, which may cause an unknown segment fault in getNode. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D83376
-
River Riddle authored
Depending on where the 0 dimension is within the shape, the parser will currently reject .mlir generated by the printer. Differential Revision: https://reviews.llvm.org/D83445
-
Richard Smith authored
variable's initializer is not known. The hope is that a better diagnostic for this case will reduce the rate at which duplicates of non-bug PR41093 are reported.
-
peter klausler authored
Ensure that external unit number hashing produces a valid index for a negative unit number, viz. a NEWUNIT=. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D83428
-
Adrian Prantl authored
This patch fixes debugserver incorrectly returning the SDK version instead of the minimum deployment target version. rdar://problem/65001691 Differential Revision: https://reviews.llvm.org/D83443
-
Julian Lettner authored
Provide `--show-xxx` flags for all non-failure result codes, just as we already do for `--show-xfail` and `--show-unsupported`. Reviewed By: jdenny Differential Revision: https://reviews.llvm.org/D82233
-
Valentin Clement authored
Summary: Change the test in isAllowedClauseForDirective from if with multiple conditions to a main switch on directive and then switches on clause for each directive. Version check is still done with a condition in the return statment. Reviewers: jdoerfert, jdenny Reviewed By: jdenny Subscribers: yaxunl, guansong, sstefan1, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83363
-