Clarify that the bypassSlowDivision optimization operates on a single BB [v2]
authorEric Christopher <echristo@gmail.com>
Mon, 4 Jan 2016 23:18:58 +0000 (23:18 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 4 Jan 2016 23:18:58 +0000 (23:18 +0000)
commit0ecf67f2feadcd0539f206aa9735a5e5c99d7ed5
tree4ce310179609095db17b32b0e756d2a9847cfab0
parent5216ace86d655833fb4e3f591a2f91b1cbdcead9
Clarify that the bypassSlowDivision optimization operates on a single BB [v2]

Update some comments to be more explicit.

Change bypassSlowDivision and the functions it calls so that they take
BasicBlock*s and Instruction*s, rather than Function::iterator&s and
BasicBlock::iterator&s.

Change the APIs so that the caller is responsible for updating the
iterator, rather than the callee. This makes control flow much easier
to follow.

Patch by Justin Lebar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256789 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/BypassSlowDivision.h
lib/CodeGen/CodeGenPrepare.cpp
lib/Transforms/Utils/BypassSlowDivision.cpp