[polly] r219338 - [Refactor][NFC] Simplify (Vector)BlockGenerator
Johannes Doerfert
doerfert at cs.uni-saarland.de
Wed Oct 8 13:18:32 PDT 2014
Author: jdoerfert
Date: Wed Oct 8 15:18:32 2014
New Revision: 219338
URL: http://llvm.org/viewvc/llvm-project?rev=219338&view=rev
Log:
[Refactor][NFC] Simplify (Vector)BlockGenerator
This removes an unnecessary cast and a unnecessary local variable.
Differential Revision: http://reviews.llvm.org/D5662
Modified:
polly/trunk/lib/CodeGen/BlockGenerators.cpp
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=219338&r1=219337&r2=219338&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Wed Oct 8 15:18:32 2014
@@ -219,9 +219,8 @@ Value *BlockGenerator::generateScalarLoa
ValueMapT &GlobalMap,
LoopToScevMapT <S) {
const Value *Pointer = Load->getPointerOperand();
- const Instruction *Inst = dyn_cast<Instruction>(Load);
Value *NewPointer =
- generateLocationAccessed(Inst, Pointer, BBMap, GlobalMap, LTS);
+ generateLocationAccessed(Load, Pointer, BBMap, GlobalMap, LTS);
Value *ScalarLoad = Builder.CreateAlignedLoad(
NewPointer, Load->getAlignment(), Load->getName() + "_p_scalar_");
return ScalarLoad;
@@ -468,8 +467,6 @@ void VectorBlockGenerator::copyBinaryIns
void VectorBlockGenerator::copyStore(const StoreInst *Store,
ValueMapT &VectorMap,
VectorValueMapT &ScalarMaps) {
- int VectorWidth = getVectorWidth();
-
const MemoryAccess &Access = Statement.getAccessFor(Store);
const Value *Pointer = Store->getPointerOperand();
@@ -481,7 +478,7 @@ void VectorBlockGenerator::copyStore(con
extractScalarValues(Store, VectorMap, ScalarMaps);
if (Access.isStrideOne(isl_map_copy(Schedule))) {
- Type *VectorPtrType = getVectorPtrTy(Pointer, VectorWidth);
+ Type *VectorPtrType = getVectorPtrTy(Pointer, getVectorWidth());
Value *NewPointer = generateLocationAccessed(Store, Pointer, ScalarMaps[0],
GlobalMaps[0], VLTS[0]);
More information about the llvm-commits
mailing list