message: [TF:XLA] Align the two implementations of CanShareOperandBufferWithUser.
  Eventually (when TuplePointsToAnalysis is removed), there will be only one implementation left.
  Also, use early return instead of else-if to make the code less indented.
diff: @@ -1017,19 +1017,17 @@ bool HloDataflowAnalysis::CanShareOperandBufferWithUser(
  }
  if (user->opcode() == HloOpcode::kFusion) {
  + if (fusion_can_share_buffer_ != nullptr) {
  + return fusion_can_share_buffer_(user, operand);
  + }
  // Get the parameter associated with 'operand';
  HloInstruction* fusion_param =
  user->fused_parameter(user->operand_index(operand));
  const HloValue& value = GetValueDefinedAt(fusion_param, operand_index);
  - if (value.uses().size() != 1) {
  if (MultiDynamicSliceUseShareSameIndices(value.uses())) {
  return true;
  }
  - return false;
  - }
  - const HloUse& use = value.uses()[0];
  -
  if (user->fusion_kind() == HloInstruction::FusionKind::kLoop ||
  user->fusion_kind() == HloInstruction::FusionKind::kInput) {
  if (user->fused_expression_root()->opcode() ==
  @@ -1039,12 +1037,16 @@ bool HloDataflowAnalysis::CanShareOperandBufferWithUser(
  // Returns true iff there is exactly one use of 'operand' at shape index
  // 'operand_index', and this singleton use is the fused root at operand
  // index 0.
  + if (value.uses().size() == 1) {
  + const HloUse& use = value.uses()[0];
  return use.instruction == user->fused_expression_root() &&
  use.operand_number == 0;
  - } else {
  + }
  + return false;
  + }
  return AreTransitiveUsesElementwiseOrTuple(fusion_param);
  }
  - } else if (user->fusion_kind() == HloInstruction::FusionKind::kOutput &&
  + if (user->fusion_kind() == HloInstruction::FusionKind::kOutput &&
  user->fused_expression_root()->opcode() == HloOpcode::kAdd) {
  // Output fusion with kAdd fused root.
  @@ -1066,11 +1068,12 @@ bool HloDataflowAnalysis::CanShareOperandBufferWithUser(
  // Returns true iff there is exactly one use of 'operand' at shape index
  // 'operand_index', and this singleton use is the fused root (at operand
  // index 'other_add_operand_index').
  + if (value.uses().size() == 1) {
  + const HloUse& use = value.uses()[0];
  return use.instruction == user->fused_expression_root() &&
  use.operand_number == other_add_operand_index;
  - } else if (fusion_can_share_buffer_ != nullptr &&
  - fusion_can_share_buffer_(user, operand)) {
  - return true;
  + }
  + return false;
  }
  }
  