- Jun 18, 2021
-
-
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
-
Jim Lin authored
Merely fix indentation Reviewed By: myhsu Differential Revision: https://reviews.llvm.org/D104434
-
Zachary Henkel authored
When creating a PCH file the use of a temp file will be dictated by the presence or absence of the -fno-temp-file flag. Creating a module file will always use a temp file via the new ForceUseTemporary flag. This fixes bug 50033.
-
Kuter Dinel authored
The lack some virtual deconstructors where causing some builds bots to fail. This patch fixes that. Problematic commit: https://reviews.llvm.org/rGeaf1b6810ce0f40008b2b1d902750eafa3e198d3 Build bot: https://lab.llvm.org/buildbot/#/builders/18/builds/1741
-
Volodymyr Sapsai authored
Differential Revision: https://reviews.llvm.org/D104350
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D104495
-
Walter Erquinigo authored
This adds a basic SB API for creating and stopping traces. Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated change and it might be better to enhande the dump functionality to output the data in binary format. I'll leave that for a later diff. This also enhances the existing tests so that they test the same flow using both the command interface and the SB API. I also did some cleanup of legacy code. Differential Revision: https://reviews.llvm.org/D103500
-
Walter Erquinigo authored
Found in http://green.lab.llvm.org/green/job/lldb-cmake/32891/testReport/lldb-api/tools_lldb-vscode_launch/TestVSCode_launch_py/ the lldb-vscode changed and that test makes no sense anymore
-
Roman Lebedev authored
It's not prohibitively verbose, and allows easier understanding why certain unswitching ultimately wasn't performed.
-
Kuter Dinel authored
This attribute computes the optimistic live call edges using the attributor liveness information. This attribute will be used for deriving a inter-procedural function reachability attribute. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D104059
-
Andrew Browne authored
This reverts commit 8441b993. Buildbot failures.
-
Fangrui Song authored
For ELF, since all counters/data are in a section group (either `comdat any` or `comdat noduplicates`), and the signature for `comdat any` is `__profc_`, the D1003372 optimization prerequisite (linker GC cannot discard data variables while the text section is retained) is always satisified, we can make __profd_ unconditionally private. Reviewed By: davidxl, rnk Differential Revision: https://reviews.llvm.org/D103717
-
Craig Topper authored
This pass emits a floating point compare and a conditional branch, but if strictfp is enabled we don't emit a constrained compare intrinsic. The backend also won't expand the readonly sqrt call this pass inserts to a sqrt instruction under strictfp. So we end up with 2 libcalls as seen here. https://godbolt.org/z/oax5zMEWd Fix these things by disabling the pass. Differential Revision: https://reviews.llvm.org/D104479
-