Skip to content

Commit a40ca3a

Browse files
committed
merge main into amd-staging
Change-Id: I3c6a9f09ff2955aebd36f0d62801e6ffa36d57d6
2 parents e4dbc0b + 594d57e commit a40ca3a

File tree

171 files changed

+6105
-1853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+6105
-1853
lines changed

.github/workflows/llvm-project-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ jobs:
5858
lit-tests:
5959
name: Lit Tests
6060
runs-on: ${{ matrix.os }}
61+
container:
62+
image: ${{(startsWith(matrix.os, 'ubuntu') && 'ghcr.io/llvm/ci-ubuntu-22.04:latest') || null}}
63+
volumes:
64+
- /mnt/:/mnt/
6165
strategy:
6266
fail-fast: false
6367
matrix:
@@ -77,6 +81,7 @@ jobs:
7781
with:
7882
python-version: ${{ inputs.python_version }}
7983
- name: Install Ninja
84+
if: runner.os != 'Linux'
8085
uses: llvm/actions/install-ninja@main
8186
# actions/checkout deletes any existing files in the new git directory,
8287
# so this needs to either run before ccache-action or it has to use
@@ -108,8 +113,8 @@ jobs:
108113
run: |
109114
if [ "${{ runner.os }}" == "Linux" ]; then
110115
builddir="/mnt/build/"
111-
sudo mkdir -p $builddir
112-
sudo chown `whoami`:`whoami` $builddir
116+
mkdir -p $builddir
117+
extra_cmake_args="-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
113118
else
114119
builddir="$(pwd)"/build
115120
fi
@@ -123,6 +128,7 @@ jobs:
123128
-DLLDB_INCLUDE_TESTS=OFF \
124129
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
125130
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
131+
$extra_cmake_args \
126132
${{ inputs.extra_cmake_args }}
127133
ninja -C "$builddir" '${{ inputs.build_target }}'
128134

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -919,15 +919,10 @@ void DWARFRewriter::updateUnitDebugInfo(
919919
DIEValue LowPCVal = Die->findAttribute(dwarf::DW_AT_low_pc);
920920
DIEValue HighPCVal = Die->findAttribute(dwarf::DW_AT_high_pc);
921921
if (FunctionRanges.empty()) {
922-
if (LowPCVal && HighPCVal) {
922+
if (LowPCVal && HighPCVal)
923923
FunctionRanges.push_back({0, HighPCVal.getDIEInteger().getValue()});
924-
} else {
925-
// I haven't seen this case, but who knows what other compilers
926-
// generate.
924+
else
927925
FunctionRanges.push_back({0, 1});
928-
errs() << "BOLT-WARNING: [internal-dwarf-error]: subprogram got GCed "
929-
"by the linker, DW_AT_ranges is used\n";
930-
}
931926
}
932927

933928
if (FunctionRanges.size() == 1 && !opts::AlwaysConvertToRanges) {

bolt/test/X86/dwarf4-subprogram-single-gc-ranges.test

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-subprogram-single-gc-ranges-main.s -o %t1.o
44
# RUN: %clang %cflags %t1.o -o %t.exe -Wl,-q
5-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections &> %t1.txt
6-
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t1.txt
5+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt > %t1.txt
77
# RUN: cat %t1.txt | FileCheck --check-prefix=POSTCHECK %s
88

99
# This test checks BOLT correctly handles DW_TAG_subprogram with Ranges with single entry, when function was GCed.
1010

11-
# POSTCHECK: BOLT-WARNING: [internal-dwarf-error]: subprogram got GCed by the linker, DW_AT_ranges is used
12-
1311
# POSTCHECK: DW_TAG_subprogram
1412
# POSTCHECK-NEXT: DW_AT_frame_base
1513
# POSTCHECK-NEXT: DW_AT_linkage_name

0 commit comments

Comments
 (0)