summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/AsmWriterEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix escaping in asm string literals correctly by having tblgen unescape Chris Lattner2009-03-131-5/+14
| | | | | | them, then the asmprinter emitter reescape them. llvm-svn: 66958
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-241-3/+1
| | | | | | | | | | | | them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. llvm-svn: 65379
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-241-1/+2
| | | | | | | | | | a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
* We have logic in there to emit a default debugging label at the beginning of aBill Wendling2009-02-201-4/+3
| | | | | | | | | function. Emitting another label after the prologue messes up the debugging. We are doing that because the first DebugLoc object it sees is different from the previous, which was nothing. Check for this situation, and don't emit one if it's the first. llvm-svn: 65180
* Add an accessor method to DwarfWriter to tell of debugging info should be ↵Bill Wendling2009-02-201-1/+2
| | | | | | emitted. llvm-svn: 65092
* Print out a new label only if the debug location *tuple* is different. The debugBill Wendling2009-02-191-6/+9
| | | | | | locations may change, but the tuples may be the same. llvm-svn: 65039
* Forgot to check that debug information is supported.Bill Wendling2009-02-191-2/+2
| | | | llvm-svn: 65034
* Put code that generates debug labels into TableGen so that it can be used byBill Wendling2009-02-181-0/+11
| | | | | | everyone. llvm-svn: 64978
* Add explicit keywords.Dan Gohman2009-02-181-1/+1
| | | | llvm-svn: 64915
* Remove tabs from my previous commit.Cedric Venet2008-10-271-2/+2
| | | | llvm-svn: 58263
* Add a default constructor to AsmWriterOperand to make VS2008sp1 happy. ↵Cedric Venet2008-10-261-0/+3
| | | | | | (AsmWriterOperand is used in a std::pair, and VS need to generate the default constructor of this pair). llvm-svn: 58185
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-2/+2
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Fix a bug where an incorrect bit mask would be generated if a target's last asmNate Begeman2008-04-091-1/+1
| | | | | | | string began at a power of 2 in the string index. For example, if "ret" started at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31. llvm-svn: 49433
* Add support for escaping {} in asm strings, based on patch from Nick Burns.Nate Begeman2008-03-171-1/+18
| | | | llvm-svn: 48450
* Replace all target specific implicit def instructions with a target ↵Evan Cheng2008-03-151-0/+3
| | | | | | independent one: TargetInstrInfo::IMPLICIT_DEF. llvm-svn: 48380
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-1/+2
| | | | | | annoying warnings. llvm-svn: 47367
* Get rid of the annoying blank lines before labels.Evan Cheng2008-02-021-0/+3
| | | | llvm-svn: 46667
* SDIsel processes llvm.dbg.declare by recording the variable debug ↵Evan Cheng2008-02-021-0/+3
| | | | | | | | | information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc. Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes. For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time. llvm-svn: 46659
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45419
* Work around a bogus gcc 4.2 warning.Chris Lattner2007-07-181-1/+2
| | | | llvm-svn: 39993
* Files missing from LABEL check in.Jim Laskey2007-01-261-1/+4
| | | | llvm-svn: 33539
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-3/+2
| | | | llvm-svn: 32333
* Remove the isTwoAddress property from the CodeGenInstruction class. It shouldChris Lattner2006-11-151-8/+3
| | | | | | | | | | not be used for anything other than backwards compat constraint handling. Add support for a new DisableEncoding property which contains a list of registers that should not be encoded by the generated code emitter. Convert the codeemitter generator to use this, fixing some PPC JIT regressions. llvm-svn: 31769
* Unbreak VC++ build.Jeff Cohen2006-11-051-1/+2
| | | | llvm-svn: 31464
* This:Chris Lattner2006-09-271-2/+3
| | | | | | | | | | AggregateString += "\0\0"; Doesn't add two nuls to the AggregateString (for obvious reasons), which broke the asmprinter when the first character of an asm string was not literal text. llvm-svn: 30625
* Actually, name the method PrintSpecial to match other stuff in AsmPrinter.hChris Lattner2006-09-261-3/+3
| | | | llvm-svn: 30618
* Add support for ${:foo} syntax, where "foo" is passed into "printSpecial" andChris Lattner2006-09-261-16/+25
| | | | | | | has no associated operand. This is useful for portably encoding stuff like the comment character into an asm string. llvm-svn: 30617
* Fix a long-standing wart in the code generator: two-address instruction loweringChris Lattner2006-09-051-8/+5
| | | | | | | | | | | | | | | actually *removes* one of the operands, instead of just assigning both operands the same register. This make reasoning about instructions unnecessarily complex, because you need to know if you are before or after register allocation to match up operand #'s with the target description file. Changing this also gets rid of a bunch of hacky code in various places. This patch also includes changes to fold loads into cmp/test instructions in the X86 backend, along with a significant simplification to the X86 spill folding code. llvm-svn: 30108
* Fix a bug handling instructions, like blr, which just consist of a textChris Lattner2006-07-191-5/+11
| | | | | | string. The return value of printInstruction should be true for these. llvm-svn: 29196
* Fix case where identical cases were not detected across case #0, becauseChris Lattner2006-07-181-2/+3
| | | | | | | | instructions not handled would have a case value of #0, throwing things off. This marginally shrinks the X86 asmprinter, but shrinks the sparc asmwriter by 25 lines. llvm-svn: 29187
* Fix an accidentally duplicated line that caused tblgen to crash on itanium.Chris Lattner2006-07-181-3/+4
| | | | | | Add an assert that catches the real problem earlier. llvm-svn: 29185
* Maximally group commands. When all instructions within a command set have aChris Lattner2006-07-181-12/+68
| | | | | | | series of identical commands, handle them all with one switch. In the case of the x86 at&t asm printer, only 3 switches are needed for all instructions. llvm-svn: 29184
* Change generator to remove operands as it processes them. No change inChris Lattner2006-07-181-15/+21
| | | | | | generated file. llvm-svn: 29183
* Handle the last operand more intelligently. When emitting the \n, alsoChris Lattner2006-07-181-5/+7
| | | | | | | return from the asmprinter to make the generated asmprinter both more efficient and smaller. llvm-svn: 29182
* Emit switches with 1/2 cases as unconditional code or an if/then/else forChris Lattner2006-07-181-10/+24
| | | | | | tidyness. llvm-svn: 29181
* Steal bits from the asm string index to use for operand information. On bothChris Lattner2006-07-181-10/+12
| | | | | | | x86 and ppc, this gets us 4 more bits to play with, since the string indices both only use 12 bits. llvm-svn: 29180
* Merge operand info and asmstr idx into a single 32-bit field. No other change.Chris Lattner2006-07-181-16/+18
| | | | llvm-svn: 29179
* Completely change the structure of the generated asmprinter to be more tableChris Lattner2006-07-181-25/+187
| | | | | | | | | based and less switch-statements-with-hundreds-of-cases based. This shrinks the x86 asmprinters to about 1/3 their previous size. Other improvements coming. llvm-svn: 29177
* The generated index array should be const.Chris Lattner2006-07-141-1/+1
| | | | llvm-svn: 29155
* Emit the string information for the asm writer as a single large stringChris Lattner2006-07-141-36/+69
| | | | | | | | | | | | | | | | | | | and index into it, instead of emitting it like this: static const char * const OpStrs[] = { "PHINODE\n", // PHI 0, // INLINEASM "adc ", // ADC32mi "adc ", // ADC32mi8 ... The old way required thousands of relocations that slows down link time and dynamic load times. This also cuts about 10K off each of the X86 asmprinters, and should shrink the others as well. llvm-svn: 29152
* instructions can be in different namespaces. Make sure to use the rightChris Lattner2006-05-011-8/+4
| | | | | | one for each instruction. llvm-svn: 28038
* Add support for modifier strings in machine instr descriptions. This allowsChris Lattner2006-02-061-6/+38
| | | | | | | | | us to avoid creating lots of "Operand" types with different printers, instead we can fold several together and use modifiers. For example, we can now use: ${target:call} to say that the operand should be printed like a 'call' operand. llvm-svn: 26024
* Simplify the variant handling code, no functionality change.Chris Lattner2006-02-061-34/+17
| | | | llvm-svn: 26023
* add a note, ya knoeChris Lattner2006-02-011-0/+3
| | | | llvm-svn: 25880
* Use printInlineAsm to, well, print inline asm's.Chris Lattner2006-01-271-4/+7
| | | | llvm-svn: 25677
* No longer track value types for asm printer operands, and remove them asNate Begeman2005-11-301-12/+6
| | | | | | | an argument to every operand printing function. Requires some slight tweaks to x86, the only user. llvm-svn: 24541
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-4/+4
| | | | llvm-svn: 22523
* Fix PR595: These error messages should not be looking at CGI.Name, theyChris Lattner2005-07-151-9/+13
| | | | | | should be looking at CGI.TheDef->getName(). llvm-svn: 22445
* Add support for a TODO; instructions in .td files can now have argumentsNate Begeman2005-07-141-1/+24
| | | | | | | | printed as part of the opcode. This allows something like cmp${cc}ss in the x86 backed to be printed as cmpltss, cmpless, etc. depending on what the value of $cc is. llvm-svn: 22439
* Remove trailing whitespaceMisha Brukman2005-04-221-8/+8
| | | | llvm-svn: 21428
OpenPOWER on IntegriCloud