summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-07-28 06:43:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-07-28 06:43:11 +0000
commitd5b806a27ffb83860a54fe0161ad398388b7278e (patch)
treea84bf530455ed9600dc38007bd0b05110c25ee92 /llvm/lib/Transforms/Scalar
parent35f72ac81879736f32f5690eb3655209c1ef79e6 (diff)
downloadbcm5719-llvm-d5b806a27ffb83860a54fe0161ad398388b7278e.tar.gz
bcm5719-llvm-d5b806a27ffb83860a54fe0161ad398388b7278e.zip
Thread DataLayout through the callers and into mem2reg. This will be
useful in a subsequent patch, but causes an unfortunate amount of noise, so I pulled it out into a separate patch. llvm-svn: 187322
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/SROA.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 5afd83008a0..1525caa868b 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -3376,7 +3376,7 @@ bool SROA::promoteAllocas(Function &F) {
if (DT && !ForceSSAUpdater) {
DEBUG(dbgs() << "Promoting allocas with mem2reg...\n");
- PromoteMemToReg(PromotableAllocas, *DT);
+ PromoteMemToReg(PromotableAllocas, *DT, DL);
PromotableAllocas.clear();
return true;
}
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 33bbe151630..73b2edfac2c 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -1426,7 +1426,7 @@ bool SROA::performPromotion(Function &F) {
if (Allocas.empty()) break;
if (HasDomTree)
- PromoteMemToReg(Allocas, *DT);
+ PromoteMemToReg(Allocas, *DT, TD);
else {
SSAUpdater SSA;
for (unsigned i = 0, e = Allocas.size(); i != e; ++i) {
OpenPOWER on IntegriCloud