summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-06-22 15:07:49 +0000
committerNirav Dave <niravd@google.com>2017-06-22 15:07:49 +0000
commitf2c349ccecc177cd60781cc65789090ea62fc9a7 (patch)
tree6d37a508c4b7641e3d0b252ec39b46798fef5ddd /llvm/lib
parentefd57a8aeceda4191348c15fb95502f496ea6a00 (diff)
downloadbcm5719-llvm-f2c349ccecc177cd60781cc65789090ea62fc9a7.tar.gz
bcm5719-llvm-f2c349ccecc177cd60781cc65789090ea62fc9a7.zip
[DAG] Add Target Store Merge pass ordering function
Allow targets to specify if they should merge stores before or after legalization. llvm-svn: 306006
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 14a722a59e8..d02dcb6f443 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -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
OpenPOWER on IntegriCloud