================ @@ -334,6 +335,15 @@ template<> struct simplify_type<User::const_op_iterator> { } }; +template <> struct GraphTraits<User *> { ---------------- wenju-he wrote:
I measured llvm-project compile time impact of this change to llvm/IR/User.h on intel icx 8358 cpu. Build command: ` cmake -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" -DLLVM_INCLUDE_TESTS=ON -DLLVM_BUILD_TESTS=ON -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release ../llvm -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DCMAKE_INSTALL_PREFIX=install && ninja -j40 ` Ref: (https://github.com/llvm/llvm-project.git c0d78c4232057768b04d3330e581d81544391e68) Exp: (https://github.com/llvm/llvm-project.git c0d78c4232057768b04d3330e581d81544391e68) + change to User.h ### OS: RHEL9 (note: llvm-project build on this system also builds https://github.com/KhronosGroup/SPIRV-LLVM-Translator as a project inside llvm/project folder) REF: real 10m39.052s user 398m36.074s sys 19m26.839s real 10m39.058s user 398m31.903s sys 19m18.405s EXP: real 10m39.910s user 398m55.339s sys 19m36.278s real 10m40.319s user 398m52.378s sys 19m38.137s ### OS: Ubuntu 22 REF: real 10m2.783s user 376m47.038s sys 18m35.310s real 10m2.983s user 376m47.032s sys 18m46.517s real 10m3.059s user 376m52.423s sys 18m45.694s EXP: real 10m2.730s user 376m46.556s sys 18m44.566s real 10m3.007s user 376m48.369s sys 18m46.733s real 10m2.860s user 376m44.655s sys 18m51.154s Summary: On RHEL9 build time is slowed down by ~1 second. On Ubuntu 22 there is no obvious change of compile time. @nikic could we add GraphTraits<User *> to User.h since compile time impact is not obvious? https://github.com/llvm/llvm-project/pull/70611 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits