This is an archive of the discontinued LLVM Phabricator instance.

Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
ClosedPublic

Authored by mjacob on Jan 20 2016, 4:11 PM.

Details

Summary

Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Diff Detail

Event Timeline

mjacob updated this revision to Diff 45460.Jan 20 2016, 4:11 PM
mjacob retitled this revision from to Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it. NFC..
mjacob updated this object.
mjacob added a reviewer: eddyb.
mjacob added subscribers: llvm-commits, dblaikie.
mjacob updated this revision to Diff 45461.Jan 20 2016, 4:26 PM

Update summary. Actually the remaining callers of ConstantFoldInstOperands cannot just be changed to use ConstantFoldInstruction.

mjacob updated this object.Jan 20 2016, 4:27 PM
zzheng added a subscriber: zzheng.Jan 20 2016, 4:48 PM
mjacob updated this revision to Diff 45466.Jan 20 2016, 4:50 PM

Try to base revision on D16378.

@Mailing list: sorry for the noise.

eddyb accepted this revision.Jan 20 2016, 4:53 PM
eddyb edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 20 2016, 4:53 PM
mjacob closed this revision.Jan 20 2016, 10:34 PM