Skip to content

[CodeLayout] Do not rebuild chains with -apply-ext-tsp-for-size #115934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

ellishg
Copy link
Contributor

@ellishg ellishg commented Nov 12, 2024

#109711 disables buildCFGChains() when -apply-ext-tsp-for-size is used to improve codesize. Tail merging can change the layout and normally requires buildCFGChains() to be called again, but we want to prevent this when optimizing for codesize. We saw slight size improvement on large binaries with this change. If -apply-ext-tsp-for-size is not used, this should be a NFC.

Copy link
Contributor

@kyulee-com kyulee-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ellishg ellishg merged commit c9260e2 into llvm:main Nov 18, 2024
9 checks passed
@ellishg ellishg deleted the code-layout-chains branch November 18, 2024 17:16
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 18, 2024

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building llvm at step 7 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/13007

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 1: /b/1/llvm-x86_64-debian-dylib/build/bin/lli -jit-kind=orc-lazy -compile-threads=2 -thread-entry hello /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll | /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
+ /b/1/llvm-x86_64-debian-dylib/build/bin/lli -jit-kind=orc-lazy -compile-threads=2 -thread-entry hello /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /b/1/llvm-x86_64-debian-dylib/build/bin/lli -jit-kind=orc-lazy -compile-threads=2 -thread-entry hello /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
 #0 0x00007fd4a29a8b07 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0xf3ab07)
 #1 0x00007fd4a29a65be llvm::sys::RunSignalHandlers() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0xf385be)
 #2 0x00007fd4a29a91df SignalHandler(int) Signals.cpp:0:0
 #3 0x00007fd4a1a58140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13140)
 #4 0x00007fd4a5058a69 llvm::orc::JITDylib::clear() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0x35eaa69)
 #5 0x00007fd4a5066c57 llvm::orc::ExecutionSession::removeJITDylibs(std::vector<llvm::IntrusiveRefCntPtr<llvm::orc::JITDylib>, std::allocator<llvm::IntrusiveRefCntPtr<llvm::orc::JITDylib>>>) (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0x35f8c57)
 #6 0x00007fd4a50667d2 llvm::orc::ExecutionSession::endSession() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0x35f87d2)
 #7 0x00007fd4a50ea326 llvm::orc::LLJIT::~LLJIT() (/b/1/llvm-x86_64-debian-dylib/build/lib/libLLVM.so.20.0git+0x367c326)
 #8 0x00007fd4a50ef531 llvm::orc::LLLazyJIT::~LLLazyJIT() crtstuff.c:0:0
 #9 0x0000000000415626 runOrcJIT(char const*) (/b/1/llvm-x86_64-debian-dylib/build/bin/lli+0x415626)
#10 0x000000000040fe49 main (/b/1/llvm-x86_64-debian-dylib/build/bin/lli+0x40fe49)
#11 0x00007fd4a1569d7a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d7a)
#12 0x000000000040e9aa _start (/b/1/llvm-x86_64-debian-dylib/build/bin/lli+0x40e9aa)
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll

--

********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants