mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-21 11:11:42 +00:00
[DAG] Add Target Store Merge pass ordering function
Allow targets to specify if they should merge stores before or after legalization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2dfb7e4fe8
commit
9bd0f56ab3
@ -410,6 +410,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Should we merge stores after Legalization (generally
|
||||
/// better quality) or before (simpler)
|
||||
virtual bool mergeStoresAfterLegalization() const { return false; }
|
||||
|
||||
/// Returns if it's reasonable to merge stores to MemVT size.
|
||||
virtual bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT) const {
|
||||
return true;
|
||||
|
@ -13209,7 +13209,8 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
|
||||
|
||||
// Only perform this optimization before the types are legal, because we
|
||||
// don't want to perform this optimization on every DAGCombine invocation.
|
||||
if (!LegalTypes) {
|
||||
if ((TLI.mergeStoresAfterLegalization()) ? Level == AfterLegalizeDAG
|
||||
: !LegalTypes) {
|
||||
for (;;) {
|
||||
// There can be multiple store sequences on the same chain.
|
||||
// Keep trying to merge store sequences until we are unable to do so
|
||||
|
Loading…
x
Reference in New Issue
Block a user