@@ -2235,44 +2235,67 @@ 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 }
2262-
22632270public:
2271+ uint64_t getAtomGroup () const {
2272+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2273+ return AtomGroup;
2274+ #endif
2275+ return 0 ;
2276+ }
2277+ uint8_t getAtomRank () const {
2278+ #ifdef EXPERIMENTAL_KEY_INSTRUCTIONS
2279+ return AtomRank;
2280+ #endif
2281+ return 0 ;
2282+ }
2283+
22642284 // Disallow replacing operands.
22652285 void replaceOperandWith (unsigned I, Metadata *New) = delete;
22662286
22672287 DEFINE_MDNODE_GET (DILocation,
22682288 (unsigned Line, unsigned Column, Metadata *Scope,
2269- Metadata *InlinedAt = nullptr , bool ImplicitCode = false ),
2270- (Line, Column, Scope, InlinedAt, ImplicitCode))
2289+ Metadata *InlinedAt = nullptr , bool ImplicitCode = false ,
2290+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2291+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2292+ AtomRank))
22712293 DEFINE_MDNODE_GET (DILocation,
22722294 (unsigned Line, unsigned Column, DILocalScope *Scope,
2273- DILocation *InlinedAt = nullptr ,
2274- bool ImplicitCode = false ),
2275- (Line, Column, Scope, InlinedAt, ImplicitCode))
2295+ DILocation *InlinedAt = nullptr , bool ImplicitCode = false ,
2296+ uint64_t AtomGroup = 0 , uint8_t AtomRank = 0 ),
2297+ (Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup,
2298+ AtomRank))
22762299
22772300 // / Return a (temporary) clone of this.
22782301 TempDILocation clone () const { return cloneImpl (); }
@@ -2647,7 +2670,8 @@ DILocation::cloneWithDiscriminator(unsigned Discriminator) const {
26472670 DILexicalBlockFile *NewScope =
26482671 DILexicalBlockFile::get (getContext (), Scope, getFile (), Discriminator);
26492672 return DILocation::get (getContext (), getLine (), getColumn (), NewScope,
2650- getInlinedAt ());
2673+ getInlinedAt (), isImplicitCode (), getAtomGroup (),
2674+ getAtomRank ());
26512675}
26522676
26532677unsigned DILocation::getBaseDiscriminator () const {
0 commit comments