[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 13:21:12 PDT 2019


rsmith marked an inline comment as done.
rsmith added inline comments.


================
Comment at: lib/CodeGen/CGExprConstant.cpp:967
 // Constant folding is currently missing support for a few features supported
 // here: CK_ToUnion, CK_ReinterpretMemberPointer, and DesignatedInitUpdateExpr.
 class ConstExprEmitter :
----------------
efriedma wrote:
> Like the comment here says, we're awfully close to being able to just completely kill off ConstExprEmitter etc. Do we really want to continue to invest effort into this code?
The new code is also the mechanism by which we emit `APValue` constants, which is the replacement for `ConstExprEmitter`.

Also I don't think we have a fix for the performance issues we saw from performing frontend evaluation of large `InitListExpr`s yet, which is another blocker for removing `ConstExprEmitter` in favor of `APValue` emission (though I don't expect that to be a problem forever; `APValue` is long overdue an overhaul).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63371/new/

https://reviews.llvm.org/D63371





More information about the cfe-commits mailing list