Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
0dcd198b
Commit
0dcd198b
authored
17 years ago
by
Devang Patel
Browse files
Options
Downloads
Patches
Plain Diff
Parse
%b = getresult {i32, i32} %a, i32 1 llvm-svn: 47349
parent
295711f5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/lib/AsmParser/LLLexer.cpp
+1
-0
1 addition, 0 deletions
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/llvmAsmParser.y
+10
-1
10 additions, 1 deletion
llvm/lib/AsmParser/llvmAsmParser.y
with
11 additions
and
1 deletion
llvm/lib/AsmParser/LLLexer.cpp
+
1
−
0
View file @
0dcd198b
...
...
@@ -598,6 +598,7 @@ int LLLexer::LexIdentifier() {
INSTKEYWORD
(
"extractelement"
,
OtherOpVal
,
ExtractElement
,
EXTRACTELEMENT
);
INSTKEYWORD
(
"insertelement"
,
OtherOpVal
,
InsertElement
,
INSERTELEMENT
);
INSTKEYWORD
(
"shufflevector"
,
OtherOpVal
,
ShuffleVector
,
SHUFFLEVECTOR
);
INSTKEYWORD
(
"getresult"
,
OtherOpVal
,
GetResult
,
GETRESULT
);
#undef INSTKEYWORD
// Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by
...
...
This diff is collapsed.
Click to expand it.
llvm/lib/AsmParser/llvmAsmParser.y
+
10
−
1
View file @
0dcd198b
...
...
@@ -1093,6 +1093,7 @@ Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) {
// Other Operators
%token <OtherOpVal> PHI_TOK SELECT VAARG
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR
%token <OtherOpVal> GETRESULT
// Function Attributes
%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST
...
...
@@ -1733,7 +1734,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
const PointerType *Ty = dyn_cast<PointerType>($1->get());
if (Ty == 0)
GEN_ERROR("Global const reference must be a pointer type
"
);
GEN_ERROR("Global const reference must be a pointer type
" + (*$1)->getDescription()
);
// ConstExprs can exist in the body of a function, thus creating
// GlobalValues whenever they refer to a variable. Because we are in
...
...
@@ -3130,6 +3131,14 @@ MemoryInst : MALLOC Types OptCAlign {
$$ = new StoreInst($3, tmpVal, $1, $7);
delete $5;
}
| GETRESULT Types LocalName ',' ConstVal {
ValID TmpVID = ValID::createLocalName(*$3);
Value *TmpVal = getVal($2->get(), TmpVID);
if (!GetResultInst::isValidOperands(TmpVal, $5))
GEN_ERROR("Invalid getresult operands");
$$ = new GetResultInst(TmpVal, $5);
CHECK_FOR_ERROR
}
| GETELEMENTPTR Types ValueRef IndexList {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment