summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] - Remove unnecessary template #3. NFC.George Rimar2017-03-141-6/+3
| | | | llvm-svn: 297719
* [ELF] - Remove unnecessary template #2. NFC.George Rimar2017-03-141-3/+3
| | | | llvm-svn: 297718
* [ELF] - Remove unnecessary template. NFC.George Rimar2017-03-141-3/+2
| | | | llvm-svn: 297717
* [ARM] Move SMULW[B|T] isel to DAG CombineSam Parker2017-03-148-150/+180
| | | | | | | | | | | | Create nodes for smulwb and smulwt and move their selection from DAGToDAG to DAG combine. smlawb and smlawt can then be selected using tablegen. Added some helper functions to detect shift patterns as well as a wrapper around SimplifyDemandBits. Added a couple of extra tests. Differential Revision: https://reviews.llvm.org/D30708 llvm-svn: 297716
* Disable Callee Saved RegistersOren Ben Simhon2017-03-1419-89/+258
| | | | | | | | | | | | | | Each Calling convention (CC) defines a static list of registers that should be preserved by a callee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. The current LLVM implementation doesn’t support it. It will save a register if it is part of the static CSR list and will not care if the register is passed/returned by the callee. The solution is to dynamically allocate the CSR lists (Only for these CCs). The lists will be updated with actual registers that should be saved by the callee. Since we need the allocated lists to live as long as the function exists, the list should reside inside the Machine Register Info (MRI) which is a property of the Machine Function and managed by it (and has the same life span). The lists should be saved in the MRI and populated upon LowerCall and LowerFormalArguments. The patch will also assist to implement future no_caller_saved_regsiters attribute intended for interrupt handler CC. Differential Revision: https://reviews.llvm.org/D28566 llvm-svn: 297715
* [ELF] - Step to combine LinkerScript and LinkerScriptBaseGeorge Rimar2017-03-144-40/+23
| | | | | | | | | | | | | We can move all not templated functionality to LinkerScriptBase. Patch do that for hasPhdrsCommands() and shows how it helps to detemplate things in other places. Probably we should be able to merge these 2 classes into single one after such steps. Even if not, it still looks as reasonable cleanup for me. Differential revision: https://reviews.llvm.org/D30895 llvm-svn: 297714
* [ELF] Fix LMA offset calculationEugene Leviant2017-03-142-4/+25
| | | | | | Differential revision: https://reviews.llvm.org/D30832 llvm-svn: 297713
* [ELF] Fix crash when .eh_frame(_hdr) is discardedEugene Leviant2017-03-142-1/+15
| | | | | | | | | lld crashes when .eh_frame or .eh_frame_hdr section is discarded in linker script and there is no PHDRS directive. Differential revision: https://reviews.llvm.org/D30885 llvm-svn: 297712
* [ELF] Fix error reporting for synthetic sectionsEugene Leviant2017-03-142-0/+32
| | | | | | | | | | | Synthetic sections don't belong to any input file, but still they are input sections. Whenever problem occurs with relocations in these sections lld crashes in error reporting, trying to print input file name. Differential revision: https://reviews.llvm.org/D30889 llvm-svn: 297711
* Preserve the isl-noexceptions.h C++ bindings when updating islTobias Grosser2017-03-141-0/+3
| | | | | | | | | The bindings currently need to be generated manually, as they are not yet part of the official isl distribution. Hence, we keep them across updates assuming they only need to be updated when new functions or functionality should be exposed. llvm-svn: 297710
* Add back header file that was accidentally dropped in previous updateTobias Grosser2017-03-141-0/+5588
| | | | llvm-svn: 297709
* Update to isl-0.18-369-g5e613c6Tobias Grosser2017-03-1416-5726/+265
| | | | | | This is a regular maintenance update. llvm-svn: 297708
* [AVX-512] Use iPTR instead of i64 in patterns for ↵Craig Topper2017-03-142-33/+12
| | | | | | extract_subvector/insert_subvector index. llvm-svn: 297707
* [AVX-512] Add test cases that demonstrate some patterns that don't work ↵Craig Topper2017-03-141-51/+159
| | | | | | correctly in 32-bit mode. NFC llvm-svn: 297706
* [TargetTransformInfo] getIntrinsicInstrCost() scalarization estimation improvedJonas Paulsson2017-03-1413-89/+145
| | | | | | | | | | | | | | | | | | | | | getIntrinsicInstrCost() used to only compute scalarization cost based on types. This patch improves this so that the actual arguments are checked when they are available, in order to handle only unique non-constant operands. Tests updates: Analysis/CostModel/X86/arith-fp.ll Transforms/LoopVectorize/AArch64/interleaved_cost.ll Transforms/LoopVectorize/ARM/interleaved_cost.ll The improvement in getOperandsScalarizationOverhead() to differentiate on constants made it necessary to update the interleaved_cost.ll tests even though they do not relate to intrinsics. Review: Hal Finkel https://reviews.llvm.org/D29540 llvm-svn: 297705
* [AVX-512] Pre-emptively fix more places in fastisel where we might copy a ↵Craig Topper2017-03-141-9/+28
| | | | | | VK1 register into a AH/BH/CH/DH register. llvm-svn: 297704
* Fix cmake to find the compiler-rt libs on darwinBruno Cardoso Lopes2017-03-141-9/+21
| | | | | | | | | Followup for r297553, which left darwin in a broken state http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan_build/3812 rdar://problem/31011980 llvm-svn: 297703
* [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encodedAkira Hatanaka2017-03-142-1/+36
| | | | | | | | | | correctly. This fixes PR30413. Patch by David Lobron. llvm-svn: 297702
* update.Jason Molenda2017-03-141-0/+6
| | | | llvm-svn: 297701
* [ubsan] Add a nullability sanitizerVedant Kumar2017-03-1411-29/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach UBSan to detect when a value with the _Nonnull type annotation assumes a null value. Call expressions, initializers, assignments, and return statements are all checked. Because _Nonnull does not affect IRGen, the new checks are disabled by default. The new driver flags are: -fsanitize=nullability-arg (_Nonnull violation in call) -fsanitize=nullability-assign (_Nonnull violation in assignment) -fsanitize=nullability-return (_Nonnull violation in return stmt) -fsanitize=nullability (all of the above) This patch builds on top of UBSan's existing support for detecting violations of the nonnull attributes ('nonnull' and 'returns_nonnull'), and relies on the compiler-rt support for those checks. Eventually we will need to update the diagnostic messages in compiler-rt (there are FIXME's for this, which will be addressed in a follow-up). One point of note is that the nullability-return check is only allowed to kick in if all arguments to the function satisfy their nullability preconditions. This makes it necessary to emit some null checks in the function body itself. Testing: check-clang and check-ubsan. I also built some Apple ObjC frameworks with an asserts-enabled compiler, and verified that we get valid reports. Differential Revision: https://reviews.llvm.org/D30762 llvm-svn: 297700
* Add missing condprop-xfail.ll that contains the remaining xfail'd testsDaniel Berlin2017-03-141-0/+123
| | | | llvm-svn: 297699
* Recommitting Craig Topper's patch now that r296476 has been recommitted.Nirav Dave2017-03-142-255/+83
| | | | | | | | When checking if chain node is foldable, make sure the intermediate nodes have a single use across all results not just the result that was used to reach the chain node. This recovers a test case that was severely broken by r296476, my making sure we don't create ADD/ADC that loads and stores when there is also a flag dependency. llvm-svn: 297698
* [Builtin][AArch64] Fix build errors of test casesWeiming Zhao2017-03-142-0/+2
| | | | | | | | | | | | | | | | | Summary: {mul,sub}tf3_test.c have build errors [1] because macro "COMPILER_RT_ABI" is defined in "int_lib.h", which should be included in test cases. [1] http://lab.llvm.org:8011/builders/clang-cmake-aarch64-39vma/builds/4861/steps/ninja%20check%201/logs/FAIL%3A%20Builtins-aarch64-linux%3A%3A%20multf3_test.c Reviewers: rengolin, sdmitriev, dschuff, compnerd, jroelofs Reviewed By: jroelofs Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D30872 llvm-svn: 297697
* clang-format: Make it very slighly more expensive to wrap between "= {".Daniel Jasper2017-03-142-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | This prevents unwanted fallout from r296664. Specifically in proto formatting, this changed: optional Aaaaaaaa aaaaaaaa = 12 [ (aaa) = aaaa, (bbbbbbbbbbbbbbbbbbbbbbbbbb) = { aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true } ]; Into: optional Aaaaaaaa aaaaaaaa = 12 [ (aaa) = aaaa, (bbbbbbbbbbbbbbbbbbbbbbbbbb) = {aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true} ]; Which is considered less readable. Generally, it seems preferable to format such dict literals as blocks rather than contract them to one line. llvm-svn: 297696
* In visitSTORE, always use FindBetterChain, rather than only when UseAA is ↵Nirav Dave2017-03-1475-2553/+2542
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enabled. Recommiting with compiler time improvements Recommitting after fixup of 32-bit aliasing sign offset bug in DAGCombiner. * Simplify Consecutive Merge Store Candidate Search Now that address aliasing is much less conservative, push through simplified store merging search and chain alias analysis which only checks for parallel stores through the chain subgraph. This is cleaner as the separation of non-interfering loads/stores from the store-merging logic. When merging stores search up the chain through a single load, and finds all possible stores by looking down from through a load and a TokenFactor to all stores visited. This improves the quality of the output SelectionDAG and the output Codegen (save perhaps for some ARM cases where we correctly constructs wider loads, but then promotes them to float operations which appear but requires more expensive constant generation). Some minor peephole optimizations to deal with improved SubDAG shapes (listed below) Additional Minor Changes: 1. Finishes removing unused AliasLoad code 2. Unifies the chain aggregation in the merged stores across code paths 3. Re-add the Store node to the worklist after calling SimplifyDemandedBits. 4. Increase GatherAllAliasesMaxDepth from 6 to 18. That number is arbitrary, but seems sufficient to not cause regressions in tests. 5. Remove Chain dependencies of Memory operations on CopyfromReg nodes as these are captured by data dependence 6. Forward loads-store values through tokenfactors containing {CopyToReg,CopyFromReg} Values. 7. Peephole to convert buildvector of extract_vector_elt to extract_subvector if possible (see CodeGen/AArch64/store-merge.ll) 8. Store merging for the ARM target is restricted to 32-bit as some in some contexts invalid 64-bit operations are being generated. This can be removed once appropriate checks are added. This finishes the change Matt Arsenault started in r246307 and jyknight's original patch. Many tests required some changes as memory operations are now reorderable, improving load-store forwarding. One test in particular is worth noting: CodeGen/PowerPC/ppc64-align-long-double.ll - Improved load-store forwarding converts a load-store pair into a parallel store and a memory-realized bitcast of the same value. However, because we lose the sharing of the explicit and implicit store values we must create another local store. A similar transformation happens before SelectionDAG as well. Reviewers: arsenm, hfinkel, tstellarAMD, jyknight, nhaehnle llvm-svn: 297695
* Fix crash with interrupt attribute on ARM.Eli Friedman2017-03-142-1/+6
| | | | | | An indirect call has no associated function declaration. llvm-svn: 297694
* Reapply [VFS] Ignore broken symlinks in the directory iterator.Juergen Ributzka2017-03-143-6/+93
| | | | | | | | | | | | | | | | | | | | | Modified the tests to accept any iteration order, to run only on Unix, and added additional error reporting to investigate SystemZ bot issue. The VFS directory iterator and recursive directory iterator behave differently from the LLVM counterparts. Once the VFS iterators hit a broken symlink they immediately abort. The LLVM counterparts don't stat entries unless they have to descend into the next directory, which allows to recover from this issue by clearing the error code and skipping to the next entry. This change adds similar behavior to the VFS iterators. There should be no change in current behavior in the current CLANG source base, because all clients have loop exit conditions that also check the error code. This fixes rdar://problem/30934619. Differential Revision: https://reviews.llvm.org/D30768 llvm-svn: 297693
* [libFuzzer] Reorder includes in testVitaly Buka2017-03-131-2/+2
| | | | llvm-svn: 297692
* [debugserver] NFC. Missed one bit of cleanup in r297688Chris Bieneman2017-03-131-22/+13
| | | | | | I did this cleanup in the x86_64, but missed it in the i386 code. This just simplifies the calls to thread_get_state. llvm-svn: 297691
* [libFuzzer] Fix compilation of CustomCrossOverAndMutateTest on WindowsVitaly Buka2017-03-131-1/+2
| | | | llvm-svn: 297690
* Add the beginning of PDB diffing support.Zachary Turner2017-03-139-131/+526
| | | | | | | | | | For now this only diffs the stream directory and the MSF Superblock. Future patches will drill down into individual streams to find out where the differences lie. Differential Revision: https://reviews.llvm.org/D30908 llvm-svn: 297689
* [debugserver] NFC. Cleanup DNBArchImpl*::GetFPUState()Chris Bieneman2017-03-133-242/+125
| | | | | | | | This patch consolidates the DEBUG_FPU_REGS code for i386 and x86_64 to take advantage of the fact that the non-AVX members of the avx register state structure overlap with the standard fpu register state structure. This reduces the amount of code required to set debug values into the register state structures because the register state structures are stored in a union. llvm-svn: 297688
* Remove a useless temporary variable.Rui Ueyama2017-03-131-3/+1
| | | | llvm-svn: 297687
* Simplify and add comments. NFC.Rui Ueyama2017-03-131-14/+24
| | | | llvm-svn: 297686
* [debugserver] This is a small cleanup patch to AVX support detectionChris Bieneman2017-03-136-121/+55
| | | | | | | | | | | | | | | | | | | | | Summary: The first Sandybridge iMacs with AVX support shipped in Spring 2011 with Snow Leopard as their OS. Unfortunately due to a kernel bug debugging AVX code was not really possible until 10.7.4. The old code here checked the kernel build number to determine when to support AVX, but that code was incorrect. It verified that the kernel build number was greater than xnu-2020, which is the build of the kernel that had the fix for 10.8. The fix was also back ported to 10.7.4. Which means all publicly available OS builds 10.7.4 and later have working AVX support. This new patch verifies that the host OS is greater than or equal to 10.7.4 by checking that the build number is greater than or equal to 11Exx. The patch also removes the HasAVX assembly blob in favor of querying the kernel via sysctl for the hardware features. Using sysctl is slower, however since the code is executed once and the result cached it is a better approach because it is possible for the kernel to disable AVX support on hardware that supports it, so listening to the kernel is a better approach for the debugger to take. Reviewers: jasonmolenda, spyffe Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30918 llvm-svn: 297685
* Revert "Debug Info: Add basic support for external types references."Adrian Prantl2017-03-138-89/+3
| | | | | | | | | | | | | | This reverts commit r242302. External type refs of this form were never used by any LLVM frontend so this is effectively dead code. (They were introduced to support clang module debug info, but in the end we came up with a better design that doesn't use this feature at all.) rdar://problem/25897929 Differential Revision: https://reviews.llvm.org/D30917 llvm-svn: 297684
* NewGVN: We pass rle-nonlocal, we just perform the replacement in a way that ↵Daniel Berlin2017-03-131-8/+22
| | | | | | keeps the old name instead of the new one llvm-svn: 297683
* [Thumb1] combine ADDC/SUBC with a negative immediateArtyom Skrobov2017-03-133-14/+26
| | | | | | | | | | | | Summary: This simple optimization has been split out of https://reviews.llvm.org/D30400 Reviewers: efriedma, jmolloy Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D30829 llvm-svn: 297682
* Fix -Wunused-lambda-capture warning in new codeReid Kleckner2017-03-131-1/+1
| | | | llvm-svn: 297681
* Widen AST bitfields too small to represent all enumeratorsReid Kleckner2017-03-134-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | All of these were found by a new warning that I am prototyping, -Wbitfield-enum-conversion. Stmt::ExprBits::ObjectKind - This was not wide enough to represent OK_ObjSubscript, so this was a real, true positive bug. ObjCDeclSpec::objCDeclQualifier - On Windows, setting DQ_CSNullability would cause the bitfield to become negative because enum types are always implicitly 'int' there. This would probably never be noticed because this is a flag-style enum, so we only ever test one bit at a time. Switching to 'unsigned' also makes this type pack smaller on Windows. FunctionDecl::SClass - Technically, we only need two bits for all valid function storage classes. Functions can never have automatic or register storage class. This seems a bit too clever, and we have a bit to spare, so widening the bitfield seems like the best way to pacify the warning. You could classify this as a false positive, but widening the bitfield defends us from invalid ASTs. llvm-svn: 297680
* Make FileOutputBuffer fail early if you pass a directory.Rui Ueyama2017-03-132-0/+5
| | | | | | | | | | Previously, it created a temporary directory and then failed when FileOutputBuffer tried to rename that file to the destination file (which is actually a directory name). Differential Revision: https://reviews.llvm.org/D30912 llvm-svn: 297679
* [AVX-512] Fix another case where we are copying from a mask register using ↵Craig Topper2017-03-132-1/+69
| | | | | | | | AH/BH/CH/DH with fastisel. Fixes PR32256. Still planning to do an audit for other possible cases. llvm-svn: 297678
* Add a comment to say that -build-id=sha1 is a synonym for tree.Rui Ueyama2017-03-131-1/+3
| | | | llvm-svn: 297677
* Fix llvm-symbolizer to navigate both DW_AT_abstract_origin and ↵David Blaikie2017-03-133-42/+28
| | | | | | | | | DW_AT_specification in a single chain In a recent refactoring (r291959) this regressed to only following one or the other, not both, in a single chain. llvm-svn: 297676
* Remove unused lambda captureDavid Blaikie2017-03-131-1/+1
| | | | llvm-svn: 297675
* Fix sign compare warning in unit test by using an explicit unsigned literal ↵David Blaikie2017-03-131-1/+1
| | | | | | suffix llvm-svn: 297674
* [IPRA] Change algorithm for RegUsageInfoCollector.Marcello Maggioni2017-03-131-3/+21
| | | | | | | | | | | | | | | | | The previous algorithm for RegUsageInfoCollector had pretty bad performance on architectures with a lot of registers that alias a lot one another, because we potentially iterate for every register over all the aliasing registers. This costs even more if the function is small and doesn't define a lot of registers. This patch changes the algorithm to one that while iterating over all the registers it will iterate over the aliasing registers only if the register itself is defined. This should be faster based on the assumption that only a subset of the whole LLVM registers set is actually defined in the function. Differential Revision: https://reviews.llvm.org/D30880 llvm-svn: 297673
* [Support] Follow-up for "Test directory iterators and recursive directory ↵Juergen Ributzka2017-03-131-1/+1
| | | | | | | | iterators with broken symlinks." Fix the test by sorting the result vector. llvm-svn: 297672
* Add the 'AllowSoleDefaultDtor' and 'AllowMissingMoveFunctions' options to ↵Aaron Ballman2017-03-136-33/+198
| | | | | | | | the cppcoreguidelines-special-member-functions check. Patch by Florian Gross. llvm-svn: 297671
* GlobalISel: Translate ConstantDataVectorVolkan Keles2017-03-132-0/+47
| | | | | | | | | | | | Reviewers: qcolombet, aditya_nandakumar, dsanders, t.p.northover, javed.absar, ab Reviewed By: qcolombet, dsanders, ab Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30216 llvm-svn: 297670
OpenPOWER on IntegriCloud