[all-commits] [llvm/llvm-project] fd86d6: [JumpThreading] Add a test that duplicates insts o...
Juneyoung Lee via All-commits
all-commits at lists.llvm.org
Wed Aug 5 17:51:43 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fd86d67b82830f1365e1e25fd138832b475bc1e7
https://github.com/llvm/llvm-project/commit/fd86d67b82830f1365e1e25fd138832b475bc1e7
Author: Juneyoung Lee <aqjune at gmail.com>
Date: 2020-08-06 (Thu, 06 Aug 2020)
Changed paths:
A llvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
Log Message:
-----------
[JumpThreading] Add a test that duplicates insts of a basic block with cond br to preds; NFC
Commit: 9f717d7b941fbc42bef017b84c4dd0f65ce06e7a
https://github.com/llvm/llvm-project/commit/9f717d7b941fbc42bef017b84c4dd0f65ce06e7a
Author: Juneyoung Lee <aqjune at gmail.com>
Date: 2020-08-06 (Thu, 06 Aug 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/JumpThreading.cpp
M llvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
Log Message:
-----------
[JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi)
This is the last JumpThreading patch for getting the performance numbers shown at
https://reviews.llvm.org/D84940#2184653 .
This patch makes ProcessBlock call ProcessBranchOnPHI when the branch condition
is freeze(phi) as well (originally it calls the function when the condition is
phi only).
Since what ProcessBranchOnPHI does is to duplicate the basic block into
predecessors if profitable, it is still valid when the condition is freeze(phi)
too.
```
p = phi [a, pred1] [b, pred2]
p.fr = freeze p
br p.fr, ...
=>
pred1:
p.fr = freeze a
br p.fr, ...
pred2:
p.fr2 = freeze b
br p.fr2, ...
```
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D85029
Compare: https://github.com/llvm/llvm-project/compare/3af4039876a1...9f717d7b941f
More information about the All-commits
mailing list