[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 23 07:01:37 PDT 2017
arphaman updated this revision to Diff 112360.
arphaman marked 2 inline comments as done.
arphaman added a comment.
- Create `tryEmitAsConstant` for MemberExprs and `emitConstant` helper for complex values as suggested by John.
- Remove dead constant emission code from CGExprAggregate.cpp
- Emit static variable member expressions as DREs when emitting Lvalues to ensure the IR is consistent between DREs and MEs that reference a constant static variables whose type is a reference to an aggregate
Repository:
rL LLVM
https://reviews.llvm.org/D36876
Files:
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprComplex.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/member-expr-references-variable.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36876.112360.patch
Type: text/x-patch
Size: 13216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170823/5b15f58e/attachment.bin>
More information about the cfe-commits
mailing list