diff options
author | Haicheng Wu <haicheng@codeaurora.org> | 2016-01-08 19:39:39 +0000 |
---|---|---|
committer | Haicheng Wu <haicheng@codeaurora.org> | 2016-01-08 19:39:39 +0000 |
commit | a6a3279bd3a088e165f2ec84a5014fe69ea133d7 (patch) | |
tree | 99135705a48629445086b6d48a6839074ab3595c /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | fe88373dca0bd8fd354f81986a115152b81fbd2d (diff) | |
download | llvm-a6a3279bd3a088e165f2ec84a5014fe69ea133d7.zip llvm-a6a3279bd3a088e165f2ec84a5014fe69ea133d7.tar.gz llvm-a6a3279bd3a088e165f2ec84a5014fe69ea133d7.tar.bz2 |
[JumpThreading] Split select that has constant conditions coming from the PHI node
Look for PHI/Select in the same BB of the form
bb:
%p = phi [false, %bb1], [true, %bb2], [false, %bb3], [true, %bb4], ...
%s = select p, trueval, falseval
And expand the select into a branch structure. This later enables
jump-threading over bb in this pass.
Using the similar approach of SimplifyCFG::FoldCondBranchOnPHI(), unfold
select if the associated PHI has at least one constant. If the unfolded
select is not jump-threaded, it will be folded again in the later
optimizations.
llvm-svn: 257198
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions