-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[KeyInstr] Add DISubprogram::keyInstructions bit #144107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl<DISubprogram> { | |
MDString *LinkageName; | ||
Metadata *File; | ||
unsigned Line; | ||
Metadata *Type; | ||
unsigned ScopeLine; | ||
Metadata *Type; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is space packing rather than being related to a functional changes, correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, 136 -> 128 bytes (144 -> 136 with the new bool). I don't think it was important to performance, but seemed a harmless improvement. ymmv? |
||
Metadata *ContainingType; | ||
unsigned VirtualIndex; | ||
int ThisAdjustment; | ||
|
@@ -936,6 +936,7 @@ template <> struct MDNodeKeyImpl<DISubprogram> { | |
Metadata *ThrownTypes; | ||
Metadata *Annotations; | ||
MDString *TargetFuncName; | ||
bool UsesKeyInstructions; | ||
|
||
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, | ||
Metadata *File, unsigned Line, Metadata *Type, | ||
|
@@ -944,18 +945,19 @@ template <> struct MDNodeKeyImpl<DISubprogram> { | |
unsigned SPFlags, Metadata *Unit, Metadata *TemplateParams, | ||
Metadata *Declaration, Metadata *RetainedNodes, | ||
Metadata *ThrownTypes, Metadata *Annotations, | ||
MDString *TargetFuncName) | ||
MDString *TargetFuncName, bool UsesKeyInstructions) | ||
: Scope(Scope), Name(Name), LinkageName(LinkageName), File(File), | ||
Line(Line), Type(Type), ScopeLine(ScopeLine), | ||
Line(Line), ScopeLine(ScopeLine), Type(Type), | ||
ContainingType(ContainingType), VirtualIndex(VirtualIndex), | ||
ThisAdjustment(ThisAdjustment), Flags(Flags), SPFlags(SPFlags), | ||
Unit(Unit), TemplateParams(TemplateParams), Declaration(Declaration), | ||
RetainedNodes(RetainedNodes), ThrownTypes(ThrownTypes), | ||
Annotations(Annotations), TargetFuncName(TargetFuncName) {} | ||
Annotations(Annotations), TargetFuncName(TargetFuncName), | ||
UsesKeyInstructions(UsesKeyInstructions) {} | ||
MDNodeKeyImpl(const DISubprogram *N) | ||
: Scope(N->getRawScope()), Name(N->getRawName()), | ||
LinkageName(N->getRawLinkageName()), File(N->getRawFile()), | ||
Line(N->getLine()), Type(N->getRawType()), ScopeLine(N->getScopeLine()), | ||
Line(N->getLine()), ScopeLine(N->getScopeLine()), Type(N->getRawType()), | ||
ContainingType(N->getRawContainingType()), | ||
VirtualIndex(N->getVirtualIndex()), | ||
ThisAdjustment(N->getThisAdjustment()), Flags(N->getFlags()), | ||
|
@@ -965,7 +967,8 @@ template <> struct MDNodeKeyImpl<DISubprogram> { | |
RetainedNodes(N->getRawRetainedNodes()), | ||
ThrownTypes(N->getRawThrownTypes()), | ||
Annotations(N->getRawAnnotations()), | ||
TargetFuncName(N->getRawTargetFuncName()) {} | ||
TargetFuncName(N->getRawTargetFuncName()), | ||
UsesKeyInstructions(N->getKeyInstructionsEnabled()) {} | ||
|
||
bool isKeyOf(const DISubprogram *RHS) const { | ||
return Scope == RHS->getRawScope() && Name == RHS->getRawName() && | ||
|
@@ -982,7 +985,8 @@ template <> struct MDNodeKeyImpl<DISubprogram> { | |
RetainedNodes == RHS->getRawRetainedNodes() && | ||
ThrownTypes == RHS->getRawThrownTypes() && | ||
Annotations == RHS->getRawAnnotations() && | ||
TargetFuncName == RHS->getRawTargetFuncName(); | ||
TargetFuncName == RHS->getRawTargetFuncName() && | ||
UsesKeyInstructions == RHS->getKeyInstructionsEnabled(); | ||
} | ||
|
||
bool isDefinition() const { return SPFlags & DISubprogram::SPFlagDefinition; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awkward style consistency -- all the other arguments have names attached except the ones you're adding here; also in other hunks.