Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e25c815
[X86] Add 128-bit vector test coverage for #167498 (#167531)
RKSimon Nov 11, 2025
1a88d04
Adding Matching and Inference Functionality to Propeller-PR4: Impleme…
wdx727 Nov 11, 2025
7a58b41
Add FramePointerKind::NonLeafNoReserve (#163775)
omern1 Nov 11, 2025
e67ac07
Revert "Reapply "Reapply "[mlir] Add FP software implementation lower…
makslevental Nov 11, 2025
5eb8d29
[AMDGPU][GlobalISel] Add RegBankLegalize support for G_BLOCK_ADDR and…
vangthao95 Nov 11, 2025
385aa01
[Asan] Ensure minimum stack size 128KB in ThreadedStressStackReuseTes…
riyaz86a Nov 11, 2025
2690f05
[SystemZ] Use MCRegister instead of unsigned. NFC (#167539)
topperc Nov 11, 2025
04df359
[mlir][vector] Simplify createReadOrMaskedRead (#163736)
banach-space Nov 11, 2025
1a4c19d
[ProfCheck] Mark Some profverify Tests as Unsupported (#167544)
boomanaiden154 Nov 11, 2025
a4a6b5f
[libc] Refactor strftime internals to handle size_t return values (#1…
mleleszi Nov 11, 2025
497dc10
[libc] Implement fchown (#167286)
nigham Nov 11, 2025
79601ce
[libc][POSIX] Add clock_settime() function for Linux (#161729)
amemov Nov 11, 2025
b7e35cc
[gn] port f63d33da0a51 (clangOptions)
nico Nov 11, 2025
4d27413
[lldb] Fix reading duplicate objc class metdata from shared cache (#1…
bulbazord Nov 11, 2025
4275019
[clang][SPIRV] Don't addrspacecast nullptr for function pointer types…
sarnex Nov 11, 2025
4a81e42
[gn] port f63d33da0a51 more
nico Nov 11, 2025
cf6b443
[Clang] Consider reachability for file-scope warnings on initializers…
JustinStitt Nov 11, 2025
49dc49e
[libc][math] Add `asin` to baremetal Arm and AArch64 (#167339)
vhscampos Nov 11, 2025
85d2b10
[DAG] Make strictfp attribute only restricts for libm and make non-ma…
diggerlin Nov 11, 2025
ee41ab3
[AMDGPU] Use MCRegister instead of unsigned. NFC (#167558)
topperc Nov 11, 2025
1eaff19
Revert "Adding Matching and Inference Functionality to Propeller-PR4:…
spupyrev Nov 11, 2025
843f122
Triple: Add isMacOSVersionGE Triple utils (#167450)
arsenm Nov 11, 2025
de68181
DAG: Use sincos vector libcalls through RuntimeLibcalls (#166984)
arsenm Nov 11, 2025
93b71e6
Llvm jitlink build failure (#167561)
anoopkg6 Nov 11, 2025
ccb5145
Add a workaround for people that use *args instead of listing (#166883)
jimingham Nov 11, 2025
ea56ca2
[CHR] Make Selects Created in MergedCondition have Unknown Profdata (…
boomanaiden154 Nov 11, 2025
b8add37
[AMDGPU] Add pattern to select scalar ops for fshr with uniform opera…
akadutta Nov 11, 2025
62d3a1e
[ARM][BPF][Lanai][MSP430] Use MCRegister::id() to avoid an implicit c…
topperc Nov 11, 2025
7f06189
[AArch64] Use MCRegister instead of unsigned. NFC (#167547)
topperc Nov 11, 2025
298c25a
[llvm][asmprinter] Make call graph section deterministic (#167400)
ilovepi Nov 11, 2025
9f069d9
[AVR] Remove implicit conversions of MCRegister to unsigned. NFC (#16…
topperc Nov 11, 2025
f5e2c5d
[clang][test] Fix test issue under LLVM_REVERSE_ITERATION (#167394)
ilovepi Nov 11, 2025
5e30fe8
[gn build] Port 17ce48f2b687
llvmgnsyncbot Nov 11, 2025
9fce004
[gn build] Port 82180558fea9
llvmgnsyncbot Nov 11, 2025
e77001c
[libc] Use a sensible default when TEST_UNDECLARED_OUTPUTS_DIR is uns…
Sterling-Augustine Nov 11, 2025
cc5057c
[CAS] Fix AIX build (#159647)
cachemeifyoucan Nov 11, 2025
c9ff2df
[IR] "modular-format" attribute for functions using format strings (#…
mysterymath Nov 11, 2025
4c3e032
[BOLT] Move call probe information to CallSiteInfo
aaupov Oct 28, 2025
9fac225
[clang][OpenMP] 6.0: Add default clause support for 'target' directiv…
ddpagan Nov 11, 2025
5b72096
[Hexagon] Remove implicit conversions of MCRegister to unsigned. NFC …
topperc Nov 11, 2025
99ed882
[HLSL] Wrap offset info into a dedicated type. NFC (#167396)
bogner Nov 11, 2025
7cd9d3d
[Github] Make Bazel Build/Test use GCS Cache (#167044)
boomanaiden154 Nov 11, 2025
75ef0be
[SLP]Be careful when trying match/vectorize copyable nodes with exter…
alexey-bataev Nov 11, 2025
1e467e4
[lldb] Introduce ScriptedFrameProvider for real threads (#161870)
medismailben Nov 11, 2025
9697f4b
[WebAssembly][FastISel] Bail out on meeting non-integer type in selec…
XChy Nov 11, 2025
810d993
[Github] Allow Premerge to use issue-write workflow
boomanaiden154 Nov 5, 2025
c41ef17
[VPlan] Add getSingleUser helper (NFC).
fhahn Nov 11, 2025
2f7a5f7
[NFCI][lldb][test] Avoid GNU extension for specifying mangling (#167221)
tambry Nov 11, 2025
2d8563f
AArch64: align pair-wise spills on WoS to 16-byte (#166902)
compnerd Nov 11, 2025
d6c750b
PPC: Disable type checking in xfailed sincospi test (#167563)
arsenm Nov 11, 2025
bbde792
AMDGPU: Relax shouldCoalesce to allow more register tuple widening (#…
arsenm Nov 11, 2025
5c3323a
[libc++] Remove <stdbool.h> (#164595)
philnik777 Nov 11, 2025
47a3ea4
[SPIRV] Use MCRegister instead of unsigned. NFC (#167585)
topperc Nov 11, 2025
519cf3c
[VPlan] Remove unneeded getDefiningRecipe with isa/cast/dyn_cast. (NFC)
fhahn Nov 11, 2025
1067930
[CodeGen] Use MCRegUnit in more places (NFC) (#167578)
s-barannikov Nov 11, 2025
2308d16
AMDGPU: Regenerate test checks after bbde79278 (#167590)
arsenm Nov 11, 2025
dd1564e
[MachO] Report error when there are too many sections (#167418)
Prabhuk Nov 11, 2025
abb8c4b
[lld][macho] Fix segfault while processing malformed object file. (#1…
Prabhuk Nov 11, 2025
dc0ccbd
[compiler-rt][asan] Fix a test on Windows (#167591)
alanzhao1 Nov 11, 2025
bbf62dc
AArch64: Use TargetConstant for intrinsic IDs (#166661)
arsenm Nov 11, 2025
b612b10
[VPlan] Add tests for hoisting predicated loads.
fhahn Nov 11, 2025
196ea57
workflows/libclang-abi-tests: Use new container (#167459)
tstellar Nov 11, 2025
2bf9278
AMDGPU: Start using RegClassByHwMode for wavesize operands
arsenm Nov 11, 2025
1ae833f
merge main into amd-staging
ronlieb Nov 11, 2025
34a4763
mar unstable llvm/test/MC/MachO/invalid-section-index.s
ronlieb Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/bazel-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ jobs:
working-directory: utils/bazel
run: |
bazelisk test --config=ci --sandbox_base="" \
--remote_cache=https://storage.googleapis.com/$CACHE_GCS_BUCKET-bazel \
--google_default_credentials \
@llvm-project//llvm/unittests:adt_tests
1 change: 1 addition & 0 deletions .github/workflows/issue-write.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "Check for private emails used in PRs"
- "PR Request Release Note"
- "Code lint"
- "CI Checks"
types:
- completed

Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/libclang-abi-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
if: github.repository_owner == 'llvm'
needs: abi-dump-setup
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
strategy:
matrix:
name:
Expand All @@ -101,17 +103,6 @@ jobs:
steps:
- name: Install Ninja
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
- name: Install abi-compliance-checker
run: |
sudo apt-get update
sudo apt-get install -y abi-dumper autoconf pkg-config
- name: Install universal-ctags
run: |
git clone https://github.com/universal-ctags/ctags.git
cd ctags
./autogen.sh
./configure
sudo make install
- name: Download source code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
Expand Down Expand Up @@ -139,6 +130,8 @@ jobs:
abi-compare:
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
container:
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
needs:
- abi-dump-setup
- abi-dump
Expand All @@ -154,10 +147,6 @@ jobs:
name: build-latest
path: build-latest

- name: Install abi-compliance-checker
run: |
sudo apt-get update
sudo apt-get install -y abi-compliance-checker
- name: Compare ABI
run: |
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
Expand Down
26 changes: 12 additions & 14 deletions bolt/include/bolt/Profile/ProfileYAMLMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ struct CallSiteInfo {
uint32_t EntryDiscriminator{0}; /// multiple entry discriminator
uint64_t Count{0};
uint64_t Mispreds{0};
// Pseudo probe information, optional
uint32_t Probe{0};
bool Indirect = false;
uint32_t InlineTreeNode{0};

bool operator==(const CallSiteInfo &Other) const {
return Offset == Other.Offset && DestId == Other.DestId &&
Expand Down Expand Up @@ -63,6 +67,9 @@ template <> struct MappingTraits<bolt::CallSiteInfo> {
YamlIO.mapOptional("disc", CSI.EntryDiscriminator, (uint32_t)0);
YamlIO.mapRequired("cnt", CSI.Count);
YamlIO.mapOptional("mis", CSI.Mispreds, (uint64_t)0);
YamlIO.mapOptional("pp", CSI.Probe, 0);
YamlIO.mapOptional("ppn", CSI.InlineTreeNode, 0);
YamlIO.mapOptional("ind", CSI.Indirect, false);
}

static const bool flow = true;
Expand Down Expand Up @@ -95,29 +102,20 @@ template <> struct MappingTraits<bolt::SuccessorInfo> {

namespace bolt {
struct PseudoProbeInfo {
uint32_t InlineTreeIndex = 0;
uint64_t BlockMask = 0; // bitset with probe indices from 1 to 64
std::vector<uint64_t> BlockProbes; // block probes with indices above 64
std::vector<uint64_t> CallProbes;
std::vector<uint64_t> IndCallProbes;
std::vector<uint64_t> BlockProbes;
std::vector<uint32_t> InlineTreeNodes;

bool operator==(const PseudoProbeInfo &Other) const {
return InlineTreeIndex == Other.InlineTreeIndex &&
BlockProbes == Other.BlockProbes && CallProbes == Other.CallProbes &&
IndCallProbes == Other.IndCallProbes;
return InlineTreeNodes == Other.InlineTreeNodes &&
BlockProbes == Other.BlockProbes;
}
};
} // end namespace bolt

template <> struct MappingTraits<bolt::PseudoProbeInfo> {
static void mapping(IO &YamlIO, bolt::PseudoProbeInfo &PI) {
YamlIO.mapOptional("blx", PI.BlockMask, 0);
YamlIO.mapOptional("blk", PI.BlockProbes, std::vector<uint64_t>());
YamlIO.mapOptional("call", PI.CallProbes, std::vector<uint64_t>());
YamlIO.mapOptional("icall", PI.IndCallProbes, std::vector<uint64_t>());
YamlIO.mapOptional("id", PI.InlineTreeIndex, 0);
YamlIO.mapOptional("ids", PI.InlineTreeNodes, std::vector<uint32_t>());
YamlIO.mapOptional("blk", PI.BlockProbes, std::vector<uint64_t>(1, 1));
YamlIO.mapOptional("ids", PI.InlineTreeNodes, std::vector<uint32_t>(1, 0));
}

static const bool flow = true;
Expand Down
35 changes: 17 additions & 18 deletions bolt/include/bolt/Profile/YAMLProfileWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,24 @@ class YAMLProfileWriter {
collectInlineTree(const MCPseudoProbeDecoder &Decoder,
const MCDecodedPseudoProbeInlineTree &Root);

// 0 - block probe, 1 - indirect call, 2 - direct call
using ProbeList = std::array<SmallVector<uint64_t, 0>, 3>;
using NodeIdToProbes = DenseMap<uint32_t, ProbeList>;
static std::vector<yaml::bolt::PseudoProbeInfo>
convertNodeProbes(NodeIdToProbes &NodeProbes);

public:
template <typename T>
static std::vector<yaml::bolt::PseudoProbeInfo>
writeBlockProbes(T Probes, const InlineTreeMapTy &InlineTreeNodeId) {
NodeIdToProbes NodeProbes;
for (const MCDecodedPseudoProbe &Probe : Probes) {
auto It = InlineTreeNodeId.find(Probe.getInlineTreeNode());
if (It == InlineTreeNodeId.end())
continue;
NodeProbes[It->second][Probe.getType()].emplace_back(Probe.getIndex());
}
return convertNodeProbes(NodeProbes);
}
class BlockProbeCtx {
struct Call {
uint64_t Id;
uint32_t Node;
bool Indirect;
bool Used;
};
// Group block probes by node id.
DenseMap<uint32_t, std::vector<uint64_t>> NodeToProbes;
// Offset -> call probe
DenseMap<uint32_t, Call> CallProbes;

public:
void addBlockProbe(const InlineTreeMapTy &Map,
const MCDecodedPseudoProbe &Probe, uint32_t ProbeOffset);
void finalize(yaml::bolt::BinaryBasicBlockProfile &YamlBB);
};
};
} // namespace bolt
} // namespace llvm
Expand Down
16 changes: 6 additions & 10 deletions bolt/lib/Profile/DataAggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2397,26 +2397,22 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
PseudoProbeDecoder->getAddress2ProbesMap();
BinaryFunction::FragmentsSetTy Fragments(BF->Fragments);
Fragments.insert(BF);
DenseMap<
uint32_t,
std::vector<std::reference_wrapper<const MCDecodedPseudoProbe>>>
BlockProbes;
DenseMap<uint32_t, YAMLProfileWriter::BlockProbeCtx> BlockCtx;
for (const BinaryFunction *F : Fragments) {
const uint64_t FuncAddr = F->getAddress();
for (const MCDecodedPseudoProbe &Probe :
ProbeMap.find(FuncAddr, FuncAddr + F->getSize())) {
const uint32_t OutputAddress = Probe.getAddress();
const uint32_t InputOffset = BAT->translate(
FuncAddr, OutputAddress - FuncAddr, /*IsBranchSrc=*/true);
const unsigned BlockIndex = getBlock(InputOffset).second;
BlockProbes[BlockIndex].emplace_back(Probe);
const auto &[BlockOffset, BlockIndex] = getBlock(InputOffset);
BlockCtx[BlockIndex].addBlockProbe(InlineTreeNodeId, Probe,
InputOffset - BlockOffset);
}
}

for (auto &[Block, Probes] : BlockProbes) {
YamlBF.Blocks[Block].PseudoProbes =
YAMLProfileWriter::writeBlockProbes(Probes, InlineTreeNodeId);
}
for (auto &[Block, Ctx] : BlockCtx)
Ctx.finalize(YamlBF.Blocks[Block]);
}
// Skip printing if there's no profile data
llvm::erase_if(
Expand Down
24 changes: 4 additions & 20 deletions bolt/lib/Profile/StaleProfileMatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,26 +348,10 @@ class StaleMatcher {
return It->second;
};

auto matchPseudoProbeInfo = [&](const yaml::bolt::PseudoProbeInfo
&ProfileProbe,
uint32_t NodeId) {
for (uint64_t Index = 0; Index < 64; ++Index)
if (ProfileProbe.BlockMask & 1ull << Index)
++FlowBlockMatchCount[matchProfileProbeToBlock(NodeId, Index + 1)];
for (const auto &ProfileProbes :
{ProfileProbe.BlockProbes, ProfileProbe.IndCallProbes,
ProfileProbe.CallProbes})
for (uint64_t ProfileProbe : ProfileProbes)
++FlowBlockMatchCount[matchProfileProbeToBlock(NodeId, ProfileProbe)];
};

for (const yaml::bolt::PseudoProbeInfo &ProfileProbe : BlockPseudoProbes) {
if (!ProfileProbe.InlineTreeNodes.empty())
for (uint32_t ProfileInlineTreeNode : ProfileProbe.InlineTreeNodes)
matchPseudoProbeInfo(ProfileProbe, ProfileInlineTreeNode);
else
matchPseudoProbeInfo(ProfileProbe, ProfileProbe.InlineTreeIndex);
}
for (const yaml::bolt::PseudoProbeInfo &ProfileProbe : BlockPseudoProbes)
for (uint32_t Node : ProfileProbe.InlineTreeNodes)
for (uint64_t Probe : ProfileProbe.BlockProbes)
++FlowBlockMatchCount[matchProfileProbeToBlock(Node, Probe)];
uint32_t BestMatchCount = 0;
uint32_t TotalMatchCount = 0;
const FlowBlock *BestMatchBlock = nullptr;
Expand Down
103 changes: 58 additions & 45 deletions bolt/lib/Profile/YAMLProfileWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,50 +129,62 @@ YAMLProfileWriter::convertPseudoProbeDesc(const MCPseudoProbeDecoder &Decoder) {
return {Desc, InlineTree};
}

std::vector<yaml::bolt::PseudoProbeInfo>
YAMLProfileWriter::convertNodeProbes(NodeIdToProbes &NodeProbes) {
struct BlockProbeInfoHasher {
size_t operator()(const yaml::bolt::PseudoProbeInfo &BPI) const {
return llvm::hash_combine(llvm::hash_combine_range(BPI.BlockProbes),
llvm::hash_combine_range(BPI.CallProbes),
llvm::hash_combine_range(BPI.IndCallProbes));
void YAMLProfileWriter::BlockProbeCtx::addBlockProbe(
const InlineTreeMapTy &Map, const MCDecodedPseudoProbe &Probe,
uint32_t ProbeOffset) {
auto It = Map.find(Probe.getInlineTreeNode());
if (It == Map.end())
return;
auto NodeId = It->second;
uint32_t Index = Probe.getIndex();
if (Probe.isCall())
CallProbes[ProbeOffset] =
Call{Index, NodeId, Probe.isIndirectCall(), false};
else
NodeToProbes[NodeId].emplace_back(Index);
}

void YAMLProfileWriter::BlockProbeCtx::finalize(
yaml::bolt::BinaryBasicBlockProfile &YamlBB) {
// Hash block probes by vector
struct ProbeHasher {
size_t operator()(const ArrayRef<uint64_t> Probes) const {
return llvm::hash_combine_range(Probes);
}
};

// Check identical BlockProbeInfo structs and merge them
std::unordered_map<yaml::bolt::PseudoProbeInfo, std::vector<uint32_t>,
BlockProbeInfoHasher>
BPIToNodes;
for (auto &[NodeId, Probes] : NodeProbes) {
yaml::bolt::PseudoProbeInfo BPI;
BPI.BlockProbes = std::vector(Probes[0].begin(), Probes[0].end());
BPI.IndCallProbes = std::vector(Probes[1].begin(), Probes[1].end());
BPI.CallProbes = std::vector(Probes[2].begin(), Probes[2].end());
BPIToNodes[BPI].push_back(NodeId);
// Check identical block probes and merge them
std::unordered_map<std::vector<uint64_t>, std::vector<uint32_t>, ProbeHasher>
ProbesToNodes;
for (auto &[NodeId, Probes] : NodeToProbes) {
llvm::sort(Probes);
ProbesToNodes[Probes].emplace_back(NodeId);
}

auto handleMask = [](const auto &Ids, auto &Vec, auto &Mask) {
for (auto Id : Ids)
if (Id > 64)
Vec.emplace_back(Id);
else
Mask |= 1ull << (Id - 1);
};

// Add to YAML with merged nodes/block mask optimizations
std::vector<yaml::bolt::PseudoProbeInfo> YamlProbes;
YamlProbes.reserve(BPIToNodes.size());
for (const auto &[BPI, Nodes] : BPIToNodes) {
auto &YamlBPI = YamlProbes.emplace_back(yaml::bolt::PseudoProbeInfo());
YamlBPI.CallProbes = BPI.CallProbes;
YamlBPI.IndCallProbes = BPI.IndCallProbes;
if (Nodes.size() == 1)
YamlBPI.InlineTreeIndex = Nodes.front();
else
YamlBPI.InlineTreeNodes = Nodes;
handleMask(BPI.BlockProbes, YamlBPI.BlockProbes, YamlBPI.BlockMask);
for (auto &[Probes, Nodes] : ProbesToNodes) {
llvm::sort(Nodes);
YamlBB.PseudoProbes.emplace_back(
yaml::bolt::PseudoProbeInfo{Probes, Nodes});
}
for (yaml::bolt::CallSiteInfo &CSI : YamlBB.CallSites) {
auto It = CallProbes.find(CSI.Offset);
if (It == CallProbes.end())
continue;
Call &Probe = It->second;
CSI.Probe = Probe.Id;
CSI.InlineTreeNode = Probe.Node;
CSI.Indirect = Probe.Indirect;
Probe.Used = true;
}
for (const auto &[Offset, Probe] : CallProbes) {
if (Probe.Used)
continue;
yaml::bolt::CallSiteInfo CSI;
CSI.Offset = Offset;
CSI.Probe = Probe.Id;
CSI.InlineTreeNode = Probe.Node;
CSI.Indirect = Probe.Indirect;
YamlBB.CallSites.emplace_back(CSI);
}
return YamlProbes;
}

std::tuple<std::vector<yaml::bolt::InlineTreeNode>,
Expand Down Expand Up @@ -343,12 +355,13 @@ YAMLProfileWriter::convert(const BinaryFunction &BF, bool UseDFS,
const AddressProbesMap &ProbeMap =
PseudoProbeDecoder->getAddress2ProbesMap();
const uint64_t FuncAddr = BF.getAddress();
const std::pair<uint64_t, uint64_t> &BlockRange =
BB->getInputAddressRange();
const std::pair<uint64_t, uint64_t> BlockAddrRange = {
FuncAddr + BlockRange.first, FuncAddr + BlockRange.second};
auto Probes = ProbeMap.find(BlockAddrRange.first, BlockAddrRange.second);
YamlBB.PseudoProbes = writeBlockProbes(Probes, InlineTreeNodeId);
auto [Start, End] = BB->getInputAddressRange();
Start += FuncAddr;
End += FuncAddr;
BlockProbeCtx Ctx;
for (const MCDecodedPseudoProbe &Probe : ProbeMap.find(Start, End))
Ctx.addBlockProbe(InlineTreeNodeId, Probe, Probe.getAddress() - Start);
Ctx.finalize(YamlBB);
}

YamlBF.Blocks.emplace_back(YamlBB);
Expand Down
6 changes: 3 additions & 3 deletions bolt/test/X86/match-blocks-with-pseudo-probes-inline.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ functions:
insns: 11
hash: 0x1
exec: 1
probes: [ { blx: 9 } ]
probes: [ { blk: [ 1, 4 ] } ]
inline_tree: [ { } ]
- name: foo
fid: 10
Expand All @@ -43,7 +43,7 @@ functions:
hash: 0x2
exec: 1
succ: [ { bid: 3, cnt: 0 } ]
probes: [ { blx: 3 } ]
probes: [ { blk: [ 1, 2 ] } ]
inline_tree: [ { g: 1 }, { g: 0, cs: 8 } ]
- name: main
fid: 11
Expand All @@ -56,7 +56,7 @@ functions:
hash: 0x3
exec: 1
succ: [ { bid: 3, cnt: 0 } ]
probes: [ { blx: 3, id: 1 }, { blx: 1 } ]
probes: [ { blk: [ 1, 2 ], ids: [ 1 ] }, { blk: [ 1 ] } ]
inline_tree: [ { g: 2 }, { g: 1, cs: 2 }, { g: 0, p: 1, cs: 8 } ]
pseudo_probe_desc:
gs: [ 0xE413754A191DB537, 0x5CF8C24CDB18BDAC, 0xDB956436E78DD5FA ]
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/match-blocks-with-pseudo-probes.test
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ functions:
hash: 0xFFFFFFFFFFFFFFF1
insns: 1
succ: [ { bid: 3, cnt: 1} ]
probes: [ { blx: 1 } ]
probes: [ { blk: [ 1 ] } ]
inline_tree: [ { g: 0 } ]
pseudo_probe_desc:
gs: [ 0xDB956436E78DD5FA ]
Expand Down
Loading