[PATCH] D50489: [LICM] hoist fences out of loops w/o memory operations
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 8 21:30:43 PDT 2018
reames created this revision.
reames added reviewers: mkazantsev, skatkov, anna.
Herald added subscribers: llvm-commits, jfb, bollu, mcrosier.
The motivating case is an otherwise dead loop with a fence in it. At the moment, this goes all the way through the optimizer and we end up emitting an entirely pointless loop on x86. This case may seem a bit contrived, but we've seen it in real code as the result of otherwise reasonable lowering strategies combined w/thread local memory optimizations (such as escape analysis).
To handle this simple case, we can teach LICM to hoist must execute fences when there is no other memory operation within the loop.
Repository:
rL LLVM
https://reviews.llvm.org/D50489
Files:
include/llvm/Analysis/AliasSetTracker.h
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/fence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50489.159853.patch
Type: text/x-patch
Size: 3158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180809/8e1765ed/attachment.bin>
More information about the llvm-commits
mailing list