summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* MIR Serialization: Serialize the '.cfi_same_value' CFI directive.Alex Lorenz2015-08-141-0/+7
| | | | llvm-svn: 245103
* MIR Serialization: Serialize the external symbol call entry pseudo sourceAlex Lorenz2015-08-141-2/+6
| | | | | | values. llvm-svn: 245098
* MIR Serialization: Serialize the global value call entry pseudo source values.Alex Lorenz2015-08-141-1/+10
| | | | llvm-svn: 245097
* MIR Serialization: Serialize the 'internal' register operand flag.Alex Lorenz2015-08-141-2/+6
| | | | llvm-svn: 245085
* MIR Serialization: Serialize the bundled machine instructions.Alex Lorenz2015-08-141-7/+43
| | | | llvm-svn: 245082
* MIR Serialization: Change MIR syntax - use custom syntax for MBBs.Alex Lorenz2015-08-131-42/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Parser: Don't allow negative alignments for memory operands.Alex Lorenz2015-08-131-1/+1
| | | | llvm-svn: 244953
* MIR Parser: Extract the code that parses the alignment into a new method. NFC.Alex Lorenz2015-08-131-5/+13
| | | | | | | | This commit extracts the code that parses the memory operand's alignment into a new method named 'parseAlignment' so that it can be reused when parsing the basic block's alignment attribute. llvm-svn: 244945
* MIR Parser: Allow the MI IR references to reference global values.Alex Lorenz2015-08-121-0/+3
| | | | | | | This commit fixes a bug where MI parser couldn't resolve the named IR references that referenced named global values. llvm-svn: 244817
* MIR Serialization: Serialize the fixed stack pseudo source values.Alex Lorenz2015-08-121-1/+10
| | | | llvm-svn: 244816
* MIR Parser: Move the parsing of fixed stack object indices into new method. NFCAlex Lorenz2015-08-121-2/+11
| | | | | | | | | This commit moves the code that parses the frame indices for the fixed stack objects from the method 'parseFixedStackObjectOperand' to a new method named 'parseFixedStackFrameIndex', so that it can be reused when parsing fixed stack pseudo source values. llvm-svn: 244814
* MIR Serialization: Serialize the jump table pseudo source values.Alex Lorenz2015-08-121-1/+4
| | | | llvm-svn: 244813
* MIR Serialization: Serialize the GOT pseudo source values.Alex Lorenz2015-08-121-1/+5
| | | | llvm-svn: 244809
* MIR Serialization: Serialize the stack pseudo source values.Alex Lorenz2015-08-121-1/+4
| | | | llvm-svn: 244806
* MIR Serialization: Serialize the constant pool pseudo source values.Alex Lorenz2015-08-121-14/+44
| | | | llvm-svn: 244803
* MIR Serialization: Serialize the liveout register mask machine operands.Alex Lorenz2015-08-101-0/+30
| | | | llvm-svn: 244529
* MIR Serialization: Serialize the base alignment for the machine memory operands.Alex Lorenz2015-08-071-3/+14
| | | | llvm-svn: 244357
* MIR Serialization: Serialize the offsets for the machine memory operands.Alex Lorenz2015-08-071-1/+5
| | | | llvm-svn: 244356
* MIR Parser: Extract the parsing of the operand's offset into a new method. NFC.Alex Lorenz2015-08-071-2/+10
| | | | | | | | This commit extract the code that parses the 64-bit offset from the method 'parseOperandsOffset' to a new method 'parseOffset' so that we can reuse it when parsing the offset for the machine memory operands. llvm-svn: 244355
* MIR Serialization: Fix serialization of unnamed IR block references.Alex Lorenz2015-08-061-10/+23
| | | | | | | | The block address machine operands can reference IR blocks in other functions. This commit fixes a bug where the references to unnamed IR blocks in other functions weren't serialized correctly. llvm-svn: 244299
* MIR Parser: Simplify the token's string value handling.Alex Lorenz2015-08-061-9/+7
| | | | | | | | | | | | | | | | | 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 Parser: Report an error when parsing duplicate memory operand flags.Alex Lorenz2015-08-061-1/+5
| | | | llvm-svn: 244240
* MIR Serialization: Serialize the 'invariant' machine memory operand flag.Alex Lorenz2015-08-061-1/+4
| | | | llvm-svn: 244230
* MIR Serialization: Serialize the 'non-temporal' machine memory operand flag.Alex Lorenz2015-08-061-0/+3
| | | | llvm-svn: 244228
* MIR Serialization: Initial serialization of the machine operand target flags.Alex Lorenz2015-08-061-7/+61
| | | | | | | | | | | | 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-5/+34
| | | | | | | 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 Parser: Report an error when parsing large immediate operands.Alex Lorenz2015-08-051-2/+1
| | | | llvm-svn: 244100
* MIR Serialization: Serialize the typed immediate integer machine operands.Alex Lorenz2015-08-051-0/+16
| | | | llvm-svn: 244098
* MIR Parser: Extract the IR constant parsing code into a new method. NFC.Alex Lorenz2015-08-051-7/+14
| | | | | | | | This commit extracts the code that parses the IR constant values into a new method named 'parseIRConstant' in the 'MIParser' class. The new method will be reused by the code that parses the typed integer immediate machine operands. llvm-svn: 244093
* MIR Parser: Report an error when parsing duplicate register flags.Alex Lorenz2015-08-051-1/+5
| | | | llvm-svn: 244081
* MIR Serialization: Serialize the 'early-clobber' register operand flag.Alex Lorenz2015-08-051-1/+5
| | | | llvm-svn: 244075
* MIR Serialization: Serialize the 'debug-use' register operand flag.Alex Lorenz2015-08-051-1/+5
| | | | llvm-svn: 244071
* MIR Parser: Simplify the handling of quoted tokens. NFC.Alex Lorenz2015-08-051-40/+12
| | | | | | | 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-2/+20
| | | | llvm-svn: 243923
* MIR Serialization: Initial serialization of the machine memory operands.Alex Lorenz2015-08-031-3/+106
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243915
* MIR Serialization: Serialize the floating point immediate machine operands.Alex Lorenz2015-07-311-0/+25
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243780
* MIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.Alex Lorenz2015-07-291-0/+9
| | | | llvm-svn: 243554
* MIR Parser: Parse multiple LHS register machine operands.Alex Lorenz2015-07-291-4/+7
| | | | llvm-svn: 243553
* MIR Serialization: Serialize the target index machine operands.Alex Lorenz2015-07-281-0/+49
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243497
* MIR Serialization: Serialize the block address machine operands.Alex Lorenz2015-07-281-0/+69
| | | | llvm-svn: 243453
* MIR Parser: Extract the method 'parseGlobalValue'. NFC.Alex Lorenz2015-07-281-9/+16
| | | | | | | | | This commit extracts the code that parses a global value from the method 'parseGlobalAddressOperand' into a new method 'parseGlobalValue', so that this code can be reused by the method which will parse the block address machine operands. llvm-svn: 243450
* MIR Serialization: Serialize the unnamed basic block references.Alex Lorenz2015-07-271-0/+58
| | | | | | | | | | | | 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/+7
| | | | llvm-svn: 243322
* MIR Parser: Rename the standalone parsing methods. NFC.Alex Lorenz2015-07-271-6/+7
| | | | | | | | This commit renames the methods 'parseMBB' and 'parseNamedRegister' to 'parseStandaloneMBB' and 'parseStandaloneNamedRegister' in order for their names to be consistent with the method 'parseStandaloneVirtualRegister'. llvm-svn: 243319
* MIR Serialization: Serialize the machine function's liveins.Alex Lorenz2015-07-271-0/+22
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243288
* MIR Serialization: Serialize the '.cfi_offset' CFI instruction.Alex Lorenz2015-07-231-7/+62
| | | | | Reviewers: Duncan P. N. Exon Smith llvm-svn: 243062
* MIR Serialization: Serialize the machine instruction's debug location.Alex Lorenz2015-07-221-2/+13
| | | | llvm-svn: 242938
* MIR Parser: Extract the MDNode parsing code into a separate method. NFC.Alex Lorenz2015-07-221-2/+11
| | | | | | | This change would allow the machine instruction parser to reuse this method when parsing the metadata node for the machine instruction's debug location property. llvm-svn: 242934
* MIR Serialization: Serialize the metadata machine operands.Alex Lorenz2015-07-221-0/+20
| | | | llvm-svn: 242916
* MIR Serialization: Start serializing the CFI operands with .cfi_def_cfa_offset.Alex Lorenz2015-07-211-0/+28
| | | | | | | | 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
OpenPOWER on IntegriCloud