Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6783fe

Browse files
committed
address comments
1 parent aea6e13 commit d6783fe

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,8 +2415,7 @@ class GICombinerEmitter final : public GlobalISelMatchTableExecutorEmitter {
24152415
MatchTable buildMatchTable(MutableArrayRef<RuleMatcher> Rules);
24162416

24172417
void emitRuleConfigImpl(raw_ostream &OS);
2418-
SmallSetVector<const CodeGenInstruction *, 32>
2419-
collectMatchOpcodes(ArrayRef<RuleMatcher> Rules) const;
2418+
void collectMatchOpcodes(ArrayRef<RuleMatcher> Rules);
24202419
void emitCanMatchOpcodeFn(raw_ostream &OS, StringRef FnName) const;
24212420

24222421
void emitAdditionalImpl(raw_ostream &OS) override;
@@ -2564,15 +2563,12 @@ void GICombinerEmitter::emitRuleConfigImpl(raw_ostream &OS) {
25642563
<< "}\n\n";
25652564
}
25662565

2567-
SmallSetVector<const CodeGenInstruction *, 32>
2568-
GICombinerEmitter::collectMatchOpcodes(ArrayRef<RuleMatcher> Rules) const {
2569-
SmallSetVector<const CodeGenInstruction *, 32> Opcodes;
2566+
void GICombinerEmitter::collectMatchOpcodes(ArrayRef<RuleMatcher> Rules) {
25702567
for (const RuleMatcher &Rule : Rules) {
25712568
for (const CodeGenInstruction *I :
25722569
Rule.insnmatchers_front().getOpcodeMatcher().getAlternativeOpcodes())
2573-
Opcodes.insert(I);
2570+
MatchOpcodes.insert(I);
25742571
}
2575-
return Opcodes;
25762572
}
25772573

25782574
void GICombinerEmitter::emitCanMatchOpcodeFn(raw_ostream &OS,
@@ -2822,7 +2818,7 @@ void GICombinerEmitter::run(raw_ostream &OS) {
28222818
return false;
28232819
});
28242820

2825-
MatchOpcodes = collectMatchOpcodes(Rules);
2821+
collectMatchOpcodes(Rules);
28262822
const MatchTable Table = buildMatchTable(Rules);
28272823

28282824
Timer.startTimer("Emit combiner");

0 commit comments

Comments
 (0)