mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 03:36:43 +00:00
[RS4GC] Fix base pair printing for constants.
Previously, "%" + name of the value was printed for each derived and base pointer. This is correct for instructions, but wrong for e.g. globals. llvm-svn: 256305
This commit is contained in:
parent
6a7dbf68a2
commit
5f0ac433d3
@ -1208,8 +1208,11 @@ static void findBasePointers(DominatorTree &DT, DefiningValueMapTy &DVCache,
|
||||
std::sort(Temp.begin(), Temp.end(), order_by_name);
|
||||
for (Value *Ptr : Temp) {
|
||||
Value *Base = PointerToBase[Ptr];
|
||||
errs() << " derived %" << Ptr->getName() << " base %" << Base->getName()
|
||||
<< "\n";
|
||||
errs() << " derived ";
|
||||
Ptr->printAsOperand(errs(), false);
|
||||
errs() << " base ";
|
||||
Base->printAsOperand(errs(), false);
|
||||
errs() << "\n";;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2378,9 +2381,13 @@ static bool insertParsePoints(Function &F, DominatorTree &DT,
|
||||
if (PrintBasePointers) {
|
||||
for (auto &Info : Records) {
|
||||
errs() << "Base Pairs: (w/Relocation)\n";
|
||||
for (auto Pair : Info.PointerToBase)
|
||||
errs() << " derived %" << Pair.first->getName() << " base %"
|
||||
<< Pair.second->getName() << "\n";
|
||||
for (auto Pair : Info.PointerToBase) {
|
||||
errs() << " derived ";
|
||||
Pair.first->printAsOperand(errs(), false);
|
||||
errs() << " base ";
|
||||
Pair.second->printAsOperand(errs(), false);
|
||||
errs() << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: opt %s -rewrite-statepoints-for-gc -spp-print-base-pointers -S 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: derived %select base %global
|
||||
; CHECK: derived %select base @global
|
||||
|
||||
@global = external addrspace(1) global i8
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: opt %s -rewrite-statepoints-for-gc -spp-print-base-pointers -S 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: derived %derived base %global
|
||||
; CHECK: derived %derived base @global
|
||||
|
||||
@global = external addrspace(1) global i8
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user