[PATCH] D30416: [InstCombine] Redo reduceLoadOpStoreWidth in instcombine for bitfield store optimization.
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 15:53:19 PDT 2017
wmi updated this revision to Diff 93018.
wmi added a reviewer: chandlerc.
wmi added a comment.
Herald added a subscriber: mgorny.
Revamp the patch.
- Extend bitfield store shrinking to handle and(or(and( ... or(load, C_1), MaskedVal_1), ..., C_N), MaskedVal_N))) pattern.
- Add bitfield load shrinking.
- Use memorySSA to do the safety check and maintain it on the fly.
With all these changes, llvm now can catch most of the shrinking opportunities for testcase http://lists.llvm.org/pipermail/llvm-commits/attachments/20170307/23ad5702/attachment-0001.cc, but still keep its bitfield coalescing ablity by putting the shrinking pass in the late pipeline.
I need to add testcases for bitfield load shrinking. Will send out patch update soon.
Repository:
rL LLVM
https://reviews.llvm.org/D30416
Files:
include/llvm/CodeGen/Passes.h
include/llvm/IR/PatternMatch.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
lib/CodeGen/CodeGen.cpp
lib/CodeGen/TargetPassConfig.cpp
lib/Transforms/Scalar/BitfieldShrinking.cpp
lib/Transforms/Scalar/CMakeLists.txt
test/CodeGen/ARM/bitfield-store.ll
test/CodeGen/ARM/illegal-bitfield-loadstore.ll
test/CodeGen/X86/bitfield-store.ll
test/CodeGen/X86/illegal-bitfield-loadstore.ll
tools/opt/opt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30416.93018.patch
Type: text/x-patch
Size: 77368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170324/e0f7005e/attachment.bin>
More information about the llvm-commits
mailing list