-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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
| // 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo