Stylistic and 80-col fixes
authorEvan Cheng <evan.cheng@apple.com>
Fri, 14 Sep 2012 21:25:34 +0000 (21:25 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 14 Sep 2012 21:25:34 +0000 (21:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163940 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/BypassSlowDivision.h
lib/Transforms/Scalar/CodeGenPrepare.cpp
lib/Transforms/Utils/BypassSlowDivision.cpp

index c262434b662871221b769361d1d774d34360ed64..dceda4858791e60671e7e9c73d2accee8a3f891a 100644 (file)
@@ -26,7 +26,7 @@ namespace llvm {
 /// profitably bypassed and carried out with a shorter, faster divide.
 bool bypassSlowDivision(Function &F,
                         Function::iterator &I,
 /// profitably bypassed and carried out with a shorter, faster divide.
 bool bypassSlowDivision(Function &F,
                         Function::iterator &I,
-                        const DenseMap<Type *, Type *> &BypassTypeMap);
+                        const DenseMap<Type*, Type*> &BypassTypeMap);
 
 } // End llvm namespace
 
 
 } // End llvm namespace
 
index e97b90f8ffb3562388395cdfba299e7a8d9201a9..65249153bd043a82be10a9f847618741a51f9881 100644 (file)
@@ -152,13 +152,9 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
   /// This optimization identifies DIV instructions that can be
   /// profitably bypassed and carried out with a shorter, faster divide.
   if (TLI && TLI->isSlowDivBypassed()) {
   /// This optimization identifies DIV instructions that can be
   /// profitably bypassed and carried out with a shorter, faster divide.
   if (TLI && TLI->isSlowDivBypassed()) {
-    const DenseMap<Type *, Type *> &BypassTypeMap = TLI->getBypassSlowDivTypes();
-
-    for (Function::iterator I = F.begin(); I != F.end(); I++) {
-      EverMadeChange |= bypassSlowDivision(F,
-                                           I,
-                                           BypassTypeMap);
-    }
+    const DenseMap<Type*, Type*> &BypassTypeMap = TLI->getBypassSlowDivTypes();
+    for (Function::iterator I = F.begin(); I != F.end(); I++)
+      EverMadeChange |= bypassSlowDivision(F, I, BypassTypeMap);
   }
 
   // Eliminate blocks that contain only PHI nodes and an
   }
 
   // Eliminate blocks that contain only PHI nodes and an
index 30d60be277d6ef5997610c8bd0513ee9146e962c..ac18b7d5a058e4a111a0de600c1e3e0ab75d36be 100644 (file)
@@ -221,7 +221,7 @@ static bool reuseOrInsertFastDiv(Function &F,
 // be profitably bypassed and carried out with a shorter, faster divide.
 bool llvm::bypassSlowDivision(Function &F,
                               Function::iterator &I,
 // be profitably bypassed and carried out with a shorter, faster divide.
 bool llvm::bypassSlowDivision(Function &F,
                               Function::iterator &I,
-                              const DenseMap<Type *, Type *> &BypassTypeMap) {
+                              const DenseMap<Type*, Type*> &BypassTypeMap) {
   DivCacheTy DivCache;
 
   bool MadeChange = false;
   DivCacheTy DivCache;
 
   bool MadeChange = false;