For an explanation of these patches see D154153.
Commit message:
Currently there's no mechanism to indicate that a particular symbol should be
treated as a global symbol, this patch adds this trait and modifies the LLVM
translation mechanism to be aware of the trait and convert the operation
alongside all the other LLVM globals.
I don't think "global scope" is the right wording here, given what this trait is doing.
Heck, the name is one I'm iffy on, though I don't have any clearer suggestions.
But, in any case, how's this:
"Trait for operations that define symbols which, within the context of a module, define global values, whether variable or constant. These operations must also implement the Symbol trait and cannot produce results. Examples of such operations include llvm.global, memref.global, and gpu.binary.
This trait is not meant for operations that define functions, modules, or other values that have more complex internal structure."
And then, perhaps, applying the GlobalSymbol