[Clang Interpreter] Initial patch for the constexpr interpreter
authorNandor Licker <n@ndor.email>
Fri, 13 Sep 2019 09:46:16 +0000 (09:46 +0000)
committerNandor Licker <n@ndor.email>
Fri, 13 Sep 2019 09:46:16 +0000 (09:46 +0000)
commit950b70dcc7e3e06f7ffbb0386f82d5085cd709a9
treebf18f8846a4e462f83f1abcb5401129745861a97
parentb55456aaa065167d8f93d3cf8cd83ad16d7ab4b2
[Clang Interpreter] Initial patch for the constexpr interpreter

Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 371834
66 files changed:
clang/docs/ConstantInterpreter.rst [new file with mode: 0644]
clang/docs/index.rst
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/OptionalDiagnostic.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/CMakeLists.txt
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Block.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Block.h [new file with mode: 0644]
clang/lib/AST/Interp/Boolean.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeEmitter.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeEmitter.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeExprGen.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeExprGen.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeGenError.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeGenError.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeStmtGen.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeStmtGen.h [new file with mode: 0644]
clang/lib/AST/Interp/Context.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Context.h [new file with mode: 0644]
clang/lib/AST/Interp/Descriptor.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Descriptor.h [new file with mode: 0644]
clang/lib/AST/Interp/Disasm.cpp [new file with mode: 0644]
clang/lib/AST/Interp/EvalEmitter.cpp [new file with mode: 0644]
clang/lib/AST/Interp/EvalEmitter.h [new file with mode: 0644]
clang/lib/AST/Interp/Frame.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Frame.h [new file with mode: 0644]
clang/lib/AST/Interp/Function.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Function.h [new file with mode: 0644]
clang/lib/AST/Interp/Integral.h [new file with mode: 0644]
clang/lib/AST/Interp/Interp.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Interp.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpFrame.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpFrame.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpStack.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpStack.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpState.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpState.h [new file with mode: 0644]
clang/lib/AST/Interp/Opcode.h [new file with mode: 0644]
clang/lib/AST/Interp/Opcodes.td [new file with mode: 0644]
clang/lib/AST/Interp/Pointer.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Pointer.h [new file with mode: 0644]
clang/lib/AST/Interp/PrimType.cpp [new file with mode: 0644]
clang/lib/AST/Interp/PrimType.h [new file with mode: 0644]
clang/lib/AST/Interp/Program.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Program.h [new file with mode: 0644]
clang/lib/AST/Interp/Record.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Record.h [new file with mode: 0644]
clang/lib/AST/Interp/Source.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Source.h [new file with mode: 0644]
clang/lib/AST/Interp/State.cpp [new file with mode: 0644]
clang/lib/AST/Interp/State.h [new file with mode: 0644]
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/AST/Interp/cond.cpp [new file with mode: 0644]
clang/utils/TableGen/CMakeLists.txt
clang/utils/TableGen/ClangOpcodesEmitter.cpp [new file with mode: 0644]
clang/utils/TableGen/TableGen.cpp
clang/utils/TableGen/TableGenBackends.h
llvm/include/llvm/Support/MathExtras.h
llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
llvm/utils/gn/secondary/clang/lib/AST/Interp/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn