ProvenanceAnalysis::related() was assuming that the order of parameters for relatedCheck() was not affecting
the result but this was not the case when both parameters were PHINodes.
Due to this assumption ProvenanceAnalysis::related() was ordering the parameters based on pointer value which resulted in
non-deterministic behavior.
To address this change relatedPHI() so that it gives the same result independent of the parameter order.
rdar://100325456
This function returns true if either comparePHISources(PNB, A) or comparePHISources(A, B) returns true. Should it return false if either comparePHISources(PNB, A) or comparePHISources(A, B) returns false instead? I think related returns true when the two pointers are related but also when it doesn't know the answer (i.e., it's being conservative). On the other hand, it returns false only when it's certain that the two pointers aren't related.