[llvm-commits] [llvm] r151125 - in /llvm/trunk: lib/Analysis/ScalarEvolutionExpander.cpp test/Transforms/LoopStrengthReduce/pr12048.ll
Duncan Sands
baldrick at free.fr
Wed Feb 22 00:32:00 PST 2012
Hi Rafael,
> --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Feb 21 21:21:39 2012
> @@ -31,11 +31,20 @@
> Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
> Instruction::CastOps Op,
> BasicBlock::iterator IP) {
> - // All new or reused instructions must strictly dominate their uses.
> - // It would be nice to assert this here, but we don't always know where
> - // the next instructions will be added as the caller can move the
> - // Builder's InsertPt before creating them and we might be called with
> - // an invalid InsertPt.
> + // This function must be called with the builder having a valid insertion
> + // point. It doesn't need to be the actual IP where the uses of the returned
> + // cast will be added, but it must dominate such IP.
> + // We use this precondition to assert that we can produce a cast that will
> + // dominate all its uses. In particular, this is crussial for the case
crussial -> crucial
Ciao, Duncan.
More information about the llvm-commits
mailing list