This is an archive of the discontinued LLVM Phabricator instance.

Clarify that the bypassSlowDivision optimization operates on a single BB [v2]
ClosedPublic

Authored by jlebar on Dec 17 2015, 5:32 PM.

Details

Summary

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.

Diff Detail

Event Timeline

jlebar updated this revision to Diff 43201.Dec 17 2015, 5:32 PM
jlebar retitled this revision from to Clarify that the bypassSlowDivision optimization operates on a single BB [v2].
jlebar updated this object.
jlebar added reviewers: tyler.nowicki, hfinkel.
jlebar added a subscriber: llvm-commits.
tyler.nowicki edited edge metadata.Dec 24 2015, 8:34 AM

LGTM!

Sorry for the delayed response. Holidays getting in the way.

tyler.nowicki accepted this revision.Dec 24 2015, 8:34 AM
tyler.nowicki edited edge metadata.
This revision is now accepted and ready to land.Dec 24 2015, 8:34 AM
jlebar updated this revision to Diff 43892.Jan 4 2016, 9:36 AM
jlebar edited edge metadata.

Sync to HEAD.

echristo closed this revision.Jan 4 2016, 3:24 PM
echristo added a subscriber: echristo.

Committed thusly for jlebar:

dzur:~/sources/llvm> git svn dcommit
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
M include/llvm/Transforms/Utils/BypassSlowDivision.h
M lib/CodeGen/CodeGenPrepare.cpp
M lib/Transforms/Utils/BypassSlowDivision.cpp
Committed r256789