- Dec 12, 2023
-
-
James Y Knight authored
This will result in larger atomic operations getting expanded to `__atomic_*` libcalls via AtomicExpandPass, which matches what Clang already does in the frontend. Additionally, adjust some comments, and remove partial code dealing with larger-than-128bit atomics, as it's now unreachable. AArch64 always supports 128-bit atomics, so there's no conditionals needed here. (Though: we really ought to require that a 128-bit load is available, not just a cmpxchg, which would mean conditioning on LSE2. But that's future work.) The arm64-irtranslator.ll test was adjusted as it was using an i258 type as a hack to avoid IR atomic lowering to test GlobalISel behavior. Pass -mattr=+lse and use i32, instead, to accomplish that goal in a way that continues to work.
-
Augusto Noronha authored
The newly introduced LocationListLookupTestCase.test_loclist_expr test fails with older clangs.
-
Lang Hames authored
SimpleMachOHeaderMU can be used as a convenient base for classes that create custom MachO headers. Instances of these custom classes can be used by passing a MachOHeaderMUBuilder using the MachOPlatform extensions added in ef314d39.
-
Fangrui Song authored
-
Mikhail Gudim authored
Support was added for the following fusions: auipc-addi, slli-srli, ld-add Some parts of the code became repetative, so small refactoring of existing lui-addi fusion was done.
-
Cyndy Ishida authored
-
Andrzej Warzyński authored
Reverting a workaround intended specifically for SPRI-V. That workaround emerged from this discussion: * https://github.com/llvm/llvm-project/pull/72105 AFAIK, it hasn't been required in practice. This is based on IREE (https://github.com/openxla/iree), which has just bumped it's fork of LLVM without using it (*). (*) https://github.com/openxla/iree/commit/cef31e775e03ec83420e4a7b47a992242d8df37c This reverts commit bbd2b08b.
-
Fangrui Song authored
-
Hui authored
Clang's support for atomic operations on long doubles is currently broken, so these tests don't work everywhere. This is a long standing condition and the goal of this patch is to get the CI green again on all platforms. The actual Clang fixes will be pursued separately. Fixes #73791
-
Peter Klausler authored
For a character literal that is split over more than one source line with free form line continuation using '&' at the end of one line but missing the standard-required '&' on the continuation line, also handle the case of spaces at the beginning of the continuation line. For example, PRINT *, 'don'& 't poke the bear' now prints "don't poke the bear", like nearly all other Fortran compilers do. This is not strictly standard conforming behavior, and the compiler emits a portability warning with -pedantic. Fixes llvm-test-suite/Fortran/gfortran/regression/continuation_1.f90, .../continuation_12.f90, and .../continuation_13.f90. -
Peter Klausler authored
There was some confusion about units (bytes vs characters) in the handling of the amount of input remaining in fixed-width formatted input fields. Clarify that any variable or parameter counting "remaining" space in a field in the I/O runtime is always in units of bytes, and make it so where it wasn't. Fixes the bug(s) in llvm-test-suite/Fortran/gfortran/regression/char4_iunit_2.f03, although the test still won't pass due to its dependence on gfortran's list-directed output spacing.
-
Peter Klausler authored
The overflow check didn't work for a 27-digit octal field containing an 80-bit x87 extended precision real value. The count of bytes required was too large because the leading digit (1) was assumed to require a full three bits. And the actual transmission of the octal input digits to the output buffer was incorrect, too. Fixes llvm-test-suite/Fortran/gfortran/regression/boz_15.f90.
-
Peter Klausler authored
Most Fortran implementations support a READ statement after a WRITE without repositioning on a sequential unit; it implies on ENDFILE and then hits an EOF condition. Fixes llvm-test-suite/Fortran/gfortran/regression/backspace_2.f.
-
Kazu Hirata authored
This patch fixes: bolt/lib/Core/BinaryFunctionProfile.cpp:222:10: error: variable 'BBMergeSI' set but not used [-Werror,-Wunused-but-set-variable] bolt/lib/Passes/VeneerElimination.cpp:67:12: error: variable 'VeneerCallers' set but not used [-Werror,-Wunused-but-set-variable]
-
Zequan Wu authored
-
Craig Topper authored
This makes it consistent with other builtins that require a specific extension.
-
Craig Topper authored
The "to be enabled" seemed unnecessary.
-
Peter Klausler authored
… input The current EOF detection method (IsAtEOF()) depends on comparing the current record number with the record number of the endfile record, if it is known, which it is for units that have been written and then rewound for input. For formatted input, this is wrong in the case of a unit written with in-band newline characters. Rather than scan output data to count newlines, it's best to just organically determine EOF by detecting a failed or short read(), as we would have done anyway had the endfile record number not been known. (I considered resetting the endfile record number at the point of a REWIND, but not all rewinds are followed by input; it seems wiser to defer the resetting until an actual READ takes place.) Fixes llvm-test-suite/Fortran/gfortran/regression/backslash_2.f90
-
Peter Klausler authored
Lowering doesn't use it, and won't need it in the future; it emits in-line code for conversions and for assignments to scalars, and uses the general Assign() routine for arrays.
-
Peter Klausler authored
…was written At the end of an internal output statement, The I/O runtime fills (the remainder of) the current record with blanks if it's the only record or if anything had been written to it. This turns out to be wrong in the case of a format that ends with an explicit advance to the next record, which needs to be cleared even if nothing has been written. Fixes llvm-test-suite/Fortran/gfortran/regression/arrayio_1.f90.
-
Fangrui Song authored
-
Amir Ayupov authored
Provide backwards compatibility for YAML profile that uses `std::hash`: xxh3 hash is the default for newly produced profile (sets `std-hash: false`), whereas the profile that doesn't specify `std-hash` will be treated as `std-hash: true`, preserving old behavior.
-
Peter Klausler authored
After a non-advancing WRITE to a unit, ensure that any ENDFILE operation (explicit or implicit) terminates the record. (All other Fortran implementations do so except XLF.) Fixes llvm-test-suite/Fortran/gfortran/regression/advance_6.f90.
-
Craig Topper authored
We only need to check the result type. Use getBuiltinVectorTypeInfo to lookup the element size.
-
Nico Weber authored
-
Walter Erquinigo authored
This is an extension to the protocol that emits the declaration information along with the metadata of each variable. This can be used by vscode extensions to implement, for example, a "goToDefinition" action in the debug tab, or for showing the value of a variable right next to where it's declared during a debug session. As this is cheap, I'm not gating this information under any setting.
-
Artem Belevich authored
-
Peter Klausler authored
A tricky case in Fw.d output editing is when the value needs to be rounded either to a signed zero or away from zero to a power of ten (1.0, 0.1, &c.). A bug report for LLVM on GitHub (#74274) exposed a bug in this code in the case of Fw.0 editing where a value just over 0.5 was rounded incorrectly to 0 rather than 1 when no fractional digits were requested. Rework that algorithm a little, ensuring that the initial binary->decimal conversion produces at least one digit, and coping correctly with the rounding of an exact 0.5 value for Fw.0 editing (rounding it to the nearest even decimal, namely 0, following near-universal compiler-dependent behavior in other Fortrans). Fixes https://github.com/llvm/llvm-project/issues/74274.
-
Benjamin Kramer authored
sm_80 only has f32->bf16 conversions, the remaining integer conversions arrived with sm_90. Use a two-step conversion for sm_80. There doesn't seem to be a way to express this promotion directly within the legalization framework, so fallback on Custom lowering.
-
Peter Klausler authored
An INTENT(IN) attribute on a pointer dummy argument prevents modification of the pointer itself only, not modification of any component of its target. Fix this case without breaking definability checking for pointer components of non-pointer INTENT(IN) dummy arguments.
-
Craig Topper authored
-
Peter Klausler authored
The present implementation of defined formatted I/O is incorrect for arrays in the data item list; it assumes that a DT defined format descriptor (or list-directed/namelist instance) applies to all of the elements in the array. The loop over the elements in the array is within the DefinedFormattedIo() template function that handles defined formatted I/O, not around its calls. This causes only one format list edit descriptor to be used for the whole array, which is of course wrong. Invert this arrangment by performing the per-element looping in at the top level in FormattedDerivedTypeIo() instead. Defined unformatted I/O remains as it was.
-
Stefan Gränitz authored
Allow C-API users to debug their JITed code via the GDB JIT Interface. This is currently supported on ELF and MachO based platforms. On other systems `LLVMOrcLLJITEnableDebugSupport()` returns an error. This patch adds a new C-API header `LLJITUtils.h`, which can host further advanced JIT features in the future. Using the header requires linking against LLVMOrcDebugging.
-
Walter Erquinigo authored
Currently there's an include in which `[opt]` might be emitted twice if the frame format also asks for it. As a trivial fix, we should manually emit `[opt]` only if a custom frame format is not specified.
-
Peter Klausler authored
Defined unformatted I/O is not allowed except from/to an external unit. This restriction prohibits an INQUIRE(IOLENGTH=n) statement from using derived types with defined unformatted output in its I/O list. The runtime currently detects this case and crashes with an internal error; this patch defines a new I/O error enum and causes the program to crash with a more useful message.
-
Natalie Chouinard authored
-
Jonathan Thackray authored
Neoverse N2 was incorrectly marked as an Armv8.5a core. This has been changed to an Armv9.0a core. However, crypto options are not enabled by default for Armv9 cores, so -mcpu=neoverse-n2+crypto is required to enable crypto for this core. Neoverse N2 Technical Reference Manual: https://developer.arm.com/documentation/102099/0003/
-
michaelrj-google authored
An unsigned integer was being initialized with -1 to set all its bits to 1, but this doesn't work for the BigInt class which may be used as an integer type on systems that don't support uint128 natively. This patch moves the initialization to use ~T(0) instead.
-
Johannes Doerfert authored
-
Amy Huang authored
no_unique_address makes it possible for a class to be empty and have non-zero virtual size, so just remove this assert. Bug: https://github.com/llvm/llvm-project/issues/74442
-