1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/lib/TableGen
Nicolai Haehnle d999c84688 TableGen: Delay instantiating inline anonymous records
Summary:
Only instantiate anonymous records once all variable references in template
arguments have been resolved. This allows patterns like the new test case,
which in practice can appear in expressions like:

  class IntrinsicTypeProfile<list<LLVMType> ty, int shift> {
    list<LLVMType> types =
      !listconcat(ty, [llvm_any_ty, LLVMMatchType<shift>]);
  }

  class FooIntrinsic<IntrinsicTypeProfile P, ...>
    : Intrinsic<..., P.types, ...>;

Without this change, the anonymous LLVMMatchType instantiation would
never get resolved.

Another consequence of this change is that anonymous inline
instantiations are uniqued via the folding set of the newly introduced
VarDefInit.

Change-Id: I7a7041a20e297cf98c9109b28d85e64e176c932a

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D43756

llvm-svn: 326788
2018-03-06 13:49:01 +00:00
..
CMakeLists.txt
Error.cpp [globalisel][regbank] Warn about MIR ambiguities when register bank/class names clash. 2017-11-01 22:13:05 +00:00
LLVMBuild.txt
Main.cpp Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
Record.cpp TableGen: Delay instantiating inline anonymous records 2018-03-06 13:49:01 +00:00
SetTheory.cpp [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
StringMatcher.cpp [TableGen] Give the option of tolerating duplicate register names 2017-12-07 09:51:55 +00:00
TableGenBackend.cpp
TGLexer.cpp TableGen: Add !size operation 2018-02-23 10:46:07 +00:00
TGLexer.h TableGen: Add !size operation 2018-02-23 10:46:07 +00:00
TGParser.cpp TableGen: Delay instantiating inline anonymous records 2018-03-06 13:49:01 +00:00
TGParser.h TableGen: Move getNewAnonymousName into RecordKeeper 2018-03-06 13:48:54 +00:00