summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-01-12 16:56:18 +0000
committerDehao Chen <dehao@google.com>2017-01-12 16:56:18 +0000
commit2f233c101b19599b04f681a0a56d7223afa928e9 (patch)
treec34d155899a3c0cad6a10745fb539ddf817d1079
parentae4063670e472cfc4be099eb9d2f6f5e6b02f5e5 (diff)
Revert r291774 which caused buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291775 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/BackendUtil.cpp7
-rw-r--r--test/CodeGen/thinlto_backend.ll4
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index b70cefa615..d2ce6ea48e 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -862,8 +862,7 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
}
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(ModuleSummaryIndex *CombinedIndex, Module *M,
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(DiagnosticsEngine &Diags,
// 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;
}
}
diff --git a/test/CodeGen/thinlto_backend.ll b/test/CodeGen/thinlto_backend.ll
index 11c8ecb96c..ac0b3b76ef 100644
--- a/test/CodeGen/thinlto_backend.ll
+++ b/test/CodeGen/thinlto_backend.ll
@@ -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'