[llvm-commits] [llvm] r164238 - /llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp

Michael Ilseman milseman at apple.com
Wed Sep 19 11:14:45 PDT 2012


Author: milseman
Date: Wed Sep 19 13:14:45 2012
New Revision: 164238

URL: http://llvm.org/viewvc/llvm-project?rev=164238&view=rev
Log:
Renaming functions to match coding style guidelines

Modified:
    llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp

Modified: llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp?rev=164238&r1=164237&r2=164238&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/IntegerDivision.cpp Wed Sep 19 13:14:45 2012
@@ -28,7 +28,7 @@
 /// instruction. This will generate a udiv in the process, and Builder's insert
 /// point will be pointing at the udiv (if present, i.e. not folded), ready to
 /// be expanded if the user wishes.
-static Value *GenerateSignedDivisionCode(Value *Dividend, Value *Divisor,
+static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor,
                                          IRBuilder<> &Builder) {
   // Implementation taken from compiler-rt's __divsi3
 
@@ -64,7 +64,7 @@
 /// Generates code to divide two unsigned scalar 32-bit integers. Returns the
 /// quotient, rounded towards 0. Builder's insert point should be pointing at
 /// the udiv instruction.
-static Value *GenerateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
+static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
                                            IRBuilder<> &Builder) {
   // The basic algorithm can be found in the compiler-rt project's
   // implementation of __udivsi3.c. Here, we do a lower-level IR based approach
@@ -286,7 +286,7 @@
   // First prepare the sign if it's a signed division
   if (Div->getOpcode() == Instruction::SDiv) {
     // Lower the code to unsigned division, and reset Div to point to the udiv.
-    Value *Quotient = GenerateSignedDivisionCode(Div->getOperand(0),
+    Value *Quotient = generateSignedDivisionCode(Div->getOperand(0),
                                                 Div->getOperand(1), Builder);
     Div->replaceAllUsesWith(Quotient);
     Div->dropAllReferences();
@@ -301,7 +301,7 @@
   }
 
   // Insert the unsigned division code
-  Value *Quotient = GenerateUnsignedDivisionCode(Div->getOperand(0),
+  Value *Quotient = generateUnsignedDivisionCode(Div->getOperand(0),
                                                  Div->getOperand(1),
                                                  Builder);
   Div->replaceAllUsesWith(Quotient);





More information about the llvm-commits mailing list