[all-commits] [llvm/llvm-project] 9a90ea: [InstrProf] Fix promoter when using counter reloca...
Ellis Hoag via All-commits
all-commits at lists.llvm.org
Mon May 16 14:32:52 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a90ea1fdcd29f7245ec0bc1295ce96fc0ec2365
https://github.com/llvm/llvm-project/commit/9a90ea1fdcd29f7245ec0bc1295ce96fc0ec2365
Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
Date: 2022-05-16 (Mon, 16 May 2022)
Changed paths:
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
A llvm/test/Transforms/PGOProfile/counter_promo_with_bias.ll
Log Message:
-----------
[InstrProf] Fix promoter when using counter relocations
When using counter relocations, two instructions are emitted to compute
the address of the counter variable.
```
%BiasAdd = add i64 ptrtoint <__profc_>, <__llvm_profile_counter_bias>
%Addr = inttoptr i64 %BiasAdd to i64*
```
When promoting a counter, these instructions might not be available in
the block, so we need to copy these instructions.
This fixes https://github.com/llvm/llvm-project/issues/55125
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D125710
More information about the All-commits
mailing list