search for: lltok

Displaying 20 results from an estimated 23 matches for "lltok".

2010 Jan 09
0
[LLVMdev] [PATCH] - Union types, attempt 2
...ast<PATypeHandle*>(this + 1); + NumContainedTys = Types.size(); + bool isAbstract = false; + for (unsigned i = 0; i < Types.size(); ++i) { No need to evaluate Types.size() every time through the loop. +bool LLParser::ParseUnionType(PATypeHolder &Result) { ... + if (!EatIfPresent(lltok::lbrace)) { + return Error(EltTyLoc, "'{' expected after 'union'"); + } Please use: if (ParseToken(lltok::lbrace, "'{' expected after 'union'")) return true; + EltTyLoc = Lex.getLoc(); + if (ParseTypeRec(Result)) return true; + ParamsL...
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...antKeyData<ConstantUnion> { + typedef Constant* ValType; + static ValType getValType(ConstantUnion *CS) { CU not CS. LLParser.cpp: In LLParser::ParseUnionType, you can use SmallVector instead of std::vector for ParamsList & ParamsListTy. @@ -2135,7 +2173,8 @@ ParseToken(lltok::rparen, "expected ')' in extractvalue constantexpr")) return true; - if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val- >getType())) + if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val- >...
2010 Jan 06
3
[LLVMdev] [PATCH] - Union types, attempt 2
This patch adds a UnionType to DerivedTypes.h. It also adds code to the bitcode reader / writer and the assembly parser for the new type, as well as a tiny .ll test file in test/Assembler. It does not contain any code related to code generation or type layout - I wanted to see if this much was acceptable before I proceeded any further. Unlike my previous patch, in which the Union type was
2016 Jun 02
6
-Wmisleading-indentation violations
Hi, I was building LLVM with gcc 6.1.1 recently and it was spitting out some warnings relating to misleading indention that caught my eye. This wasn't a fresh build so I may have missed some. I've CC'ed the authors of the potentially misleading lines so they can decide what do about the warnings (if anything). I'm wondering if clang-format is making some inappropriate choices
2010 Feb 11
0
[LLVMdev] Metadata
On Wednesday 10 February 2010 14:58:58 Dan Gohman wrote: > On Feb 10, 2010, at 12:42 PM, David Greene wrote: > > On Wednesday 10 February 2010 12:58:25 Chris Lattner wrote: > >> I think that adding a bit to LoadSDNode and StoreSDNode would make > >> sense. > > > > Ok. The consequence is that a number of functions will have to change to > > propagate
2010 Feb 10
3
[LLVMdev] Metadata
On Feb 10, 2010, at 12:42 PM, David Greene wrote: > On Wednesday 10 February 2010 12:58:25 Chris Lattner wrote: > >> I think that adding a bit to LoadSDNode and StoreSDNode would make sense. > > Ok. The consequence is that a number of functions will have to change to > propagate this bit, analogous to what happens with isVolatile. It's > essentially what we do
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...nt* ValType; > + static ValType getValType(ConstantUnion *CS) { > > CU not CS. > > > LLParser.cpp: > > In LLParser::ParseUnionType, you can use SmallVector instead of std::vector > for ParamsList & ParamsListTy. > > @@ -2135,7 +2173,8 @@ > ParseToken(lltok::rparen, "expected ')' in extractvalue > constantexpr")) > return true; > > - if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType())) > + if (!isa<StructType>(Val->getType()) && > !isa&l...
2010 Feb 11
3
[LLVMdev] Metadata
.../ ::= ',' align 4 /// /// This returns with AteExtraComma set to true if it ate an excess comma at the /// end. bool LLParser::ParseOptionalCommaAlign(unsigned &Alignment, bool &AteExtraComma) { AteExtraComma = false; while (EatIfPresent(lltok::comma)) { // Metadata at the end is an early exit. if (Lex.getKind() == lltok::MetadataVar) { AteExtraComma = true; return false; } if (Lex.getKind() == lltok::kw_align) { if (ParseOptionalAlignment(Alignment)) return true; } else return true; }...
2010 Jan 11
2
[LLVMdev] [PATCH] - Union types, attempt 2
...ContainedTys = Types.size(); > + bool isAbstract = false; > + for (unsigned i = 0; i < Types.size(); ++i) { > > No need to evaluate Types.size() every time through the loop. > > > +bool LLParser::ParseUnionType(PATypeHolder &Result) { > ... > + if (!EatIfPresent(lltok::lbrace)) { > + return Error(EltTyLoc, "'{' expected after 'union'"); > + } > > Please use: > if (ParseToken(lltok::lbrace, "'{' expected after 'union'")) return true; > > > + EltTyLoc = Lex.getLoc(); > + if (Par...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...nt* ValType; > + static ValType getValType(ConstantUnion *CS) { > > CU not CS. > > > LLParser.cpp: > > In LLParser::ParseUnionType, you can use SmallVector instead of std::vector > for ParamsList & ParamsListTy. > > @@ -2135,7 +2173,8 @@ > ParseToken(lltok::rparen, "expected ')' in extractvalue > constantexpr")) > return true; > > - if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType())) > + if (!isa<StructType>(Val->getType()) && > !isa&l...
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...fset which can be used for loads / stores /// from the global. virtual unsigned getMaximalGlobalOffset() const { diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 6523bce..939dc5d 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -636,6 +636,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(ssp); KEYWORD(sspreq); KEYWORD(sspstrong); + KEYWORD(safestack); KEYWORD(sanitize_address); KEYWORD(sanitize_thread); KEYWORD(sanitize_memory); diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index b7818bb..0a655a6 100...
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...pe(ConstantUnion *CS) { >> >> CU not CS. >> >> >> LLParser.cpp: >> >> In LLParser::ParseUnionType, you can use SmallVector instead of >> std::vector for ParamsList & ParamsListTy. >> >> @@ -2135,7 +2173,8 @@ >> ParseToken(lltok::rparen, "expected ')' in extractvalue >> constantexpr")) >> return true; >> >> - if (!isa<StructType>(Val->getType()) && >> !isa<ArrayType>(Val->getType())) >> + if (!isa<StructType>(Val->getType()...
2014 Oct 17
3
[LLVMdev] oprofile support?
...ocator<llvm::PassInfo const*> >::begin() const 1 1.5152 ld-2.19.so _dl_check_map_versions 1 1.5152 ld-2.19.so _dl_fixup 1 1.5152 ld-2.19.so do_lookup_x 1 1.5152 libLLVMAsmParser.so llvm::LLLexer::ReadString(llvm::lltok::Kind) 1 1.5152 libLLVMCodeGen.so llvm::MachineFunction::getName() const 1 1.5152 libLLVMCodeGen.so llvm::MachineOperand::isReg() const .... >From this you can see that lli is calling the oprofile interface. Oprofile is counting 6949 samples, but attributing 99%...
2013 Nov 27
0
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...accordingly), although I'm not sure a prefix $ is the best syntax. Maybe we could even get away with %42: as a BB label and that would be maximally reminiscent. The way that numbered local variables are handled is sort of ad-hoc (it is actually also handled in the Lexer; all the parser sees is lltok::LocalVarID). By just changing LLLexer::LexPercent in LLLexer.cpp to recognize a local label and emit a "LocalLabelID" token, then adding an `else if` to the first `if` in LLParser::ParseBasicBlock, you could probably get a working solution too. However, this introduces an inconsistency i...
2013 Nov 27
2
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...'m not sure a prefix $ is the best syntax. > > Maybe we could even get away with %42: as a BB label and that would be > maximally reminiscent. The way that numbered local variables are handled is > sort of ad-hoc (it is actually also handled in the Lexer; all the parser > sees is lltok::LocalVarID). By just changing LLLexer::LexPercent in > LLLexer.cpp to recognize a local label and emit a "LocalLabelID" token, > then adding an `else if` to the first `if` in LLParser::ParseBasicBlock, > you could probably get a working solution too. However, this introduces an...
2014 Nov 29
2
[LLVMdev] oprofile support?
...const*> >::begin() const > 1 1.5152 ld-2.19.so _dl_check_map_versions > 1 1.5152 ld-2.19.so _dl_fixup > 1 1.5152 ld-2.19.so do_lookup_x > 1 1.5152 libLLVMAsmParser.so > llvm::LLLexer::ReadString(llvm::lltok::Kind) > 1 1.5152 libLLVMCodeGen.so > llvm::MachineFunction::getName() const > 1 1.5152 libLLVMCodeGen.so llvm::MachineOperand::isReg() > const > .... > > From this you can see that lli is calling the oprofile interface. Oprofile > is counting 6949 s...
2013 Nov 27
4
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
The language reference states that local temporaries begin with index 0, but if I try that on my not-entirely-up-to-date v3.4 llc (it is like a week old), I get an error "instruction expected to be numbered '%1'". Also, quite a few examples in the LR uses %0 as a local identifier. Should I fix those or is it a problem in llc? -- Mikael -------------- next part --------------
2013 Nov 27
0
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...efix $ is the best syntax. >> >> Maybe we could even get away with %42: as a BB label and that would be >> maximally reminiscent. The way that numbered local variables are handled is >> sort of ad-hoc (it is actually also handled in the Lexer; all the parser >> sees is lltok::LocalVarID). By just changing LLLexer::LexPercent in >> LLLexer.cpp to recognize a local label and emit a "LocalLabelID" token, >> then adding an `else if` to the first `if` in LLParser::ParseBasicBlock, >> you could probably get a working solution too. However, this in...