[PATCH] D87202: Add new choices dot-cfg and dot-cfg-quiet to print-changed which creates a website of DOT files showing colourized changes as the IR is changed by passes in the new pass manager pipeline.

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 6 07:43:57 PST 2021


jamieschmeiser added inline comments.


================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:1267
+// Describe where a given element exists.
+std::string Colours[NumIRChangeDiffTypes];
+
----------------
mehdi_amini wrote:
> aeubanks wrote:
> > mehdi_amini wrote:
> > > This seems like this global is mutable and I see a bunch of TSAN failures, can you look into this?
> > Yeah this should probably be a member variable.
> > 
> > But where are you seeing tsan failures? This is used for debugging and the in-tree tests for this should only be single threaded.
> ```
> WARNING: ThreadSanitizer: data race (pid=45032)
>   Write of size 1 at 0x000005020700 by thread T2:
>     #0 memcpy <null> (llvm-lto2+0x143fb6e)
>     #1 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) <null> (libstdc++.so.6+0x13c835)
>     #2 runNewPMPasses /usr/local/google/home/aminim/projects/llvm-project/llvm/lib/LTO/LTOBackend.cpp:242:28 (llvm-lto2+0x268869a)
>     #3 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&) /usr/local/google/home/aminim/projects/llvm-project/llvm/lib/LTO/LTOBackend.cpp:370:5 (llvm-lto2+0x268869a)
> ```
This array is actually unnecessary and was only there to ease understanding of the code.  I will remove it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87202/new/

https://reviews.llvm.org/D87202



More information about the llvm-commits mailing list