(original) (raw)
Respected Dr. Criswell,
My problem is that the output of following code looks nothing like any opcode:for(MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); )
{
MachineInstr \*mi = I;
int op = mi->getOpcode();
std::cout << op << '\\t';
}
On Thu, Oct 2, 2014 at 4:37 PM, John Criswell <jtcriswel@gmail.com> wrote:
Dear Sachin,
Your description of the problem contains too few details; no one will be able to diagnose the problem you're having. You need to provide more information on what, exactly, is not working as you expected.
Regards,
John Criswell
On 10/2/14, 5:11 PM, sachin arora wrote:
Kindly tell me how to proceed or point to appropriate references. Thank you !Hello,I am writing a MachineFunctionPass that inspects the generated machine code, and examines each opcode and its corresponding operands. If the 'instruction + operands' match a particular sequence, then the pass should replace them with a fixed instruction + operands sequence. I tried using MachineInstr's getOpcode and getOperand functions but the pass didn't work as expected.
\--
Regards,Sachin
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ LLVM Developers mailing list LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell
--
Regards,
Sachin