[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]
Scott Constable via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 4 09:32:35 PDT 2020
sconstab added inline comments.
================
Comment at: llvm/lib/Target/X86/ImmutableGraph.h:285
+ std::unique_ptr<Edge[]> Edges;
+ size_type EdgesSize;
+};
----------------
@craig.topper It now occurs to me that these fields should probably be reordered to:
```
std::unique_ptr<Node[]> Nodes;
std::unique_ptr<Edge[]> Edges;
size_type NodesSize;
size_type EdgesSize;
```
The current ordering will cause internal fragmentation.
Old ordering:
```
static_assert(sizeof(ImmutableGraph<T, V>) == 32);
```
New ordering:
```
static_assert(sizeof(ImmutableGraph<T, V>) == 24);
```
With vectors instead of arrays:
```
static_assert(sizeof(ImmutableGraph<T, V>) == 48);
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75936/new/
https://reviews.llvm.org/D75936
More information about the cfe-commits
mailing list