@@ -95,33 +95,32 @@ RISCVInstrumentManager::createInstrument(llvm::StringRef Desc,
9595 llvm::StringRef Data) {
9696 if (Desc == RISCVLMULInstrument::DESC_NAME) {
9797 if (!RISCVLMULInstrument::isDataValid (Data)) {
98- LLVM_DEBUG ( dbgs ( ) << " RVCB: Bad data for instrument kind " << Desc << " : "
99- << Data << ' \n ' ) ;
98+ LDBG ( ) << " RVCB: Bad data for instrument kind " << Desc << " : " << Data
99+ << ' \n ' ;
100100 return nullptr ;
101101 }
102102 return std::make_unique<RISCVLMULInstrument>(Data);
103103 }
104104
105105 if (Desc == RISCVSEWInstrument::DESC_NAME) {
106106 if (!RISCVSEWInstrument::isDataValid (Data)) {
107- LLVM_DEBUG ( dbgs ( ) << " RVCB: Bad data for instrument kind " << Desc << " : "
108- << Data << ' \n ' ) ;
107+ LDBG ( ) << " RVCB: Bad data for instrument kind " << Desc << " : " << Data
108+ << ' \n ' ;
109109 return nullptr ;
110110 }
111111 return std::make_unique<RISCVSEWInstrument>(Data);
112112 }
113113
114- LLVM_DEBUG (dbgs () << " RVCB: Creating default instrument for Desc: " << Desc
115- << ' \n ' );
114+ LDBG () << " RVCB: Creating default instrument for Desc: " << Desc << ' \n ' ;
116115 return InstrumentManager::createInstrument (Desc, Data);
117116}
118117
119118SmallVector<UniqueInstrument>
120119RISCVInstrumentManager::createInstruments (const MCInst &Inst) {
121120 if (Inst.getOpcode () == RISCV::VSETVLI ||
122121 Inst.getOpcode () == RISCV::VSETIVLI) {
123- LLVM_DEBUG ( dbgs ( ) << " RVCB: Found VSETVLI and creating instrument for it: "
124- << Inst << " \n " );
122+ LDBG ( ) << " RVCB: Found VSETVLI and creating instrument for it: " << Inst
123+ << " \n " );
125124 unsigned VTypeI = Inst.getOperand (2 ).getImm ();
126125 RISCVVType::VLMUL VLMUL = RISCVVType::getVLMUL (VTypeI);
127126
@@ -252,8 +251,7 @@ unsigned RISCVInstrumentManager::getSchedClassID(
252251 // Need LMUL or LMUL, SEW in order to override opcode. If no LMUL is provided,
253252 // then no option to override.
254253 if (!LI) {
255- LLVM_DEBUG (
256- dbgs () << " RVCB: Did not use instrumentation to override Opcode.\n " );
254+ LDBG () << " RVCB: Did not use instrumentation to override Opcode.\n " ;
257255 return SchedClassID;
258256 }
259257 uint8_t LMUL = LI->getLMUL ();
@@ -315,22 +313,21 @@ unsigned RISCVInstrumentManager::getSchedClassID(
315313
316314 // Not a RVV instr
317315 if (!VPOpcode) {
318- LLVM_DEBUG (
319- dbgs () << " RVCB: Could not find PseudoInstruction for Opcode "
320- << MCII.getName (Opcode)
321- << " , LMUL=" << (LI ? LI->getData () : " Unspecified" )
322- << " , SEW=" << (SI ? SI->getData () : " Unspecified" )
316+ LDBG () << " RVCB: Could not find PseudoInstruction for Opcode "
317+ << MCII.getName (Opcode) << " , LMUL=" << (LI ? LI->getData () : " Unspecified" )
318+ << " , SEW=" << (SI ? SI->getData () :
319+ " Unspecified" )
323320 << " . Ignoring instrumentation and using original SchedClassID="
324- << SchedClassID << ' \n ' ) ;
321+ << SchedClassID << ' \n ' ;
325322 return SchedClassID;
326323 }
327324
328325 // Override using pseudo
329- LLVM_DEBUG ( dbgs ( ) << " RVCB: Found Pseudo Instruction for Opcode "
330- << MCII. getName (Opcode ) << " , LMUL =" << LI ->getData ()
331- << " , SEW= " << (SI ? SI-> getData () : " Unspecified" )
326+ LDBG ( ) << " RVCB: Found Pseudo Instruction for Opcode " << MCII. getName (Opcode)
327+ << " , LMUL= " << LI-> getData ( ) << " , SEW =" << (SI ? SI ->getData () :
328+ " Unspecified" )
332329 << " . Overriding original SchedClassID=" << SchedClassID
333- << " with " << MCII.getName (*VPOpcode) << ' \n ' ) ;
330+ << " with " << MCII.getName (*VPOpcode) << ' \n ' ;
334331 return MCII.get (*VPOpcode).getSchedClass ();
335332}
336333
0 commit comments