1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib
Nicolai Haehnle 44c4846682 TableGen: Reimplement !foreach using the resolving mechanism
Summary:
This changes the syntax of !foreach so that the first "parameter" is
a new syntactic variable: !foreach(x, lst, expr) will define the
variable x within the scope of expr, and evaluation of the !foreach
will substitute elements of the given list (or dag) for x in expr.

Aside from leading to a nicer syntax, this allows more complex
expressions where x is deeply nested, or even constant expressions
in which x does not occur at all.

!foreach is currently not actually used anywhere in trunk, but I
plan to use it in the AMDGPU backend. If out-of-tree targets are
using it, they can adjust to the new syntax very easily.

Change-Id: Ib966694d8ab6542279d6bc358b6f4d767945a805

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits, tpr

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

llvm-svn: 326705
2018-03-05 15:21:04 +00:00
..
Analysis Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
AsmParser
BinaryFormat
Bitcode
CodeGen Pass Divergence Analysis data to Selection DAG to drive divergence 2018-03-05 15:12:21 +00:00
DebugInfo [llvm-symbolizer] Use correct path when resolving .gnu_debuglink in .debug 2018-03-02 22:56:45 +00:00
Demangle
ExecutionEngine
Fuzzer
FuzzMutate
IR [PatternMatch, InstSimplify] fix m_NaN to work with vector constants and use it 2018-03-02 18:36:08 +00:00
IRReader
LineEditor
Linker [ThinLTO] Revert r325320: Import global variables 2018-03-02 23:40:08 +00:00
LTO
MC [WebAssembly] Reorder reloc sections to come between symtab and name 2018-03-05 12:59:03 +00:00
Object [WebAssembly] Add validation to reloc section 2018-03-05 13:32:38 +00:00
ObjectYAML
Option [Bash-autocompletion] Pass all flags in shell command-line to Clang 2018-03-05 08:54:20 +00:00
Passes
ProfileData
Support Make llvm::djbHash an inline function. 2018-03-02 22:00:38 +00:00
TableGen TableGen: Reimplement !foreach using the resolving mechanism 2018-03-05 15:21:04 +00:00
Target Pass Divergence Analysis data to Selection DAG to drive divergence 2018-03-05 15:12:21 +00:00
Testing
ToolDrivers
Transforms [MergeICmp] We can discard initial blocks that do other work 2018-03-05 13:54:47 +00:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt