ispras / llv8

LLV8 is an experimental top-tier compiler for V8 JavaScript Engine. LLV8 leverages the power of LLVM MCJIT to produce highly optimized code.
Other
232 stars 13 forks source link

Deal with deoptimization duplications #9

Open vivanishin opened 8 years ago

vivanishin commented 8 years ago

Fix the FIXME in LLVMChunk::SetUpDeoptimizationData:

  // FIXME(llvm): This invariant fails when optimizer duplicates a deopt branch.
  CHECK_EQ(std::set<int>(sorted_ids.begin(), sorted_ids.end()).size(),
           sorted_ids.size());

This behavior manifests on zlib test from Octane benchmark.

Remove irrelevant loads from run.js and run

d8 --llvm-filter=a8 --noturbo-asm run.js 

There were other examples, but I don't have them at hand.

vivanishin commented 8 years ago

Many asm.js programs crash on this CHECK, because they tend to be large. This check can be temporarily disabled to satisfy one's curiosity. Correctness then suffers, but the crashing JS programs tend to terminate successfully.