summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix list of deprecated C API attribute functionsAmaury Sechet2016-06-141-2/+2
| | | | llvm-svn: 272727
* Revert "Enable libFuzzer's afl_driver to append stderr to a file."Vitaly Buka2016-06-144-56/+0
| | | | | | | | | Crashes with AddressSanitizer: SEGV on unknown address http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/9924/steps/annotate/logs/stdio This reverts commit r272706. llvm-svn: 272726
* Rename AttributeSetImpl::NumAttrs and AttributeSetImpl::getNumAttributes to ↵Amaury Sechet2016-06-142-28/+30
| | | | | | | | | | | | reflect that they work on slots rather than attributes. NFC Summary: The current naming not only doesn't convey the meaning of what this does, but worse, it convey the wrong meaning. This was a major source of confusion understanding the code, so I'm applying the boy scout rule here and making it better after I leave. Reviewers: void, bkramer, whitequark Differential Revision: http://reviews.llvm.org/D21264 llvm-svn: 272725
* [PM] Port WholeProgramDevirt to the new pass manager.Davide Italiano2016-06-145-0/+16
| | | | llvm-svn: 272721
* [LV] Enable vectorization of loops where the IV has an external useMichael Kuperstein2016-06-143-58/+164
| | | | | | | | | | | Vectorizing loops with "escaping" IVs has been disabled since r190790, due to PR17179. This re-enables it, with support for external use of both "post-increment" (last iteration) and "pre-increment" (second-to-last iteration) IVs. Differential Revision: http://reviews.llvm.org/D21048 llvm-svn: 272715
* [x86] add current codegen tests for PR27924Sanjay Patel2016-06-141-0/+51
| | | | llvm-svn: 272714
* Add a missing test.Evgeniy Stepanov2016-06-141-0/+153
| | | | | | This is a test for r272421: Disable MSan-hostile loop unswitching. llvm-svn: 272713
* [MemorySSA] Set CFGOnly correctly for MemorySSAWrapperPassGeoff Berry2016-06-141-2/+3
| | | | | | | | Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D21344 llvm-svn: 272712
* IR: Introduce local_unnamed_addr attribute.Peter Collingbourne2016-06-1455-295/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing unnamed_addr attribute in that it only describes a local property of the module rather than a global property of the symbol. This attribute is intended to be used by the code generator and LTO to allow the linker to decide whether the global needs to be in the symbol table. It is possible to exclude a global from the symbol table if three things are true: - This attribute is present on every instance of the global (which means that the normal rule that the global must have a unique address can be broken without being observable by the program by performing comparisons against the global's address) - The global has linkonce_odr linkage (which means that each linkage unit must have its own copy of the global if it requires one, and the copy in each linkage unit must be the same) - It is a constant or a function (which means that the program cannot observe that the unique-address rule has been broken by writing to the global) Although this attribute could in principle be computed from the module contents, LTO clients (i.e. linkers) will normally need to be able to compute this property as part of symbol resolution, and it would be inefficient to materialize every module just to compute it. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html for earlier discussion. Part of the fix for PR27553. Differential Revision: http://reviews.llvm.org/D20348 llvm-svn: 272709
* Resubmit "[pdb] Actually write a PDB to disk from YAML.""Zachary Turner2016-06-149-76/+166
| | | | | | | Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21220 llvm-svn: 272708
* Enable libFuzzer's afl_driver to append stderr to a file.Vitaly Buka2016-06-144-0/+56
| | | | | | | | | | | | | | | | | | | Summary: [libFuzzer] Enable afl_driver to append stderr to a user specified file. Append stderr of afl_driver to the file specified by the environmental variable AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs on crashes without rerunning crashing test cases (which won't work for crashes that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz and users would have no way of seeing it. Reviewers: llvm-commits, aizatsky, kcc, vitalybuka Subscribers: vitalybuka Differential Revision: http://reviews.llvm.org/D21194 llvm-svn: 272706
* AMDGPU/SI: Refactor fixup handling for constant addrspace variablesTom Stellard2016-06-1413-47/+76
| | | | | | | | | | | | | | | | | | | | | | Summary: We now use a standard fixup type applying the pc-relative address of constant address space variables, and we have the GlobalAddress lowering code add the required 4 byte offset to the global address rather than doing it as part of the fixup. This refactoring will make it easier to use the same code for global address space variables and also simplifies the code. Re-commit this after fixing a bug where we were trying to use a reference to a Triple object that had already been destroyed. Reviewers: arsenm, kzhuravl Subscribers: arsenm, kzhuravl, llvm-commits Differential Revision: http://reviews.llvm.org/D21154 llvm-svn: 272705
* Make sure attribute kind and attributes are named respectively Kind and Attr ↵Amaury Sechet2016-06-147-99/+89
| | | | | | consistently. Historically they used to be the same the terminology is very confused in the codebase. NFC. llvm-svn: 272704
* [ValueTracking] Calls to @llvm.assume always returnSanjoy Das2016-06-142-2/+20
| | | | | | | | | | | | This change teaches llvm::isGuaranteedToTransferExecutionToSuccessor that calls to @llvm.assume always terminate. Most other relevant intrinsics should be covered by the "CS.onlyReadsMemory() || CS.onlyAccessesArgMemory()" bit but we were missing @llvm.assumes because we state that it clobbers memory. Added an LICM test case, but this change is not specific to LICM. llvm-svn: 272703
* [TailDuplication] Split up NumInstrDups statistic.Geoff Berry2016-06-141-3/+6
| | | | | | | | | | | | Summary: Split NumInstrDups statistic into separate added/removed counts to avoid negative stat being printed as unsigned. Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D21335 llvm-svn: 272700
* [LibFuzzer] Disable the ``fuzzer-trace-pc.test`` test on non-linux platforms.Dan Liew2016-06-141-0/+4
| | | | | | | | | | | | On OSX this test sometimes fails due to the ``LLVMFuzzer-FullCoverageSetTest-TracePC`` program going over the default 2GiB memory limit. This shouldn't be happening and needs investigating. For now just disable the test so we can set up an OSX buildbot. Differential Revision: http://reviews.llvm.org/D21319 llvm-svn: 272696
* [X86] Reduce the width of multiplification when its operands are extended ↵Wei Mi2016-06-143-3/+1074
| | | | | | | | | | | | | | | | from i8 or i16 For <N x i32> type mul, pmuludq will be used for targets without SSE41, which often introduces many extra pack and unpack instructions in vectorized loop body because pmuludq generates <N/2 x i64> type value. However when the operands of <N x i32> mul are extended from smaller size values like i8 and i16, the type of mul may be shrunk to use pmullw + pmulhw/pmulhuw instead of pmuludq, which generates better code. For targets with SSE41, pmulld is supported so no shrinking is needed. Differential Revision: http://reviews.llvm.org/D20931 llvm-svn: 272694
* Revert "[pdb] Actually write a PDB to disk from YAML."Zachary Turner2016-06-149-166/+76
| | | | | | | | | This reverts commit 879139e1c6577b09df52de56a6bab856a19ed185. This was committed accidentally when I blindly typed git svn dcommit instead of the command to generate a patch. llvm-svn: 272693
* [pdb] Actually write a PDB to disk from YAML.Zachary Turner2016-06-149-76/+166
| | | | llvm-svn: 272692
* [CFLAA] Tag arguments as escaped instead of unknown.George Burgess IV2016-06-145-314/+290
| | | | | | | | | | | | | | | | | | | This patch also includes some refactoring. Prior to this patch, we tagged all CFLAA attributes as unknown. This is suboptimal, since it meant that any Value used as an argument would be considered to alias any other Value that existed. Now that we have the machinery to tag sets below the set for an arbitrary value with attributes, it's okay to be less conservative with arguments. (Specifically, we still tag the set under an argument with unknown). Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21262 llvm-svn: 272690
* [CFLAA] Refactor graph-building code. NFC.George Burgess IV2016-06-141-170/+160
| | | | | | | | | | | This patch refactors CFLAA's graph building code. This makes keeping track of common state (TargetLibraryInfo, ...) easier. Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21261 llvm-svn: 272688
* [docs] Update AMDGPU relocation informationKonstantin Zhuravlyov2016-06-141-13/+14
| | | | | | | | | | | | | | | | | - Added new notation for specifying relocation calculation - Renamed: - R_AMDGPU_32_LOW -> R_AMDGPU_ABS32_LO - R_AMDGPU_32_HIGH -> R_AMDGPU_ABS32_HI - R_AMDGPU_64 -> R_AMDGPU_ABS64 - Added: - R_AMDGPU_REL32 - R_AMDGPU_REL64 - R_AMDGPU_ABS32 - Updated calculations for relative relocations Differential Revision: http://reviews.llvm.org/D21215 llvm-svn: 272684
* [FileCheck] Document --check-prefixes.Daniel Sanders2016-06-141-0/+5
| | | | llvm-svn: 272683
* Fix some typos in the Kaleidoscope tutorial (PR28120)Hans Wennborg2016-06-143-15/+15
| | | | llvm-svn: 272681
* Revert "AMDGPU/SI: Refactor fixup handling for constant addrspace variables"Tom Stellard2016-06-1413-73/+50
| | | | | | This reverts commit r272675. llvm-svn: 272677
* AMDGPU/SI: Refactor fixup handling for constant addrspace variablesTom Stellard2016-06-1413-50/+73
| | | | | | | | | | | | | | | | | | | Summary: We now use a standard fixup type applying the pc-relative address of constant address space variables, and we have the GlobalAddress lowering code add the required 4 byte offset to the global address rather than doing it as part of the fixup. This refactoring will make it easier to use the same code for global address space variables and also simplifies the code. Reviewers: arsenm, kzhuravl Subscribers: arsenm, kzhuravl, llvm-commits Differential Revision: http://reviews.llvm.org/D21154 llvm-svn: 272675
* Fix BSS global handling in AsmPrinterNirav Dave2016-06-142-35/+51
| | | | | | | | | | | | | | | | Change EmitGlobalVariable to check final assembler section is in BSS before using .lcomm/.comm directive. This prevents globals from being put into .bss erroneously when -data-sections is used. This fixes PR26570. Reviewers: echristo, rafael Subscribers: llvm-commits, mehdi_amini Differential Revision: http://reviews.llvm.org/D21146 llvm-svn: 272674
* [AMDGPU][llvm-mc] Predefined symbols to access -mcpu from the assembly ↵Artem Tamazov2016-06-142-2/+63
| | | | | | | | | | | | source (.option.machine_version...) The feature allows for conditional assembly etc. TODO: make those symbols read-only. Test added. Differential Revision: http://reviews.llvm.org/D21238 llvm-svn: 272673
* LoopRotate: restructure code to simplify functionsSebastian Pop2016-06-142-43/+59
| | | | | | | | | | | | We move the loop rotate functions in a separate class to avoid passing multiple parameters to each function. This cleanup will help with further development of loop rotation. NFC. Patch written by Aditya Kumar and Sebastian Pop. Differential Revision: http://reviews.llvm.org/D21311 llvm-svn: 272672
* [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix ↵Daniel Sanders2016-06-145-0/+12
| | | | | | | | | | | | | | | | | options. Summary: This new alias takes a comma separated list of prefixes which allows '--check-prefix=A --check-prefix=B --check-prefix=C' to be written as '--check-prefixes=A,B,C'. Reviewers: probinson Subscribers: probinson, llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D21293 llvm-svn: 272670
* [mips] Optimize stack pointer adjustments.Simon Dardis2016-06-146-24/+49
| | | | | | | | | | | | | | | | | | | | | Instead of always using addu to adjust the stack pointer when the size out is of the range of an addiu instruction, use subu so that a smaller constant can be generated. This can give savings of ~3 instructions whenever a function has a a stack frame whose size is out of range of an addiu instruction. This change may break some naive stack unwinders. Partially resolves PR/26291. Thanks to David Chisnall for reporting the issue. Reviewers: dsanders, vkalintiris Differential Review: http://reviews.llvm.org/D21321 llvm-svn: 272666
* [Thumb] Fix off-by-one error in r272007James Molloy2016-06-143-6/+14
| | | | | | | | We can only generate immediates up to #510 with a MOV+ADD, not #511, because there's no such instruction as add #256. Found by Oliver Stannard and csmith! llvm-svn: 272665
* AMDGPU: mark {exp,log}10{,f,l} library functions as unavailableNicolai Haehnle2016-06-141-0/+6
| | | | | | | | | | | | | | | | | | Summary: The SimplifyLibCalls part of InstCombine generates calls to those otherwise. I wonder if at some point we shouldn't just call disableAllFunctions() and then enable functions on a whitelist basis... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96495 Reviewers: arsenm, tstellarAMD Subscribers: llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21282 llvm-svn: 272664
* [MergedLoadStoreMotion] Before quering AA verify the loads are the same.Chad Rosier2016-06-141-1/+1
| | | | | | | Basicaa stats show the number of queries in Spec2k6 are reduced by 4540 or ~.67% overall. llvm-svn: 272661
* Add a Musl environment to the triple.Rafael Espindola2016-06-143-0/+9
| | | | | | | | It will be used in clang. Patch by Lei Zhang. llvm-svn: 272660
* [mips][atomics] Fix atomic instruction descriptions and uses.Simon Dardis2016-06-149-32/+127
| | | | | | | | | | | | | | PR27458 highlights that the MIPS backend does not have well formed MIR for atomic operations (among other errors). This patch adds expands and corrects the LL/SC descriptions and uses for MIPS(64). Reviewers: dsanders, vkalintiris Differential Review: http://reviews.llvm.org/D19719 llvm-svn: 272655
* [mips][ias] Implement one N32 case (of two) for .cpsetup.Daniel Sanders2016-06-142-56/+43
| | | | | | | | | | | | | | | | | | | | | | This patch implements the N32 case where -mno-shared is in effect. The case where -mshared is in effect will be added later since doing that now requires additional changes to how we handle %hi(%neg(%gp_rel(foo))) expressions to emit the three relocations as three relocations (currently only one of the three would be emitted) which then requires further changes to our MCFixup handling. While we could fix both cases together, fixing the -mno-shared case allows us to fix the ELFCLASS bug (where N32 incorrectly uses ELFCLASS64 instead of ELFCLASS32) in a way that allows cpsetup.s to check for a correct output instead of another incorrect output. Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D21131 llvm-svn: 272652
* [X86][SSE4A] Added patterns for nontemporal stores of scalar float/doubles ↵Simon Pilgrim2016-06-142-15/+56
| | | | | | using MOVNTSD/MOVNTSS llvm-svn: 272651
* [LoopVer] Remove an assert that's redundant now. NFCAdam Nemet2016-06-141-4/+1
| | | | | | | | Ensuring that the PHI are all single-operand is not performed in the second pass added by the previous pass. This removes the assert from the first pass. llvm-svn: 272650
* [LoopVer] Update all existing PHIs in the exit blockAdam Nemet2016-06-142-6/+80
| | | | | | | | | | | | | | | | | | | | | | We only used to add the edge from the cloned loop to PHIs that corresponded to values defined by the loop. We need to do this for all PHIs obviously since we need a PHI operand for each incoming edge. This includes things like PHIs with a constant value or with values defined before the original loop (see the testcases). After the patch the PHIs are added to the exit block in two passes. In the first pass we ensure there is a single-operand (LCSSA) PHI for each value defined by the loop. In the second pass we loop through each (single-operand) PHI and add the value for the edge from the cloned loop. If the value is defined in the loop we'll use the cloned instruction from the cloned loop. Fixes PR28037 llvm-svn: 272649
* [mips] MIPS32/64 itinerariesSimon Dardis2016-06-149-137/+312
| | | | | | | | | | | Itineraries for some pre MIPSR6 and EVA instructions. Some pseudo expanded instructions are marked as having no scheduling info. Reviewers: dsanders, vkalintiris Differential Review: http://reviews.llvm.org/D20418 llvm-svn: 272648
* [mips][dsp] Fix use without def on DSPCtrl registers read by rddsp intrinsic.Daniel Sanders2016-06-142-2/+4
| | | | | | | | | | Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21063 llvm-svn: 272647
* [mips][msa] copyPhysReg() should not set RegState::Define on result of CTCMSA.Daniel Sanders2016-06-142-4/+7
| | | | | | | | | | | | | | Summary: The machine verifier reports 'Explicit operand marked as def' when it is manually specified even though it agrees with the operand info. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21065 llvm-svn: 272646
* [SelectionDAG] Remove exit-on-error flag from test (PR27765)Diana Picus2016-06-143-3/+20
| | | | | | | | | | | | | | | | The exit-on-error flag in the ARM test is necessary in order to avoid an unreachable in the DAGTypeLegalizer, when trying to expand a physical register. We can also avoid this situation by introducing a bitcast early on, where the invalid scalar-to-vector conversion is detected. We also add a test for PowerPC, which goes through a similar code path in the SelectionDAGBuilder. Fixes PR27765. Differential Revision: http://reviews.llvm.org/D21061 llvm-svn: 272644
* re-generate the tests using the update_llc_test_checks.py script Igor Breger2016-06-148-684/+1137
| | | | llvm-svn: 272643
* [PM] Port Mem2Reg to the new pass manager.Davide Italiano2016-06-147-52/+100
| | | | llvm-svn: 272630
* [AVX512] Use AND32ri8 instead of AND32ri when anding with 1 to create single ↵Craig Topper2016-06-141-9/+9
| | | | | | bit masks. This results in a smaller encoding. llvm-svn: 272627
* [AVX512] Use MOVZX32 instead of MOVZ16 for loading single v8/v4/v2/v1 masks ↵Craig Topper2016-06-145-16/+16
| | | | | | when KMOVB is not available. This has better behavior with respect to partial register stalls since it won't need to preserve the upper 16-bits of the GPR. llvm-svn: 272626
* [AVX512] Add patterns for zero-extending a mask that use the def of ↵Craig Topper2016-06-143-7/+6
| | | | | | KMOVW/KMOVB without going through an EXTRACT_SUBREG and a MOVZX. llvm-svn: 272625
* [AVX512] Add tests for zero extending masks that show an unnecessary movzx ↵Craig Topper2016-06-141-26/+778
| | | | | | instruction. A followup patch will remove that instruction, but adding the tests first to make the more obvious. llvm-svn: 272624
OpenPOWER on IntegriCloud