This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by mjacob on Jan 20 2016, 3:17 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 45454.Jan 20 2016, 3:17 PM
mjacob retitled this revision from to Introduce ConstantFoldBinaryOpOperands 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.
eddyb accepted this revision.Jan 20 2016, 3:19 PM
eddyb edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 20 2016, 3:19 PM
mjacob updated this revision to Diff 45457.Jan 20 2016, 3:47 PM
mjacob edited edge metadata.

Fix formatting, remove overly conservative assert.

mjacob closed this revision.Jan 20 2016, 10:30 PM