@@ -276,9 +276,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
276
276
} else
277
277
SPIRVEntry::setWordCount (WC);
278
278
Ops = TheOps;
279
- // The required SPIR-V version depends on the operands for some
280
- // instructions.
281
- updateModuleVersion ();
282
279
}
283
280
void setWordCount (SPIRVWord TheWordCount) override {
284
281
SPIRVEntry::setWordCount (TheWordCount);
@@ -298,11 +295,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
298
295
299
296
// / Get operand as value.
300
297
// / If the operand is a literal, return it as a uint32 constant.
301
- const SPIRVValue *getOpValue (int I) const {
302
- return isOperandLiteral (I) ? Module->getLiteralAsConstant (Ops[I])
303
- : getValue (Ops[I]);
304
- }
305
-
306
298
SPIRVValue *getOpValue (int I) {
307
299
return isOperandLiteral (I) ? Module->getLiteralAsConstant (Ops[I])
308
300
: getValue (Ops[I]);
@@ -323,10 +315,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
323
315
return Operands;
324
316
}
325
317
326
- virtual const SPIRVValue *getOperand (unsigned I) const {
327
- return getOpValue (I);
328
- }
329
-
330
318
virtual SPIRVValue *getOperand (unsigned I) {
331
319
return getOpValue (I);
332
320
}
@@ -2515,22 +2503,6 @@ class SPIRVGroupNonUniformBallotInst : public SPIRVInstTemplateBase {
2515
2503
SPIRVCapVec getRequiredCapability () const override {
2516
2504
return getVec (CapabilityGroupNonUniformBallot);
2517
2505
}
2518
-
2519
- SPIRVWord getRequiredSPIRVVersion () const override {
2520
- switch (OpCode) {
2521
- case OpGroupNonUniformBroadcast: {
2522
- assert (Ops.size () == 3 && " Expecting (Execution, Value, Id) operands" );
2523
- if (!isConstantOpCode (getOperand (2 )->getOpCode ())) {
2524
- // Before version 1.5, Id must come from a constant instruction.
2525
- return static_cast <SPIRVWord>(VersionNumber::SPIRV_1_5);
2526
- }
2527
- break ;
2528
- }
2529
- default :
2530
- break ;
2531
- }
2532
- return static_cast <SPIRVWord>(VersionNumber::SPIRV_1_3);
2533
- }
2534
2506
};
2535
2507
2536
2508
#define _SPIRV_OP (x, ...) \
0 commit comments