Change InlineAsm to allow multiple targets instead
This commit is contained in:
parent
7152993aa8
commit
b044aaa905
23 changed files with 125 additions and 96 deletions
|
@ -242,9 +242,9 @@ impl Direction for Backward {
|
|||
propagate(pred, &tmp);
|
||||
}
|
||||
|
||||
mir::TerminatorKind::InlineAsm {
|
||||
destination: Some(dest), ref operands, ..
|
||||
} if dest == bb => {
|
||||
mir::TerminatorKind::InlineAsm { ref targets, ref operands, .. }
|
||||
if targets.contains(&bb) =>
|
||||
{
|
||||
let mut tmp = exit_state.clone();
|
||||
analysis.apply_call_return_effect(
|
||||
&mut tmp,
|
||||
|
@ -491,9 +491,12 @@ impl Direction for Forward {
|
|||
if let Some(cleanup) = cleanup {
|
||||
propagate(cleanup, exit_state);
|
||||
}
|
||||
if let Some(return_) = return_ {
|
||||
|
||||
if !return_.is_empty() {
|
||||
analysis.apply_call_return_effect(exit_state, bb, place);
|
||||
propagate(return_, exit_state);
|
||||
for &target in return_ {
|
||||
propagate(target, exit_state);
|
||||
}
|
||||
}
|
||||
}
|
||||
TerminatorEdges::SwitchInt { targets, discr } => {
|
||||
|
|
|
@ -299,7 +299,9 @@ where
|
|||
})?;
|
||||
}
|
||||
|
||||
mir::TerminatorKind::InlineAsm { destination: Some(_), ref operands, .. } => {
|
||||
mir::TerminatorKind::InlineAsm { ref targets, ref operands, .. }
|
||||
if !targets.is_empty() =>
|
||||
{
|
||||
self.write_row(w, "", "(on successful return)", |this, w, fmt| {
|
||||
let state_on_unwind = this.results.get().clone();
|
||||
this.results.apply_custom_effect(|analysis, state| {
|
||||
|
|
|
@ -491,7 +491,7 @@ impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
|
|||
ref operands,
|
||||
options: _,
|
||||
line_spans: _,
|
||||
destination: _,
|
||||
targets: _,
|
||||
unwind: _,
|
||||
} => {
|
||||
for op in operands {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue