summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* GlobalOpt: Aliases don't have sections, don't copy them when replacingReid Kleckner2014-02-133-5/+11
| | | | | | | | | | | | | | | | | | | | | As defined in LangRef, aliases do not have sections. However, LLVM's GlobalAlias class inherits from GlobalValue, which means we can read and set its section. We should probably ban that as a separate change, since it doesn't make much sense for an alias to have a section that differs from its aliasee. Fixes PR18757, where the section was being lost on the global in code from Clang like: extern "C" { __attribute__((used, section("CUSTOM"))) static int in_custom_section; } Reviewers: rafael.espindola Differential Revision: http://llvm-reviews.chandlerc.com/D2758 llvm-svn: 201286
* [CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS ↵NAKAMURA Takumi2014-02-131-3/+7
| | | | | | | | | | | to pass through to process_source. I was insightless then about unknown optional parameters. (Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux) Suggested by Michael Kruse. Thanks! llvm-svn: 201283
* Fix misleading comment.Lang Hames2014-02-131-1/+1
| | | | llvm-svn: 201279
* The new MCJIT C-API unit test is generating objects without constant dataLang Hames2014-02-131-1/+1
| | | | | | | sections, at least on MachO. Relax expectations to keep the bots green while I investigate. llvm-svn: 201277
* Remove a very old instcombine where we would turn sequences of selects intoOwen Anderson2014-02-122-25/+24
| | | | | | | | | | | | | logical operations on the i1's driving them. This is a bad idea for every target I can think of (confirmed with micro tests on all of: x86-64, ARM, AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into a general purpose register, whereas consuming it directly into a select generally allows it to exist only transiently in a predicate or flags register. Chandler ran a set of performance tests with this change, and reported no measurable change on x86-64. llvm-svn: 201275
* [Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo calledAndrea Di Biagio2014-02-127-15/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'OK_NonUniformConstValue' to identify operands which are constants but not constant splats. The cost model now allows returning 'OK_NonUniformConstValue' for non splat operands that are instances of ConstantVector or ConstantDataVector. With this change, targets are now able to compute different costs for instructions with non-uniform constant operands. For example, On X86 the cost of a vector shift may vary depending on whether the second operand is a uniform or non-uniform constant. This patch applies the following changes: - The cost model computation now takes into account non-uniform constants; - The cost of vector shift instructions has been improved in X86TargetTransformInfo analysis pass; - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish between non-uniform and uniform constant operands. Added a new test to verify that the output of opt '-cost-model -analyze' is valid in the following configurations: SSE2, SSE4.1, AVX, AVX2. llvm-svn: 201272
* [X86] Teach the backend how to lower vector shift left into multiply rather ↵Andrea Di Biagio2014-02-123-2/+169
| | | | | | | | | | | | | | | | | | | | | | | | | than scalarizing it. Instead of expanding a packed shift into a sequence of scalar shifts, the backend now tries (when possible) to convert the vector shift into a vector multiply. Before this change, a shift of a MVT::v8i16 vector by a build_vector of constants was always scalarized into a long sequence of "vector extracts + scalar shifts + vector insert". With this change, if there is SSE2 support, we emit a single vector multiply. This change also affects SSE4.1, AVX, AVX2 shifts: - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants is now lowered when possible into a single SSE4.1 vector multiply. - Packed v16i16 shift left by constant build_vector are now expanded when possible into a single AVX2 vpmullw. This change also improves the lowering of AVX512f vector shifts. Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected by this change. llvm-svn: 201271
* VS Integration: install toolsets for x64 too (PR18738)Hans Wennborg2014-02-124-66/+97
| | | | | | | | | This does exactly the same thing as for Win32, except it passes -m64 to the compiler and the files go in a different directory. Differential Revision: http://llvm-reviews.chandlerc.com/D2749 llvm-svn: 201269
* DebugInfo: Demonstrate that we're not currently uniquing address table ↵David Blaikie2014-02-121-9/+60
| | | | | | | | | entries in fission Since I just discovered this while poking at other things, here's the test case so I have it to come back to later. llvm-svn: 201267
* DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS ↵David Blaikie2014-02-122-47/+33
| | | | | | support. llvm-svn: 201266
* 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-122-8/+9
| | | | | | | | | | | 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
* Don't try to build ExceptionDemo on ARM.Rafael Espindola2014-02-121-1/+1
| | | | | | The demo uses _Unwind_GetIP which is not available on that platform. llvm-svn: 201261
* Extend RTDyld API to enable optionally precomputing the total amount of memoryLang Hames2014-02-125-66/+351
| | | | | | | | | | | | | | | | | | required for all sections in a module. This can be useful when targets or code-models place strict requirements on how sections must be laid out in memory. If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return true then the JIT will call the following method on the memory manager, which can be used to preallocate the necessary memory. void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize, uintptr_t DataSizeRO, uintptr_t DataSizeRW) Patch by Vaidas Gasiunas. Thanks very much Viadas! llvm-svn: 201259
* Rename Windows.h to WindowsSupport.h to avoid ambiguityReid Kleckner2014-02-1214-15/+18
| | | | llvm-svn: 201258
* _CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!David Fang2014-02-121-1/+2
| | | | llvm-svn: 201255
* Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.Adrian Prantl2014-02-124-5/+7
| | | | | | rdar://problem/16015314 llvm-svn: 201253
* Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass toAkira Hatanaka2014-02-122-2/+66
| | | | | | | | preserve branch probability information. <rdar://problem/15893208> llvm-svn: 201245
* PC-rel implemented in AArch64, test now passRenato Golin2014-02-121-1/+1
| | | | llvm-svn: 201243
* Move more self-contained functionality away from tools/opt/opt.cppEli Bendersky2014-02-124-61/+110
| | | | | | BreakpointPrinter moves to its own module. llvm-svn: 201242
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-1282-175/+85
| | | | | | | | 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-1282-85/+175
| | | | | | | | | | | | | | | | | | | | | 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
* Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.NAKAMURA Takumi2014-02-121-2/+3
| | | | | | | | | | | | | | | I found that swapping the order of some header files helped fix a build issue that we're seeing on mingw32. Without the swap, windows.h was being included before _WIN32_WINNT was being defined and the CreateHardLinkW function was #ifdef'd out. It looks like the header is mainly used to get the SHGetFolderPathW function, so I don't think that there'll be much fallout from the switch. Suggested by Alex Crichton. Thanks! llvm-svn: 201230
* Teach tablegen() macro to check needed variablesNAKAMURA Takumi2014-02-121-0/+11
| | | | | | | | | | | This macro depends on several variables to be set in the calling context. Check them and report an error if they are not set. Without this, custom commands may be silently specified that will fail at build time. Patch by Brad King. llvm-svn: 201229
* R600: Always implement both versions of isTruncateFree and add a sanity check.Benjamin Kramer2014-02-122-5/+12
| | | | llvm-svn: 201222
* Remove special case filtering for instructions with lock prefix as they are ↵Craig Topper2014-02-122-8/+0
| | | | | | all marked with isCodeGenOnly already. llvm-svn: 201216
* Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear ↵Craig Topper2014-02-122-7/+2
| | | | | | from the disassembler table build without custom filtering code. llvm-svn: 201215
* [PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.NAKAMURA Takumi2014-02-121-0/+3
| | | | llvm-svn: 201211
* Test case I forgot to 'add' for r201126.Craig Topper2014-02-121-0/+53
| | | | llvm-svn: 201207
* Remove unneeded includeMatt Arsenault2014-02-121-1/+0
| | | | llvm-svn: 201201
* DwarfUnit: Include type unit's file strings in the defining compile unit's ↵David Blaikie2014-02-122-67/+78
| | | | | | | | | | 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
* Tweak ARM fastcc by adopting these two AAPCS rules:Evan Cheng2014-02-112-0/+47
| | | | | | | | | | | | | | * CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers * When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g. 7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various calling conventions. rdar://16039676 llvm-svn: 201193
* Reapply r201180 with an additional error path.Adrian Prantl2014-02-114-5/+180
| | | | | | | | | | | | 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-114-175/+5
| | | | | | 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-112-3/+15
| | | | | | | | | | 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
* DebugInfo: Remove dependence on file numbering in the line table.David Blaikie2014-02-112-2/+4
| | | | | | | | These tests were unnecessarily sensitive to the presence and ordering of elements in the line table file_names list which will break on a future change I'm working on. llvm-svn: 201185
* whitespaceAdrian Prantl2014-02-111-1/+1
| | | | llvm-svn: 201181
* Debug info: Emit values in subregisters that do not have a separateAdrian Prantl2014-02-114-5/+175
| | | | | | | | | | | 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
* make llvm-dwarfdump a little more resilient when parsing .debug_locAdrian Prantl2014-02-111-1/+3
| | | | | | | | sections. The call to data.getUnsigned(&Offset, AddressSize) only increments Offset if the read succeeds, which will result in an infinite loop. llvm-svn: 201179
* R600/SI: Fix assertion on infinite loops.Matt Arsenault2014-02-112-2/+21
| | | | | | | This isn't the most useful case to fix in the real world, but bugpoint runs into this. llvm-svn: 201177
* InstCombine: Teach icmp merging about the equivalence of bit tests and ↵Benjamin Kramer2014-02-112-23/+76
| | | | | | | | | UGE/ULT with a power of 2. This happens in bitfield code. While there reorganize the existing code a bit. llvm-svn: 201176
* Tidy up a bit. Formatting only.Jim Grosbach2014-02-111-8/+8
| | | | llvm-svn: 201174
* ARM: Thumb2 LDR(literal) can target SP.Jim Grosbach2014-02-112-1/+6
| | | | | | | | | Fix a slightly overzealous destination register restriction for the 'without .w' alias. Add some explicit testcases. rdar://16033140 llvm-svn: 201173
* SCEV: Cast switched values to make -Wswitch more useful.Benjamin Kramer2014-02-111-16/+16
| | | | llvm-svn: 201170
OpenPOWER on IntegriCloud