1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 22:12:47 +01:00
llvm-mirror/lib/IR
Rafael Espindola 02dc2705ae Ask the module for its the identified types.
When lazy reading a module, the types used in a function will not be visible to
a TypeFinder until the body is read.

This patch fixes that by asking the module for its identified struct types.
If a materializer is present, the module asks it. If not, it uses a TypeFinder.

This fixes pr21374.

I will be the first to say that this is ugly, but it was the best I could find.

Some of the options I looked at:

* Asking the LLVMContext. This could be made to work for gold, but not currently
  for ld64. ld64 will load multiple modules into a single context before merging
  them. This causes us to see types from future merges. Unfortunately,
  MappedTypes is not just a cache when it comes to opaque types. Once the
  mapping has been made, we have to remember it for as long as the key may
  be used. This would mean moving MappedTypes to the Linker class and having
  to drop the Linker::LinkModules static methods, which are visible from C.

* Adding an option to ignore function bodies in the TypeFinder. This would
  fix the PR by picking the worst result. It would work, but unfortunately
  we are currently quite dependent on the upfront type merging. I will
  try to reduce our dependency, but it is not clear that we will be able
  to get rid of it for now.

The only clean solution I could think of is making the Module own the types.
This would have other advantages, but it is a much bigger change. I will
propose it, but it is nice to have this fixed while that is discussed.

With the gold plugin, this patch takes the number of types in the LTO clang
binary from 52817 to 49669.

llvm-svn: 223215
2014-12-03 07:18:23 +00:00
..
AsmWriter.cpp Prologue support 2014-12-03 02:08:38 +00:00
AsmWriter.h IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
AttributeImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Attributes.cpp Revert accidentally committed r217107 2014-09-03 23:38:05 +00:00
AutoUpgrade.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
BasicBlock.cpp Move helper for getting a terminating musttail call to BasicBlock 2014-08-12 00:05:15 +00:00
CMakeLists.txt [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
Comdat.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
ConstantFold.cpp Return undef on FP <-> Int conversions that overflow (PR21330). 2014-10-10 23:00:21 +00:00
ConstantFold.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ConstantRange.cpp [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
Constants.cpp Revert "unique_ptrify LLVMContextImpl::CAZConstants" 2014-11-25 02:26:22 +00:00
ConstantsContext.h IR: De-duplicate code for replacing operands in place 2014-08-19 19:13:30 +00:00
Core.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
DataLayout.cpp Switch the default DataLayout to be little endian, and make the variable 2014-10-20 10:41:29 +00:00
DebugInfo.cpp Debug Info: revert r222195, r222210 and r222239. 2014-11-21 19:55:23 +00:00
DebugLoc.cpp Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
DiagnosticInfo.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
DiagnosticPrinter.cpp Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
DIBuilder.cpp Debug Info: revert r222195, r222210 and r222239. 2014-11-21 19:55:23 +00:00
Dominators.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
Function.cpp Prologue support 2014-12-03 02:08:38 +00:00
GCOV.cpp GCOV: Make sure that function idents in the .gcda and .gcno match 2014-11-06 06:55:02 +00:00
Globals.cpp Copy externally_initialized in GlobalVariable::copyAttributesFrom. 2014-11-10 18:41:59 +00:00
GVMaterializer.cpp [Layering] Move GVMaterializer.h into the IR library where its 2014-03-06 03:50:29 +00:00
InlineAsm.cpp [inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{' 2014-09-05 22:30:32 +00:00
Instruction.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
Instructions.cpp Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite 2014-11-25 08:20:27 +00:00
IntrinsicInst.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-09 06:08:46 +00:00
IRBuilder.cpp Revert "Masked Vector Load and Store Intrinsics." 2014-11-28 21:29:14 +00:00
IRPrintingPasses.cpp Fix some misplaced spaces around 'override' 2014-05-24 20:19:40 +00:00
LeakDetector.cpp [Modules] Move the LeakDetector header into the IR library where the 2014-03-04 12:46:06 +00:00
LeaksContext.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegacyPassManager.cpp Remove redundant calls to isMaterializable. 2014-11-01 16:46:18 +00:00
LLVMBuild.txt
LLVMContext.cpp Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
LLVMContextImpl.cpp Revert "unique_ptrify LLVMContextImpl::CAZConstants" 2014-11-25 02:26:22 +00:00
LLVMContextImpl.h Prologue support 2014-12-03 02:08:38 +00:00
Makefile Actually update the CMake and Makefile builds correctly, and update the 2013-01-02 12:09:16 +00:00
Mangler.cpp Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC. 2014-10-28 13:12:13 +00:00
MDBuilder.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
Metadata.cpp IR: Sink MDNode::Hash down to GenericMDNode::Hash 2014-11-18 02:20:29 +00:00
Module.cpp Ask the module for its the identified types. 2014-12-03 07:18:23 +00:00
module.modulemap [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.cpp Remove unnecessary/redundant std::move 2014-07-16 17:09:21 +00:00
PassRegistry.cpp [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
Statepoint.cpp [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
SymbolTableListTraitsImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Type.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
TypeFinder.cpp Prologue support 2014-12-03 02:08:38 +00:00
Use.cpp Fix a URL (NFC) 2014-08-21 21:09:24 +00:00
UseListOrder.cpp verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
User.cpp IR: Cleanup comments for Value, User, and MDNode 2014-10-15 20:28:31 +00:00
Value.cpp [InstCombine] Re-commit of r218721 (Optimize icmp-select-icmp sequence) 2014-11-21 23:36:44 +00:00
ValueSymbolTable.cpp Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
ValueTypes.cpp Add v4f16 to supported value types. 2013-10-03 03:29:21 +00:00
Verifier.cpp [Statepoints 1/4] Statepoint infrastructure for garbage collection: IR Intrinsics 2014-12-01 21:18:12 +00:00