forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from Xilinx/bump_to_85278611
[AutoBump] Merge with fixes of 8527861 (Needs onnx/torch bump)(Sep 21) (10)
- Loading branch information
Showing
2,043 changed files
with
139,954 additions
and
55,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This test checks that IFUNC trampoline is properly recognised by BOLT | ||
|
||
static void foo() {} | ||
static void bar() {} | ||
|
||
extern int use_foo; | ||
|
||
static void *resolver_foo(void) { return use_foo ? foo : bar; } | ||
|
||
__attribute__((ifunc("resolver_foo"))) void ifoo(); | ||
|
||
void _start() { ifoo(); } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Check if BOLT can process ifunc symbols from .plt section | ||
// RUN: %clang %cflags -nostdlib -no-pie %p/../Inputs/ifunc.c -fuse-ld=lld \ | ||
// RUN: -o %t.exe -Wl,-q | ||
// RUN: llvm-bolt %t.exe -o %t.bolt.exe \ | ||
// RUN: --print-disasm --print-only=_start | \ | ||
// RUN: FileCheck --check-prefix=CHECK %s | ||
// RUN: llvm-readelf -aW %t.bolt.exe | \ | ||
// RUN: FileCheck --check-prefix=REL_CHECK %s | ||
|
||
// Check if BOLT can process ifunc symbols from .plt section in non-pie static | ||
// executable case. | ||
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -no-pie \ | ||
// RUN: -o %t.nopie.exe -Wl,-q | ||
// RUN: llvm-readelf -l %t.nopie.exe | \ | ||
// RUN: FileCheck --check-prefix=NON_DYN_CHECK %s | ||
// RUN: llvm-bolt %t.nopie.exe -o %t.nopie.bolt.exe \ | ||
// RUN: --print-disasm --print-only=_start | \ | ||
// RUN: FileCheck --check-prefix=CHECK %s | ||
// RUN: llvm-readelf -aW %t.nopie.bolt.exe | \ | ||
// RUN: FileCheck --check-prefix=REL_CHECK %s | ||
|
||
// Check if BOLT can process ifunc symbols from .plt section in pie executable | ||
// case. | ||
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \ | ||
// RUN: -o %t.pie.exe -Wl,-q | ||
// RUN: llvm-bolt %t.pie.exe -o %t.pie.bolt.exe \ | ||
// RUN: --print-disasm --print-only=_start | \ | ||
// RUN: FileCheck --check-prefix=CHECK %s | ||
// RUN: llvm-readelf -aW %t.pie.bolt.exe | \ | ||
// RUN: FileCheck --check-prefix=REL_CHECK %s | ||
|
||
// Check that IPLT trampoline located in .plt section are normally handled by | ||
// BOLT. The gnu-ld linker doesn't use separate .iplt section. | ||
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \ | ||
// RUN: -T %p/../Inputs/iplt.ld -o %t.iplt_pie.exe -Wl,-q | ||
// RUN: llvm-bolt %t.iplt_pie.exe -o %t.iplt_pie.bolt.exe \ | ||
// RUN: --print-disasm --print-only=_start | \ | ||
// RUN: FileCheck --check-prefix=CHECK %s | ||
// RUN: llvm-readelf -aW %t.iplt_pie.bolt.exe | \ | ||
// RUN: FileCheck --check-prefix=REL_CHECK %s | ||
|
||
// NON_DYN_CHECK-NOT: DYNAMIC | ||
|
||
// CHECK: callq "resolver_foo/1@PLT" | ||
|
||
// REL_CHECK: R_X86_64_IRELATIVE [[#%x,REL_SYMB_ADDR:]] | ||
// REL_CHECK: [[#REL_SYMB_ADDR]] {{.*}} FUNC {{.*}} resolver_foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Check that --print-only flag works with sections. | ||
|
||
# REQUIRES: system-linux | ||
|
||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o | ||
# RUN: ld.lld %t.o -o %t.exe | ||
# RUN: llvm-bolt %t.exe -o %t.out --print-cfg --print-only=unused_code 2>&1 \ | ||
# RUN: | FileCheck %s | ||
|
||
# CHECK: Binary Function "foo" | ||
# CHECK-NOT: Binary Function "_start" | ||
|
||
.text | ||
.globl _start | ||
.type _start, %function | ||
_start: | ||
.cfi_startproc | ||
ret | ||
.cfi_endproc | ||
.size _start, .-_start | ||
|
||
.section unused_code,"ax",@progbits | ||
.globl foo | ||
.type foo, %function | ||
foo: | ||
.cfi_startproc | ||
ret | ||
.cfi_endproc | ||
.size foo, .-foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## Test that merge-fdata correctly handles YAML header with an uninitialized | ||
## fields. a.yaml does not have hash-func set and it used to crash merge-fdata. | ||
|
||
# REQUIRES: system-linux | ||
|
||
# RUN: split-file %s %t | ||
# RUN: not merge-fdata %t/a.yaml %t/b.yaml 2>&1 | FileCheck %s | ||
|
||
# CHECK: cannot merge profiles with different hash functions | ||
|
||
#--- a.yaml | ||
--- | ||
header: | ||
profile-version: 1 | ||
binary-name: 'a.out' | ||
binary-build-id: '<unknown>' | ||
profile-flags: [ lbr ] | ||
profile-origin: branch profile reader | ||
profile-events: '' | ||
dfs-order: false | ||
functions: | ||
- name: 'main' | ||
fid: 1 | ||
hash: 0x50BBA3441D436491 | ||
exec: 1 | ||
nblocks: 0 | ||
... | ||
#--- b.yaml | ||
--- | ||
header: | ||
profile-version: 1 | ||
binary-name: 'a.out' | ||
binary-build-id: '<unknown>' | ||
profile-flags: [ lbr ] | ||
profile-origin: branch profile reader | ||
profile-events: '' | ||
dfs-order: false | ||
hash-func: xxh3 | ||
functions: | ||
- name: 'main' | ||
fid: 1 | ||
hash: 0x50BBA3441D436491 | ||
exec: 1 | ||
nblocks: 0 | ||
... |
Oops, something went wrong.