Commit Graph

23 Commits

Author SHA1 Message Date
Timm Bäder 74fb770de9 [clang][Interp] Implement bitXor opcode
Differential Revision: https://reviews.llvm.org/D136956
2022-10-30 09:23:33 +01:00
Timm Bäder ce4d5ae9dc [clang][Interp] Implement bitwise Or operations
Analogous to the bitAnd implementation, do the same for bitwise or.

Differential Revision: https://reviews.llvm.org/D135361
2022-10-14 14:15:08 +02:00
Timm Bäder 62a58050ba [clang][Interp] Implement bitwise and operations
Differential Revision: https://reviews.llvm.org/D135012
2022-10-14 14:00:07 +02:00
Timm Bäder d704ba26b9 [clang][Interp] Implement div opcode
Implement an opcode for division of two integrals.

Differential Revision: https://reviews.llvm.org/D134749
2022-10-14 12:57:57 +02:00
Timm Bäder c9ad877844 [clang][Interp] Implement rem opcode
Implement an opcode to get the remainder of the divison between LHS and
RHS.

Differential Revision: https://reviews.llvm.org/D134744
2022-10-14 12:57:57 +02:00
Timm Bäder 542123465f [clang][Interp] Implement bitwise not operations
Differential Revision: https://reviews.llvm.org/D134804
2022-10-14 12:57:57 +02:00
Timm Bäder 81c5b5d80e [clang][Interp][NFC] Simplify Integral using constexpr if
Just keep one version of the function and differentiate between
std::is_signed() and unsigned using a constexpr if, instead of having
two different versions for the signed and unsigned cases.
2022-10-14 12:47:07 +02:00
Timm Bäder d5360b932e [clang][Interp][NFC] Make classes final that can be final 2022-09-29 12:50:56 +02:00
Timm Bäder 651f4ce7b1 [clang][Interp][NFC] Use constexpr if when possible in Integral.h 2022-09-08 07:31:08 +02:00
Timm Bäder 7614785e1d [clang][Interp] Rename Integral::T to Integral::ReprT
Just 'T' is a bit generic and causes confusion.
2022-08-19 16:14:37 +02:00
Timm Bäder 80bbc05436 [clang][Interp] Implement inv and neg unary operations
Implement negating and inverting values. Also implement
IntegralToBoolean casts so the operations are easier to test.

Differential Revision: https://reviews.llvm.org/D132098
2022-08-19 16:05:00 +02:00
Justin Lebar 027eb71696 Use std::foo_t rather than std::foo in clang.
Summary: No functional change.

Reviewers: bkramer, MaskRay, martong, shafik

Subscribers: martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74414
2020-02-11 10:37:08 -08:00
Nandor Licker 950b70dcc7 [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
2019-09-13 09:46:16 +00:00
Roman Lebedev 2c9f83cfab Revert "[Clang Interpreter] Initial patch for the constexpr interpreter"
Breaks BUILD_SHARED_LIBS build, introduces cycles in library dependency
graphs. (clangInterp depends on clangAST which depends on clangInterp)

This reverts r370839, which is an yet another recommit of D64146.

llvm-svn: 370874
2019-09-04 10:57:06 +00:00
Nandor Licker 32f82c9cba [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: 370839
2019-09-04 05:49:41 +00:00
Nandor Licker c3bdad8c1e Revert [Clang Interpreter] Initial patch for the constexpr interpreter
This reverts r370636 (git commit 8327fed947)

llvm-svn: 370642
2019-09-02 11:34:47 +00:00
Nandor Licker 8327fed947 [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: 370636
2019-09-02 10:38:08 +00:00
Nandor Licker a6bef738bf Revert [Clang Interpreter] Initial patch for the constexpr interpreter
This reverts r370584 (git commit afcb3de117)

llvm-svn: 370588
2019-08-31 15:15:39 +00:00
Nandor Licker afcb3de117 [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: 370584
2019-08-31 15:00:38 +00:00
Nandor Licker 0300c3536a Revert [Clang Interpreter] Initial patch for the constexpr interpreter
This reverts r370531 (git commit d4c1002e0b)

llvm-svn: 370535
2019-08-30 21:32:00 +00:00
Nandor Licker d4c1002e0b [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
2019-08-30 21:17:03 +00:00
Nandor Licker 5c8b94a672 Revert [Clang Interpreter] Initial patch for the constexpr interpreter
This reverts r370476 (git commit a559095054)

llvm-svn: 370481
2019-08-30 15:41:45 +00:00
Nandor Licker a559095054 [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: 370476
2019-08-30 15:02:09 +00:00