[PATCH] D44445: CodeGen: Reduce LValue and CallArgList memory footprint before recommitting r326946
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 14 08:05:31 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC327515: CodeGen: Reduce LValue and CallArgList memory footprint before recommitting… (authored by yaxunl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44445?vs=138252&id=138358#toc
Repository:
rC Clang
https://reviews.llvm.org/D44445
Files:
lib/CodeGen/CGCall.h
lib/CodeGen/CGValue.h
Index: lib/CodeGen/CGValue.h
===================================================================
--- lib/CodeGen/CGValue.h
+++ lib/CodeGen/CGValue.h
@@ -193,7 +193,7 @@
// The alignment to use when accessing this lvalue. (For vector elements,
// this is the alignment of the whole vector.)
- int64_t Alignment;
+ unsigned Alignment;
// objective-c's ivar
bool Ivar:1;
@@ -215,13 +215,13 @@
// to make the default bitfield pattern all-zeroes.
bool ImpreciseLifetime : 1;
- LValueBaseInfo BaseInfo;
- TBAAAccessInfo TBAAInfo;
-
// This flag shows if a nontemporal load/stores should be used when accessing
// this lvalue.
bool Nontemporal : 1;
+ LValueBaseInfo BaseInfo;
+ TBAAAccessInfo TBAAInfo;
+
Expr *BaseIvarExp;
private:
@@ -231,7 +231,10 @@
"initializing l-value with zero alignment!");
this->Type = Type;
this->Quals = Quals;
- this->Alignment = Alignment.getQuantity();
+ const unsigned MaxAlign = 1U << 31;
+ this->Alignment = Alignment.getQuantity() <= MaxAlign
+ ? Alignment.getQuantity()
+ : MaxAlign;
assert(this->Alignment == Alignment.getQuantity() &&
"Alignment exceeds allowed max!");
this->BaseInfo = BaseInfo;
Index: lib/CodeGen/CGCall.h
===================================================================
--- lib/CodeGen/CGCall.h
+++ lib/CodeGen/CGCall.h
@@ -224,7 +224,7 @@
/// CallArgList - Type for representing both the value and type of
/// arguments in a call.
class CallArgList :
- public SmallVector<CallArg, 16> {
+ public SmallVector<CallArg, 8> {
public:
CallArgList() : StackBase(nullptr) {}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44445.138358.patch
Type: text/x-patch
Size: 1700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180314/3f14125b/attachment.bin>
More information about the cfe-commits
mailing list