This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

basic block reordering + java


With basic block reordering, we often see code from gcj that ends in...

.L20:
        call    _Jv_ThrowNullPointerException
.L21:
        call    _Jv_ThrowNullPointerException
.L22:
        call    _Jv_ThrowNullPointerException
.L23:
        call    _Jv_ThrowNullPointerException
.L24:
        call    _Jv_ThrowNullPointerException
.L25:
        call    _Jv_ThrowNullPointerException
.L26:
        call    _Jv_ThrowNullPointerException

Is there an easy way for GCC to merge identical blocks?


Also, I find that if the last NullPointerException branch is taken,
printStackTrace() will produce incorrect results.  You end up seeing the
function after this in place of the one calling _Jv_ThrowNullPointerException.
Should we be backing up the program counter somewhere? (or emitting a NOP at
the very end of each function?)

AG



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]