[Clang Interpreter] Initial patch for the constexpr interpreter
authorNandor Licker <n@ndor.email>
Fri, 30 Aug 2019 21:17:03 +0000 (21:17 +0000)
committerNandor Licker <n@ndor.email>
Fri, 30 Aug 2019 21:17:03 +0000 (21:17 +0000)
commitd4c1002e0bbbbab50f6891cdd2f5bd3a8f3a3584
tree4f131db859abb191163bb0de94edba0a7146db46
parentcfe959709f08c2183dac880446d2855d9fabe10a
[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: 370531
65 files changed:
clang/docs/ConstantInterpreter.rst [new file with mode: 0644]
clang/docs/index.rst
clang/include/clang/AST/ASTContext.h
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/OptionalDiagnostic.h [new file with mode: 0644]
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/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/CMakeLists.txt [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/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/AST/Interp/Type.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Type.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/test/SemaCXX/constant-expression-cxx2a.cpp
clang/test/SemaCXX/constexpr-many-arguments.cpp
clang/test/SemaCXX/shift.cpp
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