message: [XLA] Allow HloInstructionMap and HloInstructionSet to contain null keys.
  Null HloInstruction* keys may be useful for representing sentinel values.
diff: @@ -1579,13 +1579,20 @@ std::ostream& operator<<(std::ostream& os, HloInstruction::FusionKind kind);
  // an HloInstruction* or a const HloInstruction*.
  // To make the iteration order over the map deterministic, the comparator
  // should not be using the pointer values, but rather an intrinsic property of
  -// the hlo.
  +// the hlo. Exception: null pointer values compare less than non-null.
  //
  // Note that this cannot be used for HLO instructions across multiple modules
  // since the id of HLO instructions are only unique within each HLO module.
  struct HloPtrComparator {
  bool operator()(const HloInstruction* const& lhs,
  const HloInstruction* const& rhs) const {
  + if (rhs == nullptr) {
  + // Nothing compares less than nullptr.
  + return false;
  + }
  + if (lhs == nullptr) {
  + return true;
  + }
  return lhs->unique_id() < rhs->unique_id();
  }
  };
  