- Sep 19, 2023
-
-
Bjorn Pettersson authored
Given that transition to opaque pointers a call to CreatePointerCast in processMemSetMemCpyDependence was found redundant. It would cast from "ptr" to "ptr" (both associated with the same address space).
-
Bjorn Pettersson authored
Given the transition to opaque pointers we no longer need to emit some pointer casts. Int8PtrTy was set up to be a ptr in same address space a OrigDest, making the first CreatePointerCast dead. And then NewDestGEP will end up having the same type as OrigDest, making the second CreatePointerCast dead.
-
Peter Klausler authored
The CFI_CDESC_T(rank) macro defined for C (not C++) in ISO_Fortran_binding.h incorporates a cdesc_t structure as a member, which works for data layout but doesn't allow for direct access to its members. (The C++ definition can use inheritance.) Restructure the definitions in that header file so that CFI_CDESC_T(rank) for C defines a struct with the expected members.
-
Tom Honermann authored
This change corrects some cases where the source location for an instantiated specialization of a function template or a member function of a class template was assigned the location of a non-defining declaration rather than the location of the definition the specialization was instantiated from. Fixes https://github.com/llvm/llvm-project/issues/26057 Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D64087
-
Peter Klausler authored
When a DATA statement object is not valid, there's a number of possible reasons. Emit an error message for the most egregious violation, so that an unlucky user doesn't fix something easy (due to a less-severe error message masking one that is worse) and then run into something that might be more serious.
-
Hongtao Yu authored
Broken debug information can give empty names for an inlined frame, e.g, ``` 0x1d605c68: ryKeyINS7_17SmartCounterTypesEEESt10shared_ptrINS7_15AsyncCacheValueIS9_EEESaIhESt6atomicEEE9fetch_subElSt12memory_order at Filename: edata.h Function start filename: edata.h Function start line: 266 Function start address: 0x1d605c68 Line: 267 Column: 0 (inlined by) at Filename: edata.h Function start filename: edata.h Function start line: 274 Function start address: 0x1d605c68 Line: 275 Column: 0 (inlined by) _EEEmmEv at Filename: arena.c Function start filename: arena.c Function start line: 1303 Line: 1308 Column: 0 ``` This patch avoids creating a sample context with an empty function name by stopping tracking at that frame. This prevents a hash failure that leads to an ICE, where empty context serves at an empty key for the underlying MapVector https://github.com/llvm/llvm-project/blob/7624de5beae2f142abfdb3e32a63c263a586d768/llvm/lib/ProfileData/SampleProfWriter.cpp#L261
-
Peter Klausler authored
…mmy argument Several compilers accept a null pointer (with or without a MOLD=) as an actual argument for association with an INTENT(IN) allocatable dummy argument. At runtime, the allocatable dummy argument appears to be in the unallocated state. This seems useful, unambiguous, unlikely to invalidate conforming code, and works with Intel, NAG, & XLF, so it should be supported with an optional portability warning in this compiler as well.
-
Arthur Eubanks authored
7d81813d says that this was used because functions missing certain attributes (e.g. fast math) would inherit behavior from previous functions with those attributes. However, later c378e52c explicitly set those attributes if they were missing and removed the use of DefaultOptions.
-
Peter Klausler authored
Semantic checking of COMMON blocks and EQUIVALENCE sets has an assumption that the base storage sequence object of each COMMON block object will also be in that COMMON block's list of objects, and emits an error message when this is not the case. This assumption is faulty; it is possible for a base object to have its COMMON block set during offset assignment. Fixes https://github.com/llvm/llvm-project/issues/65922.
-
Shoaib Meenai authored
Searching for target-specific standard library header and library paths should perform fallback searches for targets, the same way searching for the runtime libraries does. It's important for the header and library searches to be consistent, otherwise we could end up using mismatched headers and libraries. (See also https://reviews.llvm.org/D146664.) Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D159293
-
Shoaib Meenai authored
https://reviews.llvm.org/D71154 prevented Clang from search for libc++ headers installed alongside the driver when targeting Android. The motivation was the NDK's use of a different libc++ inline namespace (`__ndk1` instead of the standard `__1`), which made regular libc++ headers incompatible with the NDK's libc++ library. Since then, libc++ has gained the ability to install its `__config_site` header (which controls the inline namespace, among other things) to a per-target include directory, which enables per-target customizations. If this directory is present, the user has expressly built libc++ for Android, and we should use those headers. The motivation is that, with the current setup, if a user builds their own libc++ for Android, they'll use the library they built themselves but the NDK's headers instead of their own, which is surprising at best and can cause all sorts of problems (e.g. if you built your own libc++ with a different ABI configuration). It's important to match the headers and libraries in that scenario, and checking for an Android per-target include directory lets us do so without regressing the original scenario which https://reviews.llvm.org/D71154 was addressing. While I'm here, switch to using sys::path::append instead of slashes directly, to get system path separators on Windows, which is consistent with how library paths are constructed (and that consistency will be important in a follow-up, where we use a common search function for the include and library path construction). (As an aside, one of the motivations for https://reviews.llvm.org/D71154 was to support targeting both Android and Apple platforms, which expected libc++ headers to be provided by the toolcain at the time. Apple has since switched to including libc++ headers in the platform SDK instead of in the toolchain, so that specific motivation no longer applies either.) Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D159292
-
Shoaib Meenai authored
Projects like libc++ include their own cache files, and it's convenient to just be able to reuse those cache files as part of a runtimes build instead of having to duplicate the settings inside a special runtimes cache file (which will inevitably get out of sync). I'm not completely happy about overloading the existing argument passing behavior based on the argument name, but I also couldn't think of a good alternative. Suggestions are welcome. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D158791
-
LLVM GN Syncbot authored
-
Peter Klausler authored
The Fortran standards require (F'2023 C745) that a derived type with the SEQUENCE attribute have at least one component. No Fortran compiler actually enforces this constraint. Accept this usage with a warning.
-
Fangrui Song authored
-
Zijun Zhao authored
Reviewed By: #libc, var-const Differential Revision: https://reviews.llvm.org/D150831
-
Peter Klausler authored
A NULL() pointer is an acceptable actual argument for association with an (absent) optional allocatable dummy argument. Semantics was unconditionally emitting an error that the actual argument is not allocatable.
-
Philip Reames authored
Doing so allows the use of smaller constants overall, and may allow (for some small vector constants) avoiding the constant pool entirely. This can result in extra VTYPE toggles if we get unlucky. This was reviewed under PR #66405.
-
Shilei Tian authored
-
Peter Klausler authored
The warning message about a derived type not having a FINAL subroutine for a particular object's rank should not issue for an assumed-rank dummy argument.
-
Yingwei Zheng authored
-
Maksim Panchenko authored
Minor refactoring to delete redundant code. Reviewed By: jobnoorman Differential Revision: https://reviews.llvm.org/D159525
-
Maksim Panchenko authored
Memoize SymbolRef::getAddress() for sorting symbol table entries by their address. Saves about 10 seconds of processing time on large binaries with over 2 million symbols. NFCI. Reviewed By: jobnoorman, Amir Differential Revision: https://reviews.llvm.org/D159524
-
Peter Klausler authored
…e pointer The procedure characterization package correctly characterizes the result of a reference to a function that returns a procedure pointer. In the event of a result that is a pointer to a function that itself is a procedure pointer, the code in pointer assignment semantics checking was mistakenly using that result's procedure characteristics as the characteristics of the original function reference. This is just wrong; delete it.
-
Zequan Wu authored
-
Nico Weber authored
-
Slava Zakharin authored
-
Arjun P authored
This reverts commit efca035c. Reverting due to windows build bot failure: https://lab.llvm.org/buildbot/#/builders/13/builds/40242/steps/6/logs/stdio
-
Hui authored
The helper function `__pair_like_explicit_wknd` is only SFINAE-ed with `tuple_size<remove_cvref_t<_PairLike>>::value == 2`, but its function body assumes `std::get` being valid. Fixes #65620
-
Craig Topper authored
-
walter erquinigo authored
This test was reported as failing by https://lab.llvm.org/buildbot/#/builders/68/builds/60172. The fix is very simple. We need to invoke the correct setting.
-
Yingwei Zheng authored
-
Kazu Hirata authored
This patch fixes a warning: flang/runtime/edit-input.cpp:27:20: error: unused function 'IsListDirectedFieldComplete' [-Werror,-Wunused-function]
-
Abhinav271828 authored
The method implementations remain in the .cpp file; explicit instantiations have been added for these two types. makeMatrix has been duplicated to makeIntMatrix and makeFracMatrix.
-
Peter Klausler authored
When a COMMON block object has a derived type that is part of a set of mutually-dependent types with other members, the compiler loops. Fixes https://github.com/llvm/llvm-project/issues/65572.
-
Konstantina Mitropoulou authored
[NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization (#66314) - Test for future commit in NewGVN - [NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization
-
Nicolas Vasilache authored
…cast) expansion This revision adds a rewrite for sequences of vector `ext(bitcast)` to use a more efficient sequence of vector operations comprising `shuffle` and `bitwise` ops. Such patterns appear naturally when writing quantization / dequantization functionality with the vector dialect. The rewrite performs a simple enumeration of each of the bits in the result vector and determines its provenance in the source vector. The enumeration is used to generate the proper sequence of `shuffle`, `andi`, `ori` with shifts`. The rewrite currently only applies to 1-D non-scalable vectors and bails out if the final vector element type is not a multiple of 8. This is a failsafe heuristic determined empirically: if the resulting type is not an even number of bytes, further complexities arise that are not improved by this pattern: the heavy lifting still needs to be done by LLVM.
-
Yingwei Zheng authored
-
Slava Zakharin authored
This patch adds `host_assoc` attribute for operations that implement FortranVariableInterface (e.g. `hlfir.declare`). The attribute is used by the alias analysis to make better conclusions about memory overlap. For example, a dummy argument of an inner subroutine and a host's variable used inside the inner subroutine cannot refer to the same object (if the dummy argument does not satisify exceptions in F2018 15.5.2.13). This closes a performance gap between HLFIR optimization pipeline and FIR ArrayValueCopy for Polyhedron/nf.
-
Peter Klausler authored
…lues Emit an error at runtime when a list-directed input value is not followed by a value separator or end of record. Previously, the runtime I/O library was consuming as many input characters that were valid for the type of the value, and leaving any remaining characters for the next input edit, if any.
-