summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* GlobalISel: moreElementsVector for G_LOAD/G_STOREMatt Arsenault2019-08-015-8/+78
| | | | | | | AMDGPU change and test is a placeholder until a future patch with complete handling. llvm-svn: 367503
* [Sema] Enable -Wimplicit-float-conversion for integral to floating point ↵Ziang Wan2019-08-011-17/+4
| | | | | | | | precision loss Fix one test case for it to be system-independent. llvm-svn: 367502
* Create unique, but identically-named ELF sections for explicitly-sectioned ↵Peter Collingbourne2019-08-013-8/+94
| | | | | | | | | | | | | | functions and globals when using -function-sections and -data-sections. This allows functions and globals to to be reordered later in the linking phase (using the -symbol-ordering-file) even though reordering will be limited to the scope of the explicit section. Patch by Rahman Lavaee! Differential Revision: https://reviews.llvm.org/D65478 llvm-svn: 367501
* Reapply "AMDGPU: Split block for si_end_cf"Matt Arsenault2019-08-017-80/+236
| | | | | | This reverts commit r359363, reapplying r357634 llvm-svn: 367500
* Fix a release-only build warning triggered by rL367485Philip Reames2019-08-011-0/+3
| | | | llvm-svn: 367499
* AMDGPU/GlobalISel: Select local loadsMatt Arsenault2019-08-016-9/+1014
| | | | llvm-svn: 367498
* [Sema] Enable -Wimplicit-float-conversion for integral to floating point ↵Ziang Wan2019-08-017-21/+149
| | | | | | | | | | | | | | | | precision loss Issue an warning when the code tries to do an implicit int -> float conversion, where the float type ha a narrower significant than the float type. The new warning is controlled by flag -Wimplicit-int-float-conversion, under -Wimplicit-float-conversion and -Wconversion. It is also silenced when c++11 narrowing warning is issued. Differential Revision: https://reviews.llvm.org/D64666 llvm-svn: 367497
* Revert "[MS] Emit S_HEAPALLOCSITE debug info in Selection DAG" andAmy Huang2019-07-314-153/+81
| | | | | | | | | | and partial fix. Causes windows buildbot errors. This reverts commit 6e65c34523963094acd0d6c94a5f5c64b32fe6aa and 53da7ca94343166ac68aef81db0398932fc258bb. llvm-svn: 367496
* Fix build when both gtest death tests and LLVM_NODISCARD are available.Richard Smith2019-07-311-2/+2
| | | | llvm-svn: 367495
* [Reproducers] Force replay in synchronous mode.Jonas Devlieghere2019-07-312-1/+18
| | | | | | | | | Replaying a reproducer in asynchronous mode never makes sense. This patch disables asynchronous mode during replay. Differential revision: https://reviews.llvm.org/D65547 llvm-svn: 367494
* compiler-rt: Try to appease lint script.Nico Weber2019-07-312-9/+7
| | | | | | | | | | | | | A bot complains: /b/sanitizer-x86_64-linux-autoconf/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/malloc_stress_transfer_test.cpp:2: Streams are highly discouraged. [readability/streams] [3] /b/sanitizer-x86_64-linux-autoconf/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp:11: Streams are highly discouraged. [readability/streams] [3] lib/CMakeFiles/SanitizerLintCheck.dir/build.make:57: recipe for target 'lib/CMakeFiles/SanitizerLintCheck' failed I do not know why this apparently wasn't a problem when the files had extension .cc. llvm-svn: 367493
* [ARM] Lower "(x<<c) > 0x80000000U" to "lsls" on Thumb1.Eli Friedman2019-07-316-8/+36
| | | | | | | | | This is extremely specific, but saves three instructions when it's legal. I don't think the code can be usefully generalized. Differential Revision: https://reviews.llvm.org/D65351 llvm-svn: 367492
* [ARM] Transform compare of masked value to shift on Thumb1.Eli Friedman2019-07-312-0/+251
| | | | | | | | | | | | Thumb1 has very limited immediate modes, so turning an "and" into a shift can save multiple instructions. It's possible to simplify the generated code for test2 and test3 in cmp-and-fold.ll a little more, but I'll implement that as a followup. Differential Revision: https://reviews.llvm.org/D65175 llvm-svn: 367491
* [ConstExprPreter] Overflow-detecting methods use GCC or clang builtinsJF Bastien2019-07-311-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D65536 llvm-svn: 367490
* [ScalarizeMaskedMemIntrin] Bitcast the mask to the scalar domain and use ↵Craig Topper2019-07-3114-24286/+20826
| | | | | | | | | | | | | | | | | | | | | | | | | | | | scalar bit tests for the branches. X86 at least is able to use movmsk or kmov to move the mask to the scalar domain. Then we can just use test instructions to test individual bits. This is more efficient than extracting each mask element individually. I special cased v1i1 to use the previous behavior. This avoids poor type legalization of bitcast of v1i1 to i1. I've skipped expandload/compressstore as I think we need to handle constant masks for those better first. Many tests end up with duplicate test instructions due to tail duplication in the branch folding pass. But the same thing happens when constructing similar code in C. So its not unique to the scalarization. Not sure if this lowering code will also be good for other targets, but we're only testing X86 today. Differential Revision: https://reviews.llvm.org/D65319 llvm-svn: 367489
* [X86] Add DAG combine to fold any_extend_vector_inreg+truncstore to an ↵Craig Topper2019-07-319-817/+271
| | | | | | | | | | | | extractelement+store We have custom code that ignores the normal promoting type legalization on less than 128-bit vector types like v4i8 to emit pavgb, paddusb, psubusb since we don't have the equivalent instruction on a larger element type like v4i32. If this operation appears before a store, we can be left with an any_extend_vector_inreg followed by a truncstore after type legalization. When truncstore isn't legal, this will normally be decomposed into shuffles and a non-truncating store. This will then combine away the any_extend_vector_inreg and shuffle leaving just the store. On avx512, truncstore is legal so we don't decompose it and we had no combines to fix it. This patch adds a new DAG combine to detect this case and emit either an extract_store for 64-bit stoers or a extractelement+store for 32 and 16 bit stores. This makes the avx512 codegen match the avx2 codegen for these situations. I'm restricting to only when -x86-experimental-vector-widening-legalization is false. When we're widening we're not likely to create this any_extend_inreg+truncstore combination. This means we should be able to remove this code when we flip the default. I would like to flip the default soon, but I need to investigate some performance regressions its causing in our branch that I wasn't seeing on trunk. Differential Revision: https://reviews.llvm.org/D65538 llvm-svn: 367488
* Attempt to unbreak sphinx build bot by inserting a link.Philip Reames2019-07-312-3/+4
| | | | llvm-svn: 367487
* Migrate some more fadd and fsub cases away from UnsafeFPMath control to ↵Michael Berg2019-07-3114-455/+534
| | | | | | | | | | | | | | | | utilize NoSignedZerosFPMath options control Summary: Honoring no signed zeroes is also available as a user control through clang separately regardless of fastmath or UnsafeFPMath context, DAG guards should reflect this context. Reviewers: spatel, arsenm, hfinkel, wristow, craig.topper Reviewed By: spatel Subscribers: rampitec, foad, nhaehnle, wuzish, nemanjai, jvesely, wdng, javed.absar, MaskRay, jsji Differential Revision: https://reviews.llvm.org/D65170 llvm-svn: 367486
* [IndVars, RLEV] Support rewriting exit values in loops without known exits ↵Philip Reames2019-07-313-15/+9
| | | | | | | | | | (prep work) This is a prepatory patch for future work on support exit value rewriting in loops with a mixture of computable and non-computable exit counts. The intention is to be "mostly NFC" - i.e. not enable any interesting new transforms - but in practice, there are some small output changes. The test differences are caused by cases wherewhere getSCEVAtScope can simplify a single entry phi without needing any knowledge of the loop. llvm-svn: 367485
* [NFC] allow creating error strings from a TwineJF Bastien2019-07-311-0/+4
| | | | | | It's useful when no format needs to happen, only the Twine needs to be put together. llvm-svn: 367484
* Fix to r367374 "[MS] Emit S_HEAPALLOCSITE debug info in Selection DAG"Amy Huang2019-07-312-12/+13
| | | | | | | | | after windows buildbot failure. Added a check that the MachineInstr exists and is a call before trying to add symbols around it. llvm-svn: 367483
* Fix unused variable warning for non-assert builds.Eric Christopher2019-07-311-0/+1
| | | | llvm-svn: 367482
* [GDBRemote] Reflow comments and improve docs.Jonas Devlieghere2019-07-311-31/+35
| | | | | | | | Improved the GDB client base documentation while I was reading through it. Looks like it got messed up during the automatic comment reflow a while ago. llvm-svn: 367481
* [API] Remove use of ClangASTContext from SBTargetAlex Langford2019-07-313-13/+42
| | | | | | | | | | | | | Summary: The methods to find types in a Target aren't clang specific and are pretty generalizable to type systems. Additionally, to support some of the use cases in SBTarget, I've added a "GetScratchTypeSystems" method to Target to support getting all type systems for a target we are debugging. Differential Revision: https://reviews.llvm.org/D64964 llvm-svn: 367480
* [clang][ARM] Fix msvc arm{64} builtins to use int on LP64 systems.Michael J. Spencer2019-07-314-49/+275
| | | | | | | | | | | | The `InterlockedX_{acq,nf,rel}` functions deal with 32 bits which is long on MSVC, but int on most other systems. This also checks that `ReadStatusRegister` and `WriteStatusRegister` have the correct type on aarch64-darwin. Differential Revision: https://reviews.llvm.org/D64164 llvm-svn: 367479
* [NFC][clang] Refactor getCompilationPhases()+Types.def step 3.Puyan Lotfi2019-07-313-64/+68
| | | | | | | | | | | | | Second landing attempt: Changed TY_ObjCXXHeader to TY_PP_ObjCXXHeader to fix -xobjective-c++-header. This time I verified against preprocessor output. Dropping the 'u' entry and the entire Flags table from Types.def. Now it'll be a bit easier to tablegenify this. Differential Revision: https://reviews.llvm.org/D65308 llvm-svn: 367478
* [GISel] Address review feedback on passing MD_callees to lowerCall.Mark Lacey2019-07-314-5/+5
| | | | | | | Preserve the nullptr default for KnownCallees that appears in the base class. llvm-svn: 367477
* [GISel] Pass MD_callees metadata down in call lowering.Mark Lacey2019-07-3110-16/+31
| | | | | | | | | | | | | | | | | | | | Summary: This will make it possible to improve IPRA by taking into account register usage in indirect calls. NFC yet; this is just laying the groundwork to start building up patches to take advantage of the information for improved register allocation. Reviewers: aditya_nandakumar, volkan, qcolombet, arsenm, rovka, aemerson, paquette Subscribers: sdardis, wdng, javed.absar, hiraditya, jrtc27, atanasyan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65488 llvm-svn: 367476
* AArch64: Add a tagged-globals backend feature.Peter Collingbourne2019-07-318-1/+74
| | | | | | | | | | | | | | | | | | | This feature instructs the backend to allow locally defined global variable addresses to contain a pointer tag in bits 56-63 that will be ignored by the hardware (i.e. TBI), but may be used by an instrumentation pass such as HWASAN. It works by adding a MOVK instruction to the regular ADRP/ADD sequence that sets bits 48-63 to the corresponding bits of the global, with the linker bounds check disabled on the ADRP instruction to prevent the tag from causing a link failure. This implementation of the feature omits the MOVK when loading from or storing to a global, which is sufficient for TBI. If the same approach is extended to MTE, assuming that 0 is not configured as a catch-all tag, we will most likely also need the MOVK in this case in order to avoid a tag mismatch. Differential Revision: https://reviews.llvm.org/D65364 llvm-svn: 367475
* SelectionDAG, MI, AArch64: Widen target flags fields/arguments from unsigned ↵Peter Collingbourne2019-07-3112-97/+90
| | | | | | | | | | | | | char to unsigned. This makes the field wider than MachineOperand::SubReg_TargetFlags so that we don't end up silently truncating any higher bits. We should still catch any bits truncated from the MachineOperand field as a consequence of the assertion in MachineOperand::setTargetFlags(). Differential Revision: https://reviews.llvm.org/D65465 llvm-svn: 367474
* Attempt to heal bots after r367467Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367473
* [DAGCombine] Limit the number of times for the same store and root nodesWei Mi2019-07-311-3/+42
| | | | | | | | | | | | | | to bail out in store merging dependence check. We run into a case where dependence check in store merging bail out many times for the same store and root nodes in a huge basicblock. That increases compile time by almost 100x. The patch add a map to track how many times the bailing out happen for the same store and root, and if it is over a limit, stop considering the store with the same root as a merging candidate. Differential Revision: https://reviews.llvm.org/D65174 llvm-svn: 367472
* compiler-rt: Rename .cc file in lib/sanitizer_common/symbolizer to .cppNico Weber2019-07-313-3/+3
| | | | llvm-svn: 367471
* [Support] Added overflow checking add, sub and mul.JF Bastien2019-07-312-0/+204
| | | | | | | | Added AddOverflow, SubOverflow and MulOverflow to compute truncated results and return a flag indicating whether overflow occured. Differential Revision: https://reviews.llvm.org/D65494 llvm-svn: 367470
* Attempt to heal tsan bot after r367463Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367469
* [pstl] Fully qualify pstl names.Eric Fiselier2019-07-313-404/+401
| | | | | | | | | Previously the code used "using namespace __pstl;" at block scope to introduce these names. This could cause conflicts with names defined by the standard library. So we should fully qualify them instead. llvm-svn: 367468
* compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cppNico Weber2019-07-3135-68/+71
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $(basename $f) . ; done and manually updated references to renamed files found by that. llvm-svn: 367467
* [X86] Add test cases to show premature decomposition of vector multiplies ↵Craig Topper2019-07-311-0/+452
| | | | | | into shift+add/sub for types that aren't legal and need to be split. NFC llvm-svn: 367466
* [X86] Add AVX512DQ command lines to vector-mul.ll to show that we use ↵Craig Topper2019-07-311-111/+405
| | | | | | vpmullq instead of shift+add/sub for some cases. NFC llvm-svn: 367465
* gn build: Merge r367463Nico Weber2019-07-311-64/+81
| | | | llvm-svn: 367464
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-3184-210/+213
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* Attempt to heal bots after r367456Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367462
* [SCCP] Update condition to avoid overflow.Alina Sbirlea2019-07-312-1/+14
| | | | | | | | | | | | | | | | Summary: Update condition to remove addition that may cause an overflow. Resolves PR42814. Reviewers: sanjoy, RKSimon Subscribers: jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65417 llvm-svn: 367461
* compiler-rt: Rename .cc file in lib/profile to .cppNico Weber2019-07-314-3/+3
| | | | | | | | See https://reviews.llvm.org/D58620 for discussion. Note how the comment in the file already said ".cpp" :) llvm-svn: 367460
* [CommandCompletions] Remove commented out code.Jonas Devlieghere2019-07-311-8/+0
| | | | | | We use version control here. llvm-svn: 367459
* [docs] Add references to unreferenced footnotes.Lang Hames2019-07-311-13/+13
| | | | | | Thanks to Stefan Granitz for catching the issue. llvm-svn: 367458
* gn build: Merge r367456Nico Weber2019-07-311-4/+4
| | | | llvm-svn: 367457
* compiler-rt: Rename .cc files in lib/interception to .cpp.Nico Weber2019-07-315-8/+8
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367456
* Fix completion for functions in anonymous namespacesJonas Devlieghere2019-07-313-1/+11
| | | | | | | | | | | | | | | | | I was going through some of the old bugs and came across PR21069 which I was able to reproduce. The issue is that we match the regex `^foo` against the `DW_AT_name` in the DWARF, which for our anonymous function is indeed `foo`. However, when we get the function name from the symbol context, the result is `(anonymous namespace)::foo()`. This throws off completions, which assumes that it's appending to whatever is already present on the input, resulting in a bogus `b fooonymous\ namespace)::foo()`. Bug report: https://llvm.org/PR21069 Differential revision: https://reviews.llvm.org/D65498 llvm-svn: 367455
* gn build: Merge r367452 and add standalone sourcesNico Weber2019-07-311-10/+23
| | | | llvm-svn: 367454
OpenPOWER on IntegriCloud