- Mar 22, 2022
-
-
Yonghong Song authored
For the following code, void test() { volatile int j = 0; for (int i = 0; i < 1000; i++) j += 1; return; } If compiled with clang -g -Wall -Werror -S -emit-llvm test.c we will see the following error: test.c:2:6: error: variable 'j' set but not used [-Werror,-Wunused-but-set-variable] volatile int j = 0; ^ This is not quite right since 'j' is indeed used due to '+=' operator. gcc doesn't emit error either in this case. Also if we change 'j += 1' to 'j++', the warning will disappear with latest clang. Note that clang will issue the warning if the volatile declaration involves only simple assignment (var = ...). To fix the issue, in function MaybeDecrementCount(), if the operator is a compound assignment (i.e., +=, -=, etc.) and the variable is volatile, the count for RefsMinusAssignments will be decremented, similar to 'j++' case. Differential Revision: https://reviews.llvm.org/D121715 -
Craig Topper authored
Revert "[RISCV] Special case sign extended scalars when type legalizing nxvXi64 .vx instrinsics on RV32." This reverts commit 8c4937b3. Committed by mistake.
-
sstwcw authored
We currently have all those fields in AnnotatingParser::Context. They are not inherited from the Context object for the parent scope. They are exclusive. Now they are replaced with an enum. `InCpp11AttributeSpecifier` and `InCSharpAttributeSpecifier` are not handled like the rest in ContextType because they are not exclusive. Reviewed By: curdeius, MyDeveloperDay, HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D121907
-
Craig Topper authored
-
Craig Topper authored
-
Craig Topper authored
On RV32, we need to type legalize i64 scalar arguments to intrinsics. We usually do this by splatting the value into a vector separately. If the scalar happens to be sign extended, we can continue using a .vx intrinsic. We already special cased sign extended constants, this extends it to any sign extended value. I've only added tests for one case of vadd. Most intrinsics go through the same check. I can add more tests if we're concerned. Differential Revision: https://reviews.llvm.org/D122186
-
Mahesh Ravishankar authored
Computing dropped unit-dims when all the unit dims are dropped, does not need to check for strides being dropped. This also enables canonicalization of reduced-rank subviews. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D121766
-
Jorge Gorbe Moya authored
This reverts commit 596fa2d9.
-
Simon Pilgrim authored
As suggested on PR35908, if we are adding/subtracting an extracted bit, attempt to use BT instead to fold the op and use a ADC/SBB op. Reapply with extra type legality checks - LowerAndToBT was originally only used during lowering, now that it can occur earlier we might encounter illegal types that we can either promote to i32 or just bail. Differential Revision: https://reviews.llvm.org/D122084
-
Jakob Johnson authored
Failed buildbot: https://lab.llvm.org/buildbot/#/builders/68/builds/29250 Use toString() to consume the Error
-
Konrad Kleine authored
It was requested here (https://reviews.llvm.org/D120398#3353053) to make the underlying type of all enums in `FormatStyle` an `int8_t`. Originally the type was changed in https://reviews.llvm.org/D93758. Reviewed By: HazardyKnusperkeks, curdeius, owenpan Differential Revision: https://reviews.llvm.org/D120884
-
Maksim Panchenko authored
Reviewed By: skan Differential Revision: https://reviews.llvm.org/D121731
-
Nikita Popov authored
Update test checks after the revert in 15336828.
-
Frederic Cambus authored
AuroraUX was an operating system project based on an OpenSolaris kernel and an Ada userland. There appear to be no public code or release available online anymore. The project page on Wikipedia [1] was deleted in January 2012, and a news item [2] from November 2012 has more details. [1] https://en.wikipedia.org/w/index.php?title=Special:Log/delete&page=AuroraUX [2] https://www.phoronix.com/scan.php?page=news_item&px=MTIyMTI
-
Daniel Grumberg authored
clang -extract-api should accept multiple headers and forward them to a single CC1 instance. This change introduces a new ExtractAPIJobAction. Currently API Extraction is done during the Precompile phase as this is the current phase that matches the requirements the most. Adding a new phase would need to change some logic in how phases are scheduled. If the headers scheduled for API extraction are of different types the driver emits a diagnostic. Differential Revision: https://reviews.llvm.org/D121936
-
Jakob Johnson authored
Failed buildbot: https://lab.llvm.org/buildbot/#/builders/17/builds/19480 The fix seems to be simply be adding some type casts to make the compiler happy
-
Snehasish Kumar authored
To ease profile annotation, each of the callsites in a function can be annotated with profile data - "IR metadata format for MemProf" [1]. This patch extends the on-disk serialized record format to store the debug information for allocation callsites incl inline frames. This change is incompatible with the existing format i.e. indexed profiles must be regenerated, raw profiles are unaffected. [1] https://groups.google.com/g/llvm-dev/c/aWHsdMxKAfE/m/WtEmRqyhAgAJ Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D121179
-
Arthur Eubanks authored
Can cause initialization order fiasco issues.
-
Nikita Popov authored
This reverts commit 81569f5b. This causes a segfault when building consumer-typeset in ReleaseLTO-g configuration: https://llvm-compile-time-tracker.com/show_error.php?commit=81569f5b6ef531a48023f28133481262ee1509a3
-
Mehdi Amini authored
Post 892c104f, LLVM_BUILTIN_UNREACHABLE may not be defined anymore. Also when LLVM_UNREACHABLE_OPTIMIZE is OFF, emit LLVM_BUILTIN_UNREACHABLE after LLVM_BUILTIN_TRAP to ensure that diagnostics are suppressed on environments where LLVM_BUILTIN_TRAP is not marked as noreturn. Differential Revision: https://reviews.llvm.org/D122170
-
Mircea Trofin authored
These were not detected by the build bots because those went quietly offline, too, due to a misconfiguration (fixed since)
-
LLVM GN Syncbot authored
-
Markus Böck authored
I am not sure about the meaning of Type in the name (was it meant be interpreted as Kind?), and given the importance and meaning of Type in the context of MLIR, its probably better to rename it. Given the comment in the source code, the suggestion in the GitHub issue and the final discussions in the review, this patch renames the OperandType to UnresolvedOperand. Fixes https://github.com/llvm/llvm-project/issues/54446 Differential Revision: https://reviews.llvm.org/D122142
-
Eric Li authored
Change RewriteRule from holding an `Explanation` to being able to generate arbitrary metadata. Where TransformerClangTidyCheck was interested in a string description for the diagnostic, other tools may be interested in richer metadata at a higher level of abstraction than at the edit level (which is currently available as ASTEdit::Metadata). Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D120360
-
Jakob Johnson authored
- Add PerfEvent class to handle creating ring buffers and handle the resources associated with a perf_event - Refactor IntelPT collection code to use this new API - Add TSC to timestamp conversion logic with unittest Differential Revision: https://reviews.llvm.org/D121734
-
Stanislav Mekhanoshin authored
NFC at this point, but will be used at a later patch. Differential Revision: https://reviews.llvm.org/D122174
-
Arthur Eubanks authored
Fixes some initialization order fiasco issues https://lab.llvm.org/buildbot#builders/5/builds/20996
-
Joseph Huber authored
The NVPTX toolchain uses target features to determine the PTX version to use. However this isn't exposed externally like most other toolchain specific target features are. Add this functionaliy in preparation for using it in for OpenMP offloading. Reviewed By: jdoerfert, tra Differential Revision: https://reviews.llvm.org/D122089
-
Stefan Pintilie authored
Add a test case for byval argument passing where the argument size is more than 8 bytes and is not a factor of 8 bytes.
-
alex-t authored
BUILD_VECTOR of i16 and undef gets expanded to the COPY_TO_REGCLASS. The latter is further lowererd to the copy instructions. We need to provide the correct register class for the uniform and divergent BUILD_VECTOR nodes to avoid VGPR to SGPR copies. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D122068 -
Peter Klausler authored
Some I/O error situations are current handled with fatal runtime asserts, but should be exposed for user program error recovery. Differential Revision: https://reviews.llvm.org/D122049
-
Louis Dionne authored
This patch makes it possible to pass a CMake option to one of the runtimes for all targets being built. Basically, any option that starts with the name of a runtime project being built will be forwarded as-is to the sub-build. This is useful for customizing a sub-build for all targets. Differential Revision: https://reviews.llvm.org/D121822
-
Arjun P authored
-
Craig Topper authored
This is only called for instructions and the caller is already holding an Instruction *. This makes the code more explicit and makes it obvious the code doesn't make decisions about constants.
-
Nathan James authored
Create a PrettyStackTraceEvent that will dump the current `MatchCallback` id as well as the `BoundNodes` if the 'run' method of a `MatchCallback` results in a crash. The purpose of this is sometimes clang-tidy checks can crash in the `check` method. And in a large codebase with alot of checks enabled and in a release build, it can be near impossible to figure out which check as well as the source code that caused the crash. Without that information a reproducer is very hard to create. This is a more generalised version of D118520 which has a nicer integration and should be useful to clients other than clang-tidy. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D120185
-
Kim Gräsman authored
This amends 403d7d8d.
-
Yitzhak Mandelbaum authored
This reverts commit 18440547. Causing failures in some build modes. e.g. https://lab.llvm.org/buildbot/#/builders/217/builds/1886
-
Aaron Ballman authored
Full-expressions are Sema-generated implicit nodes that cover constant-expressions and expressions-with-cleanup for temporaries. Ignore those as part of implicit-ignore, and also remove too-aggressive IgnoreImplicit (which includes nested ImplicitCastExprs, for example) on unpacked sub-expressions. Add some unittests to demonstrate that RecursiveASTVisitor sees through ConstantExpr nodes correctly. Adjust cxx2a-consteval test to cover diagnostics for nested consteval expressions that were previously missed. Fixes bug #53044.
-
Kim Gräsman authored
CastExpr::getSubExprAsWritten and getConversionFunction used to have disparate implementations to traverse the sub-expression chain and skip so-called "implicit temporaries" (which are really implicit nodes added by Sema to represent semantic details in the AST). There's some friction in these algorithms that makes it hard to extend and change them: * skipImplicitTemporary is order-dependent; it can skip a CXXBindTemporaryExpr nested inside a MaterializeTemporaryExpr, but not vice versa * skipImplicitTemporary only runs one pass, it does not traverse multiple nested sequences of MTE/CBTE/MTE/CBTE, for example Both of these weaknesses are void at this point, because this kind of out-of-order multi-level nesting does not exist in the current AST. Adding a new implicit expression to skip exacerbates the problem, however, since a node X might show up in any and all locations between the existing. Thus; * Harmonize the form of getSubExprAsWritten and getConversionFunction so they both use a for loop * Use the IgnoreExprNodes machinery to skip multiple nodes * Rename skipImplicitTemporary to ignoreImplicitSemaNodes to generalize * Update ignoreImplicitSemaNodes so it only skips one level per call, to mirror existing Ignore functions and work better with IgnoreExprNodes This is a functional change, but one without visible effect.
-
Duncan P. N. Exon Smith authored
`llvm_unreachable()` and `LLVM_ASSUME_ALIGNED` use `defined(LLVM_BUILTIN_UNREACHABLE)` to check whether it has a definition. Remove the fallback added in 26827337 (as a drive-by when updating the GCC logic) and add a comment to prevent future mistakes. Differential Revision: https://reviews.llvm.org/D122167
-