- Jun 18, 2021
-
-
Lang Hames authored
This partially reverts 838490de, which broke some Solaris bots. Apparently Solaris defines int8_t as char rather than signed char, which made the SerializationTypeName<char> specialization a redefinition. This partial revert isolates use of uint8_t buffers to ORC-RPC handling of wrapper functions only. The TargetProcessControl::runWrapper method will continue to use char buffers.
-
Matheus Izvekov authored
This implements a more comprehensive fix than was done at D95409. Instead of excluding just function pointer subobjects, we also exclude any user-defined function pointer conversion operators. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D103855
-
Lang Hames authored
Provides ObjectTransformLayer APIs, a getter to access the ObjectTransformLayer member of LLJIT, and the DumpObjects utility to make construction of a dump-to-disk transform easy. An example showing how the new APIs can be used has been added in llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects.
-
Liqiang Tao authored
-
Max Kazantsev authored
This patch handles one particular case of one-iteration loops for which SCEV cannot straightforwardly prove BECount = 1. The idea of the optimization is to symbolically execute conditional branches on the 1st iteration, moving in topoligical order, and only visiting blocks that may be reached on the first iteration. If we find out that we never reach header via the latch, then the backedge can be broken. This implementation uses InstSimplify. SCEV version was rejected due to high compile time impact. Differential Revision: https://reviews.llvm.org/D102615 Reviewed By: nikic
-
Uday Bondhugula authored
Introduce the execute_region op that is able to hold a region which it executes exactly once. The op encapsulates a CFG within itself while isolating it from the surrounding control flow. Proposal discussed here: https://llvm.discourse.group/t/introduce-std-inlined-call-op-proposal/282 execute_region enables one to inline a function without lowering out all other higher level control flow constructs (affine.for/if, scf.for/if) to the flat list of blocks / CFG form. It thus allows the benefit of transforms on higher level control flow ops available in the presence of the inlined calls. The inlined calls continue to benefit from propagation of SSA values across their top boundary. Functions won’t have to remain outlined until later than desired. Abstractions like affine execute_regions, lambdas with implicit captures could be lowered to this without first lowering out structured loops/ifs or outlining. But two potential early use cases are of: (1) an early inliner (which can inline functions by introducing execute_region ops), (2) lowering of an affine.execute_region, which cleanly maps to an scf.execute_region when going from the affine dialect to the scf dialect. Differential Revision: https://reviews.llvm.org/D75837
-
Haojian Wu authored
Found by ASAN.
-
Jay Foad authored
-
Daniil Seredkin authored
InstCombine didn't perform (sext bool X) * (sext bool X) --> zext (and X, X) which can result in just (zext X). The patch adds regression tests to check this transformation and adds a check for equality of mul's operands for that case. Differential Revision: https://reviews.llvm.org/D104193
-
Max Kazantsev authored
-
Diana Picus authored
Don't rely on volatile writes to keep the CPU busy - it seems MSVC optimizes them out, so we don't get different values for 'start' and 'end' on Windows. Rewrite the test to loop until we get a different value for 'end'. Fix suggested by Michael Kruse in https://reviews.llvm.org/rG57e85622bbdb2eb18cc03df2ea457019c58f6912#inline-6002 Committing to fix the Windows buildbot, post-commit comments welcome!
-
Liqiang Tao authored
This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining. The callsite which size is smaller would have a higher priority. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D104028
-
Max Kazantsev authored
This is to ensure that zero denominator leads to controlled assertion failure rather than UB.
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D104510
-
patacca authored
[Polly][Isl] Refactoring IslAstInfo::getBuild() and IslAstInfo::IslAstUserPayload::Build to use isl++. NFC Polly uses algorithms from the Integer Set Library (isl), which is a library written in C and which is incompatible with the rest of the LLVM as it is written in C++. Changes made: - Refactoring the method `IslAstInfo::getBuild()` - `IslAstInfo::IslAstUserPayload.Build` now uses C++ types instead of C types - Removing destructor of `IslAstInfo::IslAstUserPayload` Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D104370
-
Haojian Wu authored
This looks like not a practical pattern in our codebase (it could fail in some sandbox environement). Instead we print it via standard output, and it is controled by the -attributor-print-call-graph, this follows a similiar pattern of attributor-print-dep.
-
Siva Chandra Reddy authored
-
Tomasz Miąsko authored
Allow mangled names to include an arbitrary dot suffix, akin to vendor specific suffix in Itanium mangling. Primary motivation is a support for symbols renamed during ThinLTO import / promotion (ThinLTO is the default configuration for optimized builds in rustc). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D104358
-
Daniil Seredkin authored
This reverts commit 31053338.
-
Siva Chandra Reddy authored
The new macro definitions have been used to add Windows specific specializations.
-
Daniil Seredkin authored
InstCombine didn't perform (sext bool X) * (sext bool X) --> zext (and X, X) which can result in just (zext X). The patch adds regression tests to check this transformation and adds a check for equality of mul's operands for that case. Differential Revision: https://reviews.llvm.org/D104193
-
Bjorn Pettersson authored
Commit 4c7f820b changed the llvm.powi intrinsic to support different 'int' sizes for the exponent. That happened to break the IntrinsicToLibdeviceFunc mapping in PPCGCodeGeneration, which obviously should have been updated as part of commit 4c7f820b (https://reviews.llvm.org/D99439). The shortcoming was found by buildbots that use -DPOLLY_ENABLE_GPGPU_CODEGEN=ON This patch should fixup the problem.
-
Fangrui Song authored
This reverts commit 76d0747e. If a group has `__llvm_prf_vals` due to static value profiler counters (`NS!=0`), we cannot make `__llvm_prf_data` private, because a prevailing text section may reference `__llvm_prf_data` and will cause a `relocation refers to a discarded section` linker error. Note: while a `__profc_` group is non-prevailing, it may be referenced by a prevailing text section due to inlining. ``` group section [ 66] `.group' [__profc__ZN5clang20EmitClangDeclContextERN4llvm12RecordKeeperERNS0_11raw_ostreamE] contains 4 sections: [Index] Name [ 67] __llvm_prf_cnts [ 68] __llvm_prf_vals [ 69] __llvm_prf_data [ 70] .rela__llvm_prf_data ```
-
Johannes Doerfert authored
This should fix PR50683. The wrong assumption was that we could always know what the callee is when we replace a call site argument with undef. We wanted to know that to remove the `noundef` that might be attached to the argument. Since no callee means we did the propagation on the caller site, there is no need to remove an attribute. It is only needed if we replace all uses and therefore pass `undef` instead of the value that was passed in otherwise.
-
Johannes Doerfert authored
Users might want to run initialize for a set of AAs without an intermediate update step. Running update eagerly is not a requirement anyway so we make it optional.
-
Johannes Doerfert authored
To allow outside AAs that simplify values we need to ensure all value simplification goes through the Attributor, not AAValueSimplify (or any of the other AAs we have already like AAPotentialValues). This patch also introduces an interface for the outside AAs to register simplification callbacks for an IRPosition. To make this work as expected we have to pass IRPositions instead of Values in AAValueSimplify, which makes sense by itself.
-
Johannes Doerfert authored
If we simplify values we sometimes end up with type mismatches. If the value is a constant we can often cast it though to still allow propagation. The logic is now put into a helper and it replaces some ad hoc things we did before. This also introduces the AA namespace for abstract attribute related functions and types. Differential Revision: https://reviews.llvm.org/D103856
-
Johannes Doerfert authored
If the target stack is not accessible between different running "threads" we have to make sure not to create allocas for mallocs that might be used by multiple "threads". The "use check" is sufficient to prevent this but if we apply the "free check" we have to make sure the pointer is not communicated to others before the free is reached. Differential Revision: https://reviews.llvm.org/D98608
-
Johannes Doerfert authored
The initial use for AAExecutionDomain was to determine if a single thread executes a block. While this is sometimes informative most of the time, and for other reasons, we actually want to know if it is the "initial thread". Thus, the thread that started execution on the current device. The deduction needs to be adjusted in a follow up as the methods we use right not are looking for the OpenMP thread id which is resets whenever a thread enters a parallel region. What we basically want is to look for `llvm.nvvm.read.ptx.sreg.ntid.x` and equivalent functions.
-
Johannes Doerfert authored
It is not clear to me how we fixed this, I reverted a few candidates but I couldn't make the test fail. Still worth having it in our regression suite.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
We invalidated AAReachabilityImpl directly which is not helpful and confusing as we still used it regardless. We now avoid invalidating it (not needed anyway) and add checks for the state. This has by itself no actual effect but prepares for later extensions.
-
George Balatsouras authored
The current naming scheme adds the `dfs$` prefix to all DFSan-instrumented functions. This breaks mangling and prevents stack trace printers and other tools from automatically demangling function names. This new naming scheme is mangling-compatible, with the `.dfsan` suffix being a vendor-specific suffix: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-structure With this fix, demangling utils would work out-of-the-box. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D104494
-
Luke authored
The patch https://reviews.llvm.org/D101469 is intended to enable loop unrolling, not interleaved access vectorization. The method bool enableInterleavedAccessVectorization() should not be implemented.
-
Daniil Seredkin authored
Baseline tests for D104193
-
Igor Kudrin authored
The instruction can be 16-bit aligned while targeting 32-bit aligned code. To calculate the target address correctly, the address of the instruction has to be adjusted. Differential Revision: https://reviews.llvm.org/D104446
-
Carl Ritson authored
-
Heejin Ahn authored
We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that references a type, which may be used for something other than exceptions, and the name 'event' can be confusing in the web context. See - https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130 - https://github.com/WebAssembly/exception-handling/pull/161 Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D104423
-
Richard Smith authored
Support -Wno-frame-larger-than (with no =) and make it properly interoperate with -Wframe-larger-than. Reject -Wframe-larger-than with no argument. We continue to support Clang's old spelling, -Wframe-larger-than=, for compatibility with existing users of that facility. In passing, stop the driver from accepting and ignoring -fwarn-stack-size and make it a cc1-only flag as intended.
-
Xun Li authored
This patch is to address https://bugs.llvm.org/show_bug.cgi?id=48857. Previous attempts can be found in D104007 and D101980. A lot of discussions can be found in those two patches. To summarize the bug: When Clang emits IR for coroutines, the first thing it does is to make a copy of every argument to the local stack, so that uses of the arguments in the function will all refer to the local copies instead of the arguments directly. However, in some cases we find that arguments are still directly used: When Clang emits IR for a function that has pass-by-value arguments, sometimes it emits an argument with byval attribute. A byval attribute is considered to be local to the function (just like alloca) and hence it can be easily determined that it does not alias other values. If in the IR there exists a memcpy from a byval argument to a local alloca, and then from that local alloca to another alloca, MemCpyOpt will optimize out the first memcpy because byval argument's content will not change. This causes issues because after a coroutine suspension, the byval argument may die outside of the function, and latter uses will lead to memory use-after-free. This is only a problem for arguments with either byval attribute or noalias attribute, because only these two kinds are considered local. Arguments without these two attributes will be considered to alias coro_suspend and hence we won't have this problem. So we need to be able to deal with these two attributes in coroutines properly. For noalias arguments, since coro_suspend may potentially change the value of any argument outside of the function, we simply shouldn't mark any argument in a coroutiune as noalias. This can be taken care of in CoroEarly pass. For byval arguments, if such an argument needs to live across suspensions, we will have to copy their value content to the frame, not just the pointer. Differential Revision: https://reviews.llvm.org/D104184
-