Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -183,7 +183,7 @@ # Don't look for libxml if we're using MSan, since uninstrumented third party # code may call MSan interceptors like strlen, leading to false positives. -if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") +if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*" AND LLVM_ENABLE_LIBXML2) set (LIBXML2_FOUND 0) find_package(LibXml2 2.5.3 QUIET) if (LIBXML2_FOUND) Index: llvm/test/Bitcode/module_hash.ll =================================================================== --- llvm/test/Bitcode/module_hash.ll +++ llvm/test/Bitcode/module_hash.ll @@ -33,3 +33,5 @@ define void @foo() { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-alias.ll =================================================================== --- llvm/test/Bitcode/thinlto-alias.ll +++ llvm/test/Bitcode/thinlto-alias.ll @@ -43,3 +43,5 @@ } declare void @analias(...) + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll =================================================================== --- llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll +++ llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll @@ -49,3 +49,5 @@ ; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) ; OLD-COMBINED: Index {{.*}} contains 2 nodes (2 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll =================================================================== --- llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll +++ llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll @@ -119,3 +119,5 @@ !13 = !{i32 999000, i64 100, i32 1} !14 = !{i32 999999, i64 1, i32 2} !15 = !{!"branch_weights", i32 100} + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll =================================================================== --- llvm/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll +++ llvm/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll @@ -118,3 +118,5 @@ !14 = !{i32 999999, i64 1, i32 2} !15 = !{!"branch_weights", i32 100} !16 = !{!"branch_weights", i32 1} + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-function-summary-callgraph.ll =================================================================== --- llvm/test/Bitcode/thinlto-function-summary-callgraph.ll +++ llvm/test/Bitcode/thinlto-function-summary-callgraph.ll @@ -52,3 +52,5 @@ ; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) ; OLD-COMBINED: Index {{.*}} contains 2 nodes (2 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-function-summary-originalnames.ll =================================================================== --- llvm/test/Bitcode/thinlto-function-summary-originalnames.ll +++ llvm/test/Bitcode/thinlto-function-summary-originalnames.ll @@ -28,3 +28,5 @@ define internal void @foo() { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-summary-linkage-types.ll =================================================================== --- llvm/test/Bitcode/thinlto-summary-linkage-types.ll +++ llvm/test/Bitcode/thinlto-summary-linkage-types.ll @@ -59,3 +59,5 @@ { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-summary-section.ll =================================================================== --- llvm/test/Bitcode/thinlto-summary-section.ll +++ llvm/test/Bitcode/thinlto-summary-section.ll @@ -11,3 +11,5 @@ define internal void @functionWithSection() section "some_section" { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-type-tests.ll =================================================================== --- llvm/test/Bitcode/thinlto-type-tests.ll +++ llvm/test/Bitcode/thinlto-type-tests.ll @@ -28,3 +28,5 @@ } declare i1 @llvm.type.test(i8*, metadata) nounwind readnone + +; REQUIRES: llvm-lto Index: llvm/test/Bitcode/thinlto-type-vcalls.ll =================================================================== --- llvm/test/Bitcode/thinlto-type-vcalls.ll +++ llvm/test/Bitcode/thinlto-type-vcalls.ll @@ -103,3 +103,5 @@ declare i1 @llvm.type.test(i8*, metadata) nounwind readnone declare void @llvm.assume(i1) declare {i8*, i1} @llvm.type.checked.load(i8*, i32, metadata) + +; REQUIRES: llvm-lto Index: llvm/test/DebugInfo/Generic/missing-abstract-variable.ll =================================================================== --- llvm/test/DebugInfo/Generic/missing-abstract-variable.ll +++ llvm/test/DebugInfo/Generic/missing-abstract-variable.ll @@ -5,7 +5,7 @@ ; The formal parameter 'b' for Function 'x' when inlined within 'a' is lost on ; mips and powerpc64 (and on x86_64 at at least -O2). Presumably this is a ; SelectionDAG issue (do mips/powerpc64 use FastISel?). -; XFAIL: mips, powerpc64, s390x, sparc +; XFAIL: mips, powerpc, powerpc64, s390x, sparc ; Build from the following source with clang -O2. Index: llvm/test/Linker/funcimport.ll =================================================================== --- llvm/test/Linker/funcimport.ll +++ llvm/test/Linker/funcimport.ll @@ -194,3 +194,5 @@ entry: ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Linker/funcimport2.ll =================================================================== --- llvm/test/Linker/funcimport2.ll +++ llvm/test/Linker/funcimport2.ll @@ -15,3 +15,5 @@ call void @foo() ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Linker/funcimport_appending_global.ll =================================================================== --- llvm/test/Linker/funcimport_appending_global.ll +++ llvm/test/Linker/funcimport_appending_global.ll @@ -18,3 +18,5 @@ } declare void @foo() + +; REQUIRES: llvm-lto Index: llvm/test/Linker/funcimport_comdat.ll =================================================================== --- llvm/test/Linker/funcimport_comdat.ll +++ llvm/test/Linker/funcimport_comdat.ll @@ -26,3 +26,5 @@ define internal void @comdat2_func1() comdat($comdat2) { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Linker/thinlto_funcimport_debug.ll =================================================================== --- llvm/test/Linker/thinlto_funcimport_debug.ll +++ llvm/test/Linker/thinlto_funcimport_debug.ll @@ -85,3 +85,4 @@ !31 = !{!32} !32 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7) +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/adjustable_threshold.ll =================================================================== --- llvm/test/Transforms/FunctionImport/adjustable_threshold.ll +++ llvm/test/Transforms/FunctionImport/adjustable_threshold.ll @@ -29,3 +29,4 @@ ret void } +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/funcimport_alias.ll =================================================================== --- llvm/test/Transforms/FunctionImport/funcimport_alias.ll +++ llvm/test/Transforms/FunctionImport/funcimport_alias.ll @@ -23,3 +23,5 @@ declare void @callanalias() #1 ; CHECK-DAG: define available_externally void @callanalias() + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/funcimport_debug.ll =================================================================== --- llvm/test/Transforms/FunctionImport/funcimport_debug.ll +++ llvm/test/Transforms/FunctionImport/funcimport_debug.ll @@ -51,3 +51,5 @@ !10 = !{!"clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)"} !11 = !DILocation(line: 3, column: 3, scope: !4) !12 = !DILocation(line: 4, column: 1, scope: !4) + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/hotness_based_import.ll =================================================================== --- llvm/test/Transforms/FunctionImport/hotness_based_import.ll +++ llvm/test/Transforms/FunctionImport/hotness_based_import.ll @@ -135,3 +135,5 @@ !12 = !{i32 10000, i64 100, i32 1} !13 = !{i32 999000, i64 100, i32 1} !14 = !{i32 999999, i64 1, i32 2} + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/hotness_based_import2.ll =================================================================== --- llvm/test/Transforms/FunctionImport/hotness_based_import2.ll +++ llvm/test/Transforms/FunctionImport/hotness_based_import2.ll @@ -51,3 +51,5 @@ !14 = !{i32 999999, i64 2, i32 4} !28 = !{!"function_entry_count", i64 110} !29 = !{!"function_entry_count", i64 1} + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/FunctionImport/inlineasm.ll =================================================================== --- llvm/test/Transforms/FunctionImport/inlineasm.ll +++ llvm/test/Transforms/FunctionImport/inlineasm.ll @@ -17,3 +17,5 @@ ; CHECK: declare void @foo(i64*) declare void @foo(i64*) #1 + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll =================================================================== --- llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll +++ llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll @@ -37,3 +37,5 @@ ; ICALL-PROM-NOT: !"VP" ; ICALL-PROM: [[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 0} ; ICALL-PROM-NOT: !"VP" + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll =================================================================== --- llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll +++ llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll @@ -61,3 +61,5 @@ !31 = !{!"clang version 5.0.0 (trunk 297016)"} !34 = !{!"function_entry_count", i64 1} !40 = !{!"VP", i32 0, i64 3000, i64 -8789629626369651636, i64 3000} + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/SampleProfile/gcc-simple.ll =================================================================== --- llvm/test/Transforms/SampleProfile/gcc-simple.ll +++ llvm/test/Transforms/SampleProfile/gcc-simple.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/gcc-simple.afdo -S | FileCheck %s ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/gcc-simple.afdo -S | FileCheck %s -; XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +; XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc ; Original code: ; ; #include Index: llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll =================================================================== --- llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll +++ llvm/test/Transforms/SampleProfile/indirect-call-gcc.ll @@ -4,7 +4,7 @@ ; format profile. ; It is expected to fail on certain architectures as gcc profile reader does ; not work. -; XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +; XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc define void @test(void ()*) !dbg !3 { %2 = alloca void ()* Index: llvm/test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll =================================================================== --- llvm/test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll +++ llvm/test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll @@ -34,3 +34,5 @@ define void @f() { ret void } + +; REQUIRES: llvm-lto Index: llvm/test/Transforms/ThinLTOBitcodeWriter/split.ll =================================================================== --- llvm/test/Transforms/ThinLTOBitcodeWriter/split.ll +++ llvm/test/Transforms/ThinLTOBitcodeWriter/split.ll @@ -42,3 +42,5 @@ ; M1: !0 = !{i32 0, !"typeid"} !0 = !{i32 0, !"typeid"} + +; REQUIRES: llvm-lto Index: llvm/test/lit.cfg.py =================================================================== --- llvm/test/lit.cfg.py +++ llvm/test/lit.cfg.py @@ -259,6 +259,9 @@ if have_ld64_plugin_support(): config.available_features.add('ld64_plugin') +if config.llvm_tool_lto_build: + config.available_features.add('llvm-lto') + # Ask llvm-config about asserts and global-isel. llvm_config.feature_config( [('--assertion-mode', {'ON' : 'asserts'}), Index: llvm/test/tools/llvm-cov/copy_block_helper.m =================================================================== --- llvm/test/tools/llvm-cov/copy_block_helper.m +++ llvm/test/tools/llvm-cov/copy_block_helper.m @@ -29,4 +29,4 @@ int main(int argc, const char *argv[]) { test(0); } // llvm-cov doesn't work on big endian yet -// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc Index: llvm/test/tools/llvm-cov/gcov47_compatibility.cpp =================================================================== --- llvm/test/tools/llvm-cov/gcov47_compatibility.cpp +++ llvm/test/tools/llvm-cov/gcov47_compatibility.cpp @@ -27,4 +27,4 @@ } // GCOV: -: [[@LINE]]:} // llvm-cov doesn't work on big endian yet -// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc Index: llvm/test/tools/llvm-cov/llvm-cov.test =================================================================== --- llvm/test/tools/llvm-cov/llvm-cov.test +++ llvm/test/tools/llvm-cov/llvm-cov.test @@ -115,4 +115,4 @@ RUN: llvm-cov gcov test_exit_block_arcs.c 2>&1 | FileCheck %s -check-prefix=EXIT_BLOCK_ARCS EXIT_BLOCK_ARCS: (main) has arcs from exit block. -XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc Index: llvm/test/tools/llvm-cov/range_based_for.cpp =================================================================== --- llvm/test/tools/llvm-cov/range_based_for.cpp +++ llvm/test/tools/llvm-cov/range_based_for.cpp @@ -26,4 +26,4 @@ } // GCOV: -: [[@LINE]]:} // llvm-cov doesn't work on big endian yet -// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc Index: llvm/test/tools/llvm-lto/error.ll =================================================================== --- llvm/test/tools/llvm-lto/error.ll +++ llvm/test/tools/llvm-lto/error.ll @@ -1,3 +1,5 @@ +; REQUIRES: llvm-lto + ; RUN: not llvm-lto foobar 2>&1 | FileCheck %s ; CHECK: llvm-lto: error loading file 'foobar': {{N|n}}o such file or directory Index: llvm/test/tools/llvm-lto/thinlto.ll =================================================================== --- llvm/test/tools/llvm-lto/thinlto.ll +++ llvm/test/tools/llvm-lto/thinlto.ll @@ -1,4 +1,6 @@ ; Test combined function index generation for ThinLTO via llvm-lto. +; REQUIRES: llvm-lto + ; RUN: opt -module-summary %s -o %t.o ; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o ; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o Index: llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test =================================================================== --- llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test +++ llvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test @@ -1,7 +1,7 @@ The input gcov file has been generated on a little endian machine. Expect failures on big endian systems. -XFAIL: powerpc64-, s390x, mips-, mips64-, sparc +XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc Tests for sample profiles encoded in GCC's gcov format.