HomePhabricator

[PGO] Use SourceFileName rather module name in PGOFuncName
Audit RequiredrL350671

Description

[PGO] Use SourceFileName rather module name in PGOFuncName

In LTO or Thin-lto mode (though linker plugin), the module
names are of temp file names which are different for
different compilations. Using SourceFileName avoids the issue.
This should not change any functionality for current PGO as
all the current callers of getPGOFuncName() is before LTO.

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

Details

Auditors
kristina
Committed
xurJan 8 2019, 2:39 PM
Differential Revision
D56327: [PGO] Use SourceFileName rather module name in PGOFuncName
Parents
rL350670: [PGO] Revert r350579 to fix commit message.
Branches
Unknown
Tags
Unknown

Event Timeline

kristina raised a concern with this commit.Jan 8 2019, 5:03 PM
kristina added an auditor: kristina.
kristina added a subscriber: kristina.

Unaddressed issues in pre-commit review.

/llvm/trunk/lib/ProfileData/InstrProf.cpp
255

Don't change the style, use assignment-construction. Besides this is inconsistent with the rest of the patch.

256

C cast. And again using an stdint type seems questionable, even if you insist on an unsigned type, unsigned int would work (I still think this is not a perfect solution) better unless you need exactly 32 bits, I've tried to mention it in pre-commit review.

This commit now requires audit.Jan 8 2019, 5:03 PM