Page MenuHomePhabricator

CodeGen: Introduce a base class for immediates.

Authored by pcc on Oct 11 2016, 11:27 AM.



Move the body of ConstantSDNode to a new class, ConstantIntSDNode,
which derives from ConstantSDNode, which now acts as the base class for
immediates. Change most references to ConstantSDNode in C++ code to refer
to ConstantIntSDNode.

In tblgen, "imm" continues to refer to ConstantSDNode. Change pattern and
transform code so that it casts to ConstantIntSDNode.

This is in preparation for a future change which will introduce a separate
class derived from ConstantSDNode for references to symbols with fixed

As proposed on llvm-dev:

Depends on D25355

Event Timeline

pcc updated this revision to Diff 74277.Oct 11 2016, 11:27 AM
pcc retitled this revision from to CodeGen: Introduce a base class for immediates..
pcc updated this object.
pcc added a reviewer: chandlerc.
pcc added subscribers: llvm-commits, lattner.

As I mentioned on llvmdev, this approach doesn't make sense to me.

Ah, I didn't see it. I'll respond there.

pcc abandoned this revision.Oct 21 2016, 1:24 PM

Abandoned in favour of D25812 / D25878