<br>Hello guys,<br><br>I'm writing a pass that must check every machine instruction that will go to assembly.<br>I've put my pass registration just before the "addAsmEmmiter" line in LLVMTargetMachine.cpp
<br><br>But, iterating trought machine functions and basic blocks inside the functions, there are still machine instructions that I cant reach.<br><br>This is the beginnig of the asm output of my example test program:<br>
<br><br>        .text<br>        .align  16<br>        .globl  main<br>        .type   main, #function<br>main:<br>        nop<br>        sethi 4194296, %g1<br>        or %g1, 56, %g1<br>        save %g1, %o6, %o6<br>        sethi 0, %l0
<br><br clear="all">The nop right before sethi is one instruction I'm not being able to reach in my pass.<br>But there is more:<br><br>        add %l0, 1, %l0<br>        st %l0, [%i6+-12]<br>.BB1_2: ! bb8<br>        ld [%i6+-12], %l0
<br>        subcc %l0, 1000, %l0<br>        bl .BB1_1       ! bb<br>        nop<br>.BB1_3: ! bb12<br>        ba .BB1_5       ! bb19<br>        nop<br>        or %g0, 1, %l0<br><br>Here both the "ba" and the "nop", that are the 3rd and 2nd last operations of this snipet, are not reachable. 
<br><br>Could I express myself good enougth?<br>Is it possible to do what I want?<br>Do you know what might be the problem?<br><br>-- <br>Emilio Wuerges<br>LAPS - Laboratorio de Automacao de Projeto de Sistemas<br>UFSC - Universidade Federal de Santa Catarina
<br>Brasil