diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 20:04:09 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 20:04:09 +0000 |
commit | 86d685a17b1e4f8b57c4d5bd48e0a5429f3028e3 (patch) | |
tree | dfd6da3109a33a451fb87ff4ca62c59945430ad5 /gnu/llvm/lib/IR | |
parent | ca82c85029ae0befb17bc14a4faa9f3d51dd72b3 (diff) |
Merge LLVM 3.9.1
Diffstat (limited to 'gnu/llvm/lib/IR')
-rw-r--r-- | gnu/llvm/lib/IR/FunctionInfo.cpp | 67 | ||||
-rw-r--r-- | gnu/llvm/lib/IR/Makefile | 61 | ||||
-rw-r--r-- | gnu/llvm/lib/IR/module.modulemap | 1 |
3 files changed, 0 insertions, 129 deletions
diff --git a/gnu/llvm/lib/IR/FunctionInfo.cpp b/gnu/llvm/lib/IR/FunctionInfo.cpp deleted file mode 100644 index 17a67bcf047..00000000000 --- a/gnu/llvm/lib/IR/FunctionInfo.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===-- FunctionInfo.cpp - Function Info Index ----------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the function info index and summary classes for the -// IR library. -// -//===----------------------------------------------------------------------===// - -#include "llvm/IR/FunctionInfo.h" -#include "llvm/ADT/StringMap.h" -using namespace llvm; - -// Create the combined function index/summary from multiple -// per-module instances. -void FunctionInfoIndex::mergeFrom(std::unique_ptr<FunctionInfoIndex> Other, - uint64_t NextModuleId) { - - StringRef ModPath; - for (auto &OtherFuncInfoLists : *Other) { - std::string FuncName = OtherFuncInfoLists.getKey(); - FunctionInfoList &List = OtherFuncInfoLists.second; - - // Assert that the func info list only has one entry, since we shouldn't - // have duplicate names within a single per-module index. - assert(List.size() == 1); - std::unique_ptr<FunctionInfo> Info = std::move(List.front()); - - // Skip if there was no function summary section. - if (!Info->functionSummary()) - continue; - - // Add the module path string ref for this module if we haven't already - // saved a reference to it. - if (ModPath.empty()) - ModPath = - addModulePath(Info->functionSummary()->modulePath(), NextModuleId); - else - assert(ModPath == Info->functionSummary()->modulePath() && - "Each module in the combined map should have a unique ID"); - - // Note the module path string ref was copied above and is still owned by - // the original per-module index. Reset it to the new module path - // string reference owned by the combined index. - Info->functionSummary()->setModulePath(ModPath); - - // If it is a local function, rename it. - if (Info->functionSummary()->isLocalFunction()) { - // Any local functions are virtually renamed when being added to the - // combined index map, to disambiguate from other functions with - // the same name. The symbol table created for the combined index - // file should contain the renamed symbols. - FuncName = - FunctionInfoIndex::getGlobalNameForLocal(FuncName, NextModuleId); - } - - // Add new function info to existing list. There may be duplicates when - // combining FunctionMap entries, due to COMDAT functions. Any local - // functions were virtually renamed above. - addFunctionInfo(FuncName, std::move(Info)); - } -} diff --git a/gnu/llvm/lib/IR/Makefile b/gnu/llvm/lib/IR/Makefile deleted file mode 100644 index 329cd6636e9..00000000000 --- a/gnu/llvm/lib/IR/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -##===- lib/IR/Makefile -------------------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## -LEVEL = ../.. -LIBRARYNAME = LLVMCore -BUILD_ARCHIVE = 1 - -BUILT_SOURCES = $(PROJ_OBJ_ROOT)/include/llvm/IR/Intrinsics.gen \ - $(PROJ_OBJ_ROOT)/include/llvm/IR/Attributes.inc \ - $(PROJ_OBJ_ROOT)/lib/IR/AttributesCompatFunc.inc - -include $(LEVEL)/Makefile.common - -GENFILE:=$(PROJ_OBJ_ROOT)/include/llvm/IR/Intrinsics.gen -ATTRINCFILE:=$(PROJ_OBJ_ROOT)/include/llvm/IR/Attributes.inc -ATTRCOMPATFUNCINCFILE:=$(PROJ_OBJ_ROOT)/lib/IR/AttributesCompatFunc.inc - -INTRINSICTD := $(PROJ_SRC_ROOT)/include/llvm/IR/Intrinsics.td -INTRINSICTDS := $(wildcard $(PROJ_SRC_ROOT)/include/llvm/IR/Intrinsics*.td) -ATTRIBUTESTD := $(PROJ_SRC_ROOT)/include/llvm/IR/Attributes.td -ATTRCOMPATFUNCTD := $(PROJ_SRC_ROOT)/lib/IR/AttributesCompatFunc.td - -$(ObjDir)/Intrinsics.gen.tmp: $(ObjDir)/.dir $(INTRINSICTDS) $(LLVM_TBLGEN) - $(Echo) Building Intrinsics.gen.tmp from Intrinsics.td - $(Verb) $(LLVMTableGen) $(call SYSPATH, $(INTRINSICTD)) -o $(call SYSPATH, $@) -gen-intrinsic - -$(GENFILE): $(ObjDir)/Intrinsics.gen.tmp $(PROJ_OBJ_ROOT)/include/llvm/IR/.dir - $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \ - $(EchoCmd) Updated Intrinsics.gen because Intrinsics.gen.tmp \ - changed significantly. ) - -$(ObjDir)/Attributes.inc.tmp: $(ObjDir)/.dir $(ATTRIBUTESTD) $(LLVM_TBLGEN) - $(Echo) Building Attributes.inc.tmp from $(ATTRIBUTESTD) - $(Verb) $(LLVMTableGen) $(call SYSPATH, $(ATTRIBUTESTD)) -o $(call SYSPATH, $@) -gen-attrs - -$(ATTRINCFILE): $(ObjDir)/Attributes.inc.tmp $(PROJ_OBJ_ROOT)/include/llvm/IR/.dir - $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \ - $(EchoCmd) Updated Attributes.inc because Attributes.inc.tmp \ - changed significantly. ) - -$(ObjDir)/AttributesCompatFunc.inc.tmp: $(ObjDir)/.dir $(ATTRCOMPATFUNCTD) $(LLVM_TBLGEN) - $(Echo) Building AttributesCompatFunc.inc.tmp from $(ATTRCOMPATFUNCTD) - $(Verb) $(LLVMTableGen) $(call SYSPATH, $(ATTRCOMPATFUNCTD)) -o $(call SYSPATH, $@) -gen-attrs - -$(ATTRCOMPATFUNCINCFILE): $(ObjDir)/AttributesCompatFunc.inc.tmp $(PROJ_OBJ_ROOT)/include/llvm/IR/.dir - $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \ - $(EchoCmd) Updated AttributesCompatFunc.inc because AttributesCompatFunc.inc.tmp \ - changed significantly. ) - -install-local:: $(GENFILE) - $(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/IR/Intrinsics.gen - $(Verb) $(DataInstall) $(GENFILE) $(DESTDIR)$(PROJ_includedir)/llvm/IR/Intrinsics.gen - -install-local:: $(ATTRINCFILE) - $(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/IR/Attributes.inc - $(Verb) $(DataInstall) $(ATTRINCFILE) $(DESTDIR)$(PROJ_includedir)/llvm/IR/Attributes.inc diff --git a/gnu/llvm/lib/IR/module.modulemap b/gnu/llvm/lib/IR/module.modulemap deleted file mode 100644 index 9698e917834..00000000000 --- a/gnu/llvm/lib/IR/module.modulemap +++ /dev/null @@ -1 +0,0 @@ -module IR { requires cplusplus umbrella "." module * { export * } } |