Skip to content

Commit a6b350b

Browse files
committed
[BOLT] Enable hugify for AArch64
Fix clang-format.
1 parent 8a72675 commit a6b350b

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
@@ -5868,14 +5868,14 @@ void RewriteInstance::rewriteFile() {
58685868
if (!Section.isFinalized() || !Section.getOutputData()) {
58695869
LLVM_DEBUG(if (opts::Verbosity > 1) {
58705870
dbgs() << "BOLT-INFO: new section is finalized or !getOutputData, skip "
5871-
<< Section.getName() << '\n';
5871+
<< Section.getName() << '\n';
58725872
});
58735873
continue;
58745874
}
58755875
if (Section.isLinkOnly()) {
58765876
LLVM_DEBUG(if (opts::Verbosity > 1) {
58775877
dbgs() << "BOLT-INFO: new section is link only, skip "
5878-
<< Section.getName() << '\n';
5878+
<< Section.getName() << '\n';
58795879
});
58805880
continue;
58815881
}
@@ -5885,8 +5885,8 @@ void RewriteInstance::rewriteFile() {
58855885
<< "\n data at 0x"
58865886
<< Twine::utohexstr(Section.getAllocAddress()) << "\n of size "
58875887
<< Section.getOutputSize() << "\n at offset "
5888-
<< Section.getOutputFileOffset()
5889-
<< " with content size " << Section.getOutputContents().size() << '\n';
5888+
<< Section.getOutputFileOffset() << " with content size "
5889+
<< Section.getOutputContents().size() << '\n';
58905890
OS.seek(Section.getOutputFileOffset());
58915891
Section.write(OS);
58925892
}

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)