- Oct 27, 2022
-
-
Jonas Devlieghere authored
Because DW_TAG_LLVM_ptrauth_type is not marked as a type, dwarfdump currently emits a spurious error: DIE has DW_AT_type with incompatible tag DW_TAG_LLVM_ptrauth_type. This patch fixes that and adds a test.
-
Mehdi Amini authored
mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp:67:30: error: use 'template' keyword to treat 'dyn_cast_or_null' as a dependent template name .dyn_cast_or_null<arith::FastMathFlagsAttr>(); ^ template -
Michael Kruse authored
The MaximalStaticExpansionPass was already ported to the NPM in 02f64067. Allow adding it to the default NPM pass builder pipeline using -polly-enable-mse.
-
Michael Kruse authored
The JSONExporter pass was already ported to the NPM, the pass builder jsut had to add it to the pass pipeline when requested.
-
David Blaikie authored
Differential Revision: https://reviews.llvm.org/D118511
-
Steven Wu authored
According to the documentation, lto_module_create_in_codegen_context should return NULL on error but currently it is accidentally return error_code. Since this is a bug fix and it seems to be a one-off bug that only affects this API, there is no need to bump API version. rdar://101505192 Reviewed By: pete Differential Revision: https://reviews.llvm.org/D136769
-
Tue Ly authored
Adding `EXPECT_MPFR_MATCH_ROUNDING_SILENTLY` macro that does not call `explainError` when the tests fail. This is useful to check the passing or failing rates, such as hitting percentages of fast passes in math implementations. Reviewed By: michaelrj, sivachandra Differential Revision: https://reviews.llvm.org/D136731
-
David Blaikie authored
The AST/conditionally-trivial-smfs tests look a bit questionable, but are consistent with GCC's POD-ness, at least as far as packing is concerned: https://godbolt.org/z/36nqPMbKM (questionable because it looks like the type would be non-copyable, so how could it be pod? But the calling convention/pass by value seems to work correctly (local testing verifies that this behavior is preserved even with this patch: https://godbolt.org/z/3Pa89zsv6 )) Differential Revision: https://reviews.llvm.org/D119051
-
Emilio Cota authored
-
David Blaikie authored
Added to address some uses of implicit CTAD added in clang recently.
-
Craig Topper authored
This avoids the call overhead as well as the the save/restore of fflags and the snan handling in the libm function. The save/restore of fflags and snan handling are needed to be correct for -ftrapping-math. I think we can ignore them in the default environment. The inline sequence will generate an invalid exception for nan and an inexact exception if fractional bits are discarded. I've used a custom inserter to explicitly create the control flow around the float->int->float conversion. We can probably avoid the final fsgnj after the conversion for no signed zeros FMF, but I'll leave that for future work. Note the comparison constant is slightly different than glibc uses. They use 1<<53 for double, I'm using 1<<52. I believe either are valid. Numbers >= 1<<52 can't have any fractional bits. It's ok to do the float->int->float conversion on numbers between 1<<53 and 1<<52 since they will all fit in 64. We only have a problem if the double can't fit in i64 Reviewed By: reames Differential Revision: https://reviews.llvm.org/D136508
-
Quentin Colombet authored
The `extract_strided_metadata` operation literally breaks down a memory descriptor into its different components. Teach the MemRefToLLVM conversion framework this fact. Differential Revision: https://reviews.llvm.org/D136304
-
Nick Desaulniers authored
for commit ad78ce44 ("[clang][Toolchains][Gnu] pass -gdwarf-* through to assembler")
-
Sanjay Patel authored
-
Craig Topper authored
-
Siva Chandra authored
-
Guozhi Wei authored
The test case optnone-simple-functions.cpp is expected to be compiled unoptimized even under -O2 because of attribute optnone. But this attribute is missed for main function, and caused the fail in https://lab.llvm.org/buildbot/#/builders/217/builds/14046 when it triggered optimizations. This patch fixes that by adding attribute optnone to main function. Differential Revision: https://reviews.llvm.org/D136778
-
Sami Tolvanen authored
Clang supports indirect call Control-Flow Integrity (CFI) sanitizers (e.g. -fsanitize=cfi-icall), which enforce an exact type match between a function pointer and the target function. Unfortunately, Clang doesn't provide diagnostics that would help developers avoid function type casts that lead to runtime CFI failures. -Wcast-function-type, while helpful, only warns about ABI incompatibility, which isn't sufficient with CFI. Add -Wcast-function-type-strict, which checks for a strict type compatibility in function type casts and helps warn about casts that can potentially lead to CFI failures. Reviewed By: nickdesaulniers, aaron.ballman Differential Revision: https://reviews.llvm.org/D134831
-
Jonas Devlieghere authored
D136396 broke optnone-simple-functions. Temporary disabling the test to unblock the bot until the Sony folks can have a look. https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/47878/
-
Félix Cloutier authored
This reverts commit fb1e90ef.
-
Ben Langmuir authored
Move the check for SOURCE_DATE_EPOCH to the driver and use a cc1 option to pass it to the frontend. This avoids hidden state in the cc1 invocation and makes this env variable behave more like other env variables that clang handles in the driver. Differential Revision: https://reviews.llvm.org/D136717
-
Johannes Doerfert authored
-
Nico Weber authored
-
raghavmedicherla authored
Differential Revision: https://reviews.llvm.org/D136715
-
Félix Cloutier authored
This change modifies the implementation of the format() function so that vendor forks committed to building with compilers that support __attribute__((format)) on non-variadic functions can check the format() function with it. Reviewed By: ahatanak Differential Revision: https://reviews.llvm.org/D132413 rdar://84571523
-
Jordan Rupprecht authored
In certain configurations, libc++ headers all exist in the same directory, and libc++ binaries exist in the same directory as lldb libs. When `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is enabled (*and* the host is not Apple, which is why I assume this wasn't caught by others?), this is not the case: most headers will exist in the usual `include/c++/v1` directory, but `__config_site` exists in `include/$TRIPLE/c++/v1`. Likewise, the libc++.so binary exists in `lib/$TRIPLE/`, not `lib/` (where LLDB libraries reside). This also adds the just-built-libcxx functionality to the lldb-dotest tool. The `LIBCXX_` cmake config is borrowed from `libcxx/CMakeLists.txt`. I could not figure out a way to share the cmake config; ideally we would reuse the same config instead of copy/paste. Reviewed By: JDevlieghere, fdeazeve Differential Revision: https://reviews.llvm.org/D133973
-
Jeremy Furtek authored
This diff adds initial (partial) support for "fastmath" attributes for floating point operations in the arithmetic dialect. The "fastmath" attributes are implemented using a default-valued bit enum. The defined flags currently mirror the fastmath flags in the LLVM dialect (and in LLVM itself). Extending the set of flags (if necessary) is left as a future task. In this diff: - Definition of FastMathAttr as a custom attribute in the Arithmetic dialect that inherits from the EnumAttr class. - Definition of ArithFastMathInterface, which is an interface that is implemented by operations that have an arith::fastmath attribute. - Declaration of a default-valued fastmath attribute for unary and (some) binary floating point operations in the Arithmetic dialect. - Conversion code to lower arithmetic fastmath flags to LLVM fastmath flags NOT in this diff (but planned or currently in progress): - Documentation of flag meanings - Addition of FastMathAttr attributes to other dialects that might lower to the Arithmetic dialect (e.g. Math and Complex) - Folding/rewrite implementations that are enabled by fastmath flags - Specification of fastmath values from Python bindings (pending other in- progress diffs) Reviewed By: mehdi_amini, vzakhari Differential Revision: https://reviews.llvm.org/D126305
-
Jakob Johnson authored
Occasionally the assertion that enforces increasing TSC values in `DecodedThread::NotifyTsc` would get tripped during large multi CPU trace decoding. The root cause of this issue was an assumption that all the data of a PSB will fit within the start,end TSC of the "owning" `ThreadContinuousExecution`. After investigating, this is not the case because PSBs can have multiple TSCs. This diff works around this issue by introducing a TSC upper bound for each `PSBBlockDecoder`. This fixes the assertion failure by simply "dropping" the remaining data of PSB whenever the TSC upper bound is exceeded during decoding. Future work will do a larger refactor of the multi CPU decoding to remove the dependencies on this incorrect assumption so that PSB blocks that span multiple `ThreadContinuousExecutions` are correctly handled. correctly Test Plan: Differential Revision: https://reviews.llvm.org/D136610
-
Katherine Rasmussen authored
Add three tests for lock-stmt. The first includes standard-conforming statements, the second includes non-standard-conforming statements because of errors where something unexpected occurs, such as a missing lock-variable, and the third includes non-standard-conforming statements because of semantic errors, such as type or rank mismatches. Reviewed By: rouson Differential Revision: https://reviews.llvm.org/D136628
-
Michael Jones authored
When a number for strtofloat has an exponent that's too big or small, it doesn't need to be calculated precisely since it is guaranteed to be either INF or 0.0. This tightens those cutoffs to improve performance. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D136699
-
Chia-hung Duan authored
Also add a test for TrustyConfig to ensure it'll be awared of any scudo configuration change. Differential Revision: https://reviews.llvm.org/D136732
-
Slava Zakharin authored
The intention is to use these APIs for copyin/copyout of subprogram arguments at the call sites. Currently, Flang generates loop nests to do this, and in some corner cases this results in very long compilation times due to LLVM loop optimizations. For example, Flang produces 25245 loops for 521.wrf/module_dm.f90. If we extract the copyin/copyout loops into runtime, Flang will only produce 207 loops, and the compilation time may reduce by 47x. Given that the copyin/copyout loop nests can not be fused with other loop nests, extracting them into runtime functions should not reduce performance if the runtime optimizes the leading contiguous dimension copies. The implementation will come in separate patches. Differential Revision: https://reviews.llvm.org/D136378
-
James Y Knight authored
This is a follow-on to https://reviews.llvm.org/D134073. The number of MIPS16 changes here is a bit surprising. Many of the fields with mismatched names were NOT previously choosing the correct argument positionally, but instead doing something completely wrong (e.g. it would encode a register where an immediate was expected). But, machine-code generation for MIPS16 has never actually functioned. It's also fully untested, thus, the MIPS16 changes, despite changing behavior, breaks (and fixes) zero tests. This change does not fix MIPS16 output, but it ought to be at least incrementally less broken. Outside MIPS16, I believe the only functional change is to the 'ginvi' instruction: it was previously encoding garbage into a field which was specified to be '00'. Fortunately, it was covered by tests -- and the tests were testing the incorrect behavior. So, fixed. Differential Revision: https://reviews.llvm.org/D134220
-
James Y Knight authored
This is a follow-on to https://reviews.llvm.org/D134073. It renames a few fields to have consistent names, as well as renaming operands to match the field names. Behavior is unchanged by this cleanup. (The only generated code change is for the disassembler for LDSTUB/LDSTUBA, but in both old and new versions, it fails to add enough operands, and thus triggers a runtime abort. I will address that bug in a future commit.) Differential Revision: https://reviews.llvm.org/D134201
-
James Y Knight authored
This brings it in line with recommended practice after the introduction of sub-operand naming in a538d1f1, and the deprecation of positional argument matching in 5351878b.
-
Sanjay Patel authored
-
Sanjay Patel authored
scalar-to-vector (scalar binop (extractelt V, Idx), C) --> shuffle (vector binop V, C'), {Idx, -1, -1...} We generally try to avoid ad-hoc vectorization in SDAG, but the motivating case from issue #39482 escapes our normal vectorization folds in IR. It seems like it should always be a win to transform this pattern in cases where we have the same vector type for input and output and the target supports the vector operation. That avoids transfers from vector to scalar and back. In the x86 shift examples, we create the scalar-to-vector node during legalization. I'm not sure if there's a more general way to create the pattern for testing. (If so, I could add tests for other targets.) Differential Revision: https://reviews.llvm.org/D136713 -
Matt Arsenault authored
-
Fangrui Song authored
-
Aaron Ballman authored
This gets a start on testing how we're doing for C11 DRs
-