summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-07-18 15:51:28 +0000
committerHal Finkel <hfinkel@anl.gov>2014-07-18 15:51:28 +0000
commitb0407ba0716d940d035f5da73f6d3bfbaffecb44 (patch)
tree0fb08700ec2601986a9f5195a9d57fb6e0b48444 /llvm/lib/AsmParser/LLParser.h
parent9cf7ac75893c9f83099ce59dd4fd5d1ba7ead25a (diff)
downloadbcm5719-llvm-b0407ba0716d940d035f5da73f6d3bfbaffecb44.tar.gz
bcm5719-llvm-b0407ba0716d940d035f5da73f6d3bfbaffecb44.zip
Add a dereferenceable attribute
This attribute indicates that the parameter or return pointer is dereferenceable. Practically speaking, loads from such a pointer within the associated byte range are safe to speculatively execute. Such pointer parameters are common in source languages (C++ references, for example). llvm-svn: 213385
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 2efb260d66b..7203bb245d0 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -202,6 +202,11 @@ namespace llvm {
Loc = Lex.getLoc();
return ParseUInt32(Val);
}
+ bool ParseUInt64(uint64_t &Val);
+ bool ParseUInt64(uint64_t &Val, LocTy &Loc) {
+ Loc = Lex.getLoc();
+ return ParseUInt64(Val);
+ }
bool ParseTLSModel(GlobalVariable::ThreadLocalMode &TLM);
bool ParseOptionalThreadLocal(GlobalVariable::ThreadLocalMode &TLM);
@@ -219,6 +224,7 @@ namespace llvm {
bool ParseOptionalDLLStorageClass(unsigned &DLLStorageClass);
bool ParseOptionalCallingConv(CallingConv::ID &CC);
bool ParseOptionalAlignment(unsigned &Alignment);
+ bool ParseOptionalDereferenceableBytes(uint64_t &Bytes);
bool ParseScopeAndOrdering(bool isAtomic, SynchronizationScope &Scope,
AtomicOrdering &Ordering);
bool ParseOrdering(AtomicOrdering &Ordering);
OpenPOWER on IntegriCloud