llvm/lib/IR
Peter Collingbourne 5f220beefc DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they
described. Because most clients need to get or set a subprogram for a given
function rather than the other way around, this created unneeded inefficiency.

For example, many passes needed to call the function llvm::makeSubprogramMap()
to build a mapping from functions to subprograms, and the IR linker needed to
fix up function references in a way that caused quadratic complexity in the IR
linking phase of LTO.

This change reverses the direction of the edge by storing the subprogram as
function-level metadata and removing DISubprogram's function field.

Since this is an IR change, a bitcode upgrade has been provided.

Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
attached to the PR.

Differential Revision: http://reviews.llvm.org/D14265

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 22:03:56 +00:00
..
AsmWriter.cpp DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
AttributeImpl.h llvm/lib/IR/AttributeImpl.h: Move comment block not to cover typedef, introduced in r244164. [-Wdocumentation] 2015-08-06 09:49:17 +00:00
Attributes.cpp [IR] Have AttrBuilder::clear clear TargetDepAttrs. 2015-09-03 22:27:42 +00:00
AutoUpgrade.cpp [X86][XOP] Add support for the matching of the VPCMOV bit select instruction 2015-11-03 20:27:01 +00:00
BasicBlock.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
CMakeLists.txt Support for function summary index bitcode sections and files. 2015-10-04 14:33:43 +00:00
Comdat.cpp
ConstantFold.cpp Remove roundingMode argument in APFloat::mod 2015-09-21 19:29:25 +00:00
ConstantFold.h
ConstantRange.cpp [IR] Add a makeNoWrapRegion method to ConstantRange 2015-10-22 03:12:57 +00:00
Constants.cpp [opaque pointer type]: Pass explicit pointee type when building a constant GEP. 2015-08-21 20:16:51 +00:00
ConstantsContext.h [opaque pointer type] Avoid using pointee types to retrieve InlineAsm's function type 2015-07-28 00:06:38 +00:00
Core.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
DataLayout.cpp Revert "Add const to a bunch of Type* in DataLayout. NFC." 2015-07-27 17:15:28 +00:00
DebugInfo.cpp DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
DebugInfoMetadata.cpp DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
DebugLoc.cpp
DiagnosticInfo.cpp StringRef-ify DiagnosticInfoSampleProfile::Filename 2015-11-02 20:01:13 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
Dominators.cpp Constant propagation after hitting assume(cmp) bugfix 2015-09-02 19:59:59 +00:00
Function.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
FunctionInfo.cpp Fix use-after-free in function index merging code. 2015-11-02 20:43:33 +00:00
GCOV.cpp Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used 2015-10-14 00:04:19 +00:00
Globals.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
GVMaterializer.cpp
InlineAsm.cpp Fix SEGV in InlineAsm::ConstraintInfo::Parse. 2015-09-03 15:41:37 +00:00
Instruction.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
Instructions.cpp [IR] Add bounds checking to dataOperandHasImpliedAttr 2015-11-05 01:53:26 +00:00
IntrinsicInst.cpp
IRBuilder.cpp [IRBuilder] Change the gc.statepoint creation interface 2015-10-08 23:18:33 +00:00
IRPrintingPasses.cpp
LegacyPassManager.cpp Simplify code. No functionality change. 2015-10-05 18:53:30 +00:00
LLVMBuild.txt
LLVMContext.cpp Introduce !align metadata for load instruction 2015-09-28 17:41:08 +00:00
LLVMContextImpl.cpp [IR] Add operand bundles to CallInst and InvokeInst. 2015-09-24 19:14:18 +00:00
LLVMContextImpl.h DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
Makefile
Mangler.cpp
MDBuilder.cpp add unpredictable metadata type for control flow 2015-09-02 19:06:43 +00:00
Metadata.cpp Preserve load alignment and dereferenceable metadata during some transformations 2015-11-02 17:53:51 +00:00
MetadataImpl.h DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
MetadataTracking.cpp
Module.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
module.modulemap
Operator.cpp
Pass.cpp
PassManager.cpp
PassRegistry.cpp
Statepoint.cpp
SymbolTableListTraitsImpl.h IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
Type.cpp [IR] Simplify code. No functionality change. 2015-08-16 21:16:26 +00:00
TypeFinder.cpp IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
Use.cpp
User.cpp [IR] Teach llvm::User to co-allocate a descriptor. 2015-09-24 01:00:49 +00:00
Value.cpp Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets 2015-09-23 19:48:43 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp SelectionDAG: Support Expand of f16 extloads 2015-09-09 01:12:27 +00:00
Verifier.cpp DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00