summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove FIXME that had snuck in.Eric Christopher2014-02-201-1/+0
| | | | llvm-svn: 201745
* move getNameWithPrefix and getSymbol to TargetMachine.Rafael Espindola2014-02-193-38/+11
| | | | | | | | | | TargetLoweringBase is implemented in CodeGen, so before this patch we had a dependency fom Target to CodeGen. This would show up as a link failure of llvm-stress when building with -DBUILD_SHARED_LIBS=ON. This fixes pr18900. llvm-svn: 201711
* Add back r201608, r201622, r201624 and r201625Rafael Espindola2014-02-196-52/+123
| | | | | | | | | | | | | | r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. llvm-svn: 201700
* Revert r201622 and r201608.Daniel Jasper2014-02-196-123/+52
| | | | | | | This causes the LLVMgold plugin to segfault. More information on the replies to r201608. llvm-svn: 201669
* Avoid an infinite cycle with private linkage and -f{data|function}-sections.Rafael Espindola2014-02-192-5/+6
| | | | | | | | | | When outputting an object we check its section to find its name, but when looking for the section with -ffunction-section we look for the symbol name. Break the loop by requesting a name with the private prefix when constructing the section name. This matches the behavior before r201608. llvm-svn: 201622
* Fix PR18743.Rafael Espindola2014-02-186-50/+120
| | | | | | | | | | | | | | | | | | | | | | | | The IR @foo = private constant i32 42 is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the liker needs the labels in order to atomize it. One way of fixing it would be to just reject this IR in the backend, but that would not be very front end friendly. What this patch does is use an 'l' prefix in sections that we know the linker requires symbols for atomizing them. This allows frontends to just use private and not worry about which sections they go to or how the linker handles them. One small issue with this strategy is that now a symbol name depends on the section, which is not available before codegen. This is not a problem in practice. The reason is that it only happens with private linkage, which will be ignored by the non codegen users (llvm-nm and llvm-ar). llvm-svn: 201608
* Rename a DebugLoc variable to DbgLoc and a DataLayout to DL.Rafael Espindola2014-02-181-73/+73
| | | | | | This is quiet a bit less confusing now that TargetData was renamed DataLayout. llvm-svn: 201606
* Rename some member variables from TD to DL.Rafael Espindola2014-02-183-12/+12
| | | | | | TargetData was renamed DataLayout back in r165242. llvm-svn: 201581
* Add a DIELoc class to cover the DW_FORM_exprloc set of expressionsEric Christopher2014-02-165-73/+180
| | | | | | | | | | | | | alongside DIEBlock and replace uses accordingly. Use DW_FORM_exprloc in DWARF4 and later code. Update testcases. Adding a DIELoc instead of using extra forms inside DIEBlock so that we can keep location expressions separate from other uses. No direct use at the moment, however, it's not a lot of code and using a separately named class keeps it somewhat more obvious what's going on in various locations. llvm-svn: 201481
* DebugInfo: Deduplicate entries in the fission address tableDavid Blaikie2014-02-153-18/+20
| | | | | | | | | | | | This broke in r185459 while TLS support was being generalized to handle non-symbol TLS representations. I thought about/tried having an enum rather than a bool to track the TLS-ness of the address table entry, but namespaces and naming seemed more hassle than it was worth for only one caller that needed to specify this. llvm-svn: 201469
* DwarfDebug: Remove dead code.David Blaikie2014-02-151-7/+3
| | | | llvm-svn: 201467
* DebugInfo: Implement DW_AT_stmt_list for type unitsDavid Blaikie2014-02-143-2/+22
| | | | | | | | | Type units will share the statement list of their defining compile unit. This is a tradeoff that reduces .o debug info size at the cost of some linked debug info size (since the contents of those string tables won't be deduplicated along with the type unit) which seems right for now. llvm-svn: 201445
* DwarfUnit: Remove unnecessarily explicit/out of line virtual dtors.David Blaikie2014-02-142-6/+0
| | | | | | | These types have an out of line virtual function each (emitHeader at least) so they won't have weak vtables - no need for more than that. llvm-svn: 201444
* DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress ↵David Blaikie2014-02-141-1/+0
| | | | | | -Wunused-member-variable llvm-svn: 201442
* DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for ↵David Blaikie2014-02-143-30/+31
| | | | | | | | | | | | | | | fission and non-fission cases This probably also addresses the FIXME in the fission case regarding multiple compile units, though I haven't tested that. This code still confuses me (the literal zero offset makes little sense, the limitations surrounding asm output I'm not sure about either - but perhaps we should just always emit one line table? Or should we not rely on .loc/.file even in assembly so we can produce the same output between asm and object output?) but this maintains the existing functionality. llvm-svn: 201441
* TargetLowering: n * r where n > 2 should be an illegal addressing modeTom Stellard2014-02-141-0/+2
| | | | llvm-svn: 201433
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | when it's unneeded Recommitting r201380 (reverted in r201389) Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. Also, we emit a non-empty line table to workaround a darwin linker bug, so XFAILing on darwin too. Also, mark the test as 'REQUIRES: object-emission' because it does. llvm-svn: 201429
* Generate the DWARF stack frame decode operations in the function prologue ↵Artyom Skrobov2014-02-143-2/+25
| | | | | | | | for ARM/Thumb functions. Patch by Keith Walker! llvm-svn: 201423
* Revert "DebugInfo: Don't include the name of the CU file in the line table ↵Eric Christopher2014-02-141-0/+3
| | | | | | | | file list when it's unneeded" This reverts commit r201380 for now while we investigate. llvm-svn: 201389
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | when it's unneeded Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. llvm-svn: 201380
* Disable emission of aranges by default and add a command lineEric Christopher2014-02-141-1/+7
| | | | | | | option to enable again that will be matched with a commit to enable in clang. llvm-svn: 201378
* Use __literal16. It has been supported by the linker since 2005.Rafael Espindola2014-02-131-2/+2
| | | | llvm-svn: 201365
* [PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file ↵NAKAMURA Takumi2014-02-131-0/+3
| | | | | | | | in the line table file list when it's unneeded" It really crashes cygwin's stage2 configure with "clang -g". llvm-svn: 201351
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-132-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Changes since review (and last commit attempt): - Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others). - Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll) - mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots) - Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots) Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201333
* [RegAlloc] Fix the assertion in the last chance recoloring to match theQuentin Colombet2014-02-131-1/+1
| | | | | | condition at the call site. llvm-svn: 201296
* [DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.Juergen Ributzka2014-02-131-3/+7
| | | | | | | | | | | This fix checks the original LLVM IR node to identify opaque constants by looking for the bitcast-constant pattern. Originally we looked at the generated SDNode, but this might lead to incorrect results. The SDNode could have been generated by an constant expression that was folded to a constant. This fixes <rdar://problem/16050719> llvm-svn: 201291
* Reformat a few lines with clang-format.Eric Christopher2014-02-121-4/+8
| | | | llvm-svn: 201265
* 80-col.Eric Christopher2014-02-121-1/+2
| | | | llvm-svn: 201264
* [Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.Juergen Ributzka2014-02-121-33/+33
| | | | | | | | | | We are now no longer relying on the target-specific call lowering implementation to lower a stackmap intrinsic call. Instead we perform the call lowering in a target-independent way directly in the stackmap lowering code. This simplifies the code and removes the need to fixup the code after the target-specific call lowering. llvm-svn: 201263
* [Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the ↵Juergen Ributzka2014-02-121-6/+7
| | | | | | | | | | | documenation) The ID type for the stackmap and patchpoint intrinsics are in both cases i64. This fixes an zero extend in the SelectionDAGBuilder that still used i32. This also updates the target independent instructions STACKMAP and PATCHPOINT to use the correct type. llvm-svn: 201262
* Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.Adrian Prantl2014-02-122-3/+5
| | | | | | rdar://problem/16015314 llvm-svn: 201253
* Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass toAkira Hatanaka2014-02-121-2/+14
| | | | | | | | preserve branch probability information. <rdar://problem/15893208> llvm-svn: 201245
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-122-18/+4
| | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. llvm-svn: 201241
* Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-122-4/+18
| | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201237
* DwarfUnit: Include type unit's file strings in the defining compile unit's ↵David Blaikie2014-02-121-1/+2
| | | | | | | | | | file_names table There's still one piece missing here, which is adding the DW_AT_stmt_list to the type unit that refer's to the compile unit's line table. Working on that. llvm-svn: 201198
* Fix some formatting in my last commit (r201196)David Blaikie2014-02-122-10/+7
| | | | llvm-svn: 201197
* DwarfUnit: Provide a reference to a defining DwarfCompileUnit from ↵David Blaikie2014-02-124-14/+26
| | | | | | | | | DwarfTypeUnit. Type units need to insert their file strings into the compile unit's line/file table. This is preliminary work to that end. llvm-svn: 201196
* DwarfUnit: Refactor DW_AT_file creation into a common function.David Blaikie2014-02-122-51/+20
| | | | | | | | This is preliminary work to fix type unit file strings so they appear in their originating CU's line table - but it's also just good/simple cleanup, so I'm committing it ahead of time. llvm-svn: 201195
* DwarfUnit: Replace unnecessary conditionals with asserts.David Blaikie2014-02-111-18/+6
| | | | | | | | We used to be pretty vague about what debug entities were what, with many conditionals to silently drop/skip/accept things. These don't seem to be relevant anymore. llvm-svn: 201194
* Reapply r201180 with an additional error path.Adrian Prantl2014-02-112-4/+61
| | | | | | | | | | | | Debug info: Emit values in subregisters that do not have a separate DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201190
* Revert "Debug info: Emit values in subregisters that do not have a separate"Adrian Prantl2014-02-112-56/+4
| | | | | | This reverts commit r201179 for buildbot breakage. llvm-svn: 201188
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-111-3/+0
| | | | | | | | | | when it's unneeded This comes up in empty files or files containing #file directives that never reference the actual source file name. Came up in a small test of line tables I was playing with. llvm-svn: 201187
* whitespaceAdrian Prantl2014-02-111-1/+1
| | | | llvm-svn: 201181
* Debug info: Emit values in subregisters that do not have a separateAdrian Prantl2014-02-112-4/+56
| | | | | | | | | | | DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201180
* Teach the DAGCombiner how to fold concat_vector nodes when the input is twoRobert Lougher2014-02-111-0/+20
| | | | | | | | | | | | | BUILD_VECTOR nodes, e.g.: (concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4)) -> (BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4) This fixes an issue with AVX, where a sequence was not recognized as a 256-bit vbroadcast due to the concat_vectors. llvm-svn: 201158
* DebugInfo: Use existing symbol rather than creating it again.David Blaikie2014-02-111-1/+1
| | | | llvm-svn: 201119
* [Stackmaps] Cleanup code. No functional change intended.Juergen Ributzka2014-02-101-25/+16
| | | | llvm-svn: 201115
* Remove some prototype code accidentally committed in r201043David Blaikie2014-02-102-14/+0
| | | | | | Thanks to Chandler for the catch. llvm-svn: 201095
* Use a consistent argument order in TargetLoweringObjectFile.Rafael Espindola2014-02-093-26/+24
| | | | | | | | | These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions. llvm-svn: 201044
* Fix formatting introduced in r200941David Blaikie2014-02-093-2/+15
| | | | llvm-svn: 201043
OpenPOWER on IntegriCloud