mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Introduce enum values for previously defined metadata types. (NFC)
Our metadata scheme lazily assigns IDs to string metadata, but we have a mechanism to preassign them as well. Using a preassigned ID is helpful since we get compile time type checking, and avoid some (minimal) string construction and comparison. This change adds enum value for three existing metadata types: + MD_nontemporal = 9, // "nontemporal" + MD_mem_parallel_loop_access = 10, // "llvm.mem.parallel_loop_access" + MD_nonnull = 11 // "nonnull" I went through an updated various uses as well. I made no attempt to get all uses; I focused on the ones which were easily grepable and easily to translate. For example, there were several items in LoopInfo.cpp I chose not to update. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2624,7 +2624,7 @@ bool llvm::isKnownNonNull(const Value *V, const TargetLibraryInfo *TLI) {
|
||||
|
||||
// A Load tagged w/nonnull metadata is never null.
|
||||
if (const LoadInst *LI = dyn_cast<LoadInst>(V))
|
||||
return LI->getMetadata("nonnull");
|
||||
return LI->getMetadata(LLVMContext::MD_nonnull);
|
||||
|
||||
if (ImmutableCallSite CS = V)
|
||||
if (CS.isReturnNonNull())
|
||||
|
||||
Reference in New Issue
Block a user