summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AMDGPU] SDWA: merge VI and GFX9 pseudo instructionsSam Kolton2017-06-2115-281/+323
| | | | | | | | | | | | Summary: Previously there were two separate pseudo instruction for SDWA on VI and on GFX9. Created one pseudo instruction that is union of both of them. Added verifier to check that operands conform either VI or GFX9. Reviewers: dp, arsenm, vpykhtin Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, artem.tamazov Differential Revision: https://reviews.llvm.org/D34026 llvm-svn: 305886
* [AArch64] Preserve register flags when promoting a load from store.Florian Hahn2017-06-212-4/+23
| | | | | | | | | | | | | | | | | | | | | Summary: This patch updates promoteLoadFromStore to use the store MachineOperand as the source operand of the of the new instruction instead of creating a new register MachineOperand. This way, the existing register flags are preserved. This fixes PR33468 (https://bugs.llvm.org/show_bug.cgi?id=33468). Reviewers: MatzeB, t.p.northover, junbuml Reviewed By: MatzeB Subscribers: aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34402 llvm-svn: 305885
* [DAGCombiner] Add another combine from build vector to shuffleGuy Blank2017-06-213-37/+18
| | | | | | | Add support for combining a build vector to a shuffle. When the build vector is of extracted elements from 2 vectors (vec1, vec2) where vec2 is 2 times smaller than vec1. llvm-svn: 305883
* [SCEV] Make MulOpsInlineThreshold lower to avoid excessive compilation timeMax Kazantsev2017-06-212-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MulOpsInlineThreshold option of SCEV is defaulted to 1000, which is inadequately high. When constructing SCEVs of expressions like: x1 = a * a x2 = x1 * x1 x3 = x2 * x2 ... We actually have huge SCEVs with max allowed amount of operands inlined. Such expressions are easy to get from unrolling of loops looking like x = a for (i = 0; i < n; i++) x = x * x Or more tricky cases where big powers are involved. If some non-linear analysis tries to work with a SCEV that has 1000 operands, it may lead to excessively long compilation. The attached test does not pass within 1 minute with default threshold. This patch decreases its default value to 32, which looks much more reasonable if we use analyzes with complexity O(N^2) or O(N^3) working with SCEV. Differential Revision: https://reviews.llvm.org/D34397 llvm-svn: 305882
* Simplify test.Rafael Espindola2017-06-211-40/+8
| | | | llvm-svn: 305881
* [XRay] Reduce synthetic references emitted by XRayDean Michael Berris2017-06-219-55/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When we're building with XRay instrumentation, we use a trick that preserves references from the function to a function sled index. This index table lives in a separate section, and without this trick the linker is free to garbage-collect this section and all the segments it refers to. Until we're able to tell the linkers to preserve these sections, we use this reference trick to keep around both the index and the entries in the instrumentation map. Before this change we emitted both a synthetic reference to the label in the instrumentation map, and to the entry in the function map index. This change removes the first synthetic reference and only emits one synthetic reference to the index -- the index entry has the references to the labels in the instrumentation map, so the linker will still preserve those if the function itself is preserved. This reduces the amount of synthetic references we emit from 16 bytes to just 8 bytes in x86_64, and similarly to other platforms. Reviewers: dblaikie Subscribers: javed.absar, kpw, pelikan, llvm-commits Differential Revision: https://reviews.llvm.org/D34340 llvm-svn: 305880
* [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliasedSerguei Katkov2017-06-212-24/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now areMemoryOpsAliased has an assertion justified as: MMO1 should have a value due it comes from operation we'd like to use as implicit null check. assert(MMO1->getValue() && "MMO1 should have a Value!"); However, it is possible for that invariant to not be upheld in the following situation (conceptually): Null check %RAX NotNullSucc: %RAX = LEA %RSP, 16 // I0 %RDX = MOV64rm %RAX // I1 With the current code, we will have an early exit from ImplicitNullChecks::isSuitableMemoryOp on I0 with SR_Unsuitable. However, I1 will look plausible (since it loads from %RAX) and will go ahead and call areMemoryOpsAliased(I1, I0). This will cause us to fail the assert mentioned above since I1 does not load from an IR level value and thus is allowed to have a non-Value base address. The fix is to bail out earlier whenever we see an unsuitable instruction overwrite PointerReg. This would guarantee that when we call areMemoryOpsAliased, we're guaranteed to be looking at an instruction that loads from or stores to an IR level value. Original Patch Author: sanjoy Reviewers: sanjoy, mkazantsev, reames Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34385 llvm-svn: 305879
* Changed wording in commentRaphael Isemann2017-06-211-2/+1
| | | | llvm-svn: 305878
* Remove redundant namespace specifier.Rui Ueyama2017-06-211-2/+3
| | | | llvm-svn: 305877
* Define __guard_{iat,longjmp}_{count,table} symbols.Rui Ueyama2017-06-212-1/+79
| | | | | | | | | | | VC2017 contains these new symbols as undefined symobls. They are used for /guard:cf. Since we do not support the control flow guard, but we want to at least ignore these symbols so that we can link against VS2017 libraries. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=727193. llvm-svn: 305876
* Support MS builtins using 'long' on LP64 platformsBruno Cardoso Lopes2017-06-218-80/+219
| | | | | | | | | | | | | | | This allows for -fms-extensions to work the same on LP64. For example, _BitScanReverse is expected to be 32-bit, matching Windows/LLP64, even though long is 64-bit on x86_64 Darwin or Linux (LP64). Implement this by adding a new character code 'N', which is 'int' if the target is LP64 and the same 'L' otherwise Differential Revision: https://reviews.llvm.org/D34377 rdar://problem/32599746 llvm-svn: 305875
* Run dos2unix on ms-intrinsics-rotations.c test. NFCBruno Cardoso Lopes2017-06-211-171/+171
| | | | llvm-svn: 305874
* Fix a python object leak in SWIG glue.Zachary Turner2017-06-211-1/+2
| | | | | | | | | | PyObject_CallFunction returns a PyObject which needs to be decref'ed when it is no longer needed. Patch by David Luyer Differential Revision: https://reviews.llvm.org/D33740 llvm-svn: 305873
* [ODRHash] Supply more information when generic error message is emitted.Richard Trieu2017-06-212-0/+16
| | | | llvm-svn: 305872
* Revert "[compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka2017-06-212-40/+24
| | | | | | | | | | | | | | | | | allow_user_segv_handler is true." Summary: On Android we still need to reset preinstalled handlers and allow use handlers later. This reverts commit r304039. Reviewers: eugenis Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D34434 llvm-svn: 305871
* [asan] Fix android compiler wrapper lost in r301617.Evgeniy Stepanov2017-06-211-0/+1
| | | | llvm-svn: 305870
* Improve error messages.Rui Ueyama2017-06-201-2/+3
| | | | llvm-svn: 305868
* [NewGVN] Fix a bug that made the store verifier less effective.Davide Italiano2017-06-201-6/+4
| | | | | | | | | We weren't actually checking for duplicated stores, as the condition was always actually false. This was found by Coverity, and I have no clue how to trigger this in real-world code (although I tried for a bit). llvm-svn: 305867
* Updated llvm-objdump with Mach-O files and the -objc-meta-data option soKevin Enderby2017-06-202-2/+8
| | | | | | | | that it symbolically prints the superclass when it has dyld bind info for it. rdar://7638823 llvm-svn: 305866
* clang-format a region.Rafael Espindola2017-06-201-20/+19
| | | | | | It will make a followup patch easier to read. llvm-svn: 305865
* [ScopInfo] Fix crash with sum of invariant load and AddRec.Eli Friedman2017-06-202-2/+90
| | | | | | | | | | | | | | | | | | | | | | r303971 added an assertion that SCEV addition involving an AddRec and a SCEVUnknown must involve a dominance relation: either the SCEVUnknown value dominates the AddRec's loop, or the AddRec's loop header dominates the SCEVUnknown. This is generally fine for most usage of SCEV because it isn't possible to write an expression in IR which would violate it, but it's a bit inconvenient here for polly. To solve the issue, just avoid creating a SCEV expression which triggers the asssertion. I'm not really happy with this solution, but I don't have any better ideas. Fixes https://bugs.llvm.org/show_bug.cgi?id=33464. Differential Revision: https://reviews.llvm.org/D34259 llvm-svn: 305864
* Add a cantFail overload for Expected-reference (Expected<T&>) types.Lang Hames2017-06-202-0/+25
| | | | llvm-svn: 305863
* Prevent devirtualization of calls to un-instantiated functions.Sunil Srivastava2017-06-206-2/+89
| | | | | | | | PR 27895 Differential Revision: https://reviews.llvm.org/D22057 llvm-svn: 305862
* Special-case handling of destructors in override lists when dumping ASTs.Lang Hames2017-06-201-3/+6
| | | | | | | Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle printing of them separately. llvm-svn: 305860
* [Sanitizers] Move cached allocator_may_return_null flag to sanitizer_allocatorAlex Shlyapnikov2017-06-2014-138/+127
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Move cached allocator_may_return_null flag to sanitizer_allocator.cc and provide API to consolidate and unify the behavior of all specific allocators. Make all sanitizers using CombinedAllocator to follow AllocatorReturnNullOrDieOnOOM() rules to behave the same way when OOM happens. When OOM happens, turn allocator_out_of_memory flag on regardless of allocator_may_return_null flag value (it used to not to be set when allocator_may_return_null == true). release_to_os_interval_ms and rss_limit_exceeded will likely be moved to sanitizer_allocator.cc too (later). Reviewers: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34310 llvm-svn: 305858
* [codeview] YAMLize all section offsets and indices in symbol recordsReid Kleckner2017-06-204-29/+62
| | | | | | | | | | | | We forgot to serialize these because llvm-readobj didn't dump them. They are typically all zeros in an object file. The linker fills them in with relocations before adding them to the PDB. Now we can properly round trip these symbols through pdb2yaml -> yaml2pdb. I made these fields optional with a zero default so that we can elide them from our test cases. llvm-svn: 305857
* Revert "Add previously accidentally uncommitted testcase for r305599."Adrian Prantl2017-06-201-82/+0
| | | | | | | | | This reverts commit r305852. The testcase already exists but I moved it to the X86 directory on a using a different machine and got confused... llvm-svn: 305856
* Make this test a bit more strict. NFC.Rafael Espindola2017-06-201-4/+3
| | | | llvm-svn: 305855
* [libcxx] [test] Fix -Wmismatched-tags in ↵Stephan T. Lavavej2017-06-201-2/+4
| | | | | | | | | | | | tuple_size_structured_bindings.pass.cpp. Clang and C1XX both complain about mismatched class/struct, but libc++ and MSVC's STL differ on what they use for tuple_element/tuple_size, so there's no way to win here. I'm reverting this part of my previous change. In the future, I'll have to suppress the warning for one compiler or the other. llvm-svn: 305854
* Fix a crash in DwarfDebug::validThroughout.Adrian Prantl2017-06-202-3/+254
| | | | | | | | | | | The instruction it falls over on is an IMPLICT_DEF that also happens to be the only instruction in its lexical scope. That LexicalScope has never been created because its range is empty. This patch skips over all meta-instructions instead of just DBG_VALUEs. Thanks to David Blaikie for providing a testcase! llvm-svn: 305853
* Add previously accidentally uncommitted testcase for r305599.Adrian Prantl2017-06-201-0/+82
| | | | llvm-svn: 305852
* Preserve CXX method overrides in ASTImporterLang Hames2017-06-203-9/+59
| | | | | | | | | | | | | | Summary: The ASTImporter should import CXX method overrides from the source context when it imports a method decl. Reviewers: spyffe, rsmith, doug.gregor Reviewed By: spyffe Differential Revision: https://reviews.llvm.org/D34371 llvm-svn: 305850
* Change llvm-objdump with Mach-O files and the -info-plist option with theKevin Enderby2017-06-202-1/+6
| | | | | | | | -no-leading-headers option so that it does not print the leading header. rdar://27378808 llvm-svn: 305849
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-06-2014-32/+31
| | | | llvm-svn: 305848
* [Statepoint] Add helper functions for GCRelocate and GCResultAnna Thomas2017-06-202-0/+15
| | | | | | | These functions isGCRelocate and isGCResult are similar to isStatepoint(const Value*). llvm-svn: 305847
* Support: chunk writing on LinuxSaleem Abdulrasool2017-06-203-1/+22
| | | | | | | | This is a workaround for large file writes. It has been witnessed that write(2) failing with EINVAL (22) due to a large value (>2G). Thanks to James Knight for the help with coming up with a sane test case. llvm-svn: 305846
* [clang] Fix format specifiers fixits for nested macrosAlexander Shaposhnikov2017-06-203-15/+48
| | | | | | | | | | | | | | ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff we build the stack of expansions where the last one is the actual expansion which should be used for grouping together the edits. The definition of MacroArgUse is adjusted accordingly. Test plan: make check-all Differential revision: https://reviews.llvm.org/D34268 llvm-svn: 305845
* AMDGPU: Allow vectorization of packed typesMatt Arsenault2017-06-205-78/+249
| | | | llvm-svn: 305844
* [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp ↵Stephan T. Lavavej2017-06-201-6/+16
| | | | | | | | | | | | | | | | | | | and make it friendlier to C1XX. Style/paranoia: 42.1 doesn't have an exact binary representation. Although this doesn't cause failures, it makes me uncomfortable, so I'm changing it to 42.5. C1XX rightly warns about unreferenced variables. Adding tests for their values makes C1XX happy and improves test coverage. C1XX (somewhat obnoxiously) warns about seeing a struct specialized as a class. Although the Standard doesn't care, saying struct consistently is better. (The Standard itself is still inconsistent about whether to depict tuple_element and tuple_size as structs or classes.) Fixes D33953. llvm-svn: 305843
* [codeview] Fully initialize DataSym when mapping from YAMLReid Kleckner2017-06-201-0/+2
| | | | | | | | | | In the object file, the section index and relative offset are typically zero, so make these YAML fields optional with a default. It looks like there may be more partially initialized symbol records, but this should fix the msan bot. llvm-svn: 305842
* Fix discovery of cxxabi.h in the monorepo layoutReid Kleckner2017-06-201-0/+1
| | | | llvm-svn: 305841
* [AMDGPU] Fix illegal shrink of V_SUBB_U32 and V_ADDC_U32Stanislav Mekhanoshin2017-06-202-0/+103
| | | | | | | | | If there is an immediate operand we shall not shrink V_SUBB_U32 and V_ADDC_U32, it does not fit e32 encoding. Differential Revison: https://reviews.llvm.org/D34291 llvm-svn: 305840
* [cmake] Add support for using the standalone leaks sanitizer with LLVM.Michael Gottesman2017-06-201-0/+3
| | | | | | | | | | This commit causes LLVM_USE_SANITIZER to now accept the "Leaks" option. This will cause cmake to pass in -fsanitize=leak in all of the appropriate places. I am making this change so that I can setup a linux bot that only detects leaks. llvm-svn: 305839
* AMDGPU: Start adding global_* instructionsMatt Arsenault2017-06-207-6/+193
| | | | llvm-svn: 305838
* [GISel]: NFC. Add comment to G_FMA opcode as requested in rL305824Aditya Nandakumar2017-06-201-0/+1
| | | | llvm-svn: 305837
* [GISel]: Add G_FMA opcode for fused multiply addsAditya Nandakumar2017-06-204-0/+30
| | | | | | | | https://reviews.llvm.org/D34372 Reviewed by dsanders llvm-svn: 305824
* Fix argument numbersing in OPTION macroSam Clegg2017-06-202-6/+6
| | | | | | | | | | The option numbers in the macro were off by one which leads to some confusion. There are actually 12 arguments to this macro. Differential Revision: https://reviews.llvm.org/D34413 llvm-svn: 305823
* [ASan] Disable allocator_oom_test.cc on s390Alex Shlyapnikov2017-06-201-0/+3
| | | | | | | | | | | | | | Summary: ASan shadow memory on s390 is larger than other configurations, let's disable this test for now (will revisit it later). Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34414 llvm-svn: 305822
* AMDGPU: Do operand folding in program orderMatt Arsenault2017-06-202-5/+50
| | | | | | | | | Before it was possible to partially fold use instructions before the defs. After the xor is folded into a copy, the same mov can end up in the fold list twice, so on the second attempt it will fail expecting to see a register to fold. llvm-svn: 305821
* [AArch64] ADD ARMv.2-A FP16 vector intrinsicsAbderrazek Zaafrani2017-06-2010-363/+2355
| | | | | | Differential Revision: https://reviews.llvm.org/D34161 llvm-svn: 305820
OpenPOWER on IntegriCloud