summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Attributor/IPConstantProp
Commit message (Collapse)AuthorAgeFilesLines
* [Attributor] AAValueConstantRange: Value range analysis using constant rangeHideto Ueno2020-01-152-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces `AAValueConstantRange`, which answers a possible range for integer value in a specific program point. One of the motivations is propagating existing `range` metadata. (I think we need to change the situation that `range` metadata cannot be put to Argument). The state is a tuple of `ConstantRange` and it is initialized to (known, assumed) = ([-∞, +∞], empty). Currently, AAValueConstantRange is created in `getAssumedConstant` method when `AAValueSimplify` returns `nullptr`(worst state). Supported - BinaryOperator(add, sub, ...) - CmpInst(icmp eq, ...) - !range metadata `AAValueConstantRange` is not intended to extend to polyhedral range value analysis. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: phosek, davezarzycki, baziotis, hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71620
* [Attributor][FIX] Carefully change invokes to calls (after manifest)Johannes Doerfert2020-01-082-4/+0
| | | | | | Before we manually inserted unreachable early but that could lead to broken PHI nodes. Now we use the existing late modification functionality.
* Revert "[Attributor] AAValueConstantRange: Value range analysis using ↵Hideto Ueno2020-01-032-5/+8
| | | | | | constant range" This reverts commit e9963034314edf49a12ea5e29f694d8f9f52734a.
* [Attributor] AAValueConstantRange: Value range analysis using constant rangeHideto Ueno2020-01-012-8/+5
| | | | | | | | | | | | | | | | | | | | | This patch introduces `AAValueConstantRange`, which answers a possible range for integer value in a specific program point. One of the motivations is propagating existing `range` metadata. (I think we need to change the situation that `range` metadata cannot be put to Argument). The state is a tuple of `ConstantRange` and it is initialized to (known, assumed) = ([-∞, +∞], empty). Currently, AAValueConstantRange is created when AAValueSimplify cannot simplify the value. Supported - BinaryOperator(add, sub, ...) - CmpInst(icmp eq, ...) - !range metadata `AAValueConstantRange` is not intended to extend to polyhedral range value analysis. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D71620
* [Attributor] Use abstract call sites to determine associated argumentsJohannes Doerfert2019-12-314-10/+10
| | | | | | | | | | | | | | | | | | | | | | This is the second step after D67871 to make use of abstract call sites. In this patch the argument we associate with a abstract call site argument can be the one in the callback callee instead of the one in the callback broker. Caveat: We cannot allow no-alias arguments for problematic callbacks: As described in [1], adding no-alias (or restrict) to arguments could break synchronization as the synchronization effect, e.g., a barrier, does not "alias" with the pointer anymore. This disables no-alias annotation for potentially problematic arguments until we implement the fix described in [1]. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D68008 [1] Compiler Optimizations for OpenMP, J. Doerfert and H. Finkel, International Workshop on OpenMP 2018, http://compilers.cs.uni-saarland.de/people/doerfert/par_opt18.pdf
* [Attributor] Annotate the memory behavior of call site argumentsJohannes Doerfert2019-12-312-8/+8
| | | | | | | | | Especially for callbacks, annotating the call site arguments is important. Doing so exposed a too strong dependence of AAMemoryBehavior on AANoCapture since we handle the case of potentially captured pointers explicitly. The changes to the tests are all mechanical.
* [Attributor] AAUndefinedBehavior: Check for branches on undef value.Hideto Ueno2019-12-293-10/+8
| | | | | | | | | | | | | | | A branch is considered UB if it depends on an undefined / uninitialized value. At this point this handles simple UB branches in the form: `br i1 undef, ...` We query `AAValueSimplify` to get a value for the branch condition, so the branch can be more complicated than just: `br i1 undef, ...`. Patch By: Stefanos Baziotis (@baziotis) Reviewers: jdoerfert, sstefan1, uenoku Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D71799
* Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" ↵Fangrui Song2019-12-241-1/+1
| | | | as cleanups after D56351
* [Attributor] Annotate call sites of declarations with a callbackJohannes Doerfert2019-12-132-5/+5
| | | | | Even if a declaration is called, if there is a callback we might need the information during CG-SCC traversal (D70767).
* [Attributor][NFC] Add more simple test situations for callbacksJohannes Doerfert2019-12-131-0/+31
|
* [Attributor][NFC] Reorder test functionsJohannes Doerfert2019-12-131-23/+23
| | | | | Since one of the functions has a personality the attribute set is printed. If the function is the first it should (hopefully) always be #0
* [Attributor] Reuse the IPConstantProp tests for the AttributorJohannes Doerfert2019-12-1324-0/+1442
The Attributor can, to some degree, do what IPConstantProp does. We can consequently use the corner cases already collected and tested for in the IPConstantProp tests to improve Attributor test coverage. This exposed various bugs fixed in previous Attributor patches. Not all functionality of IPConstantProp is available in AAValueSimplify and AAIsDead so some tests show that we cannot perform the expected constant propagation. Reviewers: fhahn, efriedma, mssimpso, davide Subscribers: bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69748
OpenPOWER on IntegriCloud