summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-pdbdump] Add support for printing source files and compilands.Zachary Turner2015-01-283-5/+149
| | | | | | | | | | | | | This adds two command line options to llvm-pdbdump. --source-files prints a flat list of all source files in the PDB. --compilands prints a list of all compilands (e.g. object files) that the PDB knows about, and for each one, a list of source files that the compiland is composed of as well as a hash of the original source file. llvm-svn: 227276
* [llvm-pdbdump] Print more friendly names for enum values.Zachary Turner2015-01-281-131/+131
| | | | llvm-svn: 227275
* Revert r227242 - Merge vector stores into wider vector stores (PR21711).Quentin Colombet2015-01-272-112/+30
| | | | | | | This commit creates infinite loop in DAG combine for in the LLVM test-suite for aarch64 with mcpu=cylcone (just having neon may be enough to expose this). llvm-svn: 227272
* [mips] Use __clear_cache builtin instead of cacheflush()Petar Jovanovic2015-01-271-13/+2
| | | | | | | | | Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache(). Differential Revision: http://reviews.llvm.org/D7198 llvm-svn: 227269
* Run dos2unix against llvm-pdbdump.Zachary Turner2015-01-276-1612/+1612
| | | | llvm-svn: 227262
* SymbolRewriter: allow rewriting with comdatsSaleem Abdulrasool2015-01-273-0/+73
| | | | | | | | | COMDATs must be identically named to the symbol. When support for COMDATs was introduced, the symbol rewriter was not updated, resulting in rewriting failing for symbols which were placed into COMDATs. This corrects the behaviour and adds test cases for this. llvm-svn: 227261
* SymbolRewriter: prevent unnecessary rewriteSaleem Abdulrasool2015-01-271-0/+3
| | | | | | | The rewrite for the pattern based rewrite is unnecessary if the existing name matches the pattern. llvm-svn: 227260
* Add support for dumping debug tables to llvm-pdbdump.Zachary Turner2015-01-278-22/+1678
| | | | | | | | | | | | | PDB stores some of its data in streams and some in tables. This patch teaches llvm-pdbdump to dump basic summary data for the debug tables. In support of this, this patch also adds some DIA helper classes, such as a wrapper around an IDiaSymbol interface, as well as helpers for outputting various enumerations to a raw_ostream. llvm-svn: 227257
* remove function names from comments; NFCSanjay Patel2015-01-271-8/+6
| | | | llvm-svn: 227256
* Re-landing changes to use ArrayRef instead of SmallVectorImpl, and new API test.Chris Bieneman2015-01-273-6/+31
| | | | | | This contains the changes from r227148 & r227154, and also fixes to the test case to properly clean up the stack options. llvm-svn: 227255
* [fuzzer] properly enable asan's coverage feedbackKostya Serebryany2015-01-271-1/+4
| | | | llvm-svn: 227254
* fix typos; NFCSanjay Patel2015-01-271-4/+4
| | | | llvm-svn: 227253
* Add a Fuzzer libraryKostya Serebryany2015-01-2717-0/+799
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A simple genetic in-process coverage-guided fuzz testing library. I've used this fuzzer to test clang-format (it found 12+ bugs, thanks djasper@ for the fixes!) and it may also help us test other parts of LLVM. So why not keep it in the LLVM repository? I plan to add the cmake build rules later (in a separate patch, if that's ok) and also add a clang-format-fuzzer target. See README.txt for details. Test Plan: Tests will follow separately. Reviewers: djasper, chandlerc, rnk Reviewed By: rnk Subscribers: majnemer, ygribov, dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D7184 llvm-svn: 227252
* [SimplifyLibCalls] Don't confuse strcpy_chk for stpcpy_chk.Ahmed Bougacha2015-01-278-133/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced in a faulty refactoring (r225640, mea culpa): the tests weren't testing the return values, so, for both __strcpy_chk and __stpcpy_chk, we would return the end of the buffer (matching stpcpy) instead of the beginning (for strcpy). The root cause was the prefix "__" being ignored when comparing, which made us always pick LibFunc::stpcpy_chk. Pass the LibFunc::Func directly to avoid this kind of error. Also, make the testcases as explicit as possible to prevent this. The now-useful testcases expose another, entangled, stpcpy problem, with the further simplification. This was introduced in a refactoring (r225640) to match the original behavior. However, this leads to problems when successive simplifications generate several similar instructions, none of which are removed by the custom replaceAllUsesWith. For instance, InstCombine (the main user) doesn't erase the instruction in its custom RAUW. When trying to simplify say __stpcpy_chk: - first, an stpcpy is created (fortified simplifier), - second, a memcpy is created (normal simplifier), but the stpcpy call isn't removed. - third, InstCombine later revisits the instructions, and simplifies the first stpcpy to a memcpy. We now have two memcpys. llvm-svn: 227250
* Teach IRCE to look at branch weights when recognizing range checksSanjoy Das2015-01-276-17/+72
| | | | | | | | | | | Splitting a loop to make range checks redundant is profitable only if the range check "never" fails. Make this fact a part of recognizing a range check -- a branch is a range check only if it is expected to pass (via branch_weights metadata). Differential Revision: http://reviews.llvm.org/D7192 llvm-svn: 227249
* Revert "[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector"Alexey Samsonov2015-01-275-68/+9
| | | | | | This reverts commits r226953 and r226974. llvm-svn: 227248
* [ExecutionEngine] Fix r227228 tests on WindowsKeno Fischer2015-01-271-0/+1
| | | | | | | On Windows, we're running MCJIT with ELF, so the module needs to have its Triple explicitly adjusted. llvm-svn: 227247
* dd the option, -link-opt-hints to llvm-objdump used with -macho to print theKevin Enderby2015-01-277-4/+107
| | | | | | Mach-O AArch64 linker optimization hints for ADRP code optimization. llvm-svn: 227246
* Merge vector stores into wider vector stores (PR21711)Sanjay Patel2015-01-272-30/+112
| | | | | | | | | | | | | | | | | | | | This patch resolves part of PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ). The 'f3' test case in that report presents a situation where we have two 128-bit stores extracted from a 256-bit source vector. Instead of producing this: vmovaps %xmm0, (%rdi) vextractf128 $1, %ymm0, 16(%rdi) This patch merges the 128-bit stores into a single 256-bit store: vmovups %ymm0, (%rdi) Differential Revision: http://reviews.llvm.org/D7208 llvm-svn: 227242
* Add llvm-pdbdump to tools.Zachary Turner2015-01-276-1/+495
| | | | | | | | | | | | | | | | | llvm-pdbdump is a tool which can be used to dump the contents of Microsoft-generated PDB files. It makes use of the Microsoft DIA SDK, which is a COM based library designed specifically for this purpose. The initial commit of this tool dumps the raw bytes from PDB data streams. Future commits will dump more semantic information such as types, symbols, source files, etc similar to the types of information accessible via llvm-dwarfdump. Reviewed by: Aaron Ballman, Reid Kleckner, Chandler Carruth Differential Revision: http://reviews.llvm.org/D7153 llvm-svn: 227241
* tsan: properly instrument unaligned accessesDmitry Vyukov2015-01-272-1/+165
| | | | | | | | | | | If a memory access is unaligned, emit __tsan_unaligned_read/write callbacks instead of __tsan_read/write. Required to change semantics of __tsan_unaligned_read/write to not do the user memory. But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine. Fixes long standing issue 17: https://code.google.com/p/thread-sanitizer/issues/detail?id=17 llvm-svn: 227231
* overloaded-intrinsic-name: exercise anyptr on structRamkumar Ramachandra2015-01-271-0/+10
| | | | | | | | | No other test I know shows how struct names are mangled in overloaded intrinsic functions. Differential Revision: http://reviews.llvm.org/D7037 llvm-svn: 227229
* [ExecutionEngine] Add weak symbol support to RuntimeDyldKeno Fischer2015-01-277-2/+93
| | | | | | | | | | | Support weak symbols by first looking up if there is an externally visible symbol we can find, and only if that fails using the one in the object file we're loading. Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6950 llvm-svn: 227228
* [ExecutionEngine] FindFunctionNamed: Skip declarationsKeno Fischer2015-01-273-2/+23
| | | | | | | | | | | | | | | | Summary: Basically all other methods that look up functions by name skip them if they are mere declarations. Do the same in FindFunctionNamed. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7068 llvm-svn: 227227
* [mips] Add range checks and transformation to octeon instructions in AsmParser.Kai Nacke2015-01-272-0/+90
| | | | | | | | | | | | | | | | | This patch adds range checks to the immediate operands of octeon instructions in the AsmParser. Like gas, it applies the following transformations if the immediate is to large: bbit0 $8, 42, foo => bbit032 $8, 10, foo bbit1 $8, 46, foo => bbit132 $8, 14, foo cins $8, $31, 32, 31 => cins32 $8, $31, 0, 31 exts $7, $4, 54, 9 => exts32 $7, $4, 22, 9 Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D7080 llvm-svn: 227225
* Add cmake flag LLVM_USE_SANITIZE_COVERAGEKostya Serebryany2015-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: When LLVM_USE_SANITIZE_COVERAGE=YES and one of the sanitizers is used -fsanitize-coverage=3 will be added to build flag. This will be used to run a coverage-guided fuzzer on various llvm libraries. Test Plan: n/a Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7116 llvm-svn: 227216
* R600/SI: Enable all tests that pass on VI without changesMarek Olsak2015-01-27206-0/+221
| | | | llvm-svn: 227214
* R600/SI: Fix MIN3/MAX3 on VI, define MED3Marek Olsak2015-01-271-9/+16
| | | | llvm-svn: 227213
* R600/SI: Don't set patterns for chip-specific instructions while having pseudosMarek Olsak2015-01-271-50/+43
| | | | | | | | | | | Only pseudos have patterns on them. Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty asm. This matches what all other multiclasses do. llvm-svn: 227212
* R600/SI: Add VI versions of LDS atomicsMarek Olsak2015-01-273-120/+139
| | | | | | | Each class is split into two: one adds let statements around non-pseudos, and the other one specifies the parameters. llvm-svn: 227211
* R600/SI: Add VI versions of MUBUF atomicsMarek Olsak2015-01-272-73/+80
| | | | llvm-svn: 227210
* R600/SI: Add VI versions of MUBUF loads and storesMarek Olsak2015-01-273-131/+39
| | | | | | This enables a lot of existing patterns for VI. llvm-svn: 227209
* R600/SI: Add pseudos for MUBUF loads and storesMarek Olsak2015-01-271-103/+125
| | | | | | | | | This defines the SI versions only, so it shouldn't change anything. There are no changes other than using the new multiclasses, adding missing mayLoad/mayStore, and formatting fixes. llvm-svn: 227208
* [InstCombine] Teach how to fold a select into a cttz/ctlz with the ↵Andrea Di Biagio2015-01-273-2/+367
| | | | | | | | | | | 'is_zero_undef' flag. This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared. Added test InstCombine/select-cmp-cttz-ctlz.ll. llvm-svn: 227197
* [sancov] Fix unspecified constructor order between sancov and asan.Evgeniy Stepanov2015-01-272-1/+5
| | | | | | | Sanitizer coverage constructor must run after asan constructor (for each DSO). Bump constructor priority to guarantee that. llvm-svn: 227195
* Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.Manuel Jacob2015-01-271-0/+3
| | | | | | | | | When lowering memcpy, memset or memmove, this assert checks whether the pointer operands are in an address space < 256 which means "user defined address space" on X86. However, this notion of "user defined address space" does not exist for other targets. llvm-svn: 227191
* Replace some uses of getSubtargetImpl with the cached versionEric Christopher2015-01-275-9/+8
| | | | | | | off of the MachineFunction or with the version that takes a Function reference as an argument. llvm-svn: 227185
* [PM] Clean up file banner comments prior to refactoring this code.Chandler Carruth2015-01-271-12/+12
| | | | llvm-svn: 227182
* Have the PBQP register allocator use the subtarget on the MachineFunction.Eric Christopher2015-01-271-8/+5
| | | | | | (and remove an extraneous private). llvm-svn: 227181
* Remove some extraneous includes.Eric Christopher2015-01-272-3/+0
| | | | llvm-svn: 227180
* Fix build failure with pointer vs reference.Eric Christopher2015-01-271-1/+1
| | | | | NB: Saving files after editing helps. llvm-svn: 227178
* Update a few calls to getSubtarget<> to either be getSubtargetImplEric Christopher2015-01-275-18/+16
| | | | | | | when we didn't need the cast to the base class or the cached version off of the subtarget. llvm-svn: 227176
* Clean up the AArch64 store pair suppression pass initializationEric Christopher2015-01-271-11/+7
| | | | | | and remove and unnecessary class variable. llvm-svn: 227175
* The subtarget is cached on the MachineFunction. Access it directly.Eric Christopher2015-01-278-30/+18
| | | | llvm-svn: 227173
* Migrate SeparateConstOffsetFromGEP to use a Function withEric Christopher2015-01-271-1/+1
| | | | | | getSubtarget. llvm-svn: 227172
* LoopRotate: Don't walk the uses of a ConstantDavid Majnemer2015-01-272-11/+32
| | | | | | | | | | LoopRotate wanted to avoid live range interference by looking at the uses of a Value in the loop latch and seeing if any lied outside of the loop. We would wrongly perform this operation on Constants. This fixes PR22337. llvm-svn: 227171
* Remove unused include.Eric Christopher2015-01-271-1/+0
| | | | llvm-svn: 227170
* Revert r227148 & r227154 which added a test which infinitely loops.Richard Trieu2015-01-273-28/+3
| | | | | | | | | | | | r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly outputs two following lines: -tool: CommandLine Error: Option 'test-option-1' registered more than once! -tool: CommandLine Error: Option 'test-option-2' registered more than once! r227154 depends on changes from r227148 llvm-svn: 227167
* [PM] Run clang-format over this header to clean up the very few)Chandler Carruth2015-01-271-20/+16
| | | | | | | | divergent formatting issues. This should prevent any format-only diffs from sneaking into subsequent changes to port TTI to the new pass manager. llvm-svn: 227165
* [PM] Switch a doxygen comment to the standard format. NFCChandler Carruth2015-01-271-2/+2
| | | | llvm-svn: 227164
OpenPOWER on IntegriCloud