summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename argument strings of codegen passes to avoid collisions with command lineAkira Hatanaka2014-12-134-5/+5
| | | | | | | | | | | | | | | | | | | | options. This commit changes the command line arguments (PassInfo::PassArgument) of two passes, MachineFunctionPrinter and MachineScheduler, to avoid collisions with command line options that have the same argument strings. This bug manifests when the PassList construct (defined in opt.cpp) is used in a tool that links with codegen passes. To reproduce the bug, paste the following lines into llc.cpp and run llc. #include "llvm/IR/LegacyPassNameParser.h" static llvm::cl::list<const llvm::PassInfo*, bool, llvm::PassNameParser> PassList(llvm::cl::desc("Optimizations available:")); rdar://problem/19212448 llvm-svn: 224186
* Go bindings: introduce Value.ConstantAsMetadata.Peter Collingbourne2014-12-133-0/+10
| | | | llvm-svn: 224179
* Go bindings: introduce llvm.TemporaryMDNode.Peter Collingbourne2014-12-133-0/+13
| | | | llvm-svn: 224178
* Go bindings: introduce Metadata.ReplaceAllUsesWith.Peter Collingbourne2014-12-133-0/+16
| | | | llvm-svn: 224177
* Go bindings: expose the Metadata type.Peter Collingbourne2014-12-136-266/+338
| | | | | | | Also modifies SetCurrentDebugLocation to take individual arguments rather than an MDNode. llvm-svn: 224176
* Go bindings: remove contextless metadata bindings.Peter Collingbourne2014-12-131-11/+0
| | | | llvm-svn: 224175
* [PowerPC] Add a DAGToDAG peephole to remove unnecessary zero-extsHal Finkel2014-12-124-5/+342
| | | | | | | | | | | | | | | | | | | | On PPC64, we end up with lots of i32 -> i64 zero extensions, not only from all of the usual places, but also from the ABI, which specifies that values passed are zero extended. Almost all 32-bit PPC instructions in PPC64 mode are defined to do *something* to the higher-order bits, and for some instructions, that action clears those bits (thus providing a zero-extended result). This is especially common after rotate-and-mask instructions. Adding an additional instruction to zero-extend the results of these instructions is unnecessary. This PPCISelDAGToDAG peephole optimization examines these zero-extensions, and looks back through their operands to see if all instructions will implicitly zero extend their results. If so, we convert these instructions to their 64-bit variants (which is an internal change only, the actual encoding of these instructions is the same as the original 32-bit ones) and remove the unnecessary zero-extension (changing where the INSERT_SUBREG instructions are to make everything internally consistent). llvm-svn: 224169
* ValueTracking: Don't recurse too deeply in computeKnownBitsFromAssumeDavid Majnemer2014-12-122-0/+22
| | | | | | | | | Respect the MaxDepth recursion limit, doing otherwise will trigger an assert in computeKnownBits. This fixes PR21891. llvm-svn: 224168
* [ARMConstantIsland] Insert tbb/tbh optimization where previous jump table ↵Chad Rosier2014-12-122-1/+50
| | | | | | resided. llvm-svn: 224165
* Pass EC by reference to MemoryBufferMMapFile to return error code.Yaron Keren2014-12-121-1/+1
| | | | | | Patch by Kim Grasman! llvm-svn: 224159
* utils: update vim syntax highlighting for LLVM IRSaleem Abdulrasool2014-12-121-17/+16
| | | | | | | Add missing externally_initialized keyword from SVN r174340. Also reflow the text. llvm-svn: 224155
* Clean up static analyzer warnings.Michael Ilseman2014-12-1211-12/+24
| | | | | | | | | Clang's static analyzer found several potential cases of undefined behavior, use of un-initialized values, and potentially null pointer dereferences in tablegen, Support, MC, and ADT. This cleans them up with specific assertions on the assumptions of the code. llvm-svn: 224154
* [Hexagon] Adding double word add/min/minu/max/maxu instructions and tests.Colin LeMahieu2014-12-122-21/+77
| | | | llvm-svn: 224153
* Revert r224149, llvm-dsymutil was already here.Nico Weber2014-12-121-1/+0
| | | | | | | | | I saw a failure on an internal bot, opened this file, saw it was missing, thought "aha!", tried to land, got an "file is out of date", synced, didn't see the file listed right above the line I added (cause I didn't add it in the right place) and landed. Apologies! llvm-svn: 224152
* [Hexagon] Adding J class call instructions.Colin LeMahieu2014-12-123-9/+56
| | | | llvm-svn: 224150
* Add llvm-dsymutil to test/CMakeLists.txtNico Weber2014-12-121-0/+1
| | | | | | | r224134 added this and runs it from a test, but doesn't build it with test binaries. llvm-svn: 224149
* IR: Don't track nullptr on metadata RAUWDuncan P. N. Exon Smith2014-12-122-1/+49
| | | | | | | | | | | | | | | | | The RAUW support in `Metadata` supports going to `nullptr` specifically to handle values being deleted, causing `ValueAsMetadata` to be deleted. Fix the case where the reference is from a `TrackingMDRef` (as opposed to an `MDOperand` or a `MetadataAsValue`). This is surprisingly rare -- metadata tracked by `TrackingMDRef` going to null -- but it came up in an openSUSE bootstrap during inlining. The tracking ref was held by the `ValueMap` because it was referencing a local, the basic block containing the local became dead after it had been merged in, and when the local was deleted, the tracking ref asserted in an `isa`. llvm-svn: 224146
* MAP_FILE is the default. We don't need to add it.Rafael Espindola2014-12-121-3/+0
| | | | llvm-svn: 224144
* Relax debug-map-parsing.test error message check for WindowsReid Kleckner2014-12-121-4/+4
| | | | | | On Windows we get the string "no such file or directory". llvm-svn: 224141
* More code format fix from r224133, NFCSteven Wu2014-12-121-2/+1
| | | | llvm-svn: 224140
* Remove silly left over from the Windows resize_file implementation.Rafael Espindola2014-12-121-1/+0
| | | | | | | I didn't notice the problem first because on a non debug build the CRT was just exiting the process without any message. llvm-svn: 224139
* Move the resize file feature from mapped_file_region to the only user.Rafael Espindola2014-12-123-16/+11
| | | | | | This removes a duplicated stat on every file that llvm-ar looks at. llvm-svn: 224138
* Pass a FD to resise_file and add a testcase.Rafael Espindola2014-12-124-19/+18
| | | | | | I will add a real use in another commit. llvm-svn: 224136
* Remove unused feature. NFC.Rafael Espindola2014-12-123-11/+4
| | | | llvm-svn: 224135
* Initial dsymutil tool commit.Frederic Riss2014-12-1224-2/+757
| | | | | | | | | | | | | | | | | | | | | | | | The goal of this tool is to replicate Darwin's dsymutil functionality based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does not link the debug information, it leaves it in the object files in relocatable form, but embbeds a `debug map` into the executable that describes where to find the debug information and how to relocate it. When releasing/archiving a binary, dsymutil is called to link all the DWARF information into a `dsym bundle` that can distributed/stored along with the binary. With this commit, the LLVM based dsymutil is just able to parse the STABS debug maps embedded by ld64 in linked binaries (and not all of them, for example archives aren't supported yet). Note that the tool directory is called dsymutil, but the executable is currently called llvm-dsymutil. This discrepancy will disappear once the tool will be feature complete. At this point the executable will be renamed to dsymutil, but until then you do not want it to override the system one. Differential Revision: http://reviews.llvm.org/D6242 llvm-svn: 224134
* Restructure code from r224097. NFCSteven Wu2014-12-121-12/+12
| | | | llvm-svn: 224133
* [AVX512] Enabling bit logic loweringRobert Khasanov2014-12-124-0/+247
| | | | | | Added lowering tests. llvm-svn: 224132
* Now that we require a newer python, use the new exception syntax.Rafael Espindola2014-12-121-1/+1
| | | | llvm-svn: 224130
* Require python 2.7.Rafael Espindola2014-12-126-20/+18
| | | | | | | | | | | | | We were already requiring 2.5, which meant that people on old linux distros had to upgrade anyway. Requiring python 2.6 will make supporting 3.X easier as we can use the 3.X exception syntax. According to the discussion on llvmdev, there is not much value is requiring just 2.6, we may as well just require 2.7. llvm-svn: 224129
* [mips] Enable code generation for MIPS-III.Vasileios Kalintiris2014-12-124-102/+163
| | | | | | | | | | | | | | | | | | Summary: This commit enables the MIPS-III target and adds support for code generation of SELECT nodes. We have to use pseudo-instructions with custom inserters for these nodes as MIPS-III CPUs do not have conditional-move instructions. Depends on D6212 Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6464 llvm-svn: 224128
* [AVX512] Enabling MIN/MAX lowering.Robert Khasanov2014-12-126-25/+2830
| | | | | | Added lowering tests. llvm-svn: 224127
* Reapply "[MachineScheduler] Fix for PR21807: minor code difference building ↵Andrea Di Biagio2014-12-122-1/+93
| | | | | | | | | | | with/without -g." This reapplies r224118 with a fix for test 'misched-code-difference-with-debug.ll'. That test was failing on some buildbots because it was x86 specific but it was missing a target triple. Added an explicit triple to test misched-code-difference-with-debug.ll. llvm-svn: 224126
* [Reassociate] Use dbgs() instead of errs().Chad Rosier2014-12-121-2/+2
| | | | llvm-svn: 224125
* [mips] Support SELECT nodes for targets that don't have conditional-move ↵Vasileios Kalintiris2014-12-125-0/+778
| | | | | | | | | | | | | | | | | | | | | | | | instructions. Summary: For Mips targets that do not have conditional-move instructions, ie. targets before MIPS32 and MIPS-IV, we have to insert a diamond control-flow pattern in order to support SELECT nodes. In order to do that, we add pseudo-instructions with a custom inserter that emits the necessary control-flow that selects the correct value. With this patch we add complete support for code generation of Mips-II targets based on the LLVM test-suite. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6212 llvm-svn: 224124
* Disable --icf=safe to avoid a bug.Rafael Espindola2014-12-121-1/+3
| | | | | | Thanks to Sameer Sahasrabuddhe for the report! llvm-svn: 224123
* [AVX512] Minor fix in lowering pattern for broadcast intrustions.Robert Khasanov2014-12-121-6/+5
| | | | | | No functional change. llvm-svn: 224122
* Revert: [MachineScheduler] Fix for PR21807: minor code difference building ↵Andrea Di Biagio2014-12-122-93/+1
| | | | | | | | with/without -g. Test 'misched-code-difference-with-debug.ll' was failing on some buildbots. llvm-svn: 224121
* This patch recognizes (+ (+ v0, v1) (+ v2, v3)), reorders them for bundling ↵Suyog Sarda2014-12-122-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into vector of loads, and vectorizes it. Test case : float hadd(float* a) { return (a[0] + a[1]) + (a[2] + a[3]); } AArch64 assembly before patch : ldp s0, s1, [x0] ldp s2, s3, [x0, #8] fadd s0, s0, s1 fadd s1, s2, s3 fadd s0, s0, s1 ret AArch64 assembly after patch : ldp d0, d1, [x0] fadd v0.2s, v0.2s, v1.2s faddp s0, v0.2s ret Reviewed Link : http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141208/248531.html llvm-svn: 224119
* [MachineScheduler] Fix for PR21807: minor code difference building ↵Andrea Di Biagio2014-12-122-1/+93
| | | | | | | | | | | | | | | | | with/without -g. This patch fixes the issue reported as PR21807. There was a minor difference in the generated code depending on the -g flag. The cause was that with -g the machine scheduler used a different scheduling strategy. This decision was based on the number of instructions in a schedule region and included debug instructions in that count. This patch fixes the issue in MISched and provides a test. Patch by Russell Gallop! llvm-svn: 224118
* Emit Tag_ABI_FP_16bit_format build attribute.Charlie Turner2014-12-123-0/+31
| | | | | | | | | | | | | The __fp16 type is unconditionally exposed. Since -mfp16-format is not yet supported, there is not a user switch to change this behaviour. This build attribute should capture the default behaviour of the compiler, which is to expose the IEEE 754 version of __fp16. When -mfp16-format is emitted, that will be the way to control the value of this build attribute. Change-Id: I8a46641ff0fd2ef8ad0af5f482a6d1af2ac3f6b0 llvm-svn: 224115
* Silence gcc 4.9.1 warning 'xyz' is used uninitialized in this function.Yaron Keren2014-12-121-7/+7
| | | | | | | | In release builds this is actually possible as without asserts there is no testing of the actual read bytes and the variables could be partially uninitialized. llvm-svn: 224114
* Pass output stream to AsLexInput instead of the whole tool_output_file.Craig Topper2014-12-121-46/+46
| | | | llvm-svn: 224109
* Use unique_ptr to remove an explicit delete. Change return type to pass the ↵Craig Topper2014-12-121-5/+4
| | | | | | unique_ptr to caller. llvm-svn: 224108
* Use make_unique instead of reset() and 'new'Craig Topper2014-12-121-1/+2
| | | | llvm-svn: 224107
* Use range-based for loop.Craig Topper2014-12-121-2/+2
| | | | llvm-svn: 224106
* Remove unnecessary calls to unique_ptr::get.Craig Topper2014-12-121-7/+7
| | | | llvm-svn: 224105
* Remove an unnecessary reference variable that pointed to a unique_ptr ↵Craig Topper2014-12-121-6/+5
| | | | | | variable. Just use the unique_ptr variable directly. llvm-svn: 224104
* Use unique_ptr operator= instead of constructor to make it explicit that ↵Craig Topper2014-12-121-2/+2
| | | | | | there's no conversion occurring. llvm-svn: 224103
* A fix for PR21176. Ekaterina Romanova2014-12-122-0/+89
| | | | | | | | | | | DW_OP_const <const> doesn't describe a constant value, but a value at a constant address. The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value. Added DW_OP_stack_value to the stack. Marked incorrect-variable-debugloc1.ll to xfail for PowerPC64, while the the failure (PR21881) is being investigated. llvm-svn: 224098
* Fix another infinite loop in InstCombineSteven Wu2014-12-122-9/+24
| | | | | | | | | | | | | | | Summary: InstCombine infinite-loops for the testcase added It is because InstCombine is generating instructions that can be optimized by itself. Fix by not optimizing frem if the optimized type is the same as original type. rdar://problem/19150820 Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D6634 llvm-svn: 224097
OpenPOWER on IntegriCloud