Make all unnamed RegisterClass TreePatternNodes typed MVT::i32.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 23 Mar 2013 18:08:44 +0000 (18:08 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 23 Mar 2013 18:08:44 +0000 (18:08 +0000)
commit7a42fb3b6e729e2446f9d53b547976e5084a59d8
tree731d3bb19c16bfca3604b0932dc172972bb6addf
parent7257fda1b3b047f6fd46df8a9999580fcfafbfae
Make all unnamed RegisterClass TreePatternNodes typed MVT::i32.

A register class can appear as a leaf TreePatternNode with and without a
name:

  (COPY_TO_REGCLASS GPR:$src, F8RC)

In a named leaf node like GPR:$src, the register class provides type
information for the named variable represented by the node. The TypeSet
for such a node is the set of value types that the register class can
represent.

In an unnamed leaf node like F8RC above, the register class represents
itself as a kind of immediate. Such a node has the type MVT::i32,
we'll never create a virtual register representing it.

This change makes it possible to remove the special handling of
COPY_TO_REGCLASS in CodeGenDAGPatterns.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177825 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/CodeGenDAGPatterns.h