Skip to content

Commit 28bed54

Browse files
committed
[BOLT] Enable hugify for AArch64
Fix clang-format.
1 parent 6efa0fa commit 28bed54

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5838,14 +5838,14 @@ void RewriteInstance::rewriteFile() {
58385838
if (!Section.isFinalized() || !Section.getOutputData()) {
58395839
LLVM_DEBUG(if (opts::Verbosity > 1) {
58405840
dbgs() << "BOLT-INFO: new section is finalized or !getOutputData, skip "
5841-
<< Section.getName() << '\n';
5841+
<< Section.getName() << '\n';
58425842
});
58435843
continue;
58445844
}
58455845
if (Section.isLinkOnly()) {
58465846
LLVM_DEBUG(if (opts::Verbosity > 1) {
58475847
dbgs() << "BOLT-INFO: new section is link only, skip "
5848-
<< Section.getName() << '\n';
5848+
<< Section.getName() << '\n';
58495849
});
58505850
continue;
58515851
}
@@ -5855,8 +5855,8 @@ void RewriteInstance::rewriteFile() {
58555855
<< "\n data at 0x"
58565856
<< Twine::utohexstr(Section.getAllocAddress()) << "\n of size "
58575857
<< Section.getOutputSize() << "\n at offset "
5858-
<< Section.getOutputFileOffset()
5859-
<< " with content size " << Section.getOutputContents().size() << '\n';
5858+
<< Section.getOutputFileOffset() << " with content size "
5859+
<< Section.getOutputContents().size() << '\n';
58605860
OS.seek(Section.getOutputFileOffset());
58615861
Section.write(OS);
58625862
}

bolt/runtime/hugify.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
//
77
//===---------------------------------------------------------------------===//
88

9-
#if defined(__x86_64__) \
10-
|| ( defined(__aarch64__) || defined(__arm64__) ) \
11-
&& !defined(__APPLE__)
9+
#if defined(__x86_64__) || \
10+
(defined(__aarch64__) || defined(__arm64__)) && !defined(__APPLE__)
1211

1312
#include "common.h"
1413

@@ -76,8 +75,7 @@ static bool hasPagecacheTHPSupport() {
7675
return false;
7776

7877
if (!strStr(Buf, "[always]") && !strStr(Buf, "[madvise]")) {
79-
DEBUG(report(
80-
"[hugify] THP support is not enabled.\n");)
78+
DEBUG(report("[hugify] THP support is not enabled.\n");)
8179
return false;
8280
}
8381

bolt/test/runtime/AArch64/hugify.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ int g2;
77
static int sg1 = 1;
88
static int sg2;
99

10-
1110
int main(int argc, char **argv) {
1211
printf("Hello world %p = %d , %p = %d\n", &g1, g1, &sg1, sg1);
1312
printf("%p = %d , %p = %d\n", &g2, g2, &sg2, sg2);

bolt/test/runtime/AArch64/user-func-reorder.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@
55
*/
66
#include <stdio.h>
77

8-
int foo(int x) {
9-
return x + 1;
10-
}
8+
int foo(int x) { return x + 1; }
119

1210
int fib(int x) {
1311
if (x < 2)
1412
return x;
1513
return fib(x - 1) + fib(x - 2);
1614
}
1715

18-
int bar(int x) {
19-
return x - 1;
20-
}
16+
int bar(int x) { return x - 1; }
2117

2218
int main(int argc, char **argv) {
2319
printf("fib(%d) = %d\n", argc, fib(argc));

0 commit comments

Comments
 (0)