- Feb 27, 2020
-
-
Kirill Bobyrev authored
This reverts commit 59fb9cde. The patch caused internal miscompilations.
-
- Feb 26, 2020
-
-
Hiroshi Yamauchi authored
DevirtSCCRepeatedPass iteration. Needs ReviewPublic This aims to fix a missed inlining case. If there's a virtual call in the callee on an alloca (stack allocated object) in the caller, and the callee is inlined into the caller, the post-inline cleanup would devirtualize the virtual call, but if the next iteration of DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is based on a heuristic to determine whether to reiterate, we may miss inlining the devirtualized call. This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp.
-
- Feb 25, 2020
-
-
Johannes Doerfert authored
If we deduplicate OpenMP runtime calls we have multiple `ident_t*` that represent information like source location. So far, we simply kept the one used by the replacement call. However, as exposed by PR44893, that can cause problems if we have stack allocated `ident_t` objects. While we need to revisit the use of these as well, it is clear that we eventually want to merge source location information in some way. With this patch we add the infrastructure to do so but without doing the actual merge. Instead we pick a global `ident_t` from the replaced calls, if possible, or create a new one with an unknown location instead. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D74925
-
Hideto Ueno authored
-
- Feb 24, 2020
-
-
Ayke van Laethem authored
This patch adds bindings to C and Go for addCoroutinePassesToExtensionPoints, which is used to add coroutine passes to the correct locations in PassManagerBuilder. Differential Revision: https://reviews.llvm.org/D51642
-
- Feb 21, 2020
-
-
Johannes Doerfert authored
The buildbot http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win shows some strange SCC iterator bug since 16188f9d which we need to investigate. This patch should remove the part of 16188f9d that could have exposed the problem.
-
- Feb 20, 2020
-
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
We can look through calls with `returned` argument attributes when we collect subsuming positions. This allows us to get existing attributes from more places.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
We are often interested in an assumed constant and sometimes it has to be an integer constant. Before we only looked for the latter, now we can ask for either.
-
Johannes Doerfert authored
If we propagate function pointers across function boundaries we can create new call edges. These need to be represented in the CG if we run as a CGSCC pass. In the new pass manager that is currently not handled by the CallGraphUpdater so we need to prevent the situation for now.
-
Johannes Doerfert authored
We usually will ask for liveness of an argument anyway so we ended up lazily creating the attribute anyway. However, that is not always the case and even if it is we should go the eager route here. Various tests show how this can improve the outcome. One test exposed a problem with type mismatches between argument and call site argument, a fix is included. For liveness various more tests were added as well.
-
Johannes Doerfert authored
If a function pointer is casted into a different type the resulting expression can be a constant. If so, it can be used multiple times which cannot be handled by the AbstractCallSite constructor alone. Instead, we follow the cast expression uses now explicitly during the call site traversal.
-
- Feb 18, 2020
-
-
Vedant Kumar authored
rdar://58855712
-
- Feb 17, 2020
-
-
Benjamin Kramer authored
-
- Feb 16, 2020
-
-
Johannes Doerfert authored
-
- Feb 15, 2020
-
-
Simon Pilgrim authored
-
Johannes Doerfert authored
In addition to a single bit per memory locations, e.g., globals and arguments, we now collect more information about the actual accesses, e.g., what instruction caused it, was it a read/write/read+write, and what the underlying base pointer was. Follow up patches will make explicit use of this. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D73527
-
Fangrui Song authored
-
Johannes Doerfert authored
While the function return updateImpl did only look at call sites the manifest method looked at return values. If we don't do this during the updateImpl we might create new abstract attributes during manifest. This is a problem when it comes to liveness information.
-
Johannes Doerfert authored
If we simplify a function return value we have to modify the return instructions.
-
Johannes Doerfert authored
If we see an undef we cannot assume it's the same as "no value". For now we just collapse it to 0.
-
Johannes Doerfert authored
If we know a call was not needed we might have ended up deleting it even if it was in a different SCC. This prevents us from doing so.
-
Johannes Doerfert authored
We can strip casts in AANoAlias but that might cause us to end up with a non-pointer type. We do properly handle that case now.
-
Johannes Doerfert authored
This caused an error when passes iterated over cached assumptions in the tracker and assumed them to be `null` or an instruction. I failed to create a test case so far.
-
Johannes Doerfert authored
In addition to memory behavior attributes (readonly/writeonly) we now derive memory location attributes (argmemonly/inaccessiblememonly/...). The former is part of AAMemoryBehavior and the latter part of AAMemoryLocation. While they are similar in nature it got messy when they were put in a single AA. Location attributes for arguments and floating values will follow later. Note that both memory attributes kinds can derive readnone. If there are no accesses AAMemoryBehavior will derive readnone. If there are accesses but only to stack (=local) locations AAMemoryLocation will derive readnone. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D73426
-
Johannes Doerfert authored
Due to the genericValueTraversal we might visit values for which we did not create an AAValueConstantRange object, e.g., as they are behind a PHI or select or call with `returned` argument. As a consequence we need to validate the types as we are about to query AAValueConstantRange for operands.
-
- Feb 13, 2020
-
-
Johannes Doerfert authored
We used coarse-grained liveness before, thus we looked if the instruction was executed, but we did not use fine-grained liveness, hence if the instruction was needed or could be deleted even if the surrounding ones are live. This patches introduces this level of liveness checks together with other liveness queries, e.g., for uses. For more control we enforce that all liveness queries go through the Attributor. Test have been adjusted to reflect the changes or augmented to prevent deletion of the parts we want to check. Reviewed By: sstefan1 Differential Revision: https://reviews.llvm.org/D73313
-
Johannes Doerfert authored
If we have a replacement for a value, via AAValueSimplify, the original value will lose all its uses. Thus, as long as a value is simplified we can skip the uses in checkForAllUses, given that these uses are transitive uses for the simplified version and will therefore affect the simplified version as necessary. Since this allowed us to remove calls without side-effects and a known return value, we need to make sure not to eliminate `musttail` calls. Those we keep around, or later remove the entire `musttail` call chain.
-
Johannes Doerfert authored
We relied on wouldInstructionBeTriviallyDead before but that functions does not take assumed information, especially for calls, into account. The replacement, AAIsDead::isAssumeSideEffectFree, does. This change makes AAIsDeadCallSiteReturn more complex as we can have a dead call or only dead users. The test have been modified to include a side effect where there was none in order to keep the coverage. Reviewed By: sstefan1 Differential Revision: https://reviews.llvm.org/D73311
-
- Feb 12, 2020
-
-
Ehud Katz authored
Fixes a memory leak of allocating `LoopInfoWrapperPass` and `DominatorTreeWrapperPass`.
-
- Feb 11, 2020
-
-
Johannes Doerfert authored
-
Johannes Doerfert authored
As an approximation to a dead edge we can check if the terminator is dead. If so, the corresponding operand use in a PHI node is dead even if the PHI node itself is not.
-
Teresa Johnson authored
This restores commit 748bb5a0, along with a fix for a Chromium test suite build issue (and a new test for that case). Differential Revision: https://reviews.llvm.org/D73242
-
Johannes Doerfert authored
-
Johannes Doerfert authored
If a pointer is returned that does not mean it is freed in the current (function) scope. We can ignore such uses in AANoFree.
-
Johannes Doerfert authored
The changeXXXAfterManifest functions are better suited to deal with changes so we should prefer them. These functions also recursively delete dead instructions which is why we see test changes.
-
Johannes Doerfert authored
-