#include "llvm/Pass.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Compiler.h"
+#include <map>
using namespace llvm;
STATISTIC(NumMerged, "Number of global constants merged");
} else if (GV->hasInternalLinkage()) { // Yup, this is a duplicate!
// Make all uses of the duplicate constant use the canonical version.
Replacements.push_back(std::make_pair(GV, Slot));
- } else if (GV->hasInternalLinkage()) {
- // Make all uses of the duplicate constant use the canonical version.
- Replacements.push_back(std::make_pair(Slot, GV));
- Slot = GV;
}
}
}