[llvm-commits] [llvm] r166205 - /llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp

Meador Inge meadori at codesourcery.com
Thu Oct 18 13:19:48 PDT 2012


On 10/18/2012 03:11 PM, David Blaikie wrote:

> "Function names should be verb phrases (as they represent actions),
> and command-like function should be imperative. The name should be
> camel case, and start with a lower case letter (e.g. openFile() or
> isFoo())."
> 
>  - http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
> 
> It's inconsistent across the codebase because this particular standard
> wasn't in place from the start. Generally the rule is to be consistent
> with existing code (within a class, file, etc) but if you're making
> large changes you can take the opportunity to clean things up.

I see a few places where the new loop vectorizer code is inconsistent with
respect to what case letter function names start with.  For example:

+private:
+  /// Create an empty loop, based on the loop ranges of the old loop.
+  void CopyEmptyLoop();
+  /// Copy and widen the instructions from the old loop.
+  void VectorizeLoop();
+  /// Delete the old loop.
+  void DeleteOldLoop();
+
+  /// This instruction is un-vectorizable. Implement it as a sequence
+  /// of scalars.
+  void ScalarizeInstruction(Instruction *Instr);

Given this is a new class, those should all begin with lower-case letters.

-- 
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software



More information about the llvm-commits mailing list