Skip to content

Conversation

@fmayer
Copy link
Contributor

@fmayer fmayer commented Apr 28, 2025

Reverts #137539

This breaks the MSan buildbot. Please either fix the build or merge this revert.

@fmayer fmayer requested a review from kazutakahirata April 28, 2025 18:36
@fmayer
Copy link
Contributor Author

fmayer commented Apr 28, 2025

==llc==372806==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55555a77cb4d in unsigned int* std::__1::__find[abi:nn210000]<unsigned int*, unsigned int*, int, std::__1::__identity>(unsigned int*, unsigned int*, int const&, std::__1::__identity&) /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/__algorithm/find.h:49:41
    #1 0x55555a77caf4 in unsigned int* std::__1::find[abi:nn210000]<unsigned int*, int>(unsigned int*, unsigned int*, int const&) /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/__algorithm/find.h:177:16
    #2 0x55555a77ca94 in bool llvm::is_contained<llvm::OwningArrayRef<unsigned int> const&, int>(llvm::OwningArrayRef<unsigned int> const&, int const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1914:12
    #3 0x55555a77ba3c in llvm::PBQP::RegAlloc::NodeMetadata::isConservativelyAllocatable() const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/RegAllocPBQP.h:243:12
    #4 0x55555d22361d in llvm::PBQP::RegAlloc::RegAllocSolverImpl::setup() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/RegAllocPBQP.h:409:39
    #5 0x55555d2231db in llvm::PBQP::RegAlloc::RegAllocSolverImpl::solve() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/RegAllocPBQP.h:289:5
    #6 0x55555d214e03 in llvm::PBQP::RegAlloc::solve(llvm::PBQP::RegAlloc::PBQPRAGraph&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/RegAllocPBQP.h:518:25
    #7 0x55555d213fc9 in (anonymous namespace)::RegAllocPBQP::runOnMachineFunction(llvm::MachineFunction&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/RegAllocPBQP.cpp:873:33
    #8 0x55555cf32872 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:108:10
    #9 0x55555d622cbc in llvm::FPPassManager::runOnFunction(llvm::Function&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1406:27
    #10 0x55555d62af5d in llvm::FPPassManager::runOnModule(llvm::Module&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1452:16
    #11 0x55555d6235f6 in runOnModule /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1521:27
    #12 0x55555d6235f6 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:539:44
    #13 0x55555a1f3750 in compileModule /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:753:8
    #14 0x55555a1f3750 in main /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:400:22
    #15 0x7ffff7a2a3b7  (/lib/x86_64-linux-gnu/libc.so.6+0x2a3b7) (BuildId: 91f01b4ad171c80b6303d08d1f08cba8b990413d)
    #16 0x7ffff7a2a47a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a47a) (BuildId: 91f01b4ad171c80b6303d08d1f08cba8b990413d)
    #17 0x55555a1525a4 in _start (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc+0x4bfe5a4)

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h -- llvm/include/llvm/CodeGen/RegAllocPBQP.h
View the diff from clang-format here.
diff --git a/llvm/include/llvm/CodeGen/RegAllocPBQP.h b/llvm/include/llvm/CodeGen/RegAllocPBQP.h
index 234f1c6ff..6d135b19a 100644
--- a/llvm/include/llvm/CodeGen/RegAllocPBQP.h
+++ b/llvm/include/llvm/CodeGen/RegAllocPBQP.h
@@ -244,8 +244,8 @@ public:
 
   bool isConservativelyAllocatable() const {
     return (DeniedOpts < NumOpts) ||
-      (std::find(&OptUnsafeEdges[0], &OptUnsafeEdges[NumOpts], 0) !=
-       &OptUnsafeEdges[NumOpts]);
+           (std::find(&OptUnsafeEdges[0], &OptUnsafeEdges[NumOpts], 0) !=
+            &OptUnsafeEdges[NumOpts]);
   }
 
 #if LLVM_ENABLE_ABI_BREAKING_CHECKS

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@fmayer fmayer merged commit 6d7edbb into main Apr 28, 2025
6 of 10 checks passed
@fmayer fmayer deleted the revert-137539-cleanup_001_range_PBQP branch April 28, 2025 18:45
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
)

Reverts llvm#137539

This breaks the MSan buildbot. Please either fix the build or merge this
revert.
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
)

Reverts llvm#137539

This breaks the MSan buildbot. Please either fix the build or merge this
revert.
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