[PATCH] D44717: [InstrProf] Support calls to external indirect funcs in text format

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 16:14:38 PDT 2018


mtrofin created this revision.
Herald added a subscriber: llvm-commits.

External functions won't be found in the SymTab, and so the name
used in the text format was empty. This caused a silent[1] error
when reading the text format.

This CL:

- adds support for such functions
- fixes cases where errors were not propagated
- drive-by fixes a performance issue by sorting the SymTab internals

on-demand (and abstracting that from the user)

[InstrProf] Support for external functions in text format.

External functions appearing as indirect call targets could not be
found in the SymTab, and the value:counter record was represented,
in the text format, using an empty string for the name. This would
then cause a silent parsing error when reading.

This CL:

- adds explicit support for such functions
- fixes the places where we would not propagate errors when reading
- addresses a performance issue due to eager resorting of the SymTab.


Repository:
  rL LLVM

https://reviews.llvm.org/D44717

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfReader.h
  lib/ProfileData/InstrProf.cpp
  lib/ProfileData/InstrProfReader.cpp
  lib/ProfileData/InstrProfWriter.cpp
  test/tools/llvm-profdata/invalid-profdata.test
  unittests/ProfileData/InstrProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44717.139219.patch
Type: text/x-patch
Size: 11914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180320/b81ec64c/attachment.bin>


More information about the llvm-commits mailing list