- Jul 16, 2021
-
-
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
-
Nikita Popov authored
Call Function::isIntrinsic() instead of manually checking the function name for an "llvm." prefix.
-
Simon Pilgrim authored
-
Sam Tebbs authored
This patch makes vector spills valid for tail predication when all loads from the same stack slot are within the loop Differential Revision: https://reviews.llvm.org/D105443
-
Quinn Pham authored
This patch implements the `__popcntb` XL compatibility builtin for 32bit in the frontend and backend. This patch also updates tests for `__popcntb` and other XL Compat sync related builtins. Reviewed By: #powerpc, nemanjai, amyk Differential Revision: https://reviews.llvm.org/D105360
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Dmitry Vyukov authored
The new GET_CURRENT_PC() can lead to spurious top inlined internal frames. Here are 2 examples from bots, in both cases the malloc is supposed to be the top frame (#0): WARNING: ThreadSanitizer: signal-unsafe call inside of a signal #0 __sanitizer::StackTrace::GetNextInstructionPc(unsigned long) #1 malloc Location is heap block of size 99 at 0xbe3800003800 allocated by thread T1: #0 __sanitizer::StackTrace::GetNextInstructionPc(unsigned long) #1 malloc Let's strip these internal top frames from reports. With other code changes I also observed some top frames from __tsan::ScopedInterceptor, proactively remove these as well. Differential Revision: https://reviews.llvm.org/D106081 -
Philip Reames authored
This is split from D105216, it handles only a subset of the cases in that patch. Specifically, the issue being fixed is that the code incorrectly assumed that (Start-Stide) < End implied that the backedge was taken at least once. This is not true when e.g. Start = 4, Stride = 2, and End = 3. Note that we often do produce the right backedge taken count despite the flawed reasoning. The fix chosen here is to use an alternate form of uceil (ceiling of unsigned divide) lowering which is safe when max(RHS,Start) > Start - Stride. (Note that signedness of both max expression and comparison depend on the signedness of the comparison being analyzed, and that overflow in the Start - Stride expression is allowed.) Note that this is weaker than proving the backedge is taken because it allows start - stride < end < start. Some cases which can't be proven safe are sent down the generic path, and we do end up generating less optimal expressions in a few cases. Credit for coming up with the approach goes entirely to Eli. I just split it off, tweaked the comments a bit, and did some additional testing. Differential Revision: https://reviews.llvm.org/D105942
-
Louis Dionne authored
-
Fangrui Song authored
[test] Avoid llvm-readelf/llvm-readobj one-dash long options and deprecated aliases (e.g. --file-headers)
-
Vy Nguyen authored
Details: Switch all #includes to use <> because that is consistent with what happens in the cmake checks. Otherwise, we could be in the situation where cmake checks see that headers exist at <perfmon/...> but in llvm-exegesis code, we use "perfmon/...", which may not exist. Related PR/revisions: D84076, PR51017+D105615 Differential Revision: https://reviews.llvm.org/D105861 -
Arthur Eubanks authored
This reverts commit 2eb50baf. Causes hangs, see comments on D105827.
-