summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MILexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* MILexer: Add ErrorCallbackType typedef; NFCMatthias Braun2016-03-181-30/+22
| | | | llvm-svn: 263829
* [MIR] Change the token name for '<' and '>' to be consitent with the LLVM IR ↵Quentin Colombet2016-03-081-2/+2
| | | | | | | | parser. Thanks to Ahmed Bougacha for noticing! llvm-svn: 262899
* [MIR] Teach the parser how to parse complex types of generic machine ↵Quentin Colombet2016-03-081-0/+4
| | | | | | | | instructions. By complex types, I mean aggregate or vector types. llvm-svn: 262890
* MIR Serialization: Serialize the pointer IR expression values in the machineAlex Lorenz2015-08-211-0/+26
| | | | | | memory operands. llvm-svn: 245745
* MIR Serialization: Change syntax for the call entry pseudo source values.Alex Lorenz2015-08-201-0/+1
| | | | | | | | | | | | The global IR values in machine memory operands should use the global value '@<name>' syntax instead of the current '%ir.<name>' syntax. However, the global value call entry pseudo source values use the global value syntax already. Therefore, the syntax for the call entry pseudo source values has to be changed so that the global values and call entry global value PSVs can be parsed without ambiguities. llvm-svn: 245526
* MIR Serialization: Serialize unnamed local IR values in memory operands.Alex Lorenz2015-08-191-0/+2
| | | | llvm-svn: 245521
* MIR Serialization: Serialize instruction's register ties.Alex Lorenz2015-08-191-0/+1
| | | | | | | | This commit serializes the machine instruction's register operand ties. The ties are printed out only when the instructon has register ties that are different from the ties that are specified in the instruction's description. llvm-svn: 245482
* MIR Serialization: Serialize defined registers that require 'def' register flag.Alex Lorenz2015-08-191-0/+1
| | | | | | | | | The defined registers are already serialized - they are represented by placing them before the '=' in a machine instruction. However, certain instructions like INLINEASM can have defined register operands after the '=', so this commit introduces the 'def' register flag for such operands. llvm-svn: 245480
* MIR Serialization: Serialize the memory operand's range metadata node.Alex Lorenz2015-08-171-0/+1
| | | | llvm-svn: 245247
* MIR Serialization: Serialize the memory operand's noalias metadata node.Alex Lorenz2015-08-171-0/+1
| | | | llvm-svn: 245246
* MIR Serialization: Serialize the memory operand's alias scope metadata node.Alex Lorenz2015-08-171-0/+1
| | | | llvm-svn: 245245
* MIR Serialization: Serialize the memory operand's TBAA metadata node.Alex Lorenz2015-08-171-2/+29
| | | | llvm-svn: 245244
* MIR Serialization: Serialize the '.cfi_same_value' CFI directive.Alex Lorenz2015-08-141-0/+1
| | | | llvm-svn: 245103
* MIR Serialization: Serialize the 'internal' register operand flag.Alex Lorenz2015-08-141-0/+1
| | | | llvm-svn: 245085
* MIR Serialization: Serialize the bundled machine instructions.Alex Lorenz2015-08-141-0/+4
| | | | llvm-svn: 245082
* MIR Serialization: Change MIR syntax - use custom syntax for MBBs.Alex Lorenz2015-08-131-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies the way the machine basic blocks are serialized - now the machine basic blocks are serialized using a custom syntax instead of relying on YAML primitives. Instead of using YAML mappings to represent the individual machine basic blocks in a machine function's body, the new syntax uses a single YAML block scalar which contains all of the machine basic blocks and instructions for that function. This is an example of a function's body that uses the old syntax: body: - id: 0 name: entry instructions: - '%eax = MOV32r0 implicit-def %eflags' - 'RETQ %eax' ... The same body is now written like this: body: | bb.0.entry: %eax = MOV32r0 implicit-def %eflags RETQ %eax ... This syntax change is motivated by the fact that the bundled machine instructions didn't map that well to the old syntax which was using a single YAML sequence to store all of the machine instructions in a block. The bundled machine instructions internally use flags like BundledPred and BundledSucc to determine the bundles, and serializing them as MI flags using the old syntax would have had a negative impact on the readability and the ease of editing for MIR files. The new syntax allows me to serialize the bundled machine instructions using a block construct without relying on the internal flags, for example: BUNDLE implicit-def dead %itstate, implicit-def %s1 ... { t2IT 1, 24, implicit-def %itstate %s1 = VMOVS killed %s0, 1, killed %cpsr, implicit killed %itstate } This commit also converts the MIR testcases to the new syntax. I developed a script that can convert from the old syntax to the new one. I will post the script on the llvm-commits mailing list in the thread for this commit. llvm-svn: 244982
* MIR Serialization: Serialize the jump table pseudo source values.Alex Lorenz2015-08-121-0/+1
| | | | llvm-svn: 244813
* MIR Serialization: Serialize the GOT pseudo source values.Alex Lorenz2015-08-121-0/+1
| | | | llvm-svn: 244809
* MIR Serialization: Serialize the stack pseudo source values.Alex Lorenz2015-08-121-0/+1
| | | | llvm-svn: 244806
* MIR Serialization: Serialize the constant pool pseudo source values.Alex Lorenz2015-08-121-0/+1
| | | | llvm-svn: 244803
* MIR Serialization: Serialize the liveout register mask machine operands.Alex Lorenz2015-08-101-0/+1
| | | | llvm-svn: 244529
* MIR Serialization: Serialize the base alignment for the machine memory operands.Alex Lorenz2015-08-071-0/+1
| | | | llvm-svn: 244357
* MIR Parser: Simplify the token's string value handling.Alex Lorenz2015-08-061-24/+51
| | | | | | | | | | | | | | | | | This commit removes the 'StringOffset' and 'HasStringValue' fields from the MIToken struct and simplifies the 'stringValue' method which now returns the new 'StringValue' field. This commit also adopts a different way of initializing the lexed tokens - instead of constructing a new MIToken instance, the lexer resets the old token using the new 'reset' method and sets its attributes using the new 'setStringValue', 'setOwnedStringValue', and 'setIntegerValue' methods. Reviewers: Sean Silva Differential Revision: http://reviews.llvm.org/D11792 llvm-svn: 244295
* MIR Serialization: Serialize the 'invariant' machine memory operand flag.Alex Lorenz2015-08-061-0/+1
| | | | llvm-svn: 244230
* MIR Serialization: Serialize the 'non-temporal' machine memory operand flag.Alex Lorenz2015-08-061-0/+1
| | | | llvm-svn: 244228
* MIR Serialization: Initial serialization of the machine operand target flags.Alex Lorenz2015-08-061-0/+1
| | | | | | | | | | | | This commit implements the initial serialization of the machine operand target flags. It extends the 'TargetInstrInfo' class to add two new methods that help to provide text based serialization for the target flags. This commit can serialize only the X86 target flags, and the target flags for the other targets will be serialized in the follow-up commits. Reviewers: Duncan P. N. Exon Smith llvm-svn: 244185
* MIR Serialization: Serialize the machine operand's offset.Alex Lorenz2015-08-051-0/+4
| | | | | | | This commit serializes the offset for the following operands: target index, global address, external symbol, constant pool index, and block address. llvm-svn: 244157
* MIR Serialization: Serialize the typed immediate integer machine operands.Alex Lorenz2015-08-051-0/+13
| | | | llvm-svn: 244098
* MIR Serialization: Serialize the 'early-clobber' register operand flag.Alex Lorenz2015-08-051-0/+1
| | | | llvm-svn: 244075
* MIR Serialization: Serialize the 'debug-use' register operand flag.Alex Lorenz2015-08-051-0/+1
| | | | llvm-svn: 244071
* MIR Parser: Simplify the handling of quoted tokens. NFC.Alex Lorenz2015-08-051-16/+16
| | | | | | | The machine instructions lexer should not expose the difference between quoted and unquoted tokens to the parser. llvm-svn: 244068
* MIR Serialization: Serialize the 'volatile' machine memory operand flag.Alex Lorenz2015-08-041-0/+1
| | | | llvm-svn: 243923
* MIR Serialization: Initial serialization of the machine memory operands.Alex Lorenz2015-08-031-2/+20
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243915
* MIR Serialization: Serialize the floating point immediate machine operands.Alex Lorenz2015-07-311-2/+45
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243780
* MIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.Alex Lorenz2015-07-291-0/+1
| | | | llvm-svn: 243554
* MIR Serialization: Serialize the target index machine operands.Alex Lorenz2015-07-281-0/+1
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243497
* MIR Serialization: Serialize the block address machine operands.Alex Lorenz2015-07-281-3/+16
| | | | llvm-svn: 243453
* MIR Parser: Move the function 'lexName'. NFC.Alex Lorenz2015-07-281-20/+20
| | | | | | | This commit moves the function 'lexName' to the start of the file so it can be reused by the function which will lex the named LLVM IR block references. llvm-svn: 243449
* MIR Serialization: Serialize the unnamed basic block references.Alex Lorenz2015-07-271-0/+6
| | | | | | | | | | | | This commit serializes the references from the machine basic blocks to the unnamed basic blocks. This commit adds a new attribute to the machine basic block's YAML mapping called 'ir-block'. This attribute contains the actual reference to the basic block. Reviewers: Duncan P. N. Exon Smith llvm-svn: 243340
* MIR Serialization: Serialize the '.cfi_def_cfa_register' CFI instruction.Alex Lorenz2015-07-271-0/+1
| | | | llvm-svn: 243322
* MIR Serialization: Serialize the '.cfi_offset' CFI instruction.Alex Lorenz2015-07-231-0/+1
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243062
* MIR Serialization: Serialize the machine instruction's debug location.Alex Lorenz2015-07-221-0/+1
| | | | llvm-svn: 242938
* MIR Serialization: Serialize the metadata machine operands.Alex Lorenz2015-07-221-0/+2
| | | | llvm-svn: 242916
* MIR Serialization: Start serializing the CFI operands with .cfi_def_cfa_offset.Alex Lorenz2015-07-211-1/+2
| | | | | | | | This commit begins serialization of the CFI index machine operands by serializing one kind of CFI instruction - the .cfi_def_cfa_offset instruction. Reviewers: Duncan P. N. Exon Smith llvm-svn: 242845
* MIR Parser: Reuse the function 'lexName' when lexing global value tokens. NFC.Alex Lorenz2015-07-211-31/+19
| | | | | | | This commit refactors the function 'maybeLexGlobalValue' so that now it reuses the function 'lexName' when lexing a named global value token. llvm-svn: 242837
* MIR Serialization: Serialize the external symbol machine operands.Alex Lorenz2015-07-211-0/+32
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 242806
* MIR Serialization: Initial serialization of machine constant pools.Alex Lorenz2015-07-201-0/+6
| | | | | | | | | | This commit implements the initial serialization of machine constant pools and the constant pool index machine operands. The constant pool is serialized using a YAML sequence of YAML mappings that represent the constant values. The target-specific constant pool items aren't serialized by this commit. Reviewers: Duncan P. N. Exon Smith llvm-svn: 242707
* MIR Parser: Add support for quoted named global value operands.Alex Lorenz2015-07-201-3/+59
| | | | | | | | | | This commit extends the machine instruction lexer and implements support for the quoted global value tokens. With this change the syntax for the global value identifier tokens becomes identical to the syntax for the global identifier tokens from the LLVM's assembly language. Reviewers: Duncan P. N. Exon Smith llvm-svn: 242702
* MIR Parser: Allow the dollar characters in all of the identifier tokens.Alex Lorenz2015-07-171-1/+4
| | | | | | | | | | This commit modifies the machine instruction lexer so that it now accepts the '$' characters in identifier tokens. This change makes the syntax for unquoted global value tokens consistent with the syntax for the global idenfitier tokens in the LLVM's assembly language. llvm-svn: 242584
* MIR Serialization: Serialize the frame setup machine instruction flag.Alex Lorenz2015-07-171-0/+1
| | | | llvm-svn: 242491
OpenPOWER on IntegriCloud