HomePhabricator

Re-add ConstantFoldInstOperands form taking opcode and return type.

Description

Re-add ConstantFoldInstOperands form taking opcode and return type.

Summary:
This form was replaced by a form taking an instruction instead of opcode and
return type in r258391. After committing this change (and some depending,
follow-up changes) it turned out in the review thread to be controversial. The
discussion didn't come to a conclusion yet. I'm re-adding the old form to fix
the API regression and to provide a better base for discussion, possibly on
llvm-dev.

A difference to the original function is that it can't be called with GEPs
(similarly to how it was already the case for compares). In order to support
opaque pointers in the future, folding GEPs needs to be passed the source
element type, which is not possible with the current API.

Reviewers: dberlin, reames

Subscribers: dblaikie, eddyb

Differential Revision: http://reviews.llvm.org/D17901

Details

Committed
mjacobMar 14 2016, 3:34 PM
Differential Revision
D17901: Re-add ConstantFoldInstOperands form taking opcode and return type.
Parents
rL263500: Remove code added for debugging purposes. NFC.
Branches
Unknown
Tags
Unknown