Skip to content

Commit 922e981

Browse files
remove comments
1 parent aa2297e commit 922e981

File tree

4 files changed

+3
-127
lines changed

4 files changed

+3
-127
lines changed

llvm/lib/Target/SPIRV/SPIRVInstrInfo.td

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -219,33 +219,11 @@ def OpTypeCooperativeMatrixKHR: Op<4456, (outs TYPE:$res),
219219

220220
// 3.42.7 Constant-Creation Instructions
221221

222-
//def imm_to_i32 : SDNodeXForm<imm, [{
223-
//return CurDAG->getTargetConstant(
224-
// N->getValueAP().bitcastToAPInt().getZExtValue(), SDLoc(N), MVT::i32);
225-
//}]>;
226-
227-
//def fimm_to_i64 : SDNodeXForm<imm, [{
228-
//return CurDAG->getTargetConstant(
229-
// N->getValueAPF().bitcastToAPInt().getZExtValue(), SDLoc(N), MVT::i64);
230-
//}]>;
231-
232-
//def gi_bitcast_fimm_to_i64 : GICustomOperandRenderer<"renderFImm64">,
233-
// GISDNodeXFormEquiv<fimm_to_i64>;
234-
235-
//def gi_bitcast_imm_to_i32 : GICustomOperandRenderer<"renderImm32">,
236-
// GISDNodeXFormEquiv<imm_to_i32>;
237-
238-
//def PseudoConstI: IntImmLeaf<i64, [{ return Imm.getBitWidth() <= 32; }], imm_to_i32>;
239-
//def PseudoConstF: FPImmLeaf<f64, [{ return true; }], fimm_to_i64>;
240-
//def ConstPseudoNull: IntImmLeaf<i64, [{ return Imm.isZero(); }]>;
241-
242222
multiclass IntFPImm<bits<16> opCode, string name> {
243223
def I: Op<opCode, (outs iID:$dst), (ins TYPE:$type, iID:$src, variable_ops),
244224
"$dst = "#name#" $type">;
245-
//, [(set iID:$dst, (assigntype PseudoConstI:$src, TYPE:$type))]
246225
def F: Op<opCode, (outs fID:$dst), (ins TYPE:$type, fID:$src, variable_ops),
247226
"$dst = "#name#" $type">;
248-
//, [(set fID:$dst, (assigntype PseudoConstF:$src, TYPE:$type))]
249227
}
250228
defm OpConstant: IntFPImm<43, "OpConstant">;
251229

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,9 +2888,9 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
28882888
assert(MI);
28892889
Register GVarVReg = MI->getOperand(0).getReg();
28902890
bool Res = selectGlobalValue(GVarVReg, *MI, Init);
2891-
// We violate SSA form by inserting OpVariable having a gMIR instruction
2892-
// %vreg = G_GLOBAL_VALUE @gvar
2893-
// We need to fix this erasing the duplicated definition.
2891+
// We violate SSA form by inserting OpVariable and still having a gMIR
2892+
// instruction %vreg = G_GLOBAL_VALUE @gvar. We need to fix this by erasing
2893+
// the duplicated definition.
28942894
if (MI->getOpcode() == TargetOpcode::G_GLOBAL_VALUE) {
28952895
GR.invalidateMachineInstr(MI);
28962896
MI->removeFromParent();

llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ extern void processInstr(MachineInstr &MI, MachineIRBuilder &MIB,
5353

5454
static bool mayBeInserted(unsigned Opcode) {
5555
switch (Opcode) {
56-
// case TargetOpcode::G_CONSTANT:
57-
// case TargetOpcode::G_FCONSTANT:
5856
case TargetOpcode::G_SMAX:
5957
case TargetOpcode::G_UMAX:
6058
case TargetOpcode::G_SMIN:
@@ -105,13 +103,6 @@ static void processNewInstrs(MachineFunction &MF, SPIRVGlobalRegistry *GR,
105103
Register ResVReg = I.getOperand(0).getReg();
106104
// Check if the register defined by the instruction is newly generated
107105
// or already processed
108-
/*if (MRI.getRegClassOrNull(ResVReg)) {
109-
if (isTypeFoldingSupported(Opcode)) {
110-
insertAssignInstr(ResVReg, nullptr, ResVType, GR, MIB, MRI);
111-
processInstr(I, MIB, MRI, GR, GR->getSPIRVTypeForVReg(ResVReg));
112-
}
113-
continue;
114-
}*/
115106
// Check if we have type defined for operands of the new instruction
116107
bool IsKnownReg = MRI.getRegClassOrNull(ResVReg);
117108
SPIRVType *ResVType = GR->getSPIRVTypeForVReg(

llvm/test/CodeGen/SPIRV/phi-multiple-preds.ll.bak

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)