Merge pull request #3698 from cfallin/cold-blocks
Cranelift: add support for cold blocks.
This commit is contained in:
@@ -229,6 +229,14 @@ impl<'a> FunctionBuilder<'a> {
|
||||
block
|
||||
}
|
||||
|
||||
/// Mark a block as "cold".
|
||||
///
|
||||
/// This will try to move it out of the ordinary path of execution
|
||||
/// when lowered to machine code.
|
||||
pub fn set_cold_block(&mut self, block: Block) {
|
||||
self.func.layout.set_cold(block);
|
||||
}
|
||||
|
||||
/// Insert `block` in the layout *after* the existing block `after`.
|
||||
pub fn insert_block_after(&mut self, block: Block, after: Block) {
|
||||
self.func.layout.insert_block_after(block, after);
|
||||
|
||||
Reference in New Issue
Block a user