diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-20 02:50:54 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-20 02:50:54 +0000 |
commit | 3bd1b65ed3effc6e05d2123e5b1f8252da34afb9 (patch) | |
tree | 406891b426a10d71008481e90e7c3696264fb024 /clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp | |
parent | dceb0cf3f3917e71af2e58f60491b036914be34f (diff) | |
download | bcm5719-llvm-3bd1b65ed3effc6e05d2123e5b1f8252da34afb9.tar.gz bcm5719-llvm-3bd1b65ed3effc6e05d2123e5b1f8252da34afb9.zip |
Add a RegisterTuples class to Target.td and TableGen.
A RegisterTuples instance is used to synthesize super-registers by
zipping together lists of sub-registers. This is useful for generating
pseudo-registers representing register sequence constraints like 'two
consecutive GPRs', or 'an even-odd pair of floating point registers'.
The RegisterTuples def can be used in register set operations when
building register classes. That is the only way of accessing the
synthesized super-registers.
For example, the ARM QQ register class of pseudo-registers could have
been formed like this:
// Form pairs Q0_Q1, Q2_Q3, ...
def QQPairs : RegisterTuples<[qsub_0, qsub_1],
[(decimate QPR, 2),
(decimate (shl QPR, 1), 2)]>;
def QQ : RegisterClass<..., (add QQPairs)>;
Similarly, pseudo-registers representing '3 consecutive D-regs with
wraparound' look like:
// Form D0_D1_D2, D1_D2_D3, ..., D30_D31_D0, D31_D0_D1.
def DSeqTriples : RegisterTuples<[dsub_0, dsub_1, dsub_2],
[(rotl DPR, 0),
(rotl DPR, 1),
(rotl DPR, 2)]>;
TableGen automatically computes aliasing information for the synthesized
registers.
Register tuples are still somewhat experimental. We still need to see
how they interact with MC.
llvm-svn: 133407
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp')
0 files changed, 0 insertions, 0 deletions