summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gn build: Merge r357905Nico Weber2019-04-082-0/+2
| | | | llvm-svn: 357907
* gn-build: Re-run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py ↵Nico Weber2019-04-081-2/+3
| | | | | | format` llvm-svn: 357906
* Attempt to recommit r357901Eugene Leviant2019-04-086-1/+126
| | | | llvm-svn: 357905
* [InstCombine] sdiv exact flag fixup.Chen Zheng2019-04-082-6/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D60396 llvm-svn: 357904
* [llvm-readobj] Use `reinterpret_cast` instead of C-style casting. NFC.Xing GUO2019-04-081-18/+25
| | | | llvm-svn: 357903
* Reverting r357901 as fails to build on some of the buildbotsEugene Leviant2019-04-086-126/+1
| | | | llvm-svn: 357902
* [Support] Add zlib independent CRC32Eugene Leviant2019-04-086-1/+126
| | | | | | Differential revision: https://reviews.llvm.org/D59816 llvm-svn: 357901
* [llvm-exegesis] benchmarkMain(): less cryptic error if built w/o libpfmRoman Lebedev2019-04-081-0/+5
| | | | | | | | | | | Wanted to check if inablility to measure latency of CMOV32rm is a regression from D60041 / D60138, but unable to do that because the llvm-exegesis-{8,9} from debian sid fails with that cryptic, unhelpful error. I suspect this will be a better error. llvm-svn: 357900
* [CMake] Replace LLVM_ENABLE_CXX1Y and friends with LLVM_CXX_STDJustin Bogner2019-04-083-21/+22
| | | | | | | | | | | | | Simplify building with particular C++ standards by replacing the specific "enable standard X" flags with a flag that allows specifying the standard you want directly. We preserve compatibility with the existing flags so that anyone with those flags in existing caches won't break mysteriously. Differential Revision: https://reviews.llvm.org/D60399 llvm-svn: 357899
* [llvm-exegesis][X86] Randomize CMOVcc/SETcc OPERAND_COND_CODE CondCodesRoman Lebedev2019-04-084-8/+13
| | | | | | | | | | | | | | Reviewers: courbet, gchatelet Reviewed By: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60066 llvm-svn: 357898
* Object/Minidump: Add support for reading the ModuleList streamPavel Labath2019-04-084-6/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The ModuleList stream consists of an integer giving the number of entries in the list, followed by the list itself. Each entry in the list describes a module (dynamically loaded objects which were loaded in the process when it crashed (or when the minidump was generated). The code for reading the list is relatively straight-forward, with a single gotcha. Some minidump writers are emitting padding after the "count" field in order to align the subsequent list on 8 byte boundary (this depends on how their ModuleList type was defined and the native alignment of various types on their platform). Fortunately, the minidump format contains enough redundancy (in the form of the stream length field in the stream directory), which allows us to detect this situation and correct it. This patch just adds the ability to parse the stream. Code for conversion to/from yaml will come in a follow-up patch. Reviewers: zturner, amccarth, jhenderson, clayborg Subscribers: jdoerfert, markmentovai, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60121 llvm-svn: 357897
* MinidumpParser: parse SystemInfo stream via llvmPavel Labath2019-04-083-21/+63
| | | | | | | I also update the tests for SystemInfo parsing to use the yaml2minidump capabilities in llvm instead of relying on checked-in binaries. llvm-svn: 357896
* PDBFPO: add dyn_cast supportPavel Labath2019-04-081-7/+25
| | | | | | | This adds the necessary glue so we can use llvm::dyn_cast, instead of doing a manual type-check followed by a cast. NFC. llvm-svn: 357895
* [InstCombine] add more testcases for sdiv exact flag fixup.Chen Zheng2019-04-081-6/+68
| | | | llvm-svn: 357894
* Fix signed-unsigned comparison warning in Driver.cppPavel Labath2019-04-081-1/+1
| | | | llvm-svn: 357893
* [Sanitizer] Make wcrtomb test posix-onlyPavel Labath2019-04-081-0/+3
| | | | | | | | | | | | wcrtomb is not intercepted on windows, so this test fails there. It's not clear to me why we do not intercept this function there (I'll look into that separately), but for now this should at least make the windows sanitizer bot green again (broken by r357889, when I added this test). I also add "UNSUPPORTED: android" as this function is also not intercepted there. llvm-svn: 357892
* modify-python-lldb.py: Remove ifdef SWIG-removing codePavel Labath2019-04-081-13/+4
| | | | | | | | | There are no patterns like that in the generated swig files (there probably were some back in the days when we were running swig over the header files directly), so this is dead code and has no effect on the generated file. llvm-svn: 357890
* [Sanitizer] Fix a possible write to freed memory in the wcrtomb interceptorPavel Labath2019-04-083-7/+59
| | | | | | | | | | | | | | | | | | Summary: r357240 added an interceptor for wctomb, which uses a temporary local buffer to make sure we don't write to unallocated memory. This patch applies the same technique to wcrtomb, and adds some additional tests for this function. Reviewers: vitalybuka, eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59984 llvm-svn: 357889
* [X86] Make LowerOperationWrapper more robust. Remove now unnecessary ↵Craig Topper2019-04-081-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | ReplaceAllUsesWith from LowerMSCATTER. Previously LowerOperationWrapper took the number of results from the original node and counted that many results from the new node. This was intended to drop chain operands from FP_TO_SINT lowering that uses X87 with memory operations to stack temporaries. The final load had an extra chain output that needs to be ignored. Unfortunately, it didn't work with scatter which has 2 result operands, the mask output which is discarded and a chain output. The chain output is the one that is needed but it comes second and it would be dropped by the previous logic here. To workaround this we were doing a ReplaceAllUses in the lowering code so that the generic legalization code wouldn't see any uses to replace since it had been given the wrong result/type. After this change we take the LowerOperation result directly if the original node has one result. This allows us to directly return the chain from scatter or the load data from the FP_TO_SINT case. When the original node has multiple results we'll ensure the returned node has the same number and copy them over. For cases where the original node has multiple results and the new code for some reason has even more results, MERGE_VALUES can be used to pass only the needed results. llvm-svn: 357887
* [ConstantRange] Delete redundnt {z,s}extOrSelf for multiplicationFangrui Song2019-04-081-7/+0
| | | | | | | These calls are redundant because the quotients have the same BitWidth as MinValue/MaxValue. llvm-svn: 357886
* Fix -emit-reloc against local symbols.Rui Ueyama2019-04-082-0/+19
| | | | | | | | | | | | | | | | Previously, we drop symbols starting with .L from the symbol table, so if there is a relocation that refers a .L symbol, it ended up referencing a null -- which happened to be interpreted as an absolute symbol. This patch copies all symbols including local ones if -emit-reloc is given. Fixes https://bugs.llvm.org/show_bug.cgi?id=41385 Differential Revision: https://reviews.llvm.org/D60306 llvm-svn: 357885
* [InstCombine] add testcases for sdiv exact flag fixing - NFC.Chen Zheng2019-04-081-0/+19
| | | | llvm-svn: 357884
* [InstCombine]add testcase for sdiv canonicalizetion - NFCChen Zheng2019-04-081-0/+80
| | | | llvm-svn: 357883
* [X86] Split floating point tests out of atomic-mi.ll into atomic-fp.ll. Add ↵Craig Topper2019-04-082-417/+754
| | | | | | avx and avx512f command lines. NFC llvm-svn: 357882
* [X86] Add avx and avx512f command lines to atomic-non-integer.ll. NFCCraig Topper2019-04-081-146/+465
| | | | llvm-svn: 357881
* [llvm-objdump] Fix MC/ARM/arm-macho-calls.sFangrui Song2019-04-081-2/+1
| | | | llvm-svn: 357880
* IAS is now enabled for all OS on MIPS64Brad Smith2019-04-082-10/+2
| | | | llvm-svn: 357879
* Enable IAS for FreeBSD SPARC64.Brad Smith2019-04-072-5/+8
| | | | llvm-svn: 357878
* [clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413Owen Pan2019-04-072-3/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D60374 llvm-svn: 357877
* [ConstantRange] Add signed/unsigned unionWith()Nikita Popov2019-04-073-19/+33
| | | | | | | | | | | | | | | | This extends D59959 to unionWith(), allowing to specify that a non-wrapping unsigned/signed range is preferred. This is somewhat less useful than the intersect case, because union operations are rarer. An example use would the the phi union computed in SCEV. The implementation is mostly a straightforward use of getPreferredRange(), but I also had to adjust some <=/< checks to make sure that no ranges with lower==upper get constructed before they're passed to getPreferredRange(), as these have additional constraints. Differential Revision: https://reviews.llvm.org/D60377 llvm-svn: 357876
* [X86] Use (SUBREG_TO_REG (MOV32rm)) for extloadi64i8/extloadi64i16 when the ↵Craig Topper2019-04-076-21/+35
| | | | | | | | | | | | | | | | | | | | | load is 4 byte aligned or better and not volatile. Summary: Previously we would use MOVZXrm8/MOVZXrm16, but those are longer encodings. This is similar to what we do in the loadi32 predicate. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60341 llvm-svn: 357875
* [ConstantRangeTest] Generalize intersection testing code; NFCNikita Popov2019-04-071-8/+17
| | | | | | | Extract the exhaustive intersection tests into a separate function, so that it may be reused for unions as well. llvm-svn: 357874
* [ConstantRange] Add unsigned and signed intersection typesNikita Popov2019-04-073-28/+128
| | | | | | | | | | | | | | | | | | | | | | | | The intersection of two ConstantRanges may consist of two disjoint ranges. As we can only return one range as the result, we need to return one of the two possible ranges that cover both. Currently the result is picked based on set size. However, this is not always optimal: If we're in an unsigned context, we'd prefer to get a large unsigned range over a small signed range -- the latter effectively becomes a full set in the unsigned domain. This revision adds a PreferredRangeType, which can be either Smallest, Unsigned or Signed. Smallest is the current behavior and Unsigned and Signed are new variants that prefer not to wrap the unsigned/signed domain. The new type isn't used anywhere yet (but SCEV will be a good first user, see D60035). I've also added some comments to illustrate the various cases in intersectWith(), which should hopefully make it more obvious what is going on. Differential Revision: https://reviews.llvm.org/D59959 llvm-svn: 357873
* [LLVM-C] Allow Access to the Type of a BinaryRobert Widmann2019-04-072-0/+72
| | | | | | | | | | | | | | | | Summary: Add an accessor for the type of a binary file. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, aheejin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60366 llvm-svn: 357872
* [ConstantRange] Add isAllNegative() and isAllNonNegative() methodsNikita Popov2019-04-073-16/+74
| | | | | | | | | | | | | Add isAllNegative() and isAllNonNegative() methods to ConstantRange, which determine whether all values in the constant range are negative/non-negative. This is useful for replacing KnownBits isNegative() and isNonNegative() calls when changing code to use constant ranges. Differential Revision: https://reviews.llvm.org/D60264 llvm-svn: 357871
* Reapply [ValueTracking] Support min/max selects in computeConstantRange()Nikita Popov2019-04-078-58/+115
| | | | | | | | | | | | | | | | | | Add support for min/max flavor selects in computeConstantRange(), which allows us to fold comparisons of a min/max against a constant in InstSimplify. This fixes an infinite InstCombine loop, with the test case taken from D59378. Relative to the previous iteration, this contains some adjustments for AMDGPU med3 tests: The AMDGPU target runs InstSimplify prior to codegen, which ends up constant folding some existing med3 tests after this change. To preserve these tests a hidden -amdgpu-scalar-ir-passes option is added, which allows disabling scalar IR passes (that use InstSimplify) for testing purposes. Differential Revision: https://reviews.llvm.org/D59506 llvm-svn: 357870
* [llvm-objdump] Split disassembleObject and simplify --{start,stop}-address ↵Fangrui Song2019-04-071-109/+116
| | | | | | | | | | | | | handling The main disassembly loop is hard to read due to special handling of ARM ELF data & ELF data. Split off the logic into two functions dumpARMELFData and dumpELFData. Hoist some checks outside of the loop. --start-address --stop-address have redundant checks and minor off-by-1 issues. Fix them. llvm-svn: 357869
* last changes for nowChris Lattner2019-04-071-2/+2
| | | | llvm-svn: 357868
* various improvements in wording, also unbreak the botChris Lattner2019-04-073-42/+44
| | | | llvm-svn: 357867
* [DWARF] DWARFDebugLine: delete unused parameter `Offset`Fangrui Song2019-04-072-5/+5
| | | | llvm-svn: 357866
* make a bunch of cleanups in wording and toneChris Lattner2019-04-071-75/+52
| | | | llvm-svn: 357865
* [CostModel][X86] Masked load legalization requires an binary-shuffle not a ↵Simon Pilgrim2019-04-071-2/+2
| | | | | | | | select (PR39812) Expansion/truncation is better described by SK_PermuteTwoSrc than SK_Select llvm-svn: 357864
* remove some unhelpful language from the tutorialChris Lattner2019-04-072-7/+106
| | | | llvm-svn: 357863
* Copy the C++ kaleidoscope tutorial into a subdirectory and clean up various ↵Chris Lattner2019-04-0711-0/+5560
| | | | | | things, aligning with the direction of the WiCT workshop, and Meike Baumgärtner's view of how this should work. The old version of the documentation is unmodified, this is an experiment. llvm-svn: 357862
* [DAG] Pull out ComputeNumSignBits call to make debugging easier. NFCI.Simon Pilgrim2019-04-071-2/+2
| | | | llvm-svn: 357861
* [X86][SSE] SimplifyDemandedBitsForTargetNode - Add initial PACKSS supportSimon Pilgrim2019-04-076-187/+67
| | | | | | | | | | In the case where we only want the sign bit (e.g. when using PACKSS truncation of comparison results for MOVMSK) then we can just demand the sign bit of the source operands. This makes use of the fact that PACKSS saturates out of range values to the min/max int values - so the sign bit is always preserved. Differential Revision: https://reviews.llvm.org/D60333 llvm-svn: 357859
* [llvm-objdump] Fix split of source lines; don't ltrim source linesFangrui Song2019-04-072-24/+19
| | | | | | | | | If the file does not end with a newline, it may be dropped. Fix the splitting algorithm. Also delete an unnecessary SourceCache lookup. llvm-svn: 357858
* [llvm-objdump] Simplify some ELF typename: ELFFile<ELFT>::Elf_xxx -> ELFT::xxxFangrui Song2019-04-071-11/+4
| | | | llvm-svn: 357857
* .Fangrui Song2019-04-071-17/+8
| | | | llvm-svn: 357856
* [llvm-objdump] Simplify Expected<T> handling with unwrapOrErrorFangrui Song2019-04-074-327/+170
| | | | llvm-svn: 357855
OpenPOWER on IntegriCloud