Skip to content

Commit 8ae3ac8

Browse files
authored
[mlir][emitc] Remove dead methods from emitter (#167657)
This patch is a follow up on #167532, which refactored these method's code into the relevant `printOperation()` functions but did not remove them.
1 parent b9301c2 commit 8ae3ac8

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

mlir/lib/Target/Cpp/TranslateToCpp.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,6 @@ struct CppEmitter {
189189
/// emitc::ForOp.
190190
StringRef getOrCreateInductionVarName(Value val);
191191

192-
// Returns the textual representation of a subscript operation.
193-
std::string getSubscriptName(emitc::SubscriptOp op);
194-
195-
// Returns the textual representation of a member (of object) operation.
196-
std::string createMemberAccess(emitc::MemberOp op);
197-
198-
// Returns the textual representation of a member of pointer operation.
199-
std::string createMemberAccess(emitc::MemberOfPtrOp op);
200-
201192
/// Return the existing or a new label of a Block.
202193
StringRef getOrCreateName(Block &block);
203194

@@ -1387,32 +1378,6 @@ CppEmitter::CppEmitter(raw_ostream &os, bool declareVariablesAtTop,
13871378
labelInScopeCount.push(0);
13881379
}
13891380

1390-
std::string CppEmitter::getSubscriptName(emitc::SubscriptOp op) {
1391-
std::string out;
1392-
llvm::raw_string_ostream ss(out);
1393-
ss << getOrCreateName(op.getValue());
1394-
for (auto index : op.getIndices()) {
1395-
ss << "[" << getOrCreateName(index) << "]";
1396-
}
1397-
return out;
1398-
}
1399-
1400-
std::string CppEmitter::createMemberAccess(emitc::MemberOp op) {
1401-
std::string out;
1402-
llvm::raw_string_ostream ss(out);
1403-
ss << getOrCreateName(op.getOperand());
1404-
ss << "." << op.getMember();
1405-
return out;
1406-
}
1407-
1408-
std::string CppEmitter::createMemberAccess(emitc::MemberOfPtrOp op) {
1409-
std::string out;
1410-
llvm::raw_string_ostream ss(out);
1411-
ss << getOrCreateName(op.getOperand());
1412-
ss << "->" << op.getMember();
1413-
return out;
1414-
}
1415-
14161381
void CppEmitter::cacheDeferredOpResult(Value value, StringRef str) {
14171382
if (!valueMapper.count(value))
14181383
valueMapper.insert(value, str.str());

0 commit comments

Comments
 (0)