From d93620bf4d5e165999ad1c3cec2a2fdb02f56218 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 10 Nov 2016 22:34:55 +0000 Subject: IR: Introduce inrange attribute on getelementptr indices. If the inrange keyword is present before any index, loading from or storing to any pointer derived from the getelementptr has undefined behavior if the load or store would access memory outside of the bounds of the element selected by the index marked as inrange. This can be used, e.g. for alias analysis or to split globals at element boundaries where beneficial. As previously proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102472.html Differential Revision: https://reviews.llvm.org/D22793 llvm-svn: 286514 --- llvm/lib/AsmParser/LLLexer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/AsmParser/LLLexer.cpp') diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 2dc1c0a1487..2ead37198b1 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -551,6 +551,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(nsw); KEYWORD(exact); KEYWORD(inbounds); + KEYWORD(inrange); KEYWORD(align); KEYWORD(addrspace); KEYWORD(section); -- cgit v1.2.3