Skip to content

Commit

Permalink
Reduce the overheads
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Korobeynikov <[email protected]>
  • Loading branch information
asl committed Nov 7, 2024
1 parent ae1aafc commit 450945d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ir/base.def
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,18 @@ class Annotation {
/// Annotations described as key-value pairs
inline IndexedVector<NamedExpression> kv;

#emit
/// Whether the annotation body needs to be parsed.
/// Invariant: if this is true, then expr and kv must both be empty. If the
/// annotation is compiler-generated (e.g., derived from a P4₁₄ pragma),
/// then needsParsing will be false and the body will be empty, but expr or
/// kv may be populated.
bool needsParsing;
bool needsParsing : 1;

/// If this is true this is a structured annotation, and there are some
/// constraints on its contents.
bool structured;
bool structured : 1;
#end
}

/// There can be several annotations with the same "name", so this is a vector.
Expand Down

0 comments on commit 450945d

Please sign in to comment.