[gcov] Give the __llvm_gcov_ctr load instruction a name for more readable output

This commit is contained in:
Fangrui Song 2020-09-09 12:31:25 -07:00
parent 0ee54cf883
commit ad61e346d3
1 changed files with 2 additions and 1 deletions

View File

@ -890,7 +890,8 @@ bool GCOVProfiler::emitProfileArcs() {
Builder.CreateAtomicRMW(AtomicRMWInst::Add, V, Builder.getInt64(1),
AtomicOrdering::Monotonic);
} else {
Value *Count = Builder.CreateLoad(Builder.getInt64Ty(), V);
Value *Count =
Builder.CreateLoad(Builder.getInt64Ty(), V, "gcov_ctr");
Count = Builder.CreateAdd(Count, Builder.getInt64(1));
Builder.CreateStore(Count, V);
}