diff options
| author | Nadav Rotem <nrotem@apple.com> | 2013-06-20 17:54:36 +0000 |
|---|---|---|
| committer | Nadav Rotem <nrotem@apple.com> | 2013-06-20 17:54:36 +0000 |
| commit | b488beefeb20e218cb187d3ad0a69a99603a0c96 (patch) | |
| tree | d9882bc3863d5807fbe04754e307b1e263cc064a /llvm/lib/Transforms/Vectorize/VecUtils.h | |
| parent | f81d036ea76a6d3b644f7b4b64658b5dc915b8d1 (diff) | |
| download | bcm5719-llvm-b488beefeb20e218cb187d3ad0a69a99603a0c96.tar.gz bcm5719-llvm-b488beefeb20e218cb187d3ad0a69a99603a0c96.zip | |
Clang-format the SLP vectorizer. No functionality change.
llvm-svn: 184446
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VecUtils.h')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VecUtils.h | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VecUtils.h b/llvm/lib/Transforms/Vectorize/VecUtils.h index 28a61e3c0dd..c9fe6d23ab6 100644 --- a/llvm/lib/Transforms/Vectorize/VecUtils.h +++ b/llvm/lib/Transforms/Vectorize/VecUtils.h @@ -25,23 +25,29 @@ namespace llvm { -class BasicBlock; class Instruction; class Type; -class VectorType; class StoreInst; class Value; -class ScalarEvolution; class DataLayout; -class TargetTransformInfo; class AliasAnalysis; +class BasicBlock; +class Instruction; +class Type; +class VectorType; +class StoreInst; +class Value; +class ScalarEvolution; +class DataLayout; +class TargetTransformInfo; +class AliasAnalysis; class Loop; /// Bottom Up SLP vectorization utility class. -struct BoUpSLP { - typedef SmallVector<Value*, 8> ValueList; - typedef SmallVector<Instruction*, 16> InstrList; - typedef SmallPtrSet<Value*, 16> ValueSet; - typedef SmallVector<StoreInst*, 8> StoreList; - static const int max_cost = 1<<20; +struct BoUpSLP { + typedef SmallVector<Value *, 8> ValueList; + typedef SmallVector<Instruction *, 16> InstrList; + typedef SmallPtrSet<Value *, 16> ValueSet; + typedef SmallVector<StoreInst *, 8> StoreList; + static const int max_cost = 1 << 20; // \brief C'tor. BoUpSLP(BasicBlock *Bb, ScalarEvolution *Se, DataLayout *Dl, - TargetTransformInfo *Tti, AliasAnalysis *Aa, Loop *Lp); + TargetTransformInfo *Tti, AliasAnalysis *Aa, Loop *Lp); /// \brief Take the pointer operand from the Load/Store instruction. /// \returns NULL if this is not a valid Load/Store instruction. @@ -73,13 +79,13 @@ struct BoUpSLP { bool vectorizeStores(ArrayRef<StoreInst *> Stores, int costThreshold); /// \brief Vectorize a group of scalars into a vector tree. - /// \returns the vectorized value. + /// \returns the vectorized value. Value *vectorizeArith(ArrayRef<Value *> Operands); /// \returns the list of new instructions that were added in order to collect /// scalars into vectors. This list can be used to further optimize the gather /// sequences. - InstrList &getGatherSeqInstructions() {return GatherInstructions; } + InstrList &getGatherSeqInstructions() { return GatherInstructions; } private: /// \brief This method contains the recursive part of getTreeCost. @@ -130,9 +136,9 @@ private: private: /// Maps instructions to numbers and back. - SmallDenseMap<Value*, int> InstrIdx; + SmallDenseMap<Value *, int> InstrIdx; /// Maps integers to Instructions. - std::vector<Instruction*> InstrVec; + std::vector<Instruction *> InstrVec; // -- containers that are used during getTreeCost -- // @@ -144,14 +150,14 @@ private: /// Contains values that have users outside of the vectorized graph. /// We need to generate extract instructions for these values. /// NOTICE: The vectorization methods also use this set. - SetVector<Value*> MustExtract; + SetVector<Value *> MustExtract; /// Contains a list of values that are used outside the current tree. This /// set must be reset between runs. - SetVector<Value*> MultiUserVals; + SetVector<Value *> MultiUserVals; /// Maps values in the tree to the vector lanes that uses them. This map must /// be reset between runs of getCost. - std::map<Value*, int> LaneMap; + std::map<Value *, int> LaneMap; /// A list of instructions to ignore while sinking /// memory instructions. This map must be reset between runs of getCost. ValueSet MemBarrierIgnoreList; @@ -159,8 +165,8 @@ private: // -- Containers that are used during vectorizeTree -- // /// Maps between the first scalar to the vector. This map must be reset - ///between runs. - DenseMap<Value*, Value*> VectorizedValues; + /// between runs. + DenseMap<Value *, Value *> VectorizedValues; // -- Containers that are used after vectorization by the caller -- // @@ -169,7 +175,7 @@ private: /// Iterating over this list is faster than calling LICM. /// Notice: We insert NULL ptrs to separate between the different gather /// sequences. - InstrList GatherInstructions; + InstrList GatherInstructions; /// Instruction builder to construct the vectorized tree. IRBuilder<> Builder; |

