diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-09-04 23:11:11 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-09-04 23:11:11 +0000 |
commit | e535c1a12ee1055f896ba4f9b8a4f2d9d0876a6c (patch) | |
tree | 9791a56594be948b763865bd345e9702f3840e19 /llvm/lib/Transforms/Utils/BypassSlowDivision.cpp | |
parent | eb31ef0577f125e86925247368f7f6dd8c522ee6 (diff) | |
download | bcm5719-llvm-e535c1a12ee1055f896ba4f9b8a4f2d9d0876a6c.tar.gz bcm5719-llvm-e535c1a12ee1055f896ba4f9b8a4f2d9d0876a6c.zip |
BypassSlowDivision: Assign to reference, don't copy the object.
llvm-svn: 163179
Diffstat (limited to 'llvm/lib/Transforms/Utils/BypassSlowDivision.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BypassSlowDivision.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp b/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp index 4130def1cb8..b694779a532 100644 --- a/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp +++ b/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp @@ -189,7 +189,7 @@ static bool reuseOrInsertFastDiv(Function &F, // Get instruction operands Instruction *Instr = J; DivOpInfo Key(UseSignedOp, Instr->getOperand(0), Instr->getOperand(1)); - DivCacheTy::const_iterator CacheI = PerBBDivCache.find(Key); + DivCacheTy::iterator CacheI = PerBBDivCache.find(Key); if (CacheI == PerBBDivCache.end()) { // If previous instance does not exist, insert fast div @@ -198,7 +198,7 @@ static bool reuseOrInsertFastDiv(Function &F, } // Replace operation value with previously generated phi node - DivPhiNodes Value = CacheI->second; + DivPhiNodes &Value = CacheI->second; if (UseDivOp) { // Replace all uses of div instruction with quotient phi node J->replaceAllUsesWith(Value.Quotient); |