- Jun 27, 2022
-
-
LLVM GN Syncbot authored
-
Louis Dionne authored
Previously, we'd use raw pointers when the debug mode was enabled, which means we wouldn't get out-of-range checking with std::span's iterators. This patch introduces a new class called __bounded_iter which can be used to wrap iterators and make them carry around bounds-related information. This allows iterators to assert when they are dereferenced outside of their bounds. As a fly-by change, this commit removes the _LIBCPP_ABI_SPAN_POINTER_ITERATORS knob. Indeed, not using a raw pointer as the iterator type is useful to avoid users depending on properties of raw pointers in their code. This is an alternative to D127401. Differential Revision: https://reviews.llvm.org/D127418
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D128455
-
Valentin Clement authored
These tests were left behind during the upstreaming of parts lowering. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D128632 Co-authored-by:
V Donaldson <vdonaldson@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Wei Yi Tee authored
When a `nullptr` is assigned to a pointer variable, it is wrapped in a `ImplicitCastExpr` with cast kind `CK_NullTo(Member)Pointer`. This patch assigns singleton pointer values representing null to these expressions. For each pointee type, a singleton null `PointerValue` is created and stored in the `NullPointerVals` map of the `DataflowAnalysisContext` class. The pointee type is retrieved from the implicit cast expression, and used to initialise the `PointeeLoc` field of the `PointerValue`. The `PointeeLoc` created is not mapped to any `Value`, reflecting the absence of value indicated by null pointers. Reviewed By: gribozavr2, sgatev, xazax.hun Differential Revision: https://reviews.llvm.org/D128056
-
Nicolas Vasilache authored
An optional thread_dim_mapping index array attribute specifies for each virtual thread dimension, how it remaps 1-1 to a set of concrete processing element resources (e.g. a CUDA grid dimension or a level of concrete nested async parallelism). At this time, the specification is backend-dependent and is not verified by the op, beyond being an index array attribute. It is the reponsibility of the lowering to interpret the index array in the context of the concrete target the op is lowered to, or to ignore it when the specification is ill-formed or unsupported for a particular target. Differential Revision: https://reviews.llvm.org/D128633
-
Matthias Springer authored
This is in preparation of adding memory space support. Differential Revision: https://reviews.llvm.org/D128277
-
Matthias Springer authored
-
Matthias Springer authored
This allows for better type inference during bufferization and is in preparation of supporting memory spaces. Differential Revision: https://reviews.llvm.org/D128422
-
Matthias Springer authored
This allows for better type inference during bufferization and is in preparation of supporting memory spaces. Differential Revision: https://reviews.llvm.org/D128581
-
Matthias Springer authored
This allows for better type inference during bufferization and is in preparation of supporting memory spaces. Differential Revision: https://reviews.llvm.org/D128580
-
Jay Foad authored
-
Aaron Ballman authored
This should address the break from: https://lab.llvm.org/buildbot/#/builders/92/builds/28769
-
Matthias Springer authored
This allows for better type inference during bufferization and is in preparation of supporting memory spaces. Differential Revision: https://reviews.llvm.org/D128579
-
Dmitry Preobrazhensky authored
Summary of changes: - Updated MUBUF lds syntax (see https://reviews.llvm.org/D124485). - Updated SMEM syntax (see https://reviews.llvm.org/D127314). - Enabled src0=literal for v_madak*, v_madmk* (see https://reviews.llvm.org/D111067). - Removed SYSMSG_OP_HOST_TRAP_ACK message. - Minor bug fixing and improvements.
-
Edd Barrett authored
When a function does a dynamic stack allocation, the function's stack size (in the stack map) is reported as UINT64_MAX. This change tests and documents this property. Differential Revision: https://reviews.llvm.org/D128525
-
Bradley Smith authored
These intrinsics are now fundemental for SVE code generation and have been present for a year and a half, hence move them out of the experimental namespace. Differential Revision: https://reviews.llvm.org/D127976
-
Simon Pilgrim authored
Identified in the regression reported by @alexfh on rGb5d7beeb - IsConcatFree wasn't ensuring the subvector extraction index matched the position it would be concatenated back into.
-
Matthias Springer authored
This is useful because the result type of an op can sometimes be inferred from its body (e.g., `scf.if`). This will be utilized in subsequent changes. Also introduces a new `getBufferType` interface method on BufferizableOpInterface. This method is useful for computing a bufferized block argument type with respect to OpOperand types of the parent op. Differential Revision: https://reviews.llvm.org/D128420
-
Jolanta Jensen authored
Libraries use this flag to decide whether to use the fma builtin. Author: Paul Walker Differential Revision: https://reviews.llvm.org/D127655
-
Matthias Springer authored
This attribute is currently supported on AllocTensorOp only. Future changes will add support to other ops. Furthermore, the memory space is not propagated properly in all bufferization patterns and some of the core bufferization infrastructure. This will be addressed in a subsequent change. Differential Revision: https://reviews.llvm.org/D128274
-
gbreynoo authored
I discovered that when compared to GNU the llvm-ar MRI script parsing of CREATE could lead to some strange behaviour. This fix improves the error message in the case when no archive name is given and will not allow the adding of members until CREATE is called. Along with this change I added more testing of the CREATE command. Differential Revision: https://reviews.llvm.org/D128055
-
Andrzej Warzynski authored
This patch adds support for most common optimisation compiler flags: `-O{0|1|2|3}`. This is implemented in both the compiler and frontend drivers. At this point, these options are only used to configure the LLVM optimisation pipelines (aka middle-end). LLVM backend or MLIR/FIR optimisations are not supported yet. Previously, the middle-end pass manager was only required when generating LLVM bitcode (i.e. for `flang-new -c -emit-llvm <file>` or `flang-new -fc1 -emit-llvm-bc <file>`). With this change, it becomes required for all frontend actions that are represented as `CodeGenAction` and `CodeGenAction::executeAction` is refactored accordingly (in the spirit of better code re-use). Additionally, the `-fdebug-pass-manager` option is enabled to facilitate testing. This flag can be used to configure the pass manager to print the middle-end passes that are being run. Similar option exists in Clang and the semantics in Flang are identical. This option translates to extra configuration when setting up the pass manager. This is implemented in `CodeGenAction::runOptimizationPipeline`. This patch also adds some bolier plate code to manage code-gen options ("code-gen" refers to generating machine code in LLVM in this context). This was extracted from Clang. In Clang, it simplifies defining code-gen options and enables option marshalling. In Flang, option marshalling is not yet supported (we might do at some point), but being able to auto-generate some code with macros is beneficial. This will become particularly apparent when we start adding more options (at least in Clang, the list of code-gen options is rather long). Differential Revision: https://reviews.llvm.org/D128043 -
Wei Yi Tee authored
This patch introduces `buildAndSubstituteFlowCondition` - given a flow condition token, this function returns the expression of constraints defining the flow condition, with values substituted where specified. As an example: Say we have tokens `FC1`, `FC2`, `FC3`: ``` FlowConditionConstraints: { FC1: C1, FC2: C2, FC3: (FC1 v FC2) ^ C3, } ``` `buildAndSubstituteFlowCondition(FC3, /*Substitutions:*/{{C1 -> C1'}})` returns a value corresponding to `(C1' v C2) ^ C3`. Note: This function returns the flow condition expressed directly as its constraints, which differs to how we currently represent the flow condition as a token bound to a set of constraints and dependencies. Making the representation consistent may be an option to consider in the future. Depends On D128357 Reviewed By: gribozavr2, xazax.hun Differential Revision: https://reviews.llvm.org/D128363 -
Andrzej Warzynski authored
Document changes introduced in https://reviews.llvm.org/D126164. Differential Revision: https://reviews.llvm.org/D128413
-
Wei Yi Tee authored
[clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`. `createStorageLocation` in `DataflowEnvironment` is now a trivial wrapper around the logic in `DataflowAnalysisContext`. Additionally, `getObjectFields` and `getFieldsFromClassHierarchy` (required for the implementation of `createStorageLocation`) are also moved to `DataflowAnalysisContext`. Reviewed By: gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D128359
-
Siva Chandra Reddy authored
This will be expanded in future as more functions are brought up on arm32.
-
Sven van Haastregt authored
When overload resolution fails, clang emits a note diagnostic for each candidate. For OpenCL builtins this often leads to many repeated note diagnostics with no new information. Stop emitting such notes. Update a test that was relying on counting those notes to check how many builtins are available for certain extension configurations. Differential Revision: https://reviews.llvm.org/D127961
-
Nikita Popov authored
This is checked by the IR verifier, so replace the condition with an assert.
-
Jay Foad authored
Without this, the new test case would fail with: AMDGPUInstPrinter.cpp:545: void llvm::AMDGPUInstPrinter::printImmediate64(uint64_t, const llvm::MCSubtargetInfo &, llvm::raw_ostream &): Assertion `isUInt<32>(Imm) || Imm == 0x3fc45f306dc9c882' failed. Differential Revision: https://reviews.llvm.org/D128435
-
Siva Chandra Reddy authored
It was previously a header library. Making it an object library will allow us to declare thread local variables which can used to setup a thread's self object.
-
Matthias Springer authored
These functions now accep unsigned attributes for address spaces instead of Attributes. Differential Revision: https://reviews.llvm.org/D128275
-
Simon Tatham authored
According to EHABI32 §8.5.2, the PAC for the return address of a function described in an exception table is supposed to be addressed in the _Unwind_VRS_{Get,Set} API by setting regclass=_UVRSC_PSEUDO and regno=0. (The space of 'regno' values is independent for each regclass, and for _UVRSC_PSEUDO, there is only one valid regno so far.) That is indeed what libunwind's _Unwind_VRS_{Get,Set} functions expect to receive. But at two call sites, the wrong values are passed in: regno is being set to UNW_ARM_RA_AUTH_CODE (0x8F) instead of 0, and in one case, regclass is _UVRSC_CORE instead of _UVRSC_PSEUDO. As a result, those calls to _Unwind_VRS_{Get,Set} return _UVRSR_FAILED, which their callers ignore. So if you compile in the AUTG instruction that actually validates the PAC, it will try to validate what's effectively an uninitialised register as an authentication code, and trigger a CPU fault even on correct exception unwinding. Reviewed By: danielkiss ... -
Florian Hahn authored
Use poison instead of undef for SCEVUnkown of unreachable values. This should be in line with the movement to replace undef with poison when possible. Suggested in D114650. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D128586
-
Mikhail Goncharov authored
This reverts commit a57b62de. lldb-aarch64-ubuntu buildbot test fails since https://lab.llvm.org/buildbot/#/builders/96/builds/25128
-
Nikita Popov authored
This pass depends on AAResults. This fixes the ocaml IPO binding tests.
-
Nikita Popov authored
Support for the legacy pass manager in ArgPromotion causes complications in D125485. As the legacy pass manager for middle-end optimizations is unsupported, drop ArgPromotion from the legacy pipeline, rather than introducing additional complexity to deal with it. Differential Revision: https://reviews.llvm.org/D128536
-
Adrian Kuegel authored
-
Chuanqi Xu authored
-
Jacques Pienaar authored
-