summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused AsmPrinter OptLevel argument, and propogate.Daniel Dunbar2009-07-011-2/+2
| | | | | | | - This more or less amounts to a revert of r65379. I'm curious to know what happened that caused this variable to become unused. llvm-svn: 74579
* Privatize some more debug-related static data.Owen Anderson2009-06-251-2/+2
| | | | llvm-svn: 74179
* Move local statics to per-instance variables.Owen Anderson2009-06-241-9/+4
| | | | llvm-svn: 74132
* sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base ↵Chris Lattner2009-06-241-10/+10
| | | | | | class. llvm-svn: 74101
* sink dwarf finalization out of each target into AsmPrinter::doFinalizationChris Lattner2009-06-241-0/+4
| | | | llvm-svn: 74097
* eliminate the ExtWeakSymbols set from AsmPrinter. This eliminatesChris Lattner2009-06-241-8/+21
| | | | | | | a bunch of code from all the targets, and eliminates nondeterministic ordering of directives being emitted in the output. llvm-svn: 74096
* Move up dwarf writer initialization in common AsmPrinter class.Devang Patel2009-06-191-3/+11
| | | | llvm-svn: 73784
* move mangler quote handling from asm printers to TargetAsmInfo.Chris Lattner2009-06-181-0/+3
| | | | llvm-svn: 73738
* On Darwin, ams printer should output a second label before a jump table so ↵Evan Cheng2009-06-181-3/+7
| | | | | | the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body. llvm-svn: 73720
* Fix old-style type names in comments.Dan Gohman2009-06-141-1/+1
| | | | llvm-svn: 73362
* Temporarily revert r72191. It was causing an assert during llvm-gccBill Wendling2009-05-211-1/+1
| | | | | | bootstrapping. llvm-svn: 72200
* Introduce DebugScope which gets embedded into the machine instructions' ↵Argyrios Kyrtzidis2009-05-201-1/+1
| | | | | | | | DebugLoc. DebugScope refers to a debug region, function or block. llvm-svn: 72191
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-7/+7
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Move the tablegen-produced DebugLoc handling into a ↵Argyrios Kyrtzidis2009-05-071-0/+17
| | | | | | | | AsmWriter::processDebugLoc function. No functionality change. llvm-svn: 71156
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-2/+1
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-2/+2
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* Initialized arrays can be in any address space.Sanjiv Gupta2009-04-281-3/+4
| | | | llvm-svn: 70297
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-2/+2
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-2/+2
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine ↵Devang Patel2009-04-151-1/+1
| | | | | | scopes (only in FastISel mode). llvm-svn: 69116
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-1/+3
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Pass in the std::string parameter instead of returning it by value.Bill Wendling2009-04-101-13/+12
| | | | llvm-svn: 68747
* Constify getter methods.Bill Wendling2009-04-101-1/+2
| | | | llvm-svn: 68745
* StringMap<DIE*>::iterator::first() returns a pointer to the first character ofBill Wendling2009-04-091-1/+5
| | | | | | | | the key. This will cause it to create a new std::string, which isn't wanted. Instead, pass back the "const char*". Modify the EmitString() method to take a "const char*". llvm-svn: 68741
* change printStringChar to emit characters as unsigned char instead of char,Chris Lattner2009-04-081-9/+5
| | | | | | | | | | | avoiding sign extension for the top octet. For "negative" chars, we'd print stuff like: .asciz "\702... now we print: .asciz "\302... llvm-svn: 68577
* CodeGen still defaults to non-verbose asm, but llc now overrides it and ↵Evan Cheng2009-03-251-2/+13
| | | | | | default to verbose. llvm-svn: 67668
* Do not emit comments unless -asm-verbose.Evan Cheng2009-03-241-93/+150
| | | | llvm-svn: 67580
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-8/+8
| | | | | | | | | | same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. llvm-svn: 67562
* For inline asm output operand that matches an input. Encode the input ↵Evan Cheng2009-03-201-1/+1
| | | | | | operand index in the high bits. llvm-svn: 67387
* Fix some significant problems with constant pools that resulted in ↵Evan Cheng2009-03-131-31/+53
| | | | | | | | | | | | | | | | | | | | | | | unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues. 1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants. 2. MachineConstantPool alignment field is also a log2 value. 3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values. 4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries. 5. Asm printer uses expensive data structure multimap to track constant pool entries by sections. 6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic. Solutions: 1. ConstantPoolSDNode alignment field is changed to keep non-log2 value. 2. MachineConstantPool alignment field is also changed to keep non-log2 value. 3. Functions that create ConstantPool nodes are passing in non-log2 alignments. 4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT. 5. Asm printer uses cheaper data structure to group constant pool entries. 6. Asm printer compute entry offsets after grouping is done. 7. Change JIT code to compute entry offsets on the fly. llvm-svn: 66875
* wire up support for emitting "special" values from inline asmChris Lattner2009-03-101-1/+20
| | | | | | format strings with the standard ${:foo} syntax. llvm-svn: 66527
* just remove the use_empty() check entirely, the only reason itChris Lattner2009-03-091-14/+8
| | | | | | | existed was for llvm-gcc 3.4 (which used the __main hack) which is really really long dead. llvm-svn: 66417
* Make the code generator rip of dead constant expr uses before decidingChris Lattner2009-03-091-10/+16
| | | | | | | | whether a global is dead or not. This should fix PR3749 - linker adds spurious use to appending globals. I can't reasonably add a testcase for this, because the bc writer/reader strip dead constant users. llvm-svn: 66404
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-241-2/+2
| | | | | | | | | | | | 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
* Drop bunch of half-working stuff in the ext_weak linkage support.Anton Korobeynikov2009-02-211-10/+0
| | | | | | | | | | | Now we're using one gross, but quite robust hack :) (previous ones did not work, for example, when ext_weak symbol was used deep inside constant expression in the initializer). The proper fix of this problem will require some quite huge asmprinter changes and that's why was postponed. This fixes PR3629 by the way :) llvm-svn: 65230
* if we have a large GEP offset on a 32-bit or other target, makeChris Lattner2009-02-051-0/+6
| | | | | | | sure to print the value properly sext'd to the right pointer size. This fixes PR3481. llvm-svn: 63843
* Enable emitting of constant values in non-default address space as well. The ↵Sanjiv Gupta2009-01-301-56/+59
| | | | | | APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces. llvm-svn: 63377
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-4/+4
| | | | llvm-svn: 63198
* do not sign extend characters input to isprint. This improvesChris Lattner2009-01-221-1/+1
| | | | | | compatibility with VC++. Patch by Max Burke! llvm-svn: 62813
* Few targets like the tiny little PIC16 have only 16-bit pointers.Sanjiv Gupta2009-01-221-0/+4
| | | | llvm-svn: 62763
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Use DwarfWriter to record dbg variables.Devang Patel2009-01-131-4/+5
| | | | llvm-svn: 62185
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-7/+7
| | | | | | suggested by Chris. llvm-svn: 62099
* Refactor a bunch of code out of AsmPrinter::EmitGlobalConstant into separateDan Gohman2008-12-221-182/+207
| | | | | | functions. llvm-svn: 61345
* Fix bug 3202.Rafael Espindola2008-12-191-1/+2
| | | | | | | The EH_frame and .eh symbols are now private, except for darwin9 and earlier. The patch also fixes the definition of PrivateGlobalPrefix on pcc linux. llvm-svn: 61242
* Fix bug 3140.Rafael Espindola2008-12-031-0/+8
| | | | | | Print a single parameter .file directive if we have an ELF target. llvm-svn: 60480
* Make a convenient helper for printing offsets.Anton Korobeynikov2008-11-221-0/+7
| | | | llvm-svn: 59872
* eliminate a couple more uses of utohexstr.Chris Lattner2008-11-101-6/+10
| | | | llvm-svn: 58963
* Use utohex_buffer instead of utohexstr to avoid creating a temporaryChris Lattner2008-11-101-1/+3
| | | | | | string in the .ll and .s printers. llvm-svn: 58962
* Temporary revert my last commit: it seems it's triggering some subtle bug in ↵Anton Korobeynikov2008-11-081-7/+0
| | | | | | | | backend and breaks llvm-gcc llvm-svn: 58926
OpenPOWER on IntegriCloud