[MachineModuleInfoImpls] Replace qsort with array_pod_sort
[MachineModuleInfoImpls] Replace qsort with array_pod_sort

Summary:
This seems to be the only place in llvm we directly call qsort. We can replace
this with a call to array_pod_sort. Also minor cleanup of the sorting function.

Reviewers: bkramer, Eugene.Zelenko, rafael

Reviewed By: bkramer

Subscribers: efriedma, llvm-commits

Differential Revision: https://reviews.llvm.org/D39214

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@316671 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm