diff options
author | Matthias Braun <matze@braunis.de> | 2017-12-15 22:22:58 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-12-15 22:22:58 +0000 |
commit | f1caa2833f5052c419faa0007a38e0b242d5b034 (patch) | |
tree | 7cc0d98626eab1a09fdde0d18893ae1bdb92450a /llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | |
parent | 8539edb0f37613ba4e9a5c5e9bd059221a9336d8 (diff) | |
download | bcm5719-llvm-f1caa2833f5052c419faa0007a38e0b242d5b034.tar.gz bcm5719-llvm-f1caa2833f5052c419faa0007a38e0b242d5b034.zip |
MachineFunction: Return reference from getFunction(); NFC
The Function can never be nullptr so we can return a reference.
llvm-svn: 320884
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index 2c336e45056..3459a9f71a7 100644 --- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -224,14 +224,14 @@ MachineBlockFrequencyInfo::getBlockFreq(const MachineBasicBlock *MBB) const { Optional<uint64_t> MachineBlockFrequencyInfo::getBlockProfileCount( const MachineBasicBlock *MBB) const { - const Function *F = MBFI->getFunction()->getFunction(); - return MBFI ? MBFI->getBlockProfileCount(*F, MBB) : None; + const Function &F = MBFI->getFunction()->getFunction(); + return MBFI ? MBFI->getBlockProfileCount(F, MBB) : None; } Optional<uint64_t> MachineBlockFrequencyInfo::getProfileCountFromFreq(uint64_t Freq) const { - const Function *F = MBFI->getFunction()->getFunction(); - return MBFI ? MBFI->getProfileCountFromFreq(*F, Freq) : None; + const Function &F = MBFI->getFunction()->getFunction(); + return MBFI ? MBFI->getProfileCountFromFreq(F, Freq) : None; } bool |