summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLoopInfo.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-08-15 08:04:56 +0000
committerJames Molloy <james.molloy@arm.com>2016-08-15 08:04:56 +0000
commit9a3c82f5cfe28121a581522d5444bbaef0c91cb9 (patch)
tree05228273aefcbf00f546e056459ff967cb349dfe /llvm/lib/CodeGen/MachineLoopInfo.cpp
parenta305a435a6568114022cd684675b4b2ca24cd2da (diff)
downloadbcm5719-llvm-9a3c82f5cfe28121a581522d5444bbaef0c91cb9.tar.gz
bcm5719-llvm-9a3c82f5cfe28121a581522d5444bbaef0c91cb9.zip
[SimplifyCFG] Rewrite SinkThenElseCodeToEnd
The new version has several advantages: 1) IMSHO it's more readable and neater 2) It handles loads and stores properly 3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch. With this change we can now finally sink load-modify-store idioms such as: if (a) return *b += 3; else return *b += 4; => %z = load i32, i32* %y %.sink = select i1 %a, i32 5, i32 7 %b = add i32 %z, %.sink store i32 %b, i32* %y ret i32 %b When this works for switches it'll be even more powerful. llvm-svn: 278660
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud