performance degraration occurred in b720076 (bencher report).
this degraration probably caused due to the exception handling in Compiler::Call():
|
// Handle an exception if it's thrown. |
|
auto* is_exception = |
|
builder_->CreateICmpEQ(status, builder_->getInt32(static_cast<int32_t>(Status::Exception))); |
|
auto* then_block = llvm::BasicBlock::Create(*context_, "", function_); |
|
auto* else_block = llvm::BasicBlock::Create(*context_, "", function_); |
|
builder_->CreateCondBr(is_exception, then_block, else_block); |
|
|
|
builder_->SetInsertPoint(then_block); |
|
// Store the exception. |
|
builder_->CreateStore(status, status_); |
|
builder_->CreateMemCpy( |
|
ret_, llvm::MaybeAlign(), ret, llvm::MaybeAlign(), builder_->getInt32(sizeof(Value))); |
|
assert(!catch_stack_.empty()); |
|
auto* catch_block = catch_stack_.back(); |
|
builder_->CreateBr(catch_block); |
by this change, the exception handling always performs every function call.
in this issue, we investigate ways to improve the exception handling.
performance degraration occurred in b720076 (bencher report).
this degraration probably caused due to the exception handling in
Compiler::Call():bee/libs/jsruntime/src/bridge/llvmir/compiler.cc
Lines 776 to 790 in b720076
by this change, the exception handling always performs every function call.
in this issue, we investigate ways to improve the exception handling.