summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-02 18:17:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-02 18:17:40 +0000
commitde58870394099c89187a3b8fde15cb0177b7172d (patch)
treeff97e830fc88c68290b45d180c0f0303dd2b0f6b /llvm/lib
parent408d4d470d3f97ab7e46e745b3689f57c87c207f (diff)
downloadbcm5719-llvm-de58870394099c89187a3b8fde15cb0177b7172d.tar.gz
bcm5719-llvm-de58870394099c89187a3b8fde15cb0177b7172d.zip
AArch64: Re-enable AArch64AddressTypePromotion
This reverts commits r212189 and r212190. While this pass was accidentally disabled (until r212073), r205437 slipped in a use of `auto` that should have been `auto&`. This fixes PR20188. llvm-svn: 212201
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp2
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetMachine.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp b/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp
index 76968012947..ab2c4b73e67 100644
--- a/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp
@@ -384,7 +384,7 @@ void AArch64AddressTypePromotion::mergeSExts(ValueToInsts &ValToSExtendedUses,
if (ToRemove.count(Inst))
continue;
bool inserted = false;
- for (auto Pt : CurPts) {
+ for (auto &Pt : CurPts) {
if (DT.dominates(Inst, Pt)) {
DEBUG(dbgs() << "Replace all uses of:\n" << *Pt << "\nwith:\n"
<< *Inst << '\n');
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index cda2e2c9288..f99b90b800f 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -155,6 +155,8 @@ bool AArch64PassConfig::addPreISel() {
addPass(createAArch64PromoteConstantPass());
if (TM->getOptLevel() != CodeGenOpt::None)
addPass(createGlobalMergePass(TM));
+ if (TM->getOptLevel() != CodeGenOpt::None)
+ addPass(createAArch64AddressTypePromotionPass());
return false;
}
OpenPOWER on IntegriCloud