Minor comment cleanups.

This commit is contained in:
Dan Gohman
2017-08-31 16:16:08 -07:00
parent 1d03244e90
commit de02976162
3 changed files with 5 additions and 5 deletions

View File

@@ -162,7 +162,7 @@ pub fn legalize_abi_value(have: Type, arg: &ArgumentType) -> ValueConversion {
} }
// We have the same number of bits as the argument. // We have the same number of bits as the argument.
Ordering::Equal => { Ordering::Equal => {
// This must be an integer vector that is split and then extended. // This must be an integer vector that is split and then extended.
assert!(arg.value_type.is_int()); assert!(arg.value_type.is_int());
assert!(!have.is_scalar()); assert!(!have.is_scalar());
ValueConversion::VectorSplit ValueConversion::VectorSplit

View File

@@ -97,7 +97,7 @@ fn create_pre_header(
// //
// A loop header has a pre-header if there is only one predecessor that the header doesn't // A loop header has a pre-header if there is only one predecessor that the header doesn't
// dominate. // dominate.
// Returns the pre-header Ebb and the instruction jumping to the header. // Returns the pre-header Ebb and the instruction jumping to the header.
fn has_pre_header( fn has_pre_header(
layout: &Layout, layout: &Layout,
cfg: &ControlFlowGraph, cfg: &ControlFlowGraph,

View File

@@ -422,8 +422,8 @@ where
let mut preds = Vec::new(); let mut preds = Vec::new();
mem::swap(&mut preds, &mut self.predecessors_mut(dest_ebb)); mem::swap(&mut preds, &mut self.predecessors_mut(dest_ebb));
for &(pred, last_inst) in preds.iter() { for &(pred, last_inst) in preds.iter() {
// For undef value and each predecessor we query what is the local SSA value // For each predecessor, we query what is the local SSA value corresponding
// corresponding to var and we put it as an argument of the branch instruction. // to var and we put it as an argument of the branch instruction.
let (pred_val, mut local_side_effects) = let (pred_val, mut local_side_effects) =
self.use_var(dfg, layout, jts, temp_arg_var, ty, pred); self.use_var(dfg, layout, jts, temp_arg_var, ty, pred);
pred_values = match pred_values { pred_values = match pred_values {
@@ -527,7 +527,7 @@ where
) -> Option<Ebb> { ) -> Option<Ebb> {
match dfg[jump_inst].analyze_branch(&dfg.value_lists) { match dfg[jump_inst].analyze_branch(&dfg.value_lists) {
BranchInfo::NotABranch => { BranchInfo::NotABranch => {
panic!("you have declared a non-branch instruction as a predecessor to an ebb"); panic!("you have declared a non-branch instruction as a predecessor to an ebb");
} }
// For a single destination appending a jump argument to the instruction // For a single destination appending a jump argument to the instruction
// is sufficient. // is sufficient.