2
0
Эх сурвалжийг харах

[spirv] Remove createBinaryOp API which uses SpirvType. (#2070)

Ehsan 6 жил өмнө
parent
commit
a8ed1b6525

+ 1 - 3
tools/clang/include/clang/SPIRV/SpirvBuilder.h

@@ -188,9 +188,7 @@ public:
   SpirvBinaryOp *createBinaryOp(spv::Op op, QualType resultType,
                                 SpirvInstruction *lhs, SpirvInstruction *rhs,
                                 SourceLocation loc = {});
-  SpirvBinaryOp *createBinaryOp(spv::Op op, const SpirvType *,
-                                SpirvInstruction *lhs, SpirvInstruction *rhs,
-                                SourceLocation loc = {});
+
   SpirvSpecConstantBinaryOp *
   createSpecConstantBinaryOp(spv::Op op, QualType resultType,
                              SpirvInstruction *lhs, SpirvInstruction *rhs,

+ 0 - 14
tools/clang/lib/SPIRV/SpirvBuilder.cpp

@@ -308,20 +308,6 @@ SpirvBinaryOp *SpirvBuilder::createBinaryOp(spv::Op op, QualType resultType,
   return instruction;
 }
 
-SpirvBinaryOp *SpirvBuilder::createBinaryOp(spv::Op op,
-                                            const SpirvType *resultType,
-                                            SpirvInstruction *lhs,
-                                            SpirvInstruction *rhs,
-                                            SourceLocation loc) {
-  assert(insertPoint && "null insert point");
-  auto *instruction =
-      new (context) SpirvBinaryOp(op, /*QualType*/ {}, loc, lhs, rhs);
-  instruction->setResultType(resultType);
-  instruction->setNonUniform(lhs->isNonUniform() || rhs->isNonUniform());
-  insertPoint->addInstruction(instruction);
-  return instruction;
-}
-
 SpirvSpecConstantBinaryOp *SpirvBuilder::createSpecConstantBinaryOp(
     spv::Op op, QualType resultType, SpirvInstruction *lhs,
     SpirvInstruction *rhs, SourceLocation loc) {