Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,9 @@ impl PopulateEdgeMatrix {
terminator: &TerminatorKind,
) {
match terminator {
TerminatorKind::Goto(_) => {
TerminatorKind::Goto(_) | TerminatorKind::SwitchInt(_) => {
self.add_goto_transitions(matrix);
}
TerminatorKind::SwitchInt(_) => {
// SwitchInt does not allow additional cross-backend transitions
// due to complexity of coordinating branches across backends.
}
TerminatorKind::GraphRead(_) => {
self.restrict_to_interpreter_only(matrix);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn goto_allows_cross_backend_non_postgres() {
}

#[test]
fn switchint_blocks_cross_backend() {
fn switchint_allows_cross_backend() {
let heap = Heap::new();
let interner = Interner::new(&heap);
let env = Environment::new(&heap);
Expand Down Expand Up @@ -263,7 +263,10 @@ fn switchint_blocks_cross_backend() {
);

let matrix = costs.of(BasicBlockId::new(0))[0];
assert_eq!(matrix.get(TargetId::Interpreter, TargetId::Embedding), None);
assert_eq!(
matrix.get(TargetId::Interpreter, TargetId::Embedding),
Some(cost!(5))
);
// data transfer (1) + backend switch E->I (4) = 5
assert_eq!(
matrix.get(TargetId::Embedding, TargetId::Interpreter),
Expand Down Expand Up @@ -336,7 +339,7 @@ fn switchint_edge_targets_are_branch_specific() {
assert!(
second
.get(TargetId::Interpreter, TargetId::Embedding)
.is_none()
.is_some()
);
assert!(
second
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading