[PATCH] Add isRegSequence property

Quentin Colombet qcolombet at apple.com
Thu Jul 31 09:41:39 PDT 2014


Hi Hal,

Thanks for the feedbacks, I’ll make the changes shortly.

Cheers,
-Quentin

================
Comment at: lib/CodeGen/TargetInstrInfo.cpp:854
@@ +853,3 @@
+
+bool TargetInstrInfo::getRegSequenceInputs(
+    const MachineInstr &MI, unsigned DefIdx,
----------------
hfinkel at anl.gov wrote:
> 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.
Good idea, I’ll update accordingly.

================
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)";
----------------
hfinkel at anl.gov wrote:
> All of the others are on one line, so this one should be too.
Agree, looks like clang-format disagreed ;).

http://reviews.llvm.org/D4734






More information about the llvm-commits mailing list