Author: dehao Date: Thu Jan 12 10:56:18 2017 New Revision: 291775 URL: http://llvm.org/viewvc/llvm-project?rev=291775&view=rev Log: Revert r291774 which caused buildbot failure.
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp cfe/trunk/test/CodeGen/thinlto_backend.ll Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=291775&r1=291774&r2=291775&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original) +++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Jan 12 10:56:18 2017 @@ -862,8 +862,7 @@ void EmitAssemblyHelper::EmitAssemblyWit } static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M, - std::unique_ptr<raw_pwrite_stream> OS, - std::string SampleProfile) { + std::unique_ptr<raw_pwrite_stream> OS) { StringMap<std::map<GlobalValue::GUID, GlobalValueSummary *>> ModuleToDefinedGVSummaries; CombinedIndex->collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries); @@ -931,7 +930,6 @@ static void runThinLTOBackend(ModuleSumm return llvm::make_unique<lto::NativeObjectStream>(std::move(OS)); }; lto::Config Conf; - Conf.SampleProfile = SampleProfile; if (Error E = thinBackend( Conf, 0, AddStream, *M, *CombinedIndex, ImportList, ModuleToDefinedGVSummaries[M->getModuleIdentifier()], ModuleMap)) { @@ -967,8 +965,7 @@ void clang::EmitBackendOutput(Diagnostic // of an error). bool DoThinLTOBackend = CombinedIndex != nullptr; if (DoThinLTOBackend) { - runThinLTOBackend(CombinedIndex.get(), M, std::move(OS), - CGOpts.SampleProfileFile); + runThinLTOBackend(CombinedIndex.get(), M, std::move(OS)); return; } } Modified: cfe/trunk/test/CodeGen/thinlto_backend.ll URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/thinlto_backend.ll?rev=291775&r1=291774&r2=291775&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/thinlto_backend.ll (original) +++ cfe/trunk/test/CodeGen/thinlto_backend.ll Thu Jan 12 10:56:18 2017 @@ -8,10 +8,6 @@ ; RUN: not %clang_cc1 -O2 -o %t1.o -x c %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING ; CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir' -; Ensure sample profile pass are passed to backend -; RUN: %clang -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -fprofile-sample-use=%S/Inputs/pgo-sample.prof -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-SAMPLEPGO -; CHECK-SAMPLEPGO: Sample profile pass - ; Ensure we get expected error for missing index file ; RUN: %clang -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR1 ; CHECK-ERROR1: Error loading index file 'bad.thinlto.bc' _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits