- Aug 09, 2023
-
-
Joseph Huber authored
For the in-progress GPU `libc` project we are relying on overlay headers to handle the interfacing between the `libc` project and the host `libc`. We need this to be included on both the host and device so they agree one what is present on the device, otherwise we will end up with random errors. For whatever reason this was not being included on the host although it previously worked. This patch ensures that it's included on both. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D157438
-
Fernando authored
changed cache retrieve algorithm to an "optimal-fit" which immediate returns blocks that are less than 110% of the requested size. This reduces memory waste while still allowing for an early return without traversing the entire array of cached blocks Reviewed By: cferris, Chia-hungDuan Differential Revision: https://reviews.llvm.org/D157155
-
DianQK authored
When eliminating a tail call, we modify the values of the arguments. Therefore, if the byval parameter has a readonly attribute, we have to remove it. It is safe because, from the perspective of a caller, the byval parameter is always treated as "readonly," even if the readonly attribute is removed. Fixes #64289. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D156793
-
DianQK authored
For checking the readonly attribute. Pre-commit test for D156793. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D156789
-
Fabian Wolff authored
[clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D157436
-
Jason Molenda authored
Mach-O corefiles have several possible types of metadata for the binaries that were running when the corefile was written. ProcessMachCore will try to find these binaries, and load them. When we have a hint, but could not find the binary, this change makes ProcessMachCore not fall back to scanning the corefile looking for ANY binary that it could load. We sometimes have multiple binaries present in the memory in a corefile, but only the correct binary should be loaded, the others are data. Differential Revision: https://reviews.llvm.org/D157168 rdar://112602508
-
Aart Bik authored
Reviewed By: K-Wu Differential Revision: https://reviews.llvm.org/D157448
-
Valentin Clement authored
The global ctor for acc declare when the variable is a descriptor is treated differently. The descriptor is implicity copied in. An additional registering function will be generated to deal with the data pointer when the data is actually allocated. This will come in a follow up patch. The descriptor is not a user visible detail but an implementation detail. The intent for declare is that the lifetime is implicitly managed - and the data must be on device. Since descriptor holds pointer to the data, it makes sense to also make this available on device at same time. Copyin is used because it contains relevant details about the data such as bounds. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D157338
-
Anna Thomas authored
This is a complete fix for CompleteLoadGroups introduced in D154309. We need to check for dependency between A and every member of the load Group of B. This patch also fixes another miscompile seen when we incorrectly sink stores below a depending load (see testcase in interleaved-accesses-sink-store-across-load.ll). This is fixed by releasing store groups correctly. This change was previously reverted (e85fd3cb) due to Asan failure with use-after-free error. A testcase is added and the bug is fixed in this version of the patch. Differential Revision: https://reviews.llvm.org/D155520
-
Yaxun (Sam) Liu authored
nvcc allows using std::malloc and std::free in device code. When std::malloc or std::free is passed as a template function argument with template argument deduction, there is no diagnostics. e.g. __global__ void kern() { void *p = std::malloc(1); std::free(p); } int main() { std::shared_ptr<float> a; a = std::shared_ptr<float>( (float*)std::malloc(sizeof(float) * 100), std::free ); return 0; } However, the same code fails to compile with clang (https://godbolt.org/z/1roGvo6YY). The reason is that clang does not have logic to choose a function argument from an overloaded set of candidates based on host/device attributes for template argument deduction. Currently, clang does have a logic to choose a candidate based on the constraints of the candidates. This patch extends that logic to account for the CUDA host/device-based preference. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D154300 -
Fabian Wolff authored
Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D157428
-
Alan Hu authored
ctypes.foreign is only necessary for tests. This change is mainly for the benefit of people packaging the OCaml bindings. Differential Revision: https://reviews.llvm.org/D157325
-
David Green authored
These can be handled in the same way as other shifts.
-
Alexander Kornienko authored
This reverts commit 5dde7551, cbfcf901 and 8981520b due to a miscompile introduced in 8981520b (see https://reviews.llvm.org/D154725#4568845 for details) Differential Revision: https://reviews.llvm.org/D157430
-
Guillaume Chatelet authored
This reverts commit 910cc05a.
-
Lang Hames authored
This forwards to ExecutorProcessControl::getPageSize and saves clients from spelling out .getExecutorProcessControl() everywhere.
-
Florian Hahn authored
This fixes a failing RISCV test case that was missed originally.
-
Nathan Chancellor authored
When building the Linux kernel with -Wmissing-variable-declarations, there are several instances of warnings around variables declared with register storage: arch/x86/include/asm/asm.h:208:24: warning: no previous extern declaration for non-static variable 'current_stack_pointer' [-Wmissing-variable-declarations] register unsigned long current_stack_pointer asm(_ASM_SP); ^ arch/x86/include/asm/asm.h:208:10: note: declare 'static' if the variable is not intended to be used outside of this translation unit register unsigned long current_stack_pointer asm(_ASM_SP); ^ 1 warning generated. The suggestion is invalid, as the variable cannot have both static and register storage. Do not emit -Wmissing-variable-declarations for register variables. Closes: https://github.com/llvm/llvm-project/issues/64509 Link: https://lore.kernel.org/202308081050.sZEw4cQ5-lkp@intel.com/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110947 Reviewed By: aaron.ballman, nickdesaulniers Differential Revision: https://reviews.llvm.org/D157435 -
Guillaume Chatelet authored
This patch is an alternative to D155902. It provides the following benefits: - No buffer manual allocation and error handling for the general case - More flexible API : width specifier, sign and prefix handling - Simpler code The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString. Reviewed By: michaelrj, jhuber6 Differential Revision: https://reviews.llvm.org/D156981
-
David Green authored
-
Elizabeth Andrews authored
Fix static analyzer concern about potential null value dereference. findBackingIvar() dereferences Prop. PR checks that Prop exists before calling the function. Differential Revision: https://reviews.llvm.org/D157429
-
Florian Hahn authored
This allows for easier re-use in follow-on patches.
-
Martin Storsjö authored
The llvm-rc tool tries to locate a suitable Clang executable to use for preprocessing. For this purpose, it first checks within the same directory as the llvm-rc tool, checking with a couple different names, followed by checking all of $PATH for another couple names. On Windows, the InitLLVM() function always sets up Argv[0] with the full path to the executable, while on Unix, Argv[0] is kept as is. Therefore, call getMainExecutable to try to resolve the directory of the executable before looking for colocated Clang executables. This makes 282744a9 actually have the desired effect. Differential Revision: https://reviews.llvm.org/D157241
-
Markus Böck authored
This implication was already done de-facto and there were plenty of users and wrapper functions specifically used to handle the "return-like or RegionBranchTerminatorOpInterface" case. These simply existed due to up until recently missing features in ODS. With the new capabilities of traits, we can make `ReturnLike` imply `RegionBranchTerminatorOpInterface` and auto generate proper definitions for its methods. Various occurrences and wrapper methods used for `isa<RegionBranchTerminatorOpInterface>() || hasTrait<ReturnLike>()` have all been removed. Differential Revision: https://reviews.llvm.org/D157402
-
Joshua Batista authored
This change exposes the pow library function for HLSL, only available for floating point types. The pow function is supported for all scalar, vector, and matrix types that contain floating point types. The full documentation of the HLSL pow function is available here: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-pow Reviewed By: bogner Differential Revision: https://reviews.llvm.org/D156178
-
Fabian Mora authored
**For an explanation of these patches see D154153.** Commit message: This patch adds the NVVM target attribute for serializing GPU modules into strings containing cubin. Depends on D154113 and D154100 and D154097 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D154117
-
Peter Klausler authored
Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): ``` module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end ``` The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 -
Florian Hahn authored
Update VPInstruction to use VPRecipeWithIRFlags to manage FMFs for VPInstruction. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D157144
-
Peter Klausler authored
Generalize FoldMerge() to accommodate derived type arguments and results, rename it into Folder<T>::MERGE(), and remove it from the various FoldIntrinsicFunction() routines for intrinsic types. Fixes llvm-test-suite/Fortran/gfortran/regression/merge_init_expr_2.f90. Differential Revision: https://reviews.llvm.org/D157345
-
Peter Klausler authored
Detect and emit errors about undefinable NAMELIST group members in READ statements. Fixes llvm-test-suite/Fortran/gfortran/regression/namelist_2.f90. Differential Revision: https://reviews.llvm.org/D157344
-
Peter Klausler authored
The internal details of the C_PTR and C_FUNPTR types must be made private so that user code can't try to access their components or attempt to use their structure constructors. Fixes llvm-test-suite/Fortran/fortran/c_ptr_tests_13.f90. Differential Revision: https://reviews.llvm.org/D157343
-
Peter Klausler authored
BIND(C) interoperable pointer descriptors may not be required to be CONTIGUOUS in procedure interfaces. (Also fixed erroneous true result from IsDescriptor() predicate for assumed-size arrays that was exposed by testing.) Fixes llvm-test-suite/Fortran/gfortran/regression/bind_c_contiguous.f90. Differential Revision: https://reviews.llvm.org/D157342
-
Peter Klausler authored
The TARGET= argument to the intrinsic function ASSOCIATED() must be a valid target for the POINTER= argument, but we are missing some cases, such as parenthesized expressions. Add more checking, and restructure the logic a bit to make the case analysis structure more clear. Fixes llvm-test-suite/Fortran/gfortran/regression/associated_target_1.f90. Differential Revision: https://reviews.llvm.org/D157341
-
Matt Arsenault authored
These were not testing what was intended, which should be the cases we can directly select to the instructions.
-
Matt Arsenault authored
-
Matt Arsenault authored
There were system scope tests only for integer min/max. Expand this to cover all of the integer operations.
-
Matt Arsenault authored
-
Matt Arsenault authored
There were incomplete generated checks plus some dead manual checks.
-
Peter Klausler authored
The folding of conversions of character arrays from one kind to another was not preserving the value of the character length expression on the intermediate array constructor, causing spurious errors when defining named constant arrays of one kind of character with arrays of another kind. Fixes llvm-test-suite/Fortran/gfortran/regression/widechar_10.f90. Differential Revision: https://reviews.llvm.org/D157340
-