@@ -2235,44 +2235,70 @@ class DISubprogram : public DILocalScope {
22352235class DILocation : public MDNode {
22362236 friend class LLVMContextImpl ;
22372237 friend class MDNode ;
2238+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2239+ uint64_t AtomGroup : 61 ;
2240+ uint8_t AtomRank : 3 ;
2241+ #endif
22382242
22392243 DILocation (LLVMContext &C, StorageType Storage, unsigned Line,
2240- unsigned Column, ArrayRef<Metadata *> MDs, bool ImplicitCode);
2244+ unsigned Column, uint64_t AtomGroup, uint8_t AtomRank,
2245+ ArrayRef<Metadata *> MDs, bool ImplicitCode);
22412246 ~DILocation () { dropAllReferences (); }
22422247
22432248 static DILocation *getImpl (LLVMContext &Context, unsigned Line,
22442249 unsigned Column, Metadata *Scope,
22452250 Metadata *InlinedAt, bool ImplicitCode,
2251+ uint64_t AtomGroup, uint8_t AtomRank,
22462252 StorageType Storage, bool ShouldCreate = true );
22472253 static DILocation *getImpl (LLVMContext &Context, unsigned Line,
22482254 unsigned Column, DILocalScope *Scope,
22492255 DILocation *InlinedAt, bool ImplicitCode,
2256+ uint64_t AtomGroup, uint8_t AtomRank,
22502257 StorageType Storage, bool ShouldCreate = true ) {
22512258 return getImpl (Context, Line, Column, static_cast <Metadata *>(Scope),
2252- static_cast <Metadata *>(InlinedAt), ImplicitCode, Storage ,
2253- ShouldCreate);
2259+ static_cast <Metadata *>(InlinedAt), ImplicitCode, AtomGroup ,
2260+ AtomRank, Storage, ShouldCreate);
22542261 }
22552262
22562263 TempDILocation cloneImpl () const {
22572264 // Get the raw scope/inlinedAt since it is possible to invoke this on
22582265 // a DILocation containing temporary metadata.
22592266 return getTemporary (getContext (), getLine (), getColumn (), getRawScope (),
2260- getRawInlinedAt (), isImplicitCode ());
2267+ getRawInlinedAt (), isImplicitCode (), getAtomGroup (),
2268+ getAtomRank ());
22612269 }
22622270
22632271public:
2272+ uint64_t getAtomGroup () const {
2273+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2274+ return AtomGroup;
2275+ #else
2276+ return 0 ;
2277+ #endif
2278+ }
2279+ uint8_t getAtomRank () const {
2280+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2281+ return AtomRank;
2282+ #else
2283+ return 0 ;
2284+ #endif
2285+ }
2286+
22642287 // Disallow replacing operands.
22652288 void replaceOperandWith (unsigned I, Metadata *New) = delete;
22662289
22672290 DEFINE_MDNODE_GET (DILocation,
22682291 (unsigned Line, unsigned Column, Metadata *Scope,
2269- Metadata *InlinedAt = nullptr , bool ImplicitCode = false ),
2270- (Line, Column, Scope, InlinedAt, ImplicitCode))
2292+ Metadata *InlinedAt = nullptr , bool ImplicitCode = false ,
2293+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2294+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2295+ AtomRank))
22712296 DEFINE_MDNODE_GET (DILocation,
22722297 (unsigned Line, unsigned Column, DILocalScope *Scope,
2273- DILocation *InlinedAt = nullptr ,
2274- bool ImplicitCode = false ),
2275- (Line, Column, Scope, InlinedAt, ImplicitCode))
2298+ DILocation *InlinedAt = nullptr , bool ImplicitCode = false ,
2299+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2300+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2301+ AtomRank))
22762302
22772303 // / Return a (temporary) clone of this.
22782304 TempDILocation clone () const { return cloneImpl (); }
@@ -2647,7 +2673,8 @@ DILocation::cloneWithDiscriminator(unsigned Discriminator) const {
26472673 DILexicalBlockFile *NewScope =
26482674 DILexicalBlockFile::get (getContext (), Scope, getFile (), Discriminator);
26492675 return DILocation::get (getContext (), getLine (), getColumn (), NewScope,
2650- getInlinedAt ());
2676+ getInlinedAt (), isImplicitCode (), getAtomGroup (),
2677+ getAtomRank ());
26512678}
26522679
26532680unsigned DILocation::getBaseDiscriminator () const {
0 commit comments