[ThinLTO] Renaming of function index to module summary index (NFC)

(Resubmitting after fixing missing file issue)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

llvm-svn: 263513
This commit is contained in:
Teresa Johnson
2016-03-15 00:04:37 +00:00
parent da8b3f1914
commit 26ab5772b0
47 changed files with 387 additions and 387 deletions

View File

@@ -19,7 +19,7 @@
using namespace llvm;
PreservedAnalyses BitcodeWriterPass::run(Module &M) {
WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitFunctionSummary);
WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitSummaryIndex);
return PreservedAnalyses::all();
}
@@ -27,21 +27,20 @@ namespace {
class WriteBitcodePass : public ModulePass {
raw_ostream &OS; // raw_ostream to print on
bool ShouldPreserveUseListOrder;
bool EmitFunctionSummary;
bool EmitSummaryIndex;
public:
static char ID; // Pass identification, replacement for typeid
explicit WriteBitcodePass(raw_ostream &o, bool ShouldPreserveUseListOrder,
bool EmitFunctionSummary)
bool EmitSummaryIndex)
: ModulePass(ID), OS(o),
ShouldPreserveUseListOrder(ShouldPreserveUseListOrder),
EmitFunctionSummary(EmitFunctionSummary) {}
EmitSummaryIndex(EmitSummaryIndex) {}
const char *getPassName() const override { return "Bitcode Writer"; }
bool runOnModule(Module &M) override {
WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder,
EmitFunctionSummary);
WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitSummaryIndex);
return false;
}
};
@@ -51,7 +50,7 @@ char WriteBitcodePass::ID = 0;
ModulePass *llvm::createBitcodeWriterPass(raw_ostream &Str,
bool ShouldPreserveUseListOrder,
bool EmitFunctionSummary) {
bool EmitSummaryIndex) {
return new WriteBitcodePass(Str, ShouldPreserveUseListOrder,
EmitFunctionSummary);
EmitSummaryIndex);
}