summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-02-217-250/+485
| | | | | | other minor fixes (NFC). llvm-svn: 325659
* revert r325515: [TTI CostModel] change default cost of FP ops to 1 (PR36280)Sanjay Patel2018-02-2111-297/+355
| | | | | | | | There are too many perf regressions resulting from this, so we need to investigate (and add tests for) targets like ARM and AArch64 before trying to reinstate. llvm-svn: 325658
* [lit] Fix a problem with spaces in the python path by adding quotes around itAaron Smith2018-02-213-3/+3
| | | | | | These are the last tests left to fix after D43265. llvm-svn: 325657
* [WebAssembly] Use stable sort when sorting ctore functionsSam Clegg2018-02-211-4/+4
| | | | | | Patch by Nicholas Wilson! llvm-svn: 325656
* [X86] Disable CLWB in Cannon LakeCraig Topper2018-02-212-3/+4
| | | | | | | | | | | Cannon Lake does not support CLWB, therefore it does not include all features listed under SKX. Patch by Gabor Buella Differential Revision: https://reviews.llvm.org/D43459 llvm-svn: 325655
* [X86] Disable CLWB for Cannon LakeCraig Topper2018-02-212-1/+14
| | | | | | | | | | | | | Cannon Lake does not support CLWB, therefore it does not include all features listed under SKX anymore. Instead, enumerate all SKX features with the exception of CLWB. Patch by Gabor Buella Differential Revision: https://reviews.llvm.org/D43380 llvm-svn: 325654
* [mips] Spectre variant two mitigation for MIPSR2Simon Dardis2018-02-2122-38/+1412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides mitigation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It implements the LLVM part of -mindirect-jump=hazard. It is _not_ enabled by default for the P5600. The migitation strategy suggested by MIPS for these processors is to use hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are used with the attribute +use-indirect-jump-hazard when branching indirectly and for indirect function calls. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. Performance benchmarking of this option with -fpic and lld using -z hazardplt shows a difference of overall 10%~ time increase for the LLVM testsuite. Certain benchmarks such as methcall show a substantially larger increase in time due to their nature. Reviewers: atanasyan, zoran.jovanovic Differential Revision: https://reviews.llvm.org/D43486 llvm-svn: 325653
* [lit] Update how clang and other binaries are found in per-configuration ↵Aaron Smith2018-02-213-11/+34
| | | | | | | | | | | | | | | | | | | | | | | directories Summary: This is modeled after the clang and llvm lit tests. Several properties have CMAKE_CFG_INTDIR as part of the path - this works correctly when the cmake generator only supports one configuration which is known at configuration time, but it does not work correctly when the cmake generator supports multiple configurations (for example, VS). For VS, CMAKE_CFG_INTDIR ends up set as $Configuration and then it is never updated correctly. Instead, the lit configuration can use a property that can be overwritten at run time. AddLLVM does that for several properties (such as LLVM_TOOLS_DIR). This change is also removing properties from the lit/CMakeLists.txt that are actually set during the call to configure_lit_site_cfg Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: llvm-commits, labath, stella.stamenova, mgorny, hintonda Differential Revision: https://reviews.llvm.org/D43096 llvm-svn: 325652
* [mips] Spectre variant two mitigation for MIPSR2Simon Dardis2018-02-217-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides mitigation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It provides the option -mindirect-jump=hazard, which instructs the LLVM backend to replace indirect branches with their hazard barrier variants. This option is accepted when targeting MIPS revision two or later. The migitation strategy suggested by MIPS for these processors is to use two hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are used with the option -mindirect-jump=hazard when branching indirectly and for indirect function calls. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. Implementation note: I've opted to provide this as an -mindirect-jump={hazard,...} style option in case alternative mitigation methods are required for other implementations of the MIPS ISA in future, e.g. retpoline style solutions. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D43487 llvm-svn: 325651
* [lit] Fix a problem with spaces in the python path by adding quotes around itAaron Smith2018-02-212-2/+2
| | | | | | | | | | | | | | | | Summary: This fixes two failing tests on Windows with an installed version of python that has spaces in the path. * elf/lto/cache.ll * mach-o/dependency_info.yaml Reviewers: zturner, llvm-commits, stella.stamenova Subscribers: emaste, arichardson Differential Revision: https://reviews.llvm.org/D43265 llvm-svn: 325650
* [InstCombine] C / -X --> -C / XSanjay Patel2018-02-212-12/+19
| | | | | | | | | We already do this in DAGCombiner, but it should also be good to eliminate the fsub use in IR. This is similar to rL325648. llvm-svn: 325649
* [InstCombine] -X / C --> X / -C for FPSanjay Patel2018-02-202-15/+20
| | | | | | | We already do this in DAGCombiner, but it should also be good to eliminate the fsub use in IR. llvm-svn: 325648
* [mips][lld] Spectre variant two mitigation for MIPSR2Simon Dardis2018-02-205-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides migitation for CVE-2017-5715, Spectre variant two, which affects the P5600 and P6600. It implements the LLD part of -z hazardplt. Like the Clang part of this patch, I have opted for that specific option name in case alternative migitation methods are required in the future. The mitigation strategy suggested by MIPS for these processors is to use hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard barrier variants of the 'jalr' and 'jr' instructions respectively. These instructions impede the execution of instruction stream until architecturally defined hazards (changes to the instruction stream, privileged registers which may affect execution) are cleared. These instructions in MIPS' designs are not speculated past. These instructions are defined by the MIPS32R2 ISA, so this mitigation method is not compatible with processors which implement an earlier revision of the MIPS ISA. For LLD, this changes PLT stubs to use 'jalr.hb' and 'jr.hb'. Reviewers: atanasyan, ruiu Differential Revision: https://reviews.llvm.org/D43488 llvm-svn: 325647
* Fix assert when template argument deduction's original call arg checking ↵Richard Smith2018-02-202-1/+9
| | | | | | triggers class template instantiation. llvm-svn: 325646
* [WebAssembly] Rename GlobalSymbol types. NFC.Sam Clegg2018-02-2010-93/+93
| | | | | | | | | | | | | | | Purely a rename in preparation for adding new global symbol type. We want to use GlobalSymbol to represent real wasm globals and DataSymbol for pointers to things in linear memory (what ELF would call STT_OBJECT). This reduces the size the patch to add the explicit symbol table which is coming soon! Differential Revision: https://reviews.llvm.org/D43476 llvm-svn: 325645
* [InstCombine] add tests for fdiv with negated op and constant op; NFCSanjay Patel2018-02-201-0/+44
| | | | llvm-svn: 325644
* Revert "[AMDGPU] Increased vector length for global/constant loads."Konstantin Zhuravlyov2018-02-205-105/+3
| | | | | | | | | | https://reviews.llvm.org/rL325518 It breaks following OpenCL conformance tests: - Basic - parameter_types - Basic - vload_private llvm-svn: 325643
* [PatternMatch] allow vector matches with m_FNegSanjay Patel2018-02-203-11/+4
| | | | llvm-svn: 325642
* [DSE] Don't DSE stores that subsequent memmove calls read fromSanjoy Das2018-02-202-16/+78
| | | | | | | | | | | | | | | | | | | | | | Summary: We used to remove the first memmove in cases like this: memmove(p, p+2, 8); memmove(p, p+2, 8); which is incorrect. Fix this by changing isPossibleSelfRead to what was most likely the intended behavior. Historical note: the buggy code was added in https://reviews.llvm.org/rL120974 to address PR8728. Reviewers: rsmith Subscribers: mcrosier, llvm-commits, jlebar Differential Revision: https://reviews.llvm.org/D43425 llvm-svn: 325641
* When multiple sanitizers are enabled (ubsan + something else), use all ↵Richard Smith2018-02-202-37/+33
| | | | | | | | | | relevant blacklists. Ideally, we'd only use the ubsan blacklist for ubsan sanitizers, and only use the other-sanitizer blacklist for its sanitizers, but this at least enables the intended suppressions. llvm-svn: 325640
* [InstCombine] auto-generate full checks; NFCSanjay Patel2018-02-201-41/+47
| | | | llvm-svn: 325639
* [InstCombine] add test for vector -X/-Y; NFCSanjay Patel2018-02-201-4/+17
| | | | | | m_FNeg doesn't match vector types. llvm-svn: 325637
* [X86] Fix copy/paste mistake in test.Craig Topper2018-02-201-2/+3
| | | | | | The contents of the test case didnt' match the name of the test case. And they were identical to the test above. llvm-svn: 325635
* Fix broken test from r325630.Benjamin Kramer2018-02-201-1/+1
| | | | llvm-svn: 325634
* [NFC] In Multiversion Check function, switch to return DiagErich Keane2018-02-201-67/+47
| | | | | | | | This function did a lot of 'Diag, return true' stuff. This resulted in needing to introduce scopes in quite a few places. This patch replaces useages of a single "S.Diag" followed by return true with simply "return S.Diag". llvm-svn: 325633
* [PBQP] Fix PR33038 by pruning empty intervals in initializeGraph.Lang Hames2018-02-201-11/+27
| | | | | | | | Spilling may cause previously non-empty intervals (both for the spilled vreg and others) to become empty. Moving the pruning into initializeGraph catches these cases and fixes PR33038. llvm-svn: 325632
* Consistent use of header file for ICF and MarkLiveSam Clegg2018-02-2011-12/+80
| | | | | | | | | | Previously wasm used a separate header to declare markLive and ELF used to declare ICF. This change makes each backend consistently declare these in their own headers. Differential Revision: https://reviews.llvm.org/D43529 llvm-svn: 325631
* [MemoryBuiltins] Check nobuiltin status when identifying calls to free.Benjamin Kramer2018-02-202-11/+29
| | | | | | | | This is usually not a problem because this code's main purpose is eliminating unused new/delete pairs. We got deletes of nullptr or nobuiltin deletes of builtin new wrong though. llvm-svn: 325630
* Consistent (non) use of empty lines in include blocksSam Clegg2018-02-2021-26/+5
| | | | | | | | | The profailing style in lld seem to be to not include such empty lines. Clang-tidy/clang-format seem to handle this just fine. Differential Revision: https://reviews.llvm.org/D43528 llvm-svn: 325629
* [InstCombine] remove unneeded operand swap: NFCISanjay Patel2018-02-201-3/+0
| | | | | | | FMul is commutative, so complexity-based canonicalization should always take care of the swap via SimplifyAssociativeOrCommutative(). llvm-svn: 325628
* [SelectionDAG] Support known true/false SimplifySetCC cases for comparing ↵Craig Topper2018-02-204-100/+111
| | | | | | | | | | | | | | against vector splats of constants. This is split off from D42948 and includes just the cases that constant fold to true or false. It also includes some refactoring to keep predicate checks together. This supports things like (setcc uge X, 0) -> true Differential Revision: https://reviews.llvm.org/D43489 llvm-svn: 325627
* [CUDA] Added missing __threadfence_system() function for CUDA9.Artem Belevich2018-02-201-0/+1
| | | | llvm-svn: 325626
* Use more early returns in SymbolTable.cpp.Rui Ueyama2018-02-201-33/+46
| | | | | | | | | | | I think if statements that end with return is easier to read than cascaded if-else-if-else-if statements because it makes clear that execution of a function terminates there. This patch also adds more blank lines to separate code blocks to meaningful pieces. Differential Revision: https://reviews.llvm.org/D43517 llvm-svn: 325625
* [WebAssembly] Remove unused headerSam Clegg2018-02-201-1/+1
| | | | llvm-svn: 325624
* [PatternMatch] enhance m_SignMask() to ignore undef elements in vectorsSanjay Patel2018-02-202-22/+15
| | | | llvm-svn: 325623
* [InstSimplify] add tests for m_SignMask with undef vector elements; NFCSanjay Patel2018-02-201-2/+28
| | | | llvm-svn: 325622
* [AArch64] Refactor instructions using SIMD immediatesEvandro Menezes2018-02-202-368/+371
| | | | | | | | | | | Get rid of icky goto loops and make the code easier to maintain. Otherwise, NFC. Restore r324903 and fix PR36369. Differentail revision: https://reviews.llvm.org/D43364 llvm-svn: 325621
* [lld/LTO] Remove unused Path parameter to AddBufferFnTeresa Johnson2018-02-202-6/+7
| | | | | | | | | | | | | | | | Summary: With D43396, no clients use the Path parameter anymore. This is the lld side fix with D43400. Depends on D43396 and D43400. Reviewers: pcc Subscribers: emaste, inglorion, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D43401 llvm-svn: 325620
* [LTO] Remove unused Path parameter to AddBufferFnTeresa Johnson2018-02-204-12/+5
| | | | | | | | | | | | | | | Summary: With D43396, no clients use the Path parameter anymore. Depends on D43396. Reviewers: pcc Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43400 llvm-svn: 325619
* [ThinLTO/gold] Avoid race with cache pruner by copying to temp filesTeresa Johnson2018-02-202-4/+8
| | | | | | | | | | | | | | | | | | | Summary: This will avoid the race condition described in the review for D37993. I believe that the Path parameter to AddBufferFn is no longer utilized. I would prefer to remove that as a follow up clean up patch to reduce the diffs in this patch. Reviewers: pcc Reviewed By: pcc Subscribers: inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43396 llvm-svn: 325618
* [LV] Fix test checks, NFC.Alexey Bataev2018-02-202-140/+3506
| | | | llvm-svn: 325617
* [ARM] Lower BR_CC for f16Sjoerd Meijer2018-02-202-3/+32
| | | | | | | | This case wasn't handled yet. Differential Revision: https://reviews.llvm.org/D43508 llvm-svn: 325616
* [AMDGPU] Removed redundant run lines for fmuladd.f16 test. NFC.Stanislav Mekhanoshin2018-02-201-4/+0
| | | | llvm-svn: 325615
* feedbackSam Clegg2018-02-201-15/+8
| | | | llvm-svn: 325614
* [WebAssembly] Split addDefined into two different methods. NFC.Sam Clegg2018-02-203-42/+54
| | | | | | | | Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43496 llvm-svn: 325613
* [llvm-objdump] Use unique_ptr to simplify memory ownershipDavid Blaikie2018-02-201-34/+31
| | | | | | Followup to r325099/r325100 to simplify further. llvm-svn: 325612
* [X86][MMX] Regenerate MMX bitcast testSimon Pilgrim2018-02-201-6/+19
| | | | llvm-svn: 325611
* Correct multiversion unsupported target behavior, add a test.Erich Keane2018-02-202-0/+14
| | | | | | | | | | Multiversioning SEMA failed to set the declaration as invalid on unsupported targets. This patch does that. Additionally, I noticed that there is no test to validate this error message. This patch adds one, and uses 'mips' as the test architecture. llvm-svn: 325610
* [X86][3DNow] Regenerate intrinsics testsSimon Pilgrim2018-02-201-26/+693
| | | | llvm-svn: 325609
* [WebAssembly] Remove unused headerSam Clegg2018-02-202-2/+0
| | | | | | | | | This header used to be needed here for the `OutRelocation` struct but that no longer exists. Differential Revision: https://reviews.llvm.org/D43516 llvm-svn: 325608
OpenPOWER on IntegriCloud