This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Refactor out a createNodeForSelect
ClosedPublic

Authored by sanjoy on Oct 2 2015, 1:34 AM.

Diff Detail

Event Timeline

sanjoy updated this revision to Diff 36334.Oct 2 2015, 1:34 AM
sanjoy retitled this revision from to [SCEV] Refactor out a createNodeForSelect.
sanjoy updated this object.
sanjoy added a subscriber: llvm-commits.
mehdi_amini edited edge metadata.Oct 2 2015, 1:56 AM

Looks pretty straightforward, with a minor question.

Thanks.

lib/Analysis/ScalarEvolution.cpp
4566

What else than an instruction it could be here?

mehdi_amini accepted this revision.Oct 2 2015, 1:56 AM
mehdi_amini edited edge metadata.
This revision is now accepted and ready to land.Oct 2 2015, 1:56 AM
sanjoy added inline comments.Oct 2 2015, 12:13 PM
lib/Analysis/ScalarEvolution.cpp
4566

It could be a SelectOperator (a ConstantExpr). These won't have their condition operand be an icmp anyway (which is the first thing we check for in createNodeForSelect), so ignoring these at this place is fine.

I'll add a comment stating what I just said.

This revision was automatically updated to reflect the committed changes.