User Details
- User Since
- Nov 28 2021, 2:56 AM (36 w, 20 h)
Wed, Jul 20
Hi, is there anything else I should do for this patch?
Sun, Jul 10
This commit addresses issues mentioned in code reviews:
This commit addresses problems mentioned in code reviews:
Jul 7 2022
First of all, I am really sorry about the noise and the misbehavior here. I have to admit that some of the changes here are because I am still in the way of getting familiar with the patch system. I apologize for being careless in the progress.
Jul 6 2022
Jul 5 2022
@MaskRay PTAL
Jul 2 2022
typo
more clean ups for ifunc logic
fix test arg
fix test arg
enlarge test and fix accordingly
fix typo
fix more
fix liveness of resolvers
The LTO problem is fixed but thinlto is not fully resolved:
- format
- stage
- stage
- fix lto
@MaskRay unfortunately and fortunately, extending the test case to
; RUN: opt -module-summary -o %t.bc %s ; RUN: llvm-lto2 run %t.bc -r %t.bc,foo,pl -r %t.bc,bar,pl -r %t.bc,baz,pl -o %t2 ; RUN: llvm-nm %t2.1 | FileCheck %s ; CHECK: i foo ; CHECK: t foo_resolver ; CHECK: i bar ; CHECK: i baz
gives me another crash at LTO stage:
#0 0x000056128a37edb9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x1bb4db9) #1 0x000056128a37ef6e SignalHandler(int) Signals.cpp:0:0 #2 0x00007f0ba5506150 (/usr/lib/libc.so.6+0x42150) #3 0x000056128a6dcdd7 std::_Function_handler<bool (llvm::GlobalValue const&), llvm::thinLTOInternalizeModule(llvm::Module&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&)::$_4>::_M_invoke(std::_Any_data const&, llvm::GlobalValue const&) FunctionImport.cpp:0:0 #4 0x000056128a7073fe llvm::InternalizePass::maybeInternalize(llvm::GlobalValue&, llvm::DenseMap<llvm::Comdat const*, llvm::InternalizePass::ComdatInfo, llvm::DenseMapInfo<llvm::Comdat const*, void>, llvm::detail::DenseMapPair<llvm::Comdat const*, llvm::InternalizePass::ComdatInfo>>&) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x1f3d3fe) #5 0x000056128a707990 llvm::InternalizePass::internalizeModule(llvm::Module&, llvm::CallGraph*) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x1f3d990) #6 0x000056128a6d9df0 llvm::thinLTOInternalizeModule(llvm::Module&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x1f0fdf0) #7 0x000056128a181dba llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x19b7dba) #8 0x000056128a17d8b0 (anonymous namespace)::InProcessThinBackend::runThinLTOBackendThread(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>> (unsigned int, llvm::StringRef)>, unsigned int, llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>&)::'lambda'(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>)::operator()(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>) const LTO.cpp:0:0 #9 0x000056128a17d1fa std::_Function_handler<void (), std::_Bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>&)::'lambda'(llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>&) (llvm::BitcodeModule, std::reference_wrapper<llvm::ModuleSummaryIndex>, std::reference_wrapper<llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const>, std::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const>, std::reference_wrapper<std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const>, std::reference_wrapper<llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const>, std::reference_wrapper<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>>)>>::_M_invoke(std::_Any_data const&) LTO.cpp:0:0 #10 0x000056128a17c851 void std::__invoke_impl<void, llvm::ThreadPool::createTaskAndFuture(std::function<void ()>)::'lambda'()&>(std::__invoke_other, llvm::ThreadPool::createTaskAndFuture(std::function<void ()>)::'lambda'()&) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x19b2851) #11 0x000056128a33eed1 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/home/schrodinger/Documents/llvm-project/llvm/cmake-build-minsizerel/bin/llvm-lto2+0x1b74ed1)
Jul 1 2022
- adjust comment
- move to proper place
- address cr: use IR instead
- address cr: code brace
- specify target
Sorry for the noise during the process. I am really new to LLVM.
- adjust run arg
address CR
address CR
undo wrong patch
address CR
address CR
fix integration test
update code area
- Updating D129009: [llvm.analysis] Fix LTO for aliased IFuncs.