1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm
Nicolai Haehnle 9a21ccd3ad TableGen: Streamline the semantics of NAME
Summary:
The new rules are straightforward. The main rules to keep in mind
are:

1. NAME is an implicit template argument of class and multiclass,
   and will be substituted by the name of the instantiating def/defm.

2. The name of a def/defm in a multiclass must contain a reference
   to NAME. If such a reference is not present, it is automatically
   prepended.

And for some additional subtleties, consider these:

3. defm with no name generates a unique name but has no special
   behavior otherwise.

4. def with no name generates an anonymous record, whose name is
   unique but undefined. In particular, the name won't contain a
   reference to NAME.

Keeping rules 1&2 in mind should allow a predictable behavior of
name resolution that is simple to follow.

The old "rules" were rather surprising: sometimes (but not always),
NAME would correspond to the name of the toplevel defm. They were
also plain bonkers when you pushed them to their limits, as the old
version of the TableGen test case shows.

Having NAME correspond to the name of the toplevel defm introduces
"spooky action at a distance" and breaks composability:
refactoring the upper layers of a hierarchy of nested multiclass
instantiations can cause unexpected breakage by changing the value
of NAME at a lower level of the hierarchy. The new rules don't
suffer from this problem.

Some existing .td files have to be adjusted because they ended up
depending on the details of the old implementation.

Change-Id: I694095231565b30f563e6fd0417b41ee01a12589

Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm, javed.absar

Subscribers: wdng, llvm-commits

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

llvm-svn: 333900
2018-06-04 14:26:05 +00:00
..
ADT [ADT] Annotate immutable list/set/map update methods with LLVM_NODISCARD. 2018-05-31 17:32:29 +00:00
Analysis [CalledValuePropagation] Just use a sorted vector instead of a set. 2018-05-30 19:31:11 +00:00
AsmParser Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode [Debugify] Don't apply DI before the bitcode writer pass 2018-06-04 00:11:49 +00:00
CodeGen [WebAssembly] Add Wasm exception handling prepare pass 2018-05-31 22:02:34 +00:00
Config Don't redefine a bunch of defines from llvm-config.h in config.h. 2018-05-10 14:45:05 +00:00
DebugInfo DWARFAcceleratorTable: Add an iterator-based api for accessing names in the index 2018-06-01 10:33:11 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Add a constructor to create an IRMaterializationUnit from a module and 2018-06-03 19:22:48 +00:00
FuzzMutate [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus 2018-02-05 11:05:47 +00:00
IR [X86] Remove and autoupgrade masked avx512vnni intrinsics using the unmasked intrinsics and select instructions. 2018-06-03 23:24:17 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
LTO IRGen: Write .dwo files when -split-dwarf-file is used together with -fthinlto-index. 2018-05-31 18:25:59 +00:00
MC [MC] Add assembler support for .cg_profile. 2018-06-02 16:33:01 +00:00
Object [MC] Add assembler support for .cg_profile. 2018-06-02 16:33:01 +00:00
ObjectYAML Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." 2018-05-17 22:55:15 +00:00
Option [Option] Remove an unnecessary conversion function. 2018-05-05 06:05:31 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [Coverage] Take filenames into account when loading function records. 2018-05-08 19:26:51 +00:00
Support [Support] Remove unused raw_ostream::handle whose anchor role was superseded by anchor() 2018-06-02 06:00:35 +00:00
TableGen TableGen: Streamline the semantics of NAME 2018-06-04 14:26:05 +00:00
Target [RFC][Patch 1/3] Add a new class of predicates for variant scheduling classes. 2018-05-25 15:55:37 +00:00
Testing/Support [Testing/Support] Make Failed() matcher work with abstract error types 2018-04-10 14:11:53 +00:00
ToolDrivers llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Transforms Revert r333740: IPSCCP] Use PredicateInfo to propagate facts from cmp. 2018-06-01 12:58:43 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
WindowsResource [llvm-readobj] Teach readobj to dump .res files (WindowsResource). 2017-09-20 18:33:35 +00:00
XRay XRayRecord.h: Add missing #include 2017-11-21 00:23:19 +00:00
CMakeLists.txt
InitializePasses.h [WebAssembly] Add Wasm exception handling prepare pass 2018-05-31 22:02:34 +00:00
LinkAllIR.h Sink some IntrinsicInst.h and Intrinsics.h out of llvm/include 2017-09-07 23:27:44 +00:00
LinkAllPasses.h Revert 333358 as it's failing on some builders. 2018-05-27 12:54:33 +00:00
module.modulemap Rename *CommandFlags.def to *CommandFlags.inc 2018-04-11 18:49:37 +00:00
module.modulemap.build [Modules] Add module for Config/llvm-config.h 2017-10-24 06:18:52 +00:00
Pass.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
PassAnalysisSupport.h [NFC] fix trivial typos in comments 2018-01-23 05:49:30 +00:00
PassInfo.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00
PassRegistry.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00
PassSupport.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00