diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-31 17:00:39 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-07-31 17:00:39 +0000 |
commit | 4cd5faaa876ce6970bc4c70f2e07cf2ae2140133 (patch) | |
tree | a75ba3a4985331120967a1a65b7d5f07ea87be8a | |
parent | 60dde1fbda1356225cca89631790495d40b5ac7f (diff) | |
download | bcm5719-llvm-4cd5faaa876ce6970bc4c70f2e07cf2ae2140133.tar.gz bcm5719-llvm-4cd5faaa876ce6970bc4c70f2e07cf2ae2140133.zip |
[CodeGenPrepare] Compress a pair. No functional change.
llvm-svn: 243759
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 6ab6acc0372..2554ccf0f7b 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -109,11 +109,7 @@ static cl::opt<bool> StressExtLdPromotion( namespace { typedef SmallPtrSet<Instruction *, 16> SetOfInstrs; -struct TypeIsSExt { - Type *Ty; - bool IsSExt; - TypeIsSExt(Type *Ty, bool IsSExt) : Ty(Ty), IsSExt(IsSExt) {} -}; +typedef PointerIntPair<Type *, 1, bool> TypeIsSExt; typedef DenseMap<Instruction *, TypeIsSExt> InstrToOrigTy; class TypePromotionTransaction; @@ -2433,8 +2429,8 @@ bool TypePromotionHelper::canGetThrough(const Instruction *Inst, // #1 get the type of the operand and check the kind of the extended bits. const Type *OpndType; InstrToOrigTy::const_iterator It = PromotedInsts.find(Opnd); - if (It != PromotedInsts.end() && It->second.IsSExt == IsSExt) - OpndType = It->second.Ty; + if (It != PromotedInsts.end() && It->second.getInt() == IsSExt) + OpndType = It->second.getPointer(); else if ((IsSExt && isa<SExtInst>(Opnd)) || (!IsSExt && isa<ZExtInst>(Opnd))) OpndType = Opnd->getOperand(0)->getType(); else |