#
35d744d3 |
| 13-Feb-2018 |
Florian Hahn <florian.hahn@arm.com> |
Revert r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call.
Due to memsan not being happy with the array of ValueToValue maps.
llvm-svn: 325009
|
#
348b48ac |
| 13-Feb-2018 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Clear ValueToValue maps.
llvm-svn: 325006
|
#
78bddd4c |
| 13-Feb-2018 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Dereference pointer earlier.
This should make the sanitizers happy.
llvm-svn: 325004
|
#
b0884b64 |
| 13-Feb-2018 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Support splitting of blocks with instrs before call.
For basic blocks with instructions between the beginning of the block and a call we have to duplicate the instructions before
[CallSiteSplitting] Support splitting of blocks with instrs before call.
For basic blocks with instructions between the beginning of the block and a call we have to duplicate the instructions before the call in all split blocks and add PHI nodes for uses of the duplicated instructions after the call.
Currently, the threshold for the number of instructions before a call is quite low, to keep the impact on binary size low.
Reviewers: junbuml, mcrosier, davidxl, davide
Reviewed By: junbuml
Differential Revision: https://reviews.llvm.org/D41860
llvm-svn: 325001
show more ...
|
Revision tags: llvmorg-6.0.0-rc2 |
|
#
212afb9f |
| 26-Jan-2018 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Fix infinite loop when recording conditions.
Fix infinite loop when recording conditions by correctly marking basic blocks as visited.
Fixes https://bugs.llvm.org/show_bug.cgi?i
[CallSiteSplitting] Fix infinite loop when recording conditions.
Fix infinite loop when recording conditions by correctly marking basic blocks as visited.
Fixes https://bugs.llvm.org/show_bug.cgi?id=36105
llvm-svn: 323515
show more ...
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
c6c89bff |
| 16-Jan-2018 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Pass list of (BB, Conditions) pairs to splitCallSite.
This removes some duplication from splitCallSite and makes it easier to add additional code dealing with each predecessor. I
[CallSiteSplitting] Pass list of (BB, Conditions) pairs to splitCallSite.
This removes some duplication from splitCallSite and makes it easier to add additional code dealing with each predecessor. It also allows us to split for more than 2 predecessors, although that is not enabled for now.
Reviewers: junbuml, mcrosier, davidxl, davide
Reviewed By: junbuml
Differential Revision: https://reviews.llvm.org/D41858
llvm-svn: 322599
show more ...
|
#
c7fc81e6 |
| 30-Dec-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use phi ranges to simplify code. No functionality change intended.
llvm-svn: 321585
|
#
7e932890 |
| 23-Dec-2017 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Remove isOrHeader restriction.
By following the single predecessors of the predecessors of the call site, we do not need to restrict the control flow.
Reviewed By: junbuml, davi
[CallSiteSplitting] Remove isOrHeader restriction.
By following the single predecessors of the predecessors of the call site, we do not need to restrict the control flow.
Reviewed By: junbuml, davide
Differential Revision: https://reviews.llvm.org/D40729
llvm-svn: 321413
show more ...
|
#
beda7d51 |
| 13-Dec-2017 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Refactor creating callsites.
Summary: This change makes the call site creation more general if any of the arguments is predicated on a condition in the call site's predecessors.
[CallSiteSplitting] Refactor creating callsites.
Summary: This change makes the call site creation more general if any of the arguments is predicated on a condition in the call site's predecessors.
If we find a callsite, that potentially can be split, we collect the set of conditions for the call site's predecessors (currently only 2 predecessors are allowed). To do that, we traverse each predecessor's predecessors as long as it only has single predecessors and record the condition, if it is relevant to the call site. For each condition, we also check if the condition is taken or not. In case it is not taken, we record the inverse predicate.
We use the recorded conditions to create the new call sites and split the basic block.
This has 2 benefits: (1) it is slightly easier to see what is going on (IMO) and (2) we can easily extend it to handle more complex control flow.
Reviewers: davidxl, junbuml
Reviewed By: junbuml
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40728
llvm-svn: 320547
show more ...
|
#
66cf3837 |
| 12-Dec-2017 |
Mikael Holmen <mikael.holmen@ericsson.com> |
[CallSiteSplitting] Don't let debug intrinsics affect optimizations
Summary: This solves PR35616.
We don't want the compiler to generate different code when we compile with/without -g, so we now ig
[CallSiteSplitting] Don't let debug intrinsics affect optimizations
Summary: This solves PR35616.
We don't want the compiler to generate different code when we compile with/without -g, so we now ignore debug intrinsics when determining if the optimization can trigger or not.
Reviewers: junbuml
Subscribers: davide, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D41068
llvm-svn: 320460
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
2a266a34 |
| 18-Nov-2017 |
Florian Hahn <florian.hahn@arm.com> |
[CallSiteSplitting] Remove some indirection (NFC).
Summary: With this patch I tried to reduce the complexity of the code sightly, by removing some indirection. Please let me know what you think.
Re
[CallSiteSplitting] Remove some indirection (NFC).
Summary: With this patch I tried to reduce the complexity of the code sightly, by removing some indirection. Please let me know what you think.
Reviewers: junbuml, mcrosier, davidxl
Reviewed By: junbuml
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40037
llvm-svn: 318593
show more ...
|
#
c7c05ae4 |
| 04-Nov-2017 |
Davide Italiano <davide@freebsd.org> |
[CallSiteSplitting] clang-format my last commit. NFCI.
Thanks to Rui for pointing out.
llvm-svn: 317393
|
#
91b4790b |
| 03-Nov-2017 |
Davide Italiano <davide@freebsd.org> |
[CallSiteSplitting] Silence GCC's -Wparentheses. NFCI.
llvm-svn: 317385
|
#
0c99007d |
| 03-Nov-2017 |
Jun Bum Lim <junbuml@codeaurora.org> |
Recommit r317351 : Add CallSiteSplitting pass
This recommit r317351 after fixing a buildbot failure.
Original commit message:
Summary: This change add a pass which tries to split a call-si
Recommit r317351 : Add CallSiteSplitting pass
This recommit r317351 after fixing a buildbot failure.
Original commit message:
Summary: This change add a pass which tries to split a call-site to pass more constrained arguments if its argument is predicated in the control flow so that we can expose better context to the later passes (e.g, inliner, jump threading, or IPA-CP based function cloning, etc.). As of now we support two cases :
1) If a call site is dominated by an OR condition and if any of its arguments are predicated on this OR condition, try to split the condition with more constrained arguments. For example, in the code below, we try to split the call site since we can predicate the argument (ptr) based on the OR condition.
Split from : if (!ptr || c) callee(ptr); to : if (!ptr) callee(null ptr) // set the known constant value else if (c) callee(nonnull ptr) // set non-null attribute in the argument
2) We can also split a call-site based on constant incoming values of a PHI For example, from : BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2, label %BB1 BB1: br label %BB2 BB2: %p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ] call void @bar(i32 %p) to BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2-split0, label %BB1 BB1: br label %BB2-split1 BB2-split0: call void @bar(i32 0) br label %BB2 BB2-split1: call void @bar(i32 1) br label %BB2 BB2: %p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ]
llvm-svn: 317362
show more ...
|
#
2a589335 |
| 03-Nov-2017 |
Jun Bum Lim <junbuml@codeaurora.org> |
Add CallSiteSplitting pass
Summary: This change add a pass which tries to split a call-site to pass more constrained arguments if its argument is predicated in the control flow so that we can expose
Add CallSiteSplitting pass
Summary: This change add a pass which tries to split a call-site to pass more constrained arguments if its argument is predicated in the control flow so that we can expose better context to the later passes (e.g, inliner, jump threading, or IPA-CP based function cloning, etc.). As of now we support two cases :
1) If a call site is dominated by an OR condition and if any of its arguments are predicated on this OR condition, try to split the condition with more constrained arguments. For example, in the code below, we try to split the call site since we can predicate the argument (ptr) based on the OR condition.
Split from : if (!ptr || c) callee(ptr); to : if (!ptr) callee(null ptr) // set the known constant value else if (c) callee(nonnull ptr) // set non-null attribute in the argument
2) We can also split a call-site based on constant incoming values of a PHI For example, from : BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2, label %BB1 BB1: br label %BB2 BB2: %p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ] call void @bar(i32 %p) to BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2-split0, label %BB1 BB1: br label %BB2-split1 BB2-split0: call void @bar(i32 0) br label %BB2 BB2-split1: call void @bar(i32 1) br label %BB2 BB2: %p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ]
Reviewers: davidxl, huntergr, chandlerc, mcrosier, eraman, davide
Reviewed By: davidxl
Subscribers: sdesmalen, ashutosh.nema, fhahn, mssimpso, aemerson, mgorny, mehdi_amini, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D39137
llvm-svn: 317351
show more ...
|