[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 14:06:48 PST 2020


I'm currently traveling but will take a look tomorrow. If necessary go
ahead and revert, I will not be able to do so myself until tomorrow. Teresa

On Tue, Feb 18, 2020, 8:48 PM Alexandre Ganea via Phabricator <
reviews at reviews.llvm.org> wrote:

> aganea added a comment.
>
> There seems to be still an issue with this patch, when linking the LLVM
> unit tests on a two-stage build, it ends with:
>
>   FAILED: tools/clang/unittests/StaticAnalyzer/StaticAnalysisTests.exe
>   cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E
> vs_link_exe
> --intdir=tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir
> --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe
> --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  --
> D:\llvm-project\buildninjaRel\bin\lld-link.exe /nologo
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\AnalyzerOptionsTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\CallDescriptionTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\StoreTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\RegisterCustomCheckersTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\SymbolReaperTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\D_\llvm-project\llvm\resources\windows_version_resource.rc.res
> /out:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.exe
> /implib:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.lib
> /pdb:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.pdb
> /version:0.0  /machine:x64 -fuse-ld=lld /STACK:10000000 /DEBUG /OPT:REF
> /OPT:ICF /lldltocache:D:/llvm-project/buildninjaRelMiMalloc/lto.cache
> /INCREMENTAL:NO /subsystem:console  lib\LLVMSupport.lib
> lib\LLVMSupport.lib  lib\gtest_main.lib  lib\gtest.lib  lib\clangBasic.lib
> lib\clangAnalysis.lib  lib\clangAST.lib  lib\clangASTMatchers.lib
> lib\clangCrossTU.lib  lib\clangFrontend.lib  lib\clangSerialization.lib
> lib\clangStaticAnalyzerCore.lib  lib\clangStaticAnalyzerFrontend.lib
> lib\clangTooling.lib  lib\clangStaticAnalyzerCheckers.lib
> lib\clangStaticAnalyzerCore.lib  lib\clangCrossTU.lib  lib\clangIndex.lib
> lib\clangFrontend.lib  lib\clangParse.lib  lib\clangSerialization.lib
> lib\clangSema.lib  lib\clangAnalysis.lib  lib\clangASTMatchers.lib
> lib\clangEdit.lib  lib\clangDriver.lib  version.lib  lib\LLVMOption.lib
> lib\clangFormat.lib  lib\clangToolingInclusions.lib
> lib\clangToolingCore.lib  lib\clangAST.lib  lib\LLVMFrontendOpenMP.lib
> lib\LLVMTransformUtils.lib  lib\LLVMAnalysis.lib  lib\LLVMProfileData.lib
> lib\LLVMObject.lib  lib\LLVMBitReader.lib  lib\LLVMMCParser.lib
> lib\LLVMTextAPI.lib  lib\clangRewrite.lib  lib\clangLex.lib
> lib\clangBasic.lib  lib\LLVMCore.lib  lib\LLVMRemarks.lib
> lib\LLVMBitstreamReader.lib  lib\LLVMMC.lib  lib\LLVMBinaryFormat.lib
> lib\LLVMDebugInfoCodeView.lib  lib\LLVMDebugInfoMSF.lib
> lib\LLVMSupport.lib  psapi.lib  shell32.lib  ole32.lib  uuid.lib
> advapi32.lib  delayimp.lib  -delayload:shell32.dll  -delayload:ole32.dll
> lib\LLVMDemangle.lib  kernel32.lib user32.lib gdi32.lib winspool.lib
> shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd
> ."
>   LINK: command "D:\llvm-project\buildninjaRel\bin\lld-link.exe /nologo
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\AnalyzerOptionsTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\CallDescriptionTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\StoreTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\RegisterCustomCheckersTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\SymbolReaperTest.cpp.obj
> tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\D_\llvm-project\llvm\resources\windows_version_resource.rc.res
> /out:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.exe
> /implib:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.lib
> /pdb:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.pdb
> /version:0.0 /machine:x64 -fuse-ld=lld /STACK:10000000 /DEBUG /OPT:REF
> /OPT:ICF /lldltocache:D:/llvm-project/buildninjaRelMiMalloc/lto.cache
> /INCREMENTAL:NO /subsystem:console lib\LLVMSupport.lib lib\LLVMSupport.lib
> lib\gtest_main.lib lib\gtest.lib lib\clangBasic.lib lib\clangAnalysis.lib
> lib\clangAST.lib lib\clangASTMatchers.lib lib\clangCrossTU.lib
> lib\clangFrontend.lib lib\clangSerialization.lib
> lib\clangStaticAnalyzerCore.lib lib\clangStaticAnalyzerFrontend.lib
> lib\clangTooling.lib lib\clangStaticAnalyzerCheckers.lib
> lib\clangStaticAnalyzerCore.lib lib\clangCrossTU.lib lib\clangIndex.lib
> lib\clangFrontend.lib lib\clangParse.lib lib\clangSerialization.lib
> lib\clangSema.lib lib\clangAnalysis.lib lib\clangASTMatchers.lib
> lib\clangEdit.lib lib\clangDriver.lib version.lib lib\LLVMOption.lib
> lib\clangFormat.lib lib\clangToolingInclusions.lib lib\clangToolingCore.lib
> lib\clangAST.lib lib\LLVMFrontendOpenMP.lib lib\LLVMTransformUtils.lib
> lib\LLVMAnalysis.lib lib\LLVMProfileData.lib lib\LLVMObject.lib
> lib\LLVMBitReader.lib lib\LLVMMCParser.lib lib\LLVMTextAPI.lib
> lib\clangRewrite.lib lib\clangLex.lib lib\clangBasic.lib lib\LLVMCore.lib
> lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMMC.lib
> lib\LLVMBinaryFormat.lib lib\LLVMDebugInfoCodeView.lib
> lib\LLVMDebugInfoMSF.lib lib\LLVMSupport.lib psapi.lib shell32.lib
> ole32.lib uuid.lib advapi32.lib delayimp.lib -delayload:shell32.dll
> -delayload:ole32.dll lib\LLVMDemangle.lib kernel32.lib user32.lib gdi32.lib
> winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
> advapi32.lib /MANIFEST
> /MANIFESTFILE:tools\clang\unittests\StaticAnalyzer\StaticAnalysisTests.exe.manifest"
> failed (exit code 0) with the following output:
>   lld-link: warning: ignoring unknown argument '-fuse-ld=lld'
>   LLVM ERROR: Second argument of llvm.type.test must be a metadata string
>   Stack dump:
>   0.      Running pass 'Lower type metadata' on module
> 'tools\clang\unittests\StaticAnalyzer\CMakeFiles\StaticAnalysisTests.dir\RegisterCustomCheckersTest.cpp.obj'.
>    #0 0x00007ff62cc8f056 HandleAbort
> D:\llvm-project\llvm\lib\Support\Windows\Signals.inc:408:0
>    #1 0x00007ff62f6912f1 raise
> D:\llvm-project\buildninjaRel\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp:547:0
>    #2 0x00007ff62f687c08 abort
> D:\llvm-project\buildninjaRel\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp:71:0
>    #3 0x00007ff62cc88e98 llvm::report_fatal_error(class llvm::Twine const
> &, bool) D:\llvm-project\llvm\lib\Support\ErrorHandling.cpp:126:0
>    #4 0x00007ff62cc88cb1 llvm::report_fatal_error(char const *, bool)
> D:\llvm-project\llvm\lib\Support\ErrorHandling.cpp:83:0
>    #5 0x00007ff62ec3db75 `anonymous
> namespace'::LowerTypeTestsModule::lower
> D:\llvm-project\llvm\lib\Transforms\IPO\LowerTypeTests.cpp:0:0
>    #6 0x00007ff62ec3e0ce `anonymous
> namespace'::LowerTypeTests::runOnModule
> D:\llvm-project\llvm\lib\Transforms\IPO\LowerTypeTests.cpp:539:0
>    #7 0x00007ff62d3d6f82 llvm::legacy::PassManagerImpl::run(class
> llvm::Module &) D:\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1695:0
>    #8 0x00007ff62d6350c0 `anonymous namespace'::opt
> D:\llvm-project\llvm\lib\LTO\LTOBackend.cpp:314:0
>    #9 0x00007ff62d637a48 llvm::lto::thinBackend(struct llvm::lto::Config
> const &, unsigned int, class std::function<(unsigned int)>, class
> llvm::Module &, class llvm::ModuleSummaryIndex const &, class
> llvm::StringMap<class std::unordered_set<unsigned __int64, struct
> std::hash<unsigned __int64>, struct std::equal_to<unsigned __int64>, class
> std::allocator<unsigned __int64>>, class llvm::MallocAllocator> const &,
> class llvm::DenseMap<unsigned __int64, class llvm::GlobalValueSummary *,
> struct llvm::DenseMapInfo<unsigned __int64>, struct
> llvm::detail::DenseMapPair<unsigned __int64, class llvm::GlobalValueSummary
> *>> const &, class llvm::MapVector<class llvm::StringRef, class
> llvm::BitcodeModule, class llvm::DenseMap<class llvm::StringRef, unsigned
> int, struct llvm::DenseMapInfo<class llvm::StringRef>, struct
> llvm::detail::DenseMapPair<class llvm::StringRef, unsigned int>>, class
> std::vector<struct std::pair<class llvm::StringRef, class
> llvm::BitcodeModule>, class std::allocator<struct std::pair<class
> llvm::StringRef, class llvm::BitcodeModule>>>> &)
> D:\llvm-project\llvm\lib\LTO\LTOBackend.cpp:555:0
>   #10 0x00007ff62cefc945 `anonymous
> namespace'::InProcessThinBackend::runThinLTOBackendThread::<unnamed-tag>::operator()
> D:\llvm-project\llvm\lib\LTO\LTO.cpp:1124:0
>   #11 0x00007ff62cefc7d3
> std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,`lambda at
> D:\llvm-project\llvm\lib\LTO\LTO.cpp:1157:9',llvm::BitcodeModule
> &,std::reference_wrapper<llvm::ModuleSummaryIndex>,std::reference_wrapper<const
> llvm::StringMap<std::unordered_set<unsigned long long,std::hash<unsigned
> long long>,std::equal_to<unsigned long long>,std::allocator<unsigned long
> long> >,llvm::MallocAllocator> >,std::reference_wrapper<const
> llvm::DenseSet<llvm::ValueInfo,llvm::DenseMapInfo<llvm::ValueInfo> >
> >,std::reference_wrapper<const std::map<unsigned long
> long,llvm::GlobalValue::LinkageTypes,std::less<unsigned long
> long>,std::allocator<std::pair<const unsigned long
> long,llvm::GlobalValue::LinkageTypes> > > >,std::reference_wrapper<const
> llvm::DenseMap<unsigned long long,llvm::GlobalValueSummary
> *,llvm::DenseMapInfo<unsigned long
> long>,llvm::detail::DenseMapPair<unsigned long
> long,llvm::GlobalValueSummary *> >
> >,std::reference_wrapper<llvm::MapVector<llvm::StringRef,llvm::BitcodeModule,llvm::DenseMap<llvm::StringRef,unsigned
> int,llvm::DenseMapInfo<llvm::StringRef>,llvm::detail::DenseMapPair<llvm::StringRef,unsigned
> int>
> >,std::vector<std::pair<llvm::StringRef,llvm::BitcodeModule>,std::allocator<std::pair<llvm::StringRef,llvm::BitcodeModule>
> > > > > >,void>::_Do_call C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include\functional:926:0
>   #12 0x00007ff62d63d427 std::packaged_task<(void)>::operator()(void)
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include\future:1394:0
>   #13 0x00007ff62d63d33d std::thread::_Invoke<std::tuple<`lambda at
> D:\llvm-project\llvm\lib\Support\ThreadPool.cpp:30:26'>,0> C:\Program Files
> (x86)\Microsoft Visual
> Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include\thread:43:0
>   #14 0x00007ff62f682f04 thread_start<unsigned int (__cdecl*)(void *),1>
> D:\llvm-project\buildninjaRel\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp:97:0
>   #15 0x00007ffa95737bd4 (C:\WINDOWS\System32\KERNEL32.DLL+0x17bd4)
>   #16 0x00007ffa972eced1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6ced1)
>   [4617/4685] Linking CXX executable
> tools\clang\unittests\Analysis\ClangAnalysisTests.exe
>   lld-link: warning: ignoring unknown argument '-fuse-ld=lld'
>   ninja: build stopped: subcommand failed.
>
> I'm at rG6f846c85045ca814b57ee495d9f85a7b0496e947 <
> https://reviews.llvm.org/rG6f846c85045ca814b57ee495d9f85a7b0496e947>.
> Building on Windows 10 version 1909, on a VS2019 cmd shell, version 16.4.4.
> The first stage is built with LLVM 9.0.1.
>
> The cmake I used for stage 1:
>
>   set LLVM=c:/Program Files/LLVM
>   set OPT_AVX=/GS- /D_ITERATOR_DEBUG_LEVEL=0 /arch:AVX
>   cmake "-DLLVM_LIT_ARGS=-sv -j 36" -GNinja %ROOT%/llvm
> -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=ON
> -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_LIBXML2=OFF
> -DCMAKE_C_COMPILER="%LLVM%/bin/clang-cl.EXE"
> -DCMAKE_CXX_COMPILER="%LLVM%/bin/clang-cl.EXE"
> -DCMAKE_LINKER="%LLVM%/bin/lld-link.EXE"
> -DLLVM_ENABLE_PROJECTS="llvm;clang;lld" -DLLVM_ENABLE_PDB=ON
> -DLLVM_ENABLE_LLD=ON -DLLVM_USE_CRT_RELEASE=MT
> -DCMAKE_CXX_FLAGS="%OPT_AVX%" -DCMAKE_C_FLAGS="%OPT_AVX%"
>
> For stage 2:
>
>   set OPT_SKYLAKE=/GS- /D_ITERATOR_DEBUG_LEVEL=0 -Xclang -O3 -Xclang
> -fwhole-program-vtables -fstrict-aliasing -march=skylake-avx512
>   set LLVM_LOCAL=%ROOT%/buildninjaRel
>   cmake "-DLLVM_LIT_ARGS=-sv -j 36" -G"Ninja" %ROOT%/llvm
> -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=true
> -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_USE_CRT_RELEASE=MT
> -DCMAKE_C_COMPILER="%LLVM_LOCAL%/bin/clang-cl.exe"
> -DCMAKE_CXX_COMPILER="%LLVM_LOCAL%/bin/clang-cl.exe"
> -DCMAKE_LINKER="%LLVM_LOCAL%/bin/lld-link.exe" -DLLVM_ENABLE_LLD=ON
> -DLLVM_ENABLE_PDB=ON -DLLVM_ENABLE_PROJECTS="llvm;clang;lld"
> -DCMAKE_CXX_FLAGS="%OPT_SKYLAKE%" -DCMAKE_C_FLAGS="%OPT_SKYLAKE%"
> -DLLVM_ENABLE_LTO=THIN -DCLANG_TABLEGEN="%LLVM_LOCAL%/bin/clang-tblgen.exe"
> -DLLVM_TABLEGEN="%LLVM_LOCAL%/bin/llvm-tblgen.exe"
>
> Building both stages with `ninja check-all`.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D73242/new/
>
> https://reviews.llvm.org/D73242
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/a8ee1507/attachment.html>


More information about the llvm-commits mailing list