Skip to content

Commit ee3fd03

Browse files
committed
Generate serialiseStore automatically.
1 parent 8418e7b commit ee3fd03

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

llvm/lib/YkIR/YkIRWriter.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,16 +351,6 @@ class YkIRWriter {
351351
InstIdx++;
352352
}
353353

354-
void serialiseStore(StoreInst *I, ValueLoweringMap &VLMap, unsigned BBIdx,
355-
unsigned &InstIdx)
356-
{
357-
if (I->getNumOperands() == 2) {
358-
serialiseInstGeneric(I, VLMap, BBIdx, InstIdx, OpCode::Store);
359-
} else {
360-
serialiseUnimplementedInstruction(I, VLMap, BBIdx, InstIdx);
361-
}
362-
}
363-
364354
void serialiseInst(Instruction *I, ValueLoweringMap &VLMap, unsigned BBIdx,
365355
unsigned &InstIdx) {
366356
// Macros to help dispatch to serialisers.
@@ -383,12 +373,12 @@ class YkIRWriter {
383373
GENERIC_INST_SERIALISE(I, llvm::BinaryOperator, BinaryOperator)
384374
GENERIC_INST_SERIALISE(I, ReturnInst, Ret)
385375
GENERIC_INST_SERIALISE(I, llvm::InsertValueInst, InsertValue)
376+
GENERIC_INST_SERIALISE(I, StoreInst, Store)
386377

387378
CUSTOM_INST_SERIALISE(I, AllocaInst, serialiseAllocaInst)
388379
CUSTOM_INST_SERIALISE(I, CallInst, serialiseCallInst)
389380
CUSTOM_INST_SERIALISE(I, BranchInst, serialiseBranchInst)
390381
CUSTOM_INST_SERIALISE(I, GetElementPtrInst, serialiseGetElementPtr)
391-
CUSTOM_INST_SERIALISE(I, StoreInst, serialiseStore)
392382

393383
// GENERIC_INST_SERIALISE and CUSTOM_INST_SERIALISE do an early return upon
394384
// a match, so if we get here then the instruction wasn't handled.

0 commit comments

Comments
 (0)