- Sep 23, 2022
-
-
Jan Svoboda authored
In `ASTWriter`, input files are sorted based on whether they are system or user. The current implementation used single `std::queue` with `push_back` and `push_front`. This resulted in the user files being reversed. This patch fixes that by keeping the system/user distinction, but otherwise serializing files in the order they were loaded by the `SourceManager`. This is then used in the dependency scanner to report module map dependencies in the correct order. Depends on D134224. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D134248
-
Teresa Johnson authored
Profile matching and IR annotation for memprof profiles. See also related RFCs: RFC: Sanitizer-based Heap Profiler [1] RFC: A binary serialization format for MemProf [2] RFC: IR metadata format for MemProf [3]* * Note that the IR metadata format has changed from the RFC during implementation, as described in the preceeding patch adding the basic metadata and verification support. The matching is performed during the normal PGO annotation phase, to ensure that the inlines applied in the IR at that point are a subset of the inlines in the profiled binary and thus reflected in the profile's call stacks. This is important because the call frames are associated with functions in the profile based on the inlining in the symbolized call stacks, and this simplifies locating the subset of profile data relevant for matching onto each function's IR. The PGOInstrumentationUse pass is enhanced to perform matching for whatever combination of memprof and regular PGO profile data exists in the profile. Using the utilities introduced in D128854: The memprof profile data for each context is converted to "cold" or "notcold" based on parameterized thresholds for size, access count, and lifetime. The memprof allocation contexts are trimmed to the minimal amount of context required to uniquely identify whether the context is cold or not cold. For allocations where all profiled contexts have the same allocation type, no memprof metadata is attached and instead the allocation call is directly annotated with an attribute specifying the alloction type. This is the same attributed that will be applied to allocation calls once cloned for different contexts, and later used during LibCall simplification to emit allocation hints [4]. Depends on D128141 and D128854. [1] https://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html [2] https://lists.llvm.org/pipermail/llvm-dev/2021-September/153007.html [3] https://discourse.llvm.org/t/rfc-ir-metadata-format-for-memprof/59165 [4] https://github.com/google/tcmalloc/commit/ab87cf382dc56784f783f3aaa43d6d0465d5f385 Differential Revision: https://reviews.llvm.org/D128142
-
Simon Pilgrim authored
Preparation for adding cost kinds handling This is necessary to eventually unblock D111968
-
Jan Svoboda authored
Module map files describing excluded headers do affect compilation. Track them in the compiler, serialize them into the PCM file and report them in the scanner. Depends on D134222. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D134224
-
Philip Reames authored
The transform to fold an add into the base of a scatter/gather was only checking to see if the LHS was a splat. Included test change indicates that splats are not canonicalized to LHS, and that we need to check both sides.
-
Philip Reames authored
-
Yitzhak Mandelbaum authored
Extend the context-sensitive analysis to handle a call to a method (of the same class) from within a method. That, is a member-call expression through `this`. Differential Revision: https://reviews.llvm.org/D134432
-
Quentin Colombet authored
Add a pattern to the pass that simplifies extract_strided_metadata(other_op(memref)). The new pattern gets rid of the expand_shape operation while materializing its effects on the sizes, and the strides of the base object. In other words, this simplification replaces: ``` baseBuffer, offset, sizes, strides = extract_strided_metadata(expand_shape(memref)) ``` With ``` baseBuffer, offset, baseSizes, baseStrides = extract_strided_metadata(memref) sizes#reassIdx = baseSizes#reassDim / product(expandShapeSizes#j, for j in group excluding reassIdx) strides#reassIdx = baseStrides#reassDim * product(expandShapeSizes#j, for j in reassIdx+1.. reassIdx+group.size-1) ``` Where `reassIdx` is a reassociation index for the group at `reassDim` and `expandShapeSizes#j` is either: - The constant size at dimension j, derived directly from the result type of the expand_shape op, or - An affine expression: baseSizes#reassDim / product of all constant sizes in expandShapeSizes. Note: baseBuffer and offset are unaffected by the expand_shape operation. Differential Revision: https://reviews.llvm.org/D133625 -
Jan Svoboda authored
This patch fixes compilation failure with explicit modules caused by scanner not reporting the module map describing the module whose implementation is being compiled. Below is a breakdown of the attached test case. Note the VFS that makes frameworks "A" and "B" share the same header "shared/H.h". In non-modular build, Clang skips the last import, since the "shared/H.h" header has already been included. During scan (or implicit build), the compiler handles "tu.m" as follows: * `@import B` imports module "B", as expected, * `#import <A/H.h>` is resolved textually (due to `-fmodule-name=A`) to "shared/H.h" (due to the VFS remapping), * `#import <B/H.h>` is resolved to import module "A_Private", since the header "shared/H.h" is already known to be part of that module, and the import is skipped. In the end, the only modular dependency of the TU is "B". In explicit modular build without `-fmodule-name=A`, TU does depend on module "A_Private" properly, not just textually. Clang therefore builds & loads its PCM, and knows to ignore the last import, since "shared/H.h" is known to be part of "A_Private". But with current scanner behavior and `-fmodule-name=A` present, the last import fails during explicit build. Clang doesn't know about "A_Private" (it's included textually) and tries to import "B_Private" instead, which it doesn't know about either (the scanner correctly didn't report it as dependency). This is fixed by reporting the module map describing "A" and matching the semantics of implicit build. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D134222
-
Alex Brachet authored
-
Xiang Li authored
The resource binding attribute is to set the virtual registers and logical register spaces resources in HLSL are bound to. Format is ''register(ID, space)'' like register(t3, space1). ID must be start with t – for shader resource views (SRV), s – for samplers, u – for unordered access views (UAV), b – for constant buffer views (CBV). Register space is default to space0. The full documentation is available here: https://docs.microsoft.com/en-us/windows/win32/direct3d12/resource-binding-in-hlsl Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D130033
-
Oleg Shyshkov authored
[mlir] Modify LinalgStructuredInterface to allow the computation block to have arguments only for a subset of operands. Summary: Currently there is an expectations that there is a corresponsing block argument for each operand. For some operation, it leads to unused arguments. For example, in `map`, only input operands are used for the computation. Differential Revision: https://reviews.llvm.org/D134444
-
Leonard Chan authored
This addresses https://github.com/llvm/llvm-project/issues/51066. Prior to this, dso_local_equivalent would lead to an llvm_unreachable in a switch in the FunctionComparator. This adds a conservative case in that switch that just compares the underlying functions. Differential Revision: https://reviews.llvm.org/D134300
-
Greg Clayton authored
When debugging using Fission (-gsplit-dwarf), we can sometimes have issues loading .dwo files if they are missing or if the path was relative and we were unable to locate the file. We can also skip loading due to DWO ID mismatch or if a .dwp file doesn't contain a matching .dwo file. Also .dwo files could be updated due to a recompile and if the user debugs an executable that was linked against the old .dwo file, it could fail to load the information. This patch adds a m_dwo_error to DWARFUnit that can be get/set and will cause "frame variable" to show errors when there are .dwo/.dwp issues informing the user about the error. Differential Revision: https://reviews.llvm.org/D134252
-
Michael Benfield authored
This option was just landed in D134381. It would make sense to actually document it. Differential Revision: https://reviews.llvm.org/D134457
-
Fangrui Song authored
For an ELFCLASS32 object, a compressed section due to --compress-debug-sections={zlib,zstd} has a tail padding of 12 zero bytes. zlib happily allows this while zstd is rigid and reports `error: '{{.*}}': failed to decompress section '.debug_foo': Src size is incorrect`. Cole Kissane reported the problem. Reviewed By: jhenderson, phosek Differential Revision: https://reviews.llvm.org/D134385 -
Yashwant Singh authored
-
Chris Bieneman authored
DXIL relies on a whole bunch of IR metadata constructs being populated in the right shape. Rather than just hard coding or using complicated arrangements of constant data strings, let's make first-class objects that reprensent the metadata and manage reading and writing the metadata from the module. Reviewed By: python3kgae Differential Revision: https://reviews.llvm.org/D134397
-
Nico Weber authored
-
Slava Zakharin authored
BytesFor() used to return KIND for the size, which is not always correct, so I changed it to return the size of the actual CppType corresponding to the given category and kind. MinElemLen() used to calculate size incorrectly (e.g. CFI_type_extended_double was sized 10, whereas it may occupy more bytes on a target), so I changed it to call BytesFor(). Additional changes were needed to resolve new failures for transformational intrinsics. These intrinsics used to work for not fully supported data types (e.g. REAL(3)), but now stopped working because CppType cannot be computed for those categories/kinds. The solution is to use known element size from the source argument(s) for establishing the destination descriptor - the element size is all that is needed for transformational intrinsics to keep working. Note that this does not help cases, where runtime still has to compute the element size, e.g. when it creates descriptors for components of derived types. If the component has unsupported data type, BytesFor() will still fail. So these cases require adding support for the missing types. New regression unit test in Runtime/Transformational.cpp demonstrates the case that will start working properly with this commit.
-
Michael Benfield authored
This is now an option under the check bugprone-sizeof-expression. Differential Revision: https://reviews.llvm.org/D134381
-
Jonathan Camilleri authored
The accessibility level of a typedef or using declaration in a struct or class was being lost when producing debug information. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D134339
-
Jonathan Camilleri authored
The accessibility level of a typedef or using declaration in a struct or class was being lost when producing debug information. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D134339
-
Aaron Ballman authored
We don't yet implement this paper, so this adds a basic test demonstrating that.
-
Christopher Bate authored
Test does a "CHECK-NOT" against the function name when it should check to ensure that the `vector.warp_execute_on_lane_0` is removed. Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D134448
-
Hassnaa Hamdi authored
Differential Revision: https://reviews.llvm.org/D132477
-
Anastasia Stulova authored
-
Simon Pilgrim authored
-
Saleem Abdulrasool authored
This does *NOT* change the emitted section flags in any way. This only impacts the internal classification of sections. Extend the section classification in LLVM for ELF targets. This has one important change: we now classify sections as text by default rather than readonly. This matches the behaviour for GAS better. Ensure that any section that has a writable attribute set is not treated as readonly. We also special case any section named `.debug_` which is reserved for DWARF as metadata. In the case none of the attributes are set (or because no attributes were provided), consult the section name for classification. We match the well known names and classify the section accordingly. Any remaining section is now classified as text. This change allows us to classify sections in the MC layer more precisely which is needed for subsequent changes for handling target specific behaviour. Re-apply the change that was reverted with additional changes to classify section prefixes appropriately and differentiate the TLS sections, addressing the FIXME and post-commit review comments by @MaskRay. Differential Revision: https://reviews.llvm.org/D133456 Reviewed By: @MaskRay
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D134372
-
Philip Reames authored
Enable registration of multiple exegesis targets at once. Use idiomatic approach to defining target select macros, but leave code in the llvm-mca sub-directories for now. This is a stepping stone towards allowing llvm-exegesis benchmarking via simulator or testing in non-target dependent tests. Differential Revision: https://reviews.llvm.org/D133605
-
- Sep 22, 2022
-
-
Philip Reames authored
This extends the previously added uniform store case to handle stores of loop varying values to a loop invariant address. Note that the placement of this code only allows unpredicated stores; this is important for correctness. (That is "IsPredicated" is always false at this point in the function.) This patch does not include scalable types. The diff felt "large enough" as it were; I'll handle that in a separate patch. (It requires some changes to cost modeling.) Differential Revision: https://reviews.llvm.org/D133580
-
Fraser Cormack authored
This patch uses structured bindings to simplify a couple of specific cases when lowering RVV operations where we commonly declare two SDValues and immediately 'tie' them to the mask and vector length. There's also a couple places where we split vectors that structured bindings make sense to use. This patch tries to keep these sorts of changes minimal and to cases where the returned types are commonly understood, rather than applying this wholesale to the RISCV backend. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D134442
-
Sanjay Patel authored
More coverage for D133584
-
Simon Pilgrim authored
Help check to see the costs predicted for mul->shift conversions
-
Philip Reames authored
Various bits of existing code assume the presence of one operand implies the presence of another. Add verifier rules to catch violations. Differential Revision: https://reviews.llvm.org/D133810
-
Craig Topper authored
The default fixed vector legalization is to unroll. The default scalable vector legalization is to clamp in the FP domain. The RVV vfcvt instructions have saturating behavior so we can use them directly. The only difference is that RVV instruction turn nan into the max value, but the _SAT intrinsics want 0. I'm only supporting 1 step of narrowing for now. I think we can support more steps by using VNCLIP to saturate and narrower. The only case that needs 2 steps of widening is f16->i64 which we can do as f16->f32->i64. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D134400
-
Craig Topper authored
Improve indentation. Fix the worst of the 80 column violations.
-
Dmitri Gribenko authored
-
Amara Emerson authored
-