]> granicus.if.org Git - llvm/commit
[MIR-Canon] Skip the first N vreg names lazily.
authorPuyan Lotfi <puyan@puyan.org>
Fri, 31 May 2019 06:02:38 +0000 (06:02 +0000)
committerPuyan Lotfi <puyan@puyan.org>
Fri, 31 May 2019 06:02:38 +0000 (06:02 +0000)
commitcbd1c64005d33de20f9fd4a5f85670f395dc34f7
tree25deab224df4dcc83cc1331c6092f64c0128f373
parentc096c07323e4dbb4003d37aca1caec86ff3c0444
[MIR-Canon] Skip the first N vreg names lazily.

This consolidates the vreg skip code into one function (SkipVRegs()).
SkipVRegs() now knows if it should skip as if it is the first initialization or
subsequent skips.

The first skip is also done the first time createVirtualRegister is called by
the cursor instead of by the cursor's constructor. This prevents verifier
errors on machine functions that have no vregs (where the verifier will
complain that there are vregs when the function uses none).

Differential Revision: https://reviews.llvm.org/D62717

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362195 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MIRCanonicalizerPass.cpp
test/CodeGen/MIR/AArch64/multiple-lhs-operands.mir