Sample Profiles - Adjust integer types. Mostly NFC.
authorDiego Novillo <dnovillo@google.com>
Thu, 15 Oct 2015 16:36:21 +0000 (16:36 +0000)
committerDiego Novillo <dnovillo@google.com>
Thu, 15 Oct 2015 16:36:21 +0000 (16:36 +0000)
commit634f5c1b9b89f460935d6583ea5037174a9a9126
tree6db0d4a698f3217bc77b2ffd663e01b5f93fa3af
parent55975672e833f3cf15938eb70168d0a3fe62d8be
Sample Profiles - Adjust integer types. Mostly NFC.

This adjusts all integers in the reader/writer to reflect the types
stored on profile files. They should all be unsigned 32-bit or 64-bit
values. Changed all associated internal types to be uint32_t or
uint64_t.

The only place that needed some adjustments is in the sample profile
transformation. Altough the weight read from the profile are 64-bit
values, the internal API for branch weights only accepts 32-bit values.
The pass now saturates weights that overflow uint32_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250427 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/ProfileData/SampleProfWriter.h
lib/ProfileData/SampleProfReader.cpp
lib/ProfileData/SampleProfWriter.cpp
lib/Transforms/IPO/SampleProfile.cpp