New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang 11 upgrade #984
Merged
Merged
Clang 11 upgrade #984
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is64bit is ambiguous. In this patch, we replace it with Is64BitAddrSize to make it clearer.
…sextload)) -> copy On AArch64 we generate redundant G_SEXTs or G_SEXT_INREGs because of this. Differential Revision: https://reviews.llvm.org/D81993
This patch implements builtins for the Test LSB by Byte instruction introduced in Power10. Differential Revision: https://reviews.llvm.org/D82431
Preserve SCC dead flags in SIOptimizeExecMaskingPreRA. This helps with removing redundant s_andn2 instructions later. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D83637
Attach DbgLoc on insertvalue/extractvalue instructions created by DeadArgumentElimination. This fixes the PR46350. Differential Revision: https://reviews.llvm.org/D81939
Pre-commit clean up for D83641.
…mFPLoadStorePair In DAGCombiner::TransformFPLoadStorePair we were dropping the scalable property of TypeSize when trying to create an integer type of equivalent size. In fact, this optimisation makes no sense for scalable types since we don't know the size at compile time. I have changed the code to bail out when encountering scalable type sizes. I've added a test to llvm/test/CodeGen/AArch64/sve-fp.ll that exercises this code path. The test already emits an error if it encounters warnings due to implicit TypeSize->uint64_t conversions. Differential Revision: https://reviews.llvm.org/D83572
In getCastInstrCost() when comparing different sizes for src and dst types we should be using the TypeSize comparison operators instead of relying upon TypeSize being converted a uin64_t. Previously this meant we were dropping the scalable property and treating fixed and scalable vector types the same. Differential Revision: https://reviews.llvm.org/D83461
Summary: This patch introduces basic textDocument/foldingRange support. It relies on textDocument/documentSymbols to collect all symbols and uses takes ranges to create folds. The next steps for textDocument/foldingRange support would be: * Implementing FoldingRangeClientCapabilities and respecting respect client preferences * Specifying folding range kind * Migrating from DocumentSymbol implementation to custom RecursiveASTVisitor flow that will allow more flexibility * Supporting more folding range types: comments, PP conditional regions, includes and other code regions (e.g. public/private/protected sections of classes, control flow statement bodies) Tested: (Neo)Vim (coc-clangd) and VSCode. Related issue: clangd/clangd#310 Reviewers: sammccall Reviewed By: sammccall Subscribers: nridge, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82436
I have added a new file: llvm/test/CodeGen/AArch64/README that describes what to do in the event one of the SVE codegen tests fails the warnings check. In addition, I've added comments to all the relevant SVE tests pointing users at the README file. Differential Revision: https://reviews.llvm.org/D83467
…visitUnconditionalBranchInst()` Summary: As @nikic is pointing out in https://bugs.llvm.org/show_bug.cgi?id=46680#c5, InstCombine should not have forward instruction scans, so let's move this transform into the proper place. This is pretty much NFCI. Reviewers: nikic, spatel Reviewed By: nikic Subscribers: hiraditya, llvm-commits, nikic Tags: #llvm Differential Revision: https://reviews.llvm.org/D83670
The approach is simple: if a pass reports that it's not modifying a Function/Module, compute a loose hash of that Function/Module and compare it with the original one. If we report no change but there's a hash change, then we have an error. This approach misses a lot of change but it's not super intrusive and can detect most of the simple mistakes. Differential Revision: https://reviews.llvm.org/D80916
The hardware spec require src0 of s_cmpk should be a register. So, we should not optimize s_cmp to s_cmpk if src0 is not register. Patch by Ruiling Song!
…ively" This reverts commit 8372d50. It broke the TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp test on green dragon.
The code already supports addressing a fixed-size stack object from the frame-pointer, by first subtracting sizeof(SVE area) from FP. Reviewers: efriedma, cameron.mcinally, david-arm, rengolin Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D83125
…se env in tests"" This reverts commit 979c502. The underlying issue has been fixed in https://reviews.llvm.org/D83719.
Summary: This commit includes a couple of changes: * Benchmark selected projects by analyzing them multiple times * Compare two benchmarking results and visualizing them on one chart * Organize project build logging, so we can use the same code in benchmarks Differential Revision: https://reviews.llvm.org/D83539
Differential Revision: https://reviews.llvm.org/D83701
If a vector body has live-out values, it is probably a reduction, which needs a final reduction step after the loop. MVE has a VADDV instruction to reduce integer vectors, but doesn't have an equivalent one for float vectors. A live-out value that is not recognised as reduction later in the optimisation pipeline will result in the tail-predicated loop to be reverted to a non-predicated loop and this is very expensive, i.e. it has a significant performance impact, which is what we hope to avoid with fine tuning the ARM TTI hook preferPredicateOverEpilogue implementation. Differential Revision: https://reviews.llvm.org/D82953
Fix two obvious errors in the code and also update the test check. Also add one test to catch the failure. Patch by Ruiling Song! Differential Revision: https://reviews.llvm.org/D83280
Add a unit test for the compact DWARF expression printer which will be used by the llvm-objdump --debug-vars option. Differential revision: https://reviews.llvm.org/D75250
Add the DW_OP_breg0..DW_OP_breg31 and DW_OP_bregx opcodes to the DWARF expression printer. Differential revision: https://reviews.llvm.org/D74841
Add the DW_OP_entry_value and DW_OP_stack_value opcodes to the DWARF expression printer. Differential revision: https://reviews.llvm.org/D74843
…Solaris The new `LLVM-Unit :: Support/./SupportTests/ProgramEnvTest.TestExecuteAndWaitStatistics` test currently FAILs on Solaris: [ RUN ] ProgramEnvTest.TestExecuteAndWaitStatistics /vol/llvm/src/llvm-project/local/llvm/unittests/Support/ProgramTest.cpp:360: Failure Expected: (ProcStat->PeakMemory) > (0U), actual: 0 vs 0 [ FAILED ] ProgramEnvTest.TestExecuteAndWaitStatistics (22 ms) According to `llvm/lib/Support/Unix/Program.inc (llvm::sys::Wait)`, `PeakMemory` corresponds to `struct rusage.ru_maxrss`. However, Solaris `getrusage(3C)` documents NOTES The ru_maxrss, ru_ixrss, ru_idrss, and ru_isrss members of the rusage structure are set to 0 in this implementation. Since changing the test to check for `PeakMemory >= 0` instead is pointless and would generate a warning on targets where `ru_maxrss` is unsigned, this patch removes the check. Tested on `amd64-pc-solaris2.11`. Differential Revision: https://reviews.llvm.org/D83661
…f they are defined in non-fetched archive members After D69985, symbols for "-init" and "-fini" were unconditionally marked as used even if they were just lazy symbols seen when scanning archives. That resulted in exposing them in the symbol table of an output file, as Undefined, which added unwanted dependencies. The patch fixes the issue by checking the kind of the symbols before the marking. Differential Revision: https://reviews.llvm.org/D83549
This adds unit tests to check the expected behavior of the method in case the unit length field is truncated. Differential Revision: https://reviews.llvm.org/D83673
…ts section. DWARFListTableHeader::length() handles the zero value of HeaderData.Length in a special way, which makes the result different from the calculated value of FullLength, which leads to triggering an assertion. The patch moves the assertion a bit later when `FullLength` is already checked for minimal allowed value. Differential Revision: https://reviews.llvm.org/D82886
AArch64 does not support enabling rcpc via .arch_extension in assembly. GCC, on the other hand, does. This patch adds 'rcpc' as a valid value to .arch_extension handling. Differential Revision: https://reviews.llvm.org/D83685
…pe and IncompleteArrayType
…eGenericFunction arguments to serialization information for FunctionProtoType
Checked C support. As per the comment on line 1509, the variable NumfunctionDeclBits needs to be 33 (the sum of the sizes of all the bit fields) The size of class CXXConstructorDeclBitfields (on line 1591) needs to be 64 bits. Accordingly, the value of the field NumCtorInitializers (one line 1603) needs to be adjusted.
Comparing StmtExprs causes an assertion failure in CanonBounds.cpp since their children are Stmts, not Exprs. This assertion failure previously caused the CodeGen/arm-neon-range-checks.c test to fail.
…BoundsCastExpression
…r.c test This reflects the pruning of ImplicitValueInitExprs from the CFG in llvm-project commit 9fdcae7
… the -fno-checkedc-extension argument
* Use VisitUnaryOperator and VisitBinaryOperator VisitUnary* and VisitBin* * Add case for DesignatedInitExpr in getExprConstraintVars
For creating an empty DeclRefExpr, we need to pass NumTemplateArgs. This depends on the NumExprFields. In Checked C, we changed the NumExprFields from 5 to 7. But upstream has this field as 6. So we adjust this and change it to 8. (cherry picked from commit 9902f10)
) 277d84a. We first submitted them in PR #837, but Mandeep noticed (#837 (review)) and the unintended changes were removed from that PR in 74bfcaf. However, when the squash of PR #837 was merged with the original commits in cfc998e, the unintended changes were incorrectly retained. They got submitted again in the next 3C PR (#891), and no one noticed that time. (cherry picked from commit cfe00ea)
…re 9 of them). Needs to be reviewed.
Fixes the SemaOpenCLCXX/address-space-lambda.cl test. DeclaratorChunk::getFunction clears the attribute pool of its TheDeclarator argument if its MethodQualifiers argument is non-null. Previously, a call to getFunction from ParseLambdaExpressionAfterIntroducer was missing the MethodQualifiers argument. This caused the attributes of the declarator to be set incorrectly, which resulted in incorrect OpenCL address spaces for declarations involving lambda expressions.
…into updated-master-11-last # Conflicts: # clang/lib/AST/CanonBounds.cpp # clang/test/CheckedC/inferred-bounds/compound-literals.c
…ax node Checked C binds string literals to temporaries. Add CHKCBindTemporaryExpression as a syntax node and add a separate Checked C case for the StringLiteral syntax test that expects a CHKCBindTemporary parent for StringLiteral expressions.
…AST matcher Checked C binds string literals to temporaries. Add a matcher that ignores parens and temporary bindings on expressions and use the matcher in the IgnoringParens ASTMatcher test.
…penMP test cases after upgrade.
…f some OpenMP test cases after upgrade." This reverts commit 2afbfb5. Reverting this fix in order to resubmit these changes as a PR because it will be easier to incorporate review comments and other changes.
With Git Unix utilities and cygwin utilities, the grep tool does not strip carriage returns from files. When the diff tool compares the output of grep to another file in the ir-support.c test, the output of grep contains carriage returns while the other file does not. This does not occur when using GnuWin32 utilities. The --strip-trailing-cr argument causes diff to remove carriage returns from the input files before comparing them.
…/checkedc-clang into updated-master-11-last
(See commit 5b67a18 which added the ignoringParenTmp matcher)
…in (#979) * Fix for handling CapturedDecl, which was causing the failure of certain OpenMP test case after upgrade. * Addressed review comments. * Addressed David's review comment about handling invalid source locations before calling CompareLoc. * Removed redundant "else". * Removed CompareLoc as this is not the best thing to use in ordering two CapturedDecls. An interim solution using pointer comparison is present, with a TODO for an improved ordering. * Minor fix.
…into updated-master-11-last
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the compiler sources to Clang/LLVM 11.0. Changes to Checked C tests are in the clang-11-upgrade-tests branch of the checkedc repository (see checkedc/#436).