aboutsummaryrefslogtreecommitdiff
path: root/clang
AgeCommit message (Collapse)AuthorFilesLines
71 min.[AMDGPU] gfx1250 v_cvt_scalef32_pk8_* instructions (#151758)HEADmainStanislav Mekhanoshin2-0/+103
2 hours[CodeGen][counted_by] Support use of the comma operator (#151776)Bill Wendling2-0/+39
Writing something like this: __builtin_dynamic_object_size((0, p->array), 0) is equivalent to writing this: __builtin_dynamic_object_size(p->array, 0) though the former will give a warning about the first value being unused.
3 hours[CUDA] Do not include obsolete texture_fetch_functions.h (#151766)Artem Belevich1-0/+5
3 hours[AMDGPU] gfx1250 v_permlane_* instructions (#151749)Stanislav Mekhanoshin2-0/+132
6 hours[CUDA] Use --image3 to construct fat binary (#151760)Artem Belevich3-36/+30
CUDA-12.9 has removed fatbinary tool's `--image` argument we've been using till now. --image3 has been supported since cuda-9, so we do not need CUDA SDK version checks.
8 hours[CIR] Add vptr type and generate vptr field when needed (#151377)Andy Kaylor4-4/+70
This adds a new CIR type, cir.vptr, and generates a field of that type when a record is declared that requires a vptr member.
8 hours[CIR] Simplify ConstantOp accesses and its getDefiningOp (#151216)Henrich Lauko7-33/+29
- Replaces dyn_cast<cir::ConstantOp>(v.getDefiningOp()) and similar with v.getDefiningOp<cir::ConstantOp>() - Adds `getValueAttr` method to ConstantOp
8 hours[CIR] Handle expression with cleanups (#151600)Andy Kaylor8-16/+243
This adds code to handle expressions with cleanup, including materializing a temporary object for the expression.
9 hours[clang][ARM] Fix setting of MaxAtomicInlineWidth. (#151404)Eli Friedman3-14/+22
2f497ec3a0056f15727ee6008211aeb2c4a8f455 updated the backend's rules for when lock-free atomics are available, but we never made a corresponding change to the frontend. Fix it to be consistent. This only affects targets older than v7.
9 hours[clang][ScanDeps] Clear compilation directory if needed (#150129)Steven Wu2-27/+9
During explicit module build, clear the compilation directory flags when CWD optimization is on. Now clang CodeGen will not add compilation directories to DIFile when the corresponding flags are not passed and make debug info not dependent on CWD.
9 hoursRevert "[clang] Remove %T from tests (#151614)"Aiden Grossman15-103/+98
This reverts commit 5a586375aa3a128dadc9473cfa196bf8588c2a82. This breaks two buildbots with failures in implicit-module-header-maps.cpp. No idea why these failures are occurring. https://lab.llvm.org/buildbot/#/builders/64/builds/5166 https://lab.llvm.org/buildbot/#/builders/13/builds/8725
10 hours[Analyzer] No longer crash with VLA operands to unary type traits (#151719)Aaron Ballman3-1/+22
sizeof was handled correctly, but __datasizeof and _Countof were not. Fixes #151711
10 hours[CIR] Add diagnostic for NYI AST visitor handlers (#151561)Andy Kaylor3-0/+34
A couple of handlers that were missing from the CIRGenerator AST visitor allowed important features to be silently ignored during CIR generation. This change adds these handlers with diagnostics to report that they are not yet handled (except in the case where only debug information is missed).
10 hours[OpenACC][CIR] Implement 'private' clause lowering. (#151360)Erich Keane8-7/+1587
The private clause is the first with 'recipes', so a lot of infrastructure is included here, including some MLIR dialect changes that allow simple adding of a privatization. We'll likely get similar for firstprivate and reduction. Also, we have quite a bit of infrastructure in clause lowering to make sure we have most cases we could think of covered. At the moment, ONLY private is implemented, so all it requires is an 'init' segment (that doesn't call any copy operations), and potentially a 'destroy' segment. However, actually calling 'init' functions on each of the elements in them are not properly implemented, and will be in a followup patch. This patch implements all of that, and adds tests in a way that will be useful for firstprivate as well.
11 hours[clang][ExprConst] Call `FastEvaluateAsRValue` in `isCXX11ConstantExpr` ↵Timm Baeder1-13/+20
(#151466) This was one case where we didn't call `FastEvaluateAsRValue` before going through `EvaluateAsRValue`. Also replace the `EvalResult` parameter with an `APValue` one, since `FastEvaluateAsRVaule` only needs that. Small gains: https://llvm-compile-time-tracker.com/compare.php?from=112af8e62e734938547d50eeb7b416c8dd666f45&to=b2ea804b9e22b7f37eb1b07b01c0a8057275fe4a&stat=instructions:u
11 hours[clang] Remove %T from tests (#151614)Aiden Grossman15-98/+103
This patch removes %T from clang lit tests. %T has been deprecated for about seven years and is not reccomended as it is not unique to each test, which can lead to races. This patch is intended to remove usage in tree with the end goal of removing support for %T within lit.
12 hours[analyzer] Retain address space information in getElementRegion (#151370)Donát Nagy2-0/+21
The factory method `MemRegionManager::getElementRegion()` is the main way of constructing `ElementRegion` objects, which are widespread in the analysis and may represent array elements (as lvalues), pointer arithmetic and type conversions. This factory method used to strip all qualifiers from the type associated with the element (after canonicalizing it), but the address space qualifier can affect the size of a pointer type, so stripping it caused an assertion failure (in `evalBinOpLL`): clang: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:785: void assertEqualBitWidths(clang::ento::ProgramStateRef, clang::ento::Loc, clang::ento::Loc): Assertion `RhsBitwidth == LhsBitwidth && "RhsLoc and LhsLoc bitwidth must be same!"' failed. --------- Co-authored-by: Vince Bridgers <vince.a.bridgers@ericsson.com>
12 hours[clang] Remove use of %T from crash-report-modules.m (#151615)Aiden Grossman1-9/+6
This patch removes the use of %T from crash-report-modules.m. %T has been deprecated for about seven years, and is to be avoided as it can lead to races between tests. Posting this one as a separate patch given it was explicitly ported to %T in 5c268f078ddbaa7cc1e9ea0ef658eb90563ff5db. Given 36bb47c70802629df98276ce90b0f8163f959e28 was landed seven years ago to completely disable the test on Windows due to continued failures, I think it should be fine to just leave this test unsupported on Windows.
12 hours[clang][bytecode][NFC] Add a FIXME comment for heap allocations (#151700)Timm Baeder1-0/+19
13 hours[NFC][arm_sve.td] Remove StructLoad/Store classes and improve tabification.Paul Walker1-356/+347
14 hours[AMDGPU] Update tests (#151688)Piotr Sobczak1-1/+1
Fix two minor issues: - Add double quote - Remove unused prefix
14 hours[Clang] Dump minimization hints for namespaces (#151534)Ilya Biryukov2-17/+118
Unlike other declarations, these cover two ranges: - from `namespace/inline namespace` to the opening `{`, - the closing `}`. This allows to mark the declarations inside the namespace itself independently.
14 hours[HIP] Fix compression arguments being passed to linker wrapper (#151591)Joseph Huber3-7/+19
Summary: The new driver's behavior forwards all unrecognized command line arguments to the host linker. It only knew `--compress` so when `-compress` was passed it didn't forward it correctly. This patch changes the spelling because multi word arguments should have two dashes.
15 hours[clang][ExprConst] Remove Loc param (#151461)Timm Baeder3-43/+22
The Loc param to these functions was weird and not always set in error cases. It wasn't reliable to use. This was almost entirely unused inside of clang and the one call site that used the returned source location doesn't make a difference in practice.
15 hours[Clang] Flush minimization hints after writing (#151522)Ilya Biryukov1-0/+2
This helps to get well-formed output if Clang crashes after that point.
15 hours[static analyzer] Fix crash on parenthesized expression in assume attribute ↵Iris Shi3-1/+16
(#151682) - Closes #151529 `ParenExpr` should be ignored before reaching `ExprEngine::Visit`. Failing to do so triggers the assertion.
18 hours[clang] Fix clang debug info generation for unprtototyped function (#150022)Georgiy Samoylov2-1/+89
Consider this declaration: `int foo();` This function is described in LLVM with `clang::FunctionNoProtoType` class. ([See description](https://clang.llvm.org/doxygen/classclang_1_1FunctionNoProtoType.html)) Judging by [this comment](https://github.com/llvm/llvm-project/blob/a1bf0d1394e48894be05d274d3942ff77c35ce87/clang/lib/CodeGen/CGCall.cpp#L159C11-L159C12) all such functions are treated like functions with variadic number of parameters. When we want to [emit debug info](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/clang/lib/CodeGen/CGDebugInfo.cpp#L4808) we have to know function that we calling. In method [getCalledFunction()](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/llvm/include/llvm/IR/InstrTypes.h#L1348) we compare two types of function: 1. Function that we deduce from calling operand, and 2. Function that we store locally If they differ we get `nullptr` and can't emit appropriate debug info. The only thing they differ is: lhs function is variadic, but rhs function isn't Reason of this difference is that under RISC-V there is no overridden function that tells us about treating functions with no parameters. [Default function](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/clang/lib/CodeGen/TargetInfo.cpp#L87) always return `false`. This patch overrides this function for RISC-V
18 hours[DTLTO][Clang][Docs] Update for COFF support (#149988)bd1976bris1-5/+20
As the COFF linker is usually invoked independently, update the Clang DTLTO section to show an example. This follows what is done earlier in the document. Also some minor fixes and improvements: - Use generic distributor names to avoid implying anything about what an Incredibuild distributor may or should support. - Use subheadings for readability. - Correct a mis-cased hyperlink.
19 hours[clang] Proofread InternalsManual.rst (#151626)Kazu Hirata1-5/+5
19 hours[Analysis] Avoid creating a temporary instance of std::string (NFC) (#151625)Kazu Hirata1-2/+1
hasName takes StringRef, so we don't need to create a temporary instance of std::string.
25 hours[AMDGPU] Add v_cvt_scale_pk8_* gfx1250 instructions (#151616)Stanislav Mekhanoshin4-0/+170
27 hours[clang][CodeGen] Remove CWD fallback in compilation directory (#150130)Steven Wu12-69/+24
CWD is queried in clang driver and passed to clang cc1 via flags when needed. Respect the cc1 flags and do not repeated checking current working directory in CodeGen.
27 hours[SYCL] Restrict the sycl_kernel_entry_point attribute spelling to C++11 ↵Tom Honermann10-78/+84
style. (#151405) Previously, the `sycl_kernel_entry_point` attribute could be specified using either the GNU or C++11 spelling styles. Future SYCL attributes are expected to support only the C++11 spelling style, so support for the GNU style is being removed. In order to ensure consistent presentation of the attribute in diagnostic messages, diagnostics specific to this attribute now require the attribute to be provided as an argument. This delegates formatting of the attribute name to the diagnostic engine. As an additional nicety, "the" is added to some diagnostic messages so that they read more like proper sentences.
28 hours[AMDGPU] Add gfx1250 cvt_pk|sr_fp8|bf8_f32 instructions (#151595)Stanislav Mekhanoshin2-0/+56
29 hours[CIR] Fix warnings related to unused variables in release builds (#151412)Andy Kaylor7-14/+16
This fixes a number of warnings in release builds due to variables that were only being used in asserts. Some of these variables will later be used in non-debug code, but for now they are unused in release builds.
30 hours[CUDA] add support for targeting sm_103/sm_121 with CUDA-12.9 (#151587)Artem Belevich9-7/+46
31 hours[AMDGPU] v_cvt_sr_pk_f16_f32 gfx1250 instruction (#151482)Stanislav Mekhanoshin2-0/+28
32 hoursNFC: Clean up of IntrusiveRefCntPtr construction from raw pointers. (#151545)James Y Knight66-189/+160
Handles clang::DiagnosticsEngine and clang::DiagnosticIDs. For DiagnosticIDs, this mostly migrates from `new DiagnosticIDs` to convenience method `DiagnosticIDs::create()`. Part of cleanup https://github.com/llvm/llvm-project/issues/151026
33 hours[clang] Infer compilation directory in driverSteven Wu2-18/+25
When building with -fdebug-compilation-dir/-fcoverige-compilation-dir, infer the compilation directory in clang driver, rather than try to fallback to VFS current working directory lookup during CodeGen. This allows compilation directory to be used as it is passed via cc1 flag and the value can be empty to remove dependency on CWD if needed. Reviewers: adrian-prantl, dwblaikie Reviewed By: adrian-prantl, dwblaikie Pull Request: https://github.com/llvm/llvm-project/pull/150112
33 hours[CIR] Upstream MulOp for ComplexType (#150834)Amr Hesham5-3/+509
This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365
34 hours[CIR] Fix fallthrough warning (#151418)Andy Kaylor1-0/+1
This fixes a warning about an unannotated fallthrough.
34 hours[HLSL] fix D3DCOLORtoUBYTE4 return type to be int (#151353)Farzon Lotfi4-4/+12
fixes #150673 fixes #150678 The issue was we were using the wrong return type.
34 hours[win][arm64ec] Fixes to unblock building LLVM and Clang as Arm64EC (#150068)Daniel Paoliello1-6/+9
These changes allow LLVM and Clang to be built with Clang targeting Arm64EC using the MSVC linker. Built with these options: ``` -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_HOST_TRIPLE=arm64ec-pc-windows-msvc -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_C_COMPILER_TARGET=arm64ec-pc-windows-msvc -DCMAKE_CXX_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER_TARGET=arm64ec-pc-windows-msvc -DCMAKE_LINKER_TYPE=MSVC ```
35 hours[Docs] Fix typo in shadow call stack option name (#151474)Venkata Ramanaiah Nalamothu1-1/+1
Fix typo in shadow call stack option name mentioned in 'ShadowCallStack.rst'.
35 hours[CIR] Upstream support for function-level variable decompositions (#151073)Morris Hafner7-8/+90
This implements support for structured bindings on a function scope level. It does not add support for global structured bindings.
35 hours[CIR] Add ComputeVolatileBitfields Implementation (#151252)Andres-Salamanca2-1/+174
This PR adds the implementation of the `ComputeVolatileBitfields` function for the AAPCS ABI, following the rules described in [AAPCS64 §8.1.8.5 Volatile Bit-fields](https://github.com/ARM-software/abi-aa/blob/f52e1ad3f81254497a83578dc102f6aac89e52d0/aapcs64/aapcs64.rst#8185volatile-bit-fields----preserving-number-and-width-of-container-accesses). When accessing a volatile bit-field either reading or writing the compiler must perform a load or store using the access size that matches the width of the declared type (i.e., the type of the container), rather than the packed bit-field size. For example, if a field is declared as `int`, it must read or write 32 bits, even if the bit-field is only 3 bits wide. The `ComputeVolatileBitfields` function calculates the correct values and offsets necessary for proper lowering of volatile bitfields. Support for emitting calls to `get_bitfield` and `set_bitfield` with the correct access size for volatile bitfields will be implemented in a future PR.
36 hours[CIR] Support more declarations without any codegen (#151076)Morris Hafner2-1/+39
This patch adds or completes support for a couple of top level declaration types that don't emit any code: Most notably these include Concepts, static_assert and type aliases.
36 hours[Basic] Remove deprecated methods in CustomizableOptional (#151444)Kazu Hirata1-11/+0
This patch removes deprecated methods in CustomizableOptional. These methods come from llvm::Optional, which later got renamed to CustomizableOptional. Since CustomizableOptional is used only in OptionalDirectoryEntryRef and OptionalFileEntryRef, we do not need to have full std::optional-like support in CustomizableOptional.
36 hours[llvm] Proofread LangRef.rst (#151443)Kazu Hirata1-16/+16
37 hoursNFC: Clean up construction of IntrusiveRefCntPtr from raw pointers for ↵James Y Knight37-155/+165
llvm::vfs::FileSystem. (#151407) This switches to `makeIntrusiveRefCnt<FileSystem>` where creating a new object, and to passing/returning by `IntrusiveRefCntPtr<FileSystem>` instead of `FileSystem*` or `FileSystem&`, when dealing with existing objects. Part of cleanup #151026.