Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions bolt/test/AArch64/fdata-nolbr.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Check that using link_fdata tool in non-lbr mode allows using hardcoded
# addresses for basic block offsets.

# REQUIRES: system-linux

# RUN: %clang %cflags -o %t %s
# RUN: %clang %s %cflags -Wl,-q -o %t
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: cat %t.fdata | FileCheck %s

.text
.globl foo
.type foo, %function
foo:
# FDATA: 1 foo 0 10
ret

# CHECK: no_lbr
# CHECK-NEXT: 1 foo 0 10
2 changes: 1 addition & 1 deletion bolt/test/link_fdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
fdata_match = fdata_pat.match(profile_line)
preagg_match = preagg_pat.match(profile_line)
nolbr_match = nolbr_pat.match(profile_line)
if fdata_match:
if fdata_match and not (nolbr_match and args.no_lbr):
src_dst, execnt, mispred = fdata_match.groups()
# Split by whitespaces not preceded by a backslash (negative lookbehind)
chunks = re.split(r"(?<!\\) +", src_dst)
Expand Down
Loading