@@ -2099,44 +2099,67 @@ class DISubprogram : public DILocalScope {
20992099class DILocation : public MDNode {
21002100 friend class LLVMContextImpl ;
21012101 friend class MDNode ;
2102+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2103+ uint64_t AtomGroup : 61 ;
2104+ uint8_t AtomRank : 3 ;
2105+ #endif
21022106
21032107 DILocation (LLVMContext &C, StorageType Storage, unsigned Line,
2104- unsigned Column, ArrayRef<Metadata *> MDs, bool ImplicitCode);
2108+ unsigned Column, uint64_t AtomGroup, uint8_t AtomRank,
2109+ ArrayRef<Metadata *> MDs, bool ImplicitCode);
21052110 ~DILocation () { dropAllReferences (); }
21062111
21072112 static DILocation *getImpl (LLVMContext &Context, unsigned Line,
21082113 unsigned Column, Metadata *Scope,
21092114 Metadata *InlinedAt, bool ImplicitCode,
2115+ uint64_t AtomGroup, uint8_t AtomRank,
21102116 StorageType Storage, bool ShouldCreate = true );
21112117 static DILocation *getImpl (LLVMContext &Context, unsigned Line,
21122118 unsigned Column, DILocalScope *Scope,
21132119 DILocation *InlinedAt, bool ImplicitCode,
2120+ uint64_t AtomGroup, uint8_t AtomRank,
21142121 StorageType Storage, bool ShouldCreate = true ) {
21152122 return getImpl (Context, Line, Column, static_cast <Metadata *>(Scope),
2116- static_cast <Metadata *>(InlinedAt), ImplicitCode, Storage ,
2117- ShouldCreate);
2123+ static_cast <Metadata *>(InlinedAt), ImplicitCode, AtomGroup ,
2124+ AtomRank, Storage, ShouldCreate);
21182125 }
21192126
21202127 TempDILocation cloneImpl () const {
21212128 // Get the raw scope/inlinedAt since it is possible to invoke this on
21222129 // a DILocation containing temporary metadata.
21232130 return getTemporary (getContext (), getLine (), getColumn (), getRawScope (),
2124- getRawInlinedAt (), isImplicitCode ());
2131+ getRawInlinedAt (), isImplicitCode (), getAtomGroup (),
2132+ getAtomRank ());
21252133 }
2126-
21272134public:
2135+ uint64_t getAtomGroup () const {
2136+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2137+ return AtomGroup;
2138+ #endif
2139+ return 0 ;
2140+ }
2141+ uint8_t getAtomRank () const {
2142+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2143+ return AtomRank;
2144+ #endif
2145+ return 0 ;
2146+ }
2147+
21282148 // Disallow replacing operands.
21292149 void replaceOperandWith (unsigned I, Metadata *New) = delete;
21302150
21312151 DEFINE_MDNODE_GET (DILocation,
21322152 (unsigned Line, unsigned Column, Metadata *Scope,
2133- Metadata *InlinedAt = nullptr , bool ImplicitCode = false ),
2134- (Line, Column, Scope, InlinedAt, ImplicitCode))
2153+ Metadata *InlinedAt = nullptr , bool ImplicitCode = false ,
2154+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2155+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2156+ AtomRank))
21352157 DEFINE_MDNODE_GET (DILocation,
21362158 (unsigned Line, unsigned Column, DILocalScope *Scope,
2137- DILocation *InlinedAt = nullptr ,
2138- bool ImplicitCode = false ),
2139- (Line, Column, Scope, InlinedAt, ImplicitCode))
2159+ DILocation *InlinedAt = nullptr , bool ImplicitCode = false ,
2160+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2161+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2162+ AtomRank))
21402163
21412164 // / Return a (temporary) clone of this.
21422165 TempDILocation clone () const { return cloneImpl (); }
@@ -2511,7 +2534,8 @@ DILocation::cloneWithDiscriminator(unsigned Discriminator) const {
25112534 DILexicalBlockFile *NewScope =
25122535 DILexicalBlockFile::get (getContext (), Scope, getFile (), Discriminator);
25132536 return DILocation::get (getContext (), getLine (), getColumn (), NewScope,
2514- getInlinedAt ());
2537+ getInlinedAt (), isImplicitCode (), getAtomGroup (),
2538+ getAtomRank ());
25152539}
25162540
25172541unsigned DILocation::getBaseDiscriminator () const {
0 commit comments