summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* on darwin<10, fallback to .weak_definition (PPC,X86)David Fang2013-12-101-1/+2
| | | | | | .weak_def_can_be_hidden was not yet supported by the system assembler llvm-svn: 196970
* Remove incorrect comment and pointless cast.Eric Christopher2013-12-041-2/+1
| | | | llvm-svn: 196427
* const on its own line is confusing.Eric Christopher2013-12-041-2/+2
| | | | llvm-svn: 196426
* Reland 196270 "Generalize debug info / EH emission in AsmPrinter"Timur Iskhodzhanov2013-12-031-45/+49
| | | | | | Addressing the existense AMDGPUAsmPrinter and other subclasses of AsmPrinter llvm-svn: 196288
* Revert r196270, "Generalize debug info / EH emission in AsmPrinter"NAKAMURA Takumi2013-12-031-49/+45
| | | | | | It broke CodeGen/R600 tests with +Asserts. llvm-svn: 196272
* Generalize debug info / EH emission in AsmPrinterTimur Iskhodzhanov2013-12-031-45/+49
| | | | llvm-svn: 196270
* Convert two char* that are only ever used as booleans to bool.Rafael Espindola2013-12-021-2/+2
| | | | llvm-svn: 196168
* Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.Rafael Espindola2013-12-021-5/+2
| | | | | | This allows it to be used in TargetLoweringObjectFileImpl.cpp. llvm-svn: 196117
* Remove an always true parameter.Rafael Espindola2013-11-281-6/+2
| | | | llvm-svn: 195931
* Rename DwarfException methods so the new names are consistent with ↵Timur Iskhodzhanov2013-11-261-3/+3
| | | | | | DwarfDebug and the style guide llvm-svn: 195763
* Reformat const for readability.Eric Christopher2013-11-231-6/+4
| | | | llvm-svn: 195522
* Error if we see an alias to a declaration.Rafael Espindola2013-11-141-0/+5
| | | | | | | | | | | | | | | In ELF and COFF an alias is just another offset in a section. There is no way to represent an alias to something in another file. In MachO, the spec has the N_INDR type which should allow for exactly that, but is not currently implemented. Given that it is specified but not implemented, we error in codegen to avoid miscompiling but don't reject aliases to declarations in the verifier to leave the option open of implementing it. In the past we have used alias to declarations as a way of implementing weakref, which is why it exists in some old tests which this patch updates. llvm-svn: 194705
* Use type form of getIntPtrType.Matt Arsenault2013-11-101-1/+1
| | | | | | | | This should be inconsequential and is work towards removing the default address space arguments. llvm-svn: 194347
* Remove linkonce_odr_auto_hide.Rafael Espindola2013-11-011-4/+2
| | | | | | | | | | | | | | | linkonce_odr_auto_hide was in incomplete attempt to implement a way for the linker to hide symbols that are known to be available in every TU and whose addresses are not relevant for a particular DSO. It was redundant in that it all its uses are equivalent to linkonce_odr+unnamed_addr. Unlike those, it has never been connected to clang or llvm's optimizers, so it was effectively dead. Given that nothing produces it, this patch just nukes it (other than the llvm-c enum value). llvm-svn: 193865
* Produce .weak_def_can_be_hidden for some linkonce_odr valuesRafael Espindola2013-10-301-7/+20
| | | | | | | | | | | | | | With this patch llvm produces a weak_def_can_be_hidden for linkonce_odr if they are also unnamed_addr or don't have their address taken. There is not a lot of documentation about .weak_def_can_be_hidden, but from the old discussion about linkonce_odr_auto_hide and the name of the directive this looks correct: these symbols can be hidden. Testing this with the ld64 in Xcode 5 linking clang reduces the number of exported symbols from 21053 to 19049. llvm-svn: 193718
* Debug Info: code clean up.Manman Ren2013-10-291-2/+2
| | | | | | | | | | Use EmitLabelOffsetDifference for handling on darwin platform when non-darwin platforms use EmitLabelPlusOffset. Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded to 4 even though Size is passed in as an argument. llvm-svn: 193660
* Move getSymbol to TargetLoweringObjectFile.Rafael Espindola2013-10-291-2/+2
| | | | | | This allows constructing a Mangler with just a TargetMachine. llvm-svn: 193630
* Add a helper getSymbol to AsmPrinter.Rafael Espindola2013-10-291-9/+12
| | | | llvm-svn: 193627
* Reduce casting and use a fully covered switch.Rafael Espindola2013-10-231-9/+14
| | | | llvm-svn: 193272
* Fix CodeGen for different size address space GEPsMatt Arsenault2013-10-211-2/+2
| | | | llvm-svn: 193111
* Emit prefix data after debug and EH directives.Peter Collingbourne2013-10-201-4/+4
| | | | | | | | | This ensures that the prefix data is treated as part of the function for the purpose of debug info. This provides a better debugging experience, among other things by allowing a debug info client to correctly look up a function in debug info given a function pointer. llvm-svn: 193042
* Add support for metadata representing .ident directives.Rafael Espindola2013-10-161-0/+18
| | | | llvm-svn: 192764
* Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom ↵Justin Holewinski2013-10-111-5/+5
| | | | | | | | | | | | | comments for implicit defs For NVPTX, this fixes a crash where the emitImplicitDef implementation was expecting physical registers, while NVPTX uses virtual registers (with a couple of exceptions). Now, the implicit def comment will be emitted as a true PTX register name. Other targets can use this to customize the output of implicit def comments. Fixes PR17519 llvm-svn: 192444
* Add support for aliases with linkonce_odr.Rafael Espindola2013-10-061-1/+1
| | | | | | This will be used to extend constructor aliases in clang. llvm-svn: 192066
* Rename DataLayout variables TD -> DLMatt Arsenault2013-10-031-34/+34
| | | | llvm-svn: 191927
* Fixed debug_aranges handling for common symbols.Richard Mitton2013-09-231-0/+3
| | | | | | | | | | The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols. .comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section. Test case update to account for this. llvm-svn: 191210
* Added support for generate DWARF .debug_aranges sections automatically.Richard Mitton2013-09-191-0/+3
| | | | llvm-svn: 191052
* Implement function prefix data as an IR feature.Peter Collingbourne2013-09-161-0/+4
| | | | | | | | | Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 llvm-svn: 190773
* Add an instruction deprecation feature to TableGen.Joey Gouly2013-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The 'Deprecated' class allows you to specify a SubtargetFeature that the instruction is deprecated on. The 'ComplexDeprecationPredicate' class allows you to define a custom predicate that is called to check for deprecation. For example: ComplexDeprecationPredicate<"MCR"> would mean you would have to define the following function: bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI, std::string &Info) Which returns 'false' for not deprecated, and 'true' for deprecated and store the warning message in 'Info'. The MCTargetAsmParser constructor was chaned to take an extra argument of the MCInstrInfo class, so out-of-tree targets will need to be changed. llvm-svn: 190598
* AsmPrinter: Get rid of llvm$workaround$fake$stub$David Majnemer2013-08-251-10/+0
| | | | | | | | | We currently emit labels with the prefix Lllvm$workaround$fake$stub$ if the target's MCAsmInfo has getLinkOnceDirective() mapped to something interesting. This was apparently a work around introduced in r31033 for binutils that we don't need anymore. llvm-svn: 189187
* Add a function object to compare the first or second component of a std::pair.Benjamin Kramer2013-08-241-7/+2
| | | | | | Replace instances of this scattered around the code base. llvm-svn: 189169
* Make a few more things const.Bill Wendling2013-08-151-2/+2
| | | | llvm-svn: 188484
* Use a reference instead of making an unnecessary copy. Also use 'const'.Bill Wendling2013-08-151-3/+3
| | | | llvm-svn: 188483
* For COFF only: dwarf debug info output a label reference as a section ↵Carlo Kok2013-08-131-2/+2
| | | | | | relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size. llvm-svn: 188296
* Using the integrated assembler we'd fail to change section to theEric Christopher2013-08-071-2/+3
| | | | | | | | | .tbss section for zerofill thread locals. Make sure we do this before emitting the zerofills. Fixes PR15972. llvm-svn: 187913
* Bugfix for making the DWARF debug strings and labels to code emitted as ↵Carlo Kok2013-08-021-0/+4
| | | | | | secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB (with fix for 64bits msvc) llvm-svn: 187656
* Revert r187597, "Bugfix for making the DWARF debug strings and labels to ↵NAKAMURA Takumi2013-08-021-4/+0
| | | | | | | | code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB." It broke x86_64-win32 builder in llvm/test/DebugInfo. llvm-svn: 187642
* Bugfix for making the DWARF debug strings and labels to code emitted as ↵Carlo Kok2013-08-011-0/+4
| | | | | | | | secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB. fixes Bug 16249 - LLVM generates broken debug info on Windows llvm-svn: 187597
* Add 'const' qualifiers to static const char* variables.Craig Topper2013-07-161-3/+3
| | | | llvm-svn: 186371
* Initialize AsmPrinter::MF in the constructorHal Finkel2013-07-111-1/+1
| | | | | | | | | | | MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file contains only globals (no functions), then we need this to be initialized because, when encountering an error, lowerConstant() references it. This should fix the non-deterministic failures of test/CodeGen/X86/nonconst-static-iv.ll, etc. llvm-svn: 186068
* Reapply an improved version of r180816/180817.Adrian Prantl2013-07-091-7/+6
| | | | | | | | | | | | | | | Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 llvm-svn: 185966
* Initialize object file info before output streamerNico Rieck2013-07-041-2/+2
| | | | | | | | | r179494 switched to using the object file info to retrieve the default text section for some MC streamers. It is possible that initializing an MC streamer can request sections before the object file info is initialized when the AutoInitSections flag is set on the streamer. llvm-svn: 185670
* Remove address spaces from MC.Rafael Espindola2013-07-021-49/+42
| | | | | | | | This is dead code since PIC16 was removed in 2010. The result was an odd mix, where some parts would carefully pass it along and others would assert it was zero (most of the object streamer for example). llvm-svn: 185436
* 80-column and tab character fixes.Eric Christopher2013-06-241-2/+3
| | | | llvm-svn: 184792
* DebugInfo: PR14763/r183329 correct the location of indirect parametersDavid Blaikie2013-06-191-3/+6
| | | | | | | | | | | | | | | | We had been papering over a problem with location info for non-trivial types passed by value by emitting their type as references (this caused the debugger to interpret the location information correctly, but broke the type of the function). r183329 corrected the type information but lead to the debugger interpreting the pointer parameter as the value - the debug info describing the location needed an extra dereference. Use a new flag in DIVariable to add the extra indirection (either by promoting an existing DW_OP_reg (parameter passed in a register) to DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n (parameter passed on the stack). llvm-svn: 184368
* DebugInfo: remove target-specific Frame Index handling for DBG_VALUE ↵David Blaikie2013-06-161-8/+0
| | | | | | | | | | MachineInstrs Frame index handling is now target-agnostic, so delete the target hooks for creation & asm printing of target-specific addressing in DBG_VALUEs and any related functions. llvm-svn: 184067
* Debug Info: Simplify Frame Index handling in DBG_VALUE Machine InstructionsDavid Blaikie2013-06-161-4/+12
| | | | | | | | | | | | | | | | | | | | Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
* DebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the ↵David Blaikie2013-06-151-3/+13
| | | | | | offset when it's zero llvm-svn: 184045
* Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE ↵David Blaikie2013-06-151-2/+5
| | | | | | comments if the display name is empty llvm-svn: 184026
* Teach AsmPrinter how to print odd constants.Quentin Colombet2013-06-071-2/+43
| | | | | | | | | | | Fix an assertion when the compiler encounters big constants whose bit width is not a multiple of 64-bits. Although clang would never generate something like this, the backend should be able to handle any legal IR. <rdar://problem/13363576> llvm-svn: 183544
OpenPOWER on IntegriCloud