[llvm-commits] [llvm] r47177 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Dan Gohman
gohman at apple.com
Fri Feb 15 16:32:30 PST 2008
Ok. I'm working to understand the dance between target SDNodes and
MachineInstrs and I mistook what was going on there. Can you point me
to
an example where an instruction has def operands that aren't first, not
counting ImplicitDefs defs?
Dan
On Feb 15, 2008, at 3:15 PM, Evan Cheng wrote:
> Hi Dan,
>
> This is not right. You are assuming def operands must be first in the
> operand list. But that's not necessary the case.
>
> Evan
>
> On Feb 15, 2008, at 12:59 PM, Dan Gohman wrote:
>
>> Author: djg
>> Date: Fri Feb 15 14:59:17 2008
>> New Revision: 47177
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=47177&view=rev
>> Log:
>> Skip over the defs and start at the uses when looking for operands
>> with the TIED_TO attribute.
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=47177&r1=47176&r2=47177&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>> (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Fri
>> Feb 15 14:59:17 2008
>> @@ -431,7 +431,7 @@
>> SUnit *NewSU = NewSUnit(N);
>> SUnitMap[N].push_back(NewSU);
>> const TargetInstrDesc &TID = TII->get(N->getTargetOpcode());
>> - for (unsigned i = 0; i != TID.getNumOperands(); ++i) {
>> + for (unsigned i = TID.getNumDefs(); i != TID.getNumOperands(); +
>> +i) {
>> if (TID.getOperandConstraint(i, TOI::TIED_TO) != -1) {
>> NewSU->isTwoAddress = true;
>> break;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> 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