Hi all,<br><br>    I wrote you some days ago about one project that I want to do on vmkit: I want to remove redundant instanceof tests. I am right now looking at the LLVM code that vmkit produces for java files, but I am finding it very difficult to identify the code that is produced by each instanceof. Would it be possible for you guys to give me some pointers on how to attack this problem? Should I focus on the vmkit front-end, or should I perform this type of optimization directly in LLVM, as a function pass?<br>


<br>Just to give you context, the optimization that I want to perform is to remove redundant instanceof's that are inserted by vmkit to ensure that the code does not do unsafe casts at runtime. For instance, if I code the program:<br>

<br>
if (o instanceof String)<br>  String s = (String)o;<br><br>then vmkit will most likely insert a second test in the code, like this:<br><br>if (o instanceof String) {<br>  if (!o instanceof String)<br>    throw ClassCastException<br>


  String s = (String)o;<br>}<br><br>Thanks in advance,<br><br>Alysson<br>