- Mar 30, 2021
-
-
Amara Emerson authored
Differential Revision: https://reviews.llvm.org/D99388
-
Sourabh Singh Tomar authored
Negative numbers are represented using DW_OP_consts along with signed representation of the number as the argument. Test case IR is generated using Fortran front-end. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D99273
-
Eugene Zhulenev authored
Interchange options was missing in the pass flags. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D99397
-
spupyrev authored
Currently prof metadata with branch counts is added only for BranchInst and SwitchInst, but not for IndirectBrInst. As a result, BPI/BFI make incorrect inferences for indirect branches, which can be very hot. This diff adds metadata for IndirectBrInst, in addition to BranchInst and SwitchInst. Reviewed By: wmi, wenlei Differential Revision: https://reviews.llvm.org/D99550
-
Hongtao Yu authored
Use profiled call edges to augment the top-down order. There are cases that the top-down order computed based on the static call graph doesn't reflect real execution order. For example: 1. Incomplete static call graph due to unknown indirect call targets. Adjusting the order by considering indirect call edges from the profile can enable the inlining of indirect call targets by allowing the caller processed before them. 2. Mutual call edges in an SCC. The static processing order computed for an SCC may not reflect the call contexts in the context-sensitive profile, thus may cause potential inlining to be overlooked. The function order in one SCC is being adjusted to a top-down order based on the profile to favor more inlining. 3. Transitive indirect call edges due to inlining. When a callee function is inlined into into a caller function in LTO prelink, every call edge originated from the callee will be transferred to the caller. If any of the transferred edges is indirect, the original profiled indirect edge, even if considered, would not enforce a top-down order from the caller to the potential indirect call target in LTO postlink since the inlined callee is gone from the static call graph. 4. #3 can happen even for direct call targets, due to functions defined in header files. Header functions, when included into source files, are defined multiple times but only one definition survives due to ODR. Therefore, the LTO prelink inlining done on those dropped definitions can be useless based on a local file scope. More importantly, the inlinee, once fully inlined to a to-be-dropped inliner, will have no profile to consume when its outlined version is compiled. This can lead to a profile-less prelink compilation for the outlined version of the inlinee function which may be called from external modules. while this isn't easy to fix, we rely on the postlink AutoFDO pipeline to optimize the inlinee. Since the survived copy of the inliner (defined in headers) can be inlined in its local scope in prelink, it may not exist in the merged IR in postlink, and we'll need the profiled call edges to enforce a top-down order for the rest of the functions. Considering those cases, a profiled call graph completely independent of the static call graph is constructed based on profile data, where function objects are not even needed to handle case #3 and case 4. I'm seeing an average 0.4% perf win out of SPEC2017. For certain benchmark such as Xalanbmk and GCC, the win is bigger, above 2%. The change is an enhancement to https://reviews.llvm.org/D95988. Reviewed By: wmi, wenlei Differential Revision: https://reviews.llvm.org/D99351
-
John Brawn authored
The test Frontend/plugin-delayed-template.cpp is failing when asserts are enabled because it hits an assertion in denormalizeStringImpl when trying to round-trip OPT_plugin_arg. Fix this by adjusting how the option is handled, as the first part is joined to -plugin-arg and the second is separate. Differential Revision: https://reviews.llvm.org/D99606
-
Jessica Paquette authored
Basically a port of isBitfieldExtractOpFromSExtInReg in AArch64ISelDAGToDAG. This is only done post-legalization for now. Once the legalizer knows how to decompose these back into shifts, this requirement can probably be removed. Differential Revision: https://reviews.llvm.org/D99230
-
Jonas Devlieghere authored
-
Mehdi Amini authored
Add a "register_runtime" method to the mlir.execution_engine and show calling back from MLIR into Python This exposes the ability to register Python functions with the JIT and exposes them to the MLIR jitted code. The provided test case illustrates the mechanism. Differential Revision: https://reviews.llvm.org/D99562
-
Nick Lewycky authored
This flag allows the developer to see the result of linking even if it fails the verifier, as a step in debugging cases where the linked module fails the verifier. Differential Revision: https://reviews.llvm.org/D99382
-
Michał Górny authored
-
Craig Topper authored
[RISCV] Pass 'half' in the lower 16 bits of an f32 value when F extension is enabled, but Zfh is not. Without Zfh the half type isn't legal, but it could still be used as an argument/return in IR. Clang will not generate this today. Previously we promoted the half value to float for arguments and returns if the F extension is enabled but Zfh isn't. Then depending on which ABI is enabled we would pass it in either an FPR or a GPR in float format. If the F extension isn't enabled, it would get passed in the lower 16 bits of a GPR in half format. With this patch the value will always in half format and will be in the lower bits of a GPR or FPR. This should be consistent with where the bits are located when Zfh is enabled. I've based this implementation off of how this is done on ARM. I've manually nan-boxed the value to 32 bits using integer ops. It looks like flw, fsw, fmv.s, fmv.w.x, fmf.x.w won't canonicalize nans so should leave the value alone. I think those are the instructions that could get used on this value. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D98670
-
Amara Emerson authored
This is a straightforward port. Differential Revision: https://reviews.llvm.org/D99449
-
Tomas Matheson authored
Currently needsStackRealignment returns false if canRealignStack returns false. This means that the behavior of needsStackRealignment does not correspond to it's name and description; a function might need stack realignment, but if it is not possible then this function returns false. Furthermore, needsStackRealignment is not virtual and therefore some backends have made use of canRealignStack to indicate whether a function needs stack realignment. This patch attempts to clarify the situation by separating them and introducing new names: - shouldRealignStack - true if there is any reason the stack should be realigned - canRealignStack - true if we are still able to realign the stack (e.g. we can still reserve/have reserved a frame pointer) - hasStackRealignment = shouldRealignStack && canRealignStack (not target customisable) Targets can now override shouldRealignStack to indicate that stack realignment is required. This change will make it easier in a future change to handle the case where we need to realign the stack but can't do so (for example when the register allocator creates an aligned spill after the frame pointer has been eliminated). Differential Revision: https://reviews.llvm.org/D98716 Change-Id: Ib9a4d21728bf9d08a545b4365418d3ffe1af4d87
-
Nick Lewycky authored
-
Craig Topper authored
The shift amount should always be a vector or an XLen scalar. The SplatOperand flag is used to indicate we need to legalize non-XLen scalars including special handling for i64 on RV32. This will prevent us from silently adjusting these operands if the intrinsics are misused. I'll probably adjust the name of the SplatOperand flag slightly in a follow up patch. Reviewed By: khchen, frasercrmck Differential Revision: https://reviews.llvm.org/D99545
-
Craig Topper authored
After D98939, this is done by LegalizeVectorOps making this code dead. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D99519
-
Pavel Labath authored
-
Pavel Labath authored
should fix the arm builtbots.
-
Pavel Labath authored
and hopefully other ELF OSes. The problem was a missing "extra_images" startup argument (which ensures LD_LIBRARY_PATH is set properly).
-
Guillaume Chatelet authored
This is needed to prevent asan/msan instrumentation to redirect CopyBlock to `__asan_memcpy` (resp. `__msan_memcpy`). These functions would then differ operation to `memcpy` which leads to reentrancy issues. With this patch, `memcpy` is fully instrumented and covered by asan/msan. If this turns out to be too expensive, instrumentation can be selectively or fully disabled through the use of the `__attribute__((no_sanitize(address, memory)))` annotation. Differential Revision: https://reviews.llvm.org/D99598
-
Thomas Preud'homme authored
tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. LLVM test CodeGenPrepare/ARM/sink-add-mul-shufflevector.ll tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However, CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. The bug was then copied over in Transforms/CodeGenPrepare/ARM/sink-add-mul-shufflevector-inseltpoison.ll This commit removes the definition and uses of variable to check each line independently, making the check stronger than the current one. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99597
-
oToToT authored
The documentation link of Google Test on GitHub have been moved to the top-level docs directory. Thus, the original link is invalid now. Reviewed By: Pavel Labath Differential Revision: https://reviews.llvm.org/D99559
-
Nico Rieck authored
This patch fixes left pointer alignment after pointer qualifiers of operators. Currently "operator void const*()" is formatted with a space between const and pointer despite setting PointerAlignment to Left. AFAICS this has been broken since clang-format 10. Reviewed By: MyDeveloperDay, curdeius Differential Revision: https://reviews.llvm.org/D99458
-
Kevin Petit authored
Ensure that the cl_khr_3d_image_writes pragma is enabled by making cl_khr_3d_image_writes an optional core feature in CL 3.0 in addition to being an available extension in 1.0 onwards and a core feature in CL 2.0. https://reviews.llvm.org/D99425 Signed-off-by:
Kevin Petit <kevin.petit@arm.com>
-
Pavel Labath authored
This patch fixes an issue, where if the thread has a signal blocked when we try to inject it into the process (via vCont), then instead of executing straight away, the injected signal will trigger another stop when the thread unblocks the signal. As (linux) threads start their life with SIGUSR1 (among others) disabled, and only enable it during initialization, injecting the signal during this window did not behave as expected. The fix is to change the test to ensure the signal gets injected with the signal unblocked. The simplest way to do this was to write a dedicated inferior for this test. I also created a new header to factor out the function retrieving the (os-specific) thread id.
-
Alexey Bataev authored
-
Thomas Preud'homme authored
LLVM test Transforms/LoopVectorize/X86/x86-pr39099.ll tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit only checks for the absence of a widened load which rules out the presence of the whole sequence and does not involve an undefined variable. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D99583
-
Inho Seo authored
This verification is to check if the indices for static shaped operands on linalgOps access out of bound memory or not. For dynamic shaped operands, we would be able to check it on runtime stage. Found several invalid Linalg ops testcases, and fixed them. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D98390
-
Thomas Preud'homme authored
LLVM test Transforms/HardwareLoops/ARM/structure.ll tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit only checks for the absence of llvm.loop.decrement.i32 which rules out the presence of the whole sequence and does not involve an undefined variable. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99591
-
Pavel Labath authored
As discussed on lldb-dev <https://lists.llvm.org/pipermail/lldb-dev/2021-March/016777.html> the mips code is unmaintained and untested. It also carries a lot of technical debt which is not limited to mips-specific code. Generic mips support remains (and is going to be used by the upcoming freebsd code). Resurrecting mips support should be a matter of re-adding the relevant register context files (while avoiding reintroducing the debt).
-
Sebastian Neubauer authored
spillSGPRToVGPR is already respected in these places since D95768. Differential Revision: https://reviews.llvm.org/D99570
-
Michał Górny authored
Add a minimal support for the multiprocess extension in lldb-server. The server indicates support for it via qSupported, and accepts thread-ids containing a PID. However, it still does not support debugging more than one inferior, so any other PID value results in an error. Differential Revision: https://reviews.llvm.org/D98482
-
Valeriy Savchenko authored
rdar://75020762 Differential Revision: https://reviews.llvm.org/D99274
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D97888
-
Valeriy Savchenko authored
`allocClassWithName` allocates an object with the given type. The type is actually provided as a string argument (type's name). This creates a possibility for not particularly useful warnings from the analyzer. In order to combat with those, this patch checks for casts of the `allocClassWithName` results to types mentioned directly as its argument. All other uses of this method should be reasoned about as before. rdar://72165694 Differential Revision: https://reviews.llvm.org/D99500
-
Gabor Marton authored
It makes sense to track rvalue expressions in the case of special concrete integer values. The most notable special value is zero (later we may find other values). By tracking the origin of 0, we can provide a better explanation for users e.g. in case of division by 0 warnings. When the divisor is a product of a multiplication then now we can show which operand (or both) was (were) zero and why. Differential Revision: https://reviews.llvm.org/D99344
-
Alexey Bataev authored
If no initializer-clause is specified, the private variables will be initialized following the rules for initialization of objects with static storage duration. Need to adjust the implementation to the current version of the standard. Differential Revision: https://reviews.llvm.org/D99539
-
Martin Probst authored
In JavaScript, `- -1;` is legal syntax, the language allows unary minus. However the two tokens must not collapse together: `--1` is prefix decrement, i.e. different syntax. Before: - -1; ==> --1; After: - -1; ==> - -1; This change makes no attempt to format this "nicely", given by all likelihood this represents a programming mistake by the user, or odd generated code. The check is not guarded by language: this appears to be a problem in Java as well, and will also be beneficial when formatting syntactically incorrect C++ (e.g. during editing). Differential Revision: https://reviews.llvm.org/D99495
-
LLVM GN Syncbot authored
-