- Jul 16, 2021
-
-
Shilei Tian authored
[NFC][OpenMP][Offloading] Replaced explicit parallel level computation with function `__kmpc_parallel_level` There are two places in current deviceRTLs where it computes parallel level explicitly, which is basically the functionality of `__kmpc_parallel_level`. Starting from D105787, we plan to introduce a series of function call folding based on information that can be deducted during compilation time. Computation of parallel level is the next target. This patch makes steps for the optimization. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105955
-
Louis Dionne authored
This configuration is interesting because GCC has a different level of strictness for some C++ rules. In particular, it implements the older standards more stringently than Clang, which can help find places where we are non-conforming (especially in the test suite). Differential Revision: https://reviews.llvm.org/D105936
-
Ben Barham authored
It was possible to re-add a module to a shared in-memory module cache when search paths are changed. This can eventually cause a crash if the original module is referenced after this occurs. 1. Module A depends on B 2. B exists in two paths C and D 3. First run only has C on the search path, finds A and B and loads them 4. Second run adds D to the front of the search path. A is loaded and contains a reference to the already compiled module from C. But searching finds the module from D instead, causing a mismatch 5. B and the modules that depend on it are considered out of date and thus rebuilt 6. The recompiled module A is added to the in-memory cache, freeing the previously inserted one This can never occur from a regular clang process, but is very easy to do through the API - whether through the use of a shared case or just running multiple compilations from a single `CompilerInstance`. Update the compilation to return early if a module is already finalized so that the pre-condition in the in-memory module cache holds. Resolves rdar://78180255 Differential Revision: https://reviews.llvm.org/D105328 -
Daniel Rodríguez Troitiño authored
Use double pound at the start of the line to differentiate comments from statements for Lit or FileCheck. I will also use this small commit to check my commit access. Differential Revision: https://reviews.llvm.org/D106103
-
Weiwei Li authored
Add spv.GLSL.FMix opertaion. co-authered-by:
Alan Liu <alanliu.yf@gmail.com> Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D104153
-
Vincent Lee authored
We want to incorporate some of the optimization passes in bind opcodes from ld64. This revision makes no functional changes but to start storing opcodes in intermediate containers in preparation for implementing the optimization passes in a follow-up revision. Differential Revision: https://reviews.llvm.org/D105866
-
Kirill Stoimenov authored
The goal of this change is to test if I can commit changes. Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D106101
-
Nico Weber authored
This reverts commit e33446ea. Doesn't build on mac, and causes other problems. See reports on https://reviews.llvm.org/D106046 and https://reviews.llvm.org/D106081 Also revert follow-up "tsan: strip top inlined internal frames" This reverts commit 7b302fc9.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
Since we're still building on top of the MVT based infrastructure, we need to track the pointer type/address space on the side so we can end up with the correct pointer LLTs when interpreting CCValAssigns.
-
Peter S. Housel authored
This change adds AllocateMemory and DeallocateMemory methods to the SBProcess API, so that clients can allocate and deallocate memory blocks within the process being debugged (for storing JIT-compiled code or other uses). (I am developing a debugger + REPL using the API; it will need to store JIT-compiled code within the target.) Reviewed By: clayborg, jingham Differential Revision: https://reviews.llvm.org/D105389
-
Vitaly Buka authored
-
Victor Huang authored
[PowerPC] Add PowerPC population count, reversed load and store related builtins and instrinsics for XL compatibility This patch is in a series of patches to provide builtins for compatibility with the XL compiler. This patch adds the builtins and instrisics for population count, reversed load and store related operations. Reviewed By: nemanjai, #powerpc Differential revision: https://reviews.llvm.org/D106021
-
Shilei Tian authored
In the device runtime there are many function calls to `__kmpc_is_spmd_exec_mode` to query the execution mode of current kernels. In many cases, user programs only contain target region executing in one mode. As a consequence, those runtime function calls will only return one value. If we can get rid of these function calls during compliation, it can potentially improve performance. In this patch, we use `AAKernelInfo` to analyze kernel execution. Basically, for each kernel (device) function `F`, we collect all kernel entries `K` that can reach `F`. A new AA, `AAFoldRuntimeCall`, is created for each call site. In each iteration, it will check all reaching kernel entries, and update the folded value accordingly. In the future we will support more function. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105787
-
Amara Emerson authored
This adds some level of type safety, allows helper functions to be added for specific opcodes for free, and also allows us to succinctly check for class membership with the usual dyn_cast/isa/cast functions. To start off with, add variants for the different load/store operations with some places using it. Differential Revision: https://reviews.llvm.org/D105751
-
Roland McGrath authored
Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106105
-
Omar Emara authored
This patch adds a form window to attach a process, either by PID or by name. This patch also adds support for dynamic field visibility such that the form delegate can hide or show certain fields based on some conditions. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D105655
-
Eli Friedman authored
D104806 broke some uses of getMinusSCEV() in DependenceAnalysis: subtraction with different pointer bases returns a SCEVCouldNotCompute. Make sure we avoid cases involving such subtractions. Differential Revision: https://reviews.llvm.org/D106099
-
Harald van Dijk authored
The maskmovdqu instruction is an odd one: it has a 32-bit and a 64-bit variant, the former using EDI, the latter RDI, but the use of the register is implicit. In 64-bit mode, a 0x67 prefix can be used to get the version using EDI, but there is no way to express this in assembly in a single instruction, the only way is with an explicit addr32. This change adds support for the instruction. When generating assembly text, that explicit addr32 will be added. When not generating assembly text, it will be kept as a single instruction and will be emitted with that 0x67 prefix. When parsing assembly text, it will be re-parsed as ADDR32 followed by MASKMOVDQU64, which still results in the correct bytes when converted to machine code. The same applies to vmaskmovdqu as well. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D103427
-
Sanjay Patel authored
This bug was introduced with D105730 / 25ee55c0 . If we are not converting all of the operations of a reduction into a vector op, we need to preserve the existing select form of the remaining ops. Otherwise, we are potentially leaking poison where it did not in the original code. Alive2 agrees that the version that freezes some inputs and then falls back to scalar is correct: https://alive2.llvm.org/ce/z/erF4K2
-
Nikita Popov authored
Intrinsics can only be called directly, taking their address is not legal. This is currently only enforced for intrinsics that have an ID, rather than all intrinsics. Adjust the check to cover all intrinsics. This came up in D106013. Differential Revision: https://reviews.llvm.org/D106095
-
Victor Huang authored
[PowerPC][NFC] Add the missing 'REQUIRES: powerpc-registered-target.' in the builtins' front end test cases for XL compatibility
-
Sumesh Udayakumaran authored
Changes include the following: 1. Single iteration reduction loops being sibling fused at innermost insertion level are skipped from being considered as sequential loops. Otherwise, the slice bounds of these loops is reset. 2. Promote loops that are skipped in previous step into outer loops. 3. Two utility function - buildSliceTripCountMap, getSliceIterationCount - are moved from mlir/lib/Transforms/Utils/LoopFusionUtils.cpp to mlir/lib/Analysis/Utils.cpp Reviewed By: bondhugula, vinayaka-polymage Differential Revision: https://reviews.llvm.org/D104249 -
Jessica Paquette authored
This case was missing from G_EXTRACT_VECTOR_ELT. It's the same as for s64. https://godbolt.org/z/Tnq4acY8z Differential Revision: https://reviews.llvm.org/D105952
-
zhijian authored
Summary: in the function PPCFunctionInfo::getParmsType(), there is if (Bits > 31 || (Bits > 30 && (Elt != FixedType || hasVectorParms()))) when the Bit is 31 and the Elt is not FixedType(for example the Elt is FloatingType) , the 31th bit will be not encoded, it leave the bit as zero, when the function Expected<SmallString<32>> XCOFF::parseParmsType() the original implement **// unsigned ParmsNum = FixedParmsNum + FloatingParmsNum; while (Bits < 32 && ParsedNum < ParmsNum) { ... }//** it will look the 31 bits (zero) as FixedType. which should be FloatingType, and get a error. Reviewers: Jason Liu,ZarkoCA Differential Revision: https://reviews.llvm.org/D105023 -
Louis Dionne authored
When a target triple is specified in CMake via XXX_TARGET_TRIPLE, we tried passing the --target=<...> flag to the compiler. However, not all compilers support that flag (e.g. GCC, which is not a cross-compiler). As a result, setting e.g. LIBCXX_TARGET_TRIPLE=<host-triple> would end up trying to pass --target=<host-triple> to GCC, which breaks everything because the flag isn't even supported. This commit only adds `--target=<...>` & friends to the flags if it is supported by the compiler. One could argue that it's confusing to pass LIBCXX_TARGET_TRIPLE=<...> and have it be ignored. That's correct, and one possibility would be to assert that the requested triple is the same as the host triple when we know the compiler is unable to cross-compile. However, note that this is a pre-existing issue (setting the TARGET_TRIPLE variable never had an influence on the flags passed to the compiler), and also fixing that is starting to look like reimplementing a lot o...
-
Martin Storsjö authored
The XFAIL comments about VCRuntime not providing aligned operator new are outdated; these days VCRuntime does provide them. However, the tests used to fail on Windows, as the pointers allocated with an aligned operator new (which is implemented with _aligned_malloc on Windows) can't be freed using std::free() on Windows (but they need to be freed with the corresponding function _aligned_free instead). Instead override the aligned operator new to return a dummy suitably aligned pointer instead, like other tests that override aligned operator new. Also override `operator delete[]` instead of plain `operator delete` in the array testcase; the fallback from `operator delete[]` to user defined `operator delete` doesn't work in all DLL build configurations on Windows. Also expand the TEST_NOEXCEPT macros, as these tests only are built in C++17 mode. By providing the aligned operator new within the tests, this also makes these test cases pass when testing back deployment on macOS 10.9. Differential Revision: https://reviews.llvm.org/D105962
-
Hedin Garca authored
Changed where an #endif was placed because previously it prevented three macro definitions from being enable in Windows. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106087
-
Nikita Popov authored
D55348 replaced @objc_msgSend with @llvm.objc.msgSend in tests together with many other objc intrinsics. However, this is not a recognized objc intrinsic (https://llvm.org/docs/LangRef.html#objective-c-arc-runtime-intrinsics) and does not receive special treatment by LLVM. It's likely that uses of this function were renamed by accident. This came up in D106013, because the address of @llvm.objs.msgSend is taken, something which is normally not allowed for intrinsics. Differential Revision: https://reviews.llvm.org/D106094
-
George Burgess IV authored
`intermediate_commits` is a list of full SHAs, and `across_ref` may/may not be a full SHA (or a SHA at all). We already have `across_sha`, which is the resolved form of `across_ref`, so use that instead. Thanks to probinson for catching this in post-commit review of https://reviews.llvm.org/D105578!
-
Harald van Dijk authored
x86_64-linux-gnu and x86_64-linux-gnux32 use different ABIs and objects built for one cannot be used for the other. In order to build and use compiler-rt for x32, we need to treat x32 as a new arch there. This updates the driver to search using the new arch name. Reviewed By: glaubitz Differential Revision: https://reviews.llvm.org/D100148
-
Aart Bik authored
This format was missing from the support library. Although there are some subtleties reading in an external format for int64 as double, there is no good reason to omit support for this data type form the support library. Reviewed By: gussmith23 Differential Revision: https://reviews.llvm.org/D106016
-
Artem Belevich authored
That should allow clang to compile mma.h from CUDA-11.3. Differential Revision: https://reviews.llvm.org/D105384
-
Sushma Unnibhavi authored
Added rules for G_ADD, G_SUB, G_MUL, G_UDIV to be legal. Differential Revision: https://reviews.llvm.org/D105536
-
Dmitry Vyukov authored
Currently we don't lock ScopedErrorReportLock around fork and it mostly works becuase tsan has own report_mtx that is locked around fork and tsan reports. However, sanitizer_common code prints some own reports which are not protected by tsan's report_mtx. So it's better to lock ScopedErrorReportLock explicitly. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106048
-
Philip Reames authored
The ceiling variant was recently added (due to the work towards D105216), and we're spending a lot of time trying to find optimizations for the expression. This patch brute forces the space of i8 unsigned divides and checks that we get a correct (well consistent with APInt) result for both udiv and udiv ceiling. (This is basically what I've been doing locally in a hand rolled C++ program, and I realized there no good reason not to check it in as a unit test which directly exercises the logic on constants.) Differential Revision: https://reviews.llvm.org/D106083
-
Louis Dionne authored
The feature was always defined, which means that the two test cases guarded by it were never run. Differential Revision: https://reviews.llvm.org/D106062
-
Fangrui Song authored
`clang -fuse-ld=lld -static-pie -fpie` produced executable currently crashes and this patch makes it work. See https://sourceware.org/bugzilla/show_bug.cgi?id=27164 and https://sourceware.org/pipermail/libc-alpha/2021-July/128810.html While it seems unreasonable to keep csu/libc-start.c ARCH_APPLY_IREL unclear in static-pie mode and have an unneeded diff -u =(ld.bfd --verbose) =(ld.bfd -pie --verbose) difference, glibc folks don't want to fix their code. I feel sad about that but this patch can remove an iffy condition for lld/ELF as well: `needsInterpSection()`.
-
Fangrui Song authored
-