[llvm-commits] [llvm] r151273 - /llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Feb 23 11:29:42 PST 2012
On Feb 23, 2012, at 11:15 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote:
> Author: d0k
> Date: Thu Feb 23 13:15:40 2012
> New Revision: 151273
>
> URL: http://llvm.org/viewvc/llvm-project?rev=151273&view=rev
> Log:
> post-ra-sched: Turn the KillIndices vector into a bitvector, it only stored two meaningful states.
>
> Rename it to LiveRegs to make it more clear what's stored inside.
Very nice. Thanks.
> @@ -466,7 +462,7 @@
> if (MO.isRegMask())
> for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i)
> if (MO.clobbersPhysReg(i))
> - KillIndices[i] = ~0u;
> + LiveRegs.reset(i);
And now this loop can be vectorized:
if (MO.isRegMask())
LiveRegs.clearBitsNotInMask(MO.getRegMask());
The regmask has 1s for preserved registers, and 0s for clobbered registers.
/jakob
More information about the llvm-commits
mailing list