[PATCH] Add isRegSequence property

hfinkel at anl.gov hfinkel at anl.gov
Thu Jul 31 07:33:34 PDT 2014


I think that the general direction seems reasonable. Some comments...

================
Comment at: lib/CodeGen/TargetInstrInfo.cpp:854
@@ +853,3 @@
+
+bool TargetInstrInfo::getRegSequenceInputs(
+    const MachineInstr &MI, unsigned DefIdx,
----------------
I would actually arrange this the other way. Have a target hook called getRegSequenceLikeInputs, which is called by this function. This function need not be virtual, but getRegSequenceLikeInputs would be virtual (and just return false by default). In this way, implementers of the callback don't need to remember to call the base class implementation to get the desired behavior for REG_SEQUENCE itself.

================
Comment at: utils/TableGen/InstrInfoEmitter.cpp:507
@@ -506,1 +506,3 @@
   if (Inst.hasExtraDefRegAllocReq) OS << "|(1<<MCID::ExtraDefRegAllocReq)";
+  if (Inst.isRegSequence)
+    OS << "|(1<<MCID::RegSequence)";
----------------
All of the others are on one line, so this one should be too.

http://reviews.llvm.org/D4734






More information about the llvm-commits mailing list