[llvm-commits] [llvm] r57286 - /llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
Evan Cheng
evan.cheng at apple.com
Wed Oct 8 10:44:44 PDT 2008
On Oct 7, 2008, at 9:30 PM, Owen Anderson wrote:
> Author: resistor
> Date: Tue Oct 7 23:30:51 2008
> New Revision: 57286
>
> URL: http://llvm.org/viewvc/llvm-project?rev=57286&view=rev
> Log:
> Fix the case where an instruction is not properly marked as using
> all registers that alias its inputs.
>
> Modified:
> llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
>
> Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=57286&r1=57285&r2=57286&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Tue Oct 7 23:30:51 2008
> @@ -575,8 +575,26 @@
> // them for later. Also, we have to process these
> // _before_ processing the defs, since an instr
> // uses regs before it defs them.
> - if (MO.isReg() && MO.getReg() && MO.isUse())
> + if (MO.isReg() && MO.getReg() && MO.isUse()) {
> LastUseDef[MO.getReg()] = std::make_pair(I, i);
> +
> +
> + if (TargetRegisterInfo::isVirtualRegister(MO.getReg()))
> continue;
> +
> + const unsigned* subregs = TRI->getAliasSet(MO.getReg());
Why call it subregs? That's confusing.
>
> + if (subregs) {
> + while (*subregs) {
This seems like a good time to get alias set the same treatment as
subreg set (i.e. hash)?
Thanks,
Evan
>
> + DenseMap<unsigned, std::pair<MachineInstr*, unsigned>
> >::iterator
> + alias = LastUseDef.find(*subregs);
> +
> + if (alias != LastUseDef.end() &&
> + alias->second.first != I)
> + LastUseDef[*subregs] = std::make_pair(I, i);
> +
> + ++subregs;
> + }
> + }
> + }
> }
>
> for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list