[llvm] r264695 - LiveVariables: Do not remove dead flags from vreg operands
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 10:05:12 PDT 2016
> On Mar 28, 2016, at 8:08 PM, Matthias Braun via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: matze
> Date: Mon Mar 28 22:08:18 2016
> New Revision: 264695
>
> URL: http://llvm.org/viewvc/llvm-project?rev=264695&view=rev
> Log:
> LiveVariables: Do not remove dead flags from vreg operands
>
> Also add a FIXME comment on why Mips RDDSP causes bogus dead flags to be
> added which LiveVariables cleans up by accident.
>
> Modified:
> llvm/trunk/lib/CodeGen/LiveVariables.cpp
>
> Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=264695&r1=264694&r2=264695&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Mon Mar 28 22:08:18 2016
> @@ -527,9 +527,14 @@ void LiveVariables::runOnInstr(MachineIn
> MO.setIsKill(false);
> if (MO.readsReg())
> UseRegs.push_back(MOReg);
> - } else /*MO.isDef()*/ {
> - if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
> - MRI->isReserved(MOReg)))
> + } else {
> + assert(MO.isDef());
> + // FIXME: We should not remove any dead flags. Howeve the MIPS RDDSP
Typo: However
> + // instruction needs it at the moment: RDDSP gets its implicit use
> + // operands added too late in the processing so InstrEmitter adds an
> + // incorrect dead flag because the uses are not yet visible.
Please file a PR if not already done, to make sure we do not forget about it.
> + if (TargetRegisterInfo::isPhysicalRegister(MOReg) &&
> + !MRI->isReserved(MOReg))
> MO.setIsDead(false);
> DefRegs.push_back(MOReg);
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list