[PATCH] D13427: RFC: faster isa<IntrinsicInst> (bugged tests?)
    escha via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct  5 17:06:05 PDT 2015
    
    
  
escha added a comment.
I stuck an rdtsc timer around code that traversed the function like this:
if (isa<callinst>(I)) {
  START_TIMER;
  if (isa<intrinsicinst>(I) and intrinsic ID is assume) {
     do a thing that will never happen
   }
  STOP_TIMER;
}
It was ~10 cycles per timer hit when using the ID-based approach, ~50 when using the current approach. The timer already subtracts out the cost of the timer itself and the effects of context switches (approximately).
I don't know why it was so slow, but I still don't think we should be constantly doing string comparisons either way, at least if we can avoid it.
Repository:
  rL LLVM
http://reviews.llvm.org/D13427
    
    
More information about the llvm-commits
mailing list