Move the code that uses SCEVs prior to creating the new loops.
[oota-llvm.git] / lib / Transforms / Instrumentation / EdgeProfiling.cpp
index 1d31fcc4df3f207b5ff7c429df0b26b8e86c94a3..e8ef2654d2564ff8268db778b8a62f19e7c24c46 100644 (file)
@@ -74,7 +74,7 @@ bool EdgeProfiler::runOnModule(Module &M) {
     }
   }
 
-  const Type *ATy = ArrayType::get(Type::getInt32Ty(M.getContext()), NumEdges);
+  Type *ATy = ArrayType::get(Type::getInt32Ty(M.getContext()), NumEdges);
   GlobalVariable *Counters =
     new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
                        Constant::getNullValue(ATy), "EdgeProfCounters");