summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* BranchRelaxation: computeLiveIns() after creating new blockMatthias Braun2017-05-271-0/+4
| | | | | | | | One case in BranchRelaxation did not compute liveins after creating a new block. This is catched by existing tests with an upcoming commit that will improve MachineVerifier checking of livein lists. llvm-svn: 304049
* AArch64: Fix cmpxchg O0 expansionMatthias Braun2017-05-263-64/+74
| | | | | | | | | | | | | | - Rewrite livein calculation to use the computeLiveIns() helper function. This is slightly less efficient but easier to reason about and doesn't unnecessarily add pristine and reserved registers[1] - Zero the status register at the beginning of the loop to make sure it has a defined value. - Remove kill flags of values that need to stay alive throughout the loop. [1] An upcoming commit of mine will tighten the MachineVerifier to catch these. llvm-svn: 304048
* [llvm-pdbdump] pdb2yaml: add an -all option to dump everything we canBob Haarman2017-05-263-0/+18
| | | | | | | | | | | | Reviewers: amccarth, rnk, zturner Reviewed By: zturner Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D33613 llvm-svn: 304047
* Bitcode: Remove some dead code. Spotted by Teresa.Peter Collingbourne2017-05-261-23/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D33609 llvm-svn: 304046
* [asan] Enable back halt_on_error-torture.cc disabled on PowerPC.Alex Shlyapnikov2017-05-261-4/+0
| | | | | | | | | | | | | | Summary: D33521 addressed a memory ordering issue in BlockingMutex, which seems to be the cause of a flakiness of a few ASan tests on PowerPC. Reviewers: eugenis Subscribers: kubamracek, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D33611 llvm-svn: 304045
* [InstSimplify] Push commuted op checks for and/or of icmp further down to ↵Craig Topper2017-05-261-33/+47
| | | | | | | | | | | | avoid duplicate work Previously, we called simplifyPossiblyCastedAndOrOfICmps twice with the operands commuted, but the call to simplifyAndOrOfICmpsWithConstants further down already handles commuting and doesn't need to be called both ways. This patch pushes double calls further down to just the individual routines that need to be called twice. Differential Revision: https://reviews.llvm.org/D33603 llvm-svn: 304044
* [bpf] disallow global_addr+off foldingAlexei Starovoitov2017-05-262-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Wrong assembly code is generated for a simple program with clang. If clang only produces IR and llc is used for IR lowering and optimization, correct assembly code is generated. The main reason is that clang feeds default Reloc::Static to llvm and llc feeds no RelocMode to llvm, where for llc case, BPF backend picks up Reloc::PIC_ mode. This leads different IR lowering behavior and clang permits global_addr+off folding while llc doesn't. This patch introduces isOffsetFoldingLegal function into BPF backend and the function always return false. This will make clang and llc behave the same for the lowering. Bug https://bugs.llvm.org//show_bug.cgi?id=33183 has more detailed explanation. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 304043
* Fix test broken by r304020David Blaikie2017-05-261-1/+6
| | | | | | | | | | It's a workaround because the test was flakey passing to begin with, but it looks like (going off commit history) it really did want to test in the presence of debug info, so keep that behavior (by adding something to the CU so it's not dropped) & restore the flakey pass in the process. (added a FIXME in case someone else decides to look at it later) llvm-svn: 304042
* [Mips] Placate GCC's -Wmisleading-indentation. NFCI.Davide Italiano2017-05-261-17/+17
| | | | llvm-svn: 304041
* [lib/LTO] Don't reinvent the code for switching linkage.Davide Italiano2017-05-261-10/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D33582 llvm-svn: 304040
* [compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka2017-05-262-1/+124
| | | | | | | | | | | | allow_user_segv_handler is true. Reviewers: eugenis, kcc Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32457 llvm-svn: 304039
* LivePhysRegs: Rework constructor + documentation; NFCMatthias Braun2017-05-2611-32/+31
| | | | | | | - Take reference instead of pointer to a TRI that cannot be nullptr. - Improve documentation comments. llvm-svn: 304038
* LivePhysRegs: Doxygen cleanup; NFCMatthias Braun2017-05-261-45/+45
| | | | | | | | - Remove unnecessary \brief - @p -> \p - Add \file and /// to introduction llvm-svn: 304037
* LivePhysRegs: Add default for removeRegsInMask(Clobbers); NFCMatthias Braun2017-05-262-2/+3
| | | | llvm-svn: 304036
* MachineVerifier: Remove unused set; NFCMatthias Braun2017-05-261-5/+0
| | | | llvm-svn: 304035
* [Hexagon] Cleanup of unused function isCalleeSaveReg (NFC)Sumanth Gundapaneni2017-05-262-6/+0
| | | | llvm-svn: 304034
* Resubmit r303861.Konstantin Zhuravlyov2017-05-262-0/+8
| | | | | | | | [AMDGPU] add __builtin_amdgcn_s_getpc Patch by Tim Corringham llvm-svn: 304033
* allow_user_segv_handler was already removedVitaly Buka2017-05-261-4/+0
| | | | | | New default behavior matches previous allow_user_segv_handler=1 llvm-svn: 304032
* Resubmit r303859 with test fixed.Konstantin Zhuravlyov2017-05-263-1/+28
| | | | | | | | | | [AMDGPU] add intrinsic for s_getpc Summary: The s_getpc instruction is exposed as intrinsic llvm.amdgcn.s.getpc. Patch by Tim Corringham llvm-svn: 304031
* Remove unused diagnostics. NFC.Benjamin Kramer2017-05-261-4/+0
| | | | llvm-svn: 304030
* Make helper functions static. NFC.Benjamin Kramer2017-05-268-12/+22
| | | | llvm-svn: 304029
* Make helper functions static. NFC.Benjamin Kramer2017-05-264-13/+13
| | | | llvm-svn: 304028
* Fix the ManagedStatic list ordering when using ↵Frederich Munch2017-05-261-3/+8
| | | | | | | | | | | | | | | | | | | | DynamicLibrary::addPermanentLibrary. Summary: r295737 included a fix for leaking libraries loaded via. DynamicLibrary::addPermanentLibrary. This created a problem where static constructors in a library could insert llvm::ManagedStatic objects before DynamicLibrary would register it's own ManagedStatic, meaning a crash could occur at shutdown. r301562 exasperated this problem by cleaning up the DynamicLibrary ManagedStatic during llvm_shutdown. Reviewers: v.g.vassilev, lhames, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33581 llvm-svn: 304027
* [libcxxabi] iconv is not needed for mingw-w64Martell Malone2017-05-261-1/+1
| | | | llvm-svn: 304026
* [scan-build] Patch to scan-build tool to support "--target=<value>" flagPetr Hosek2017-05-261-1/+2
| | | | | | | | | | | | | | | | | The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=<value>" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used this flag in their makefile. This single line of change allows scan-build script to properly handle the "--target=<value>" flag. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D33263 llvm-svn: 304025
* [lld][ELF]Add option to make .dynamic read onlyPetr Hosek2017-05-265-3/+53
| | | | | | | | | | | | | | The .dynamic section of an ELF almost doesn't need to be written to with the exception of the DT_DEBUG entry. For several reasons having a read only .dynamic section would be useful. This change adds the -z keyword "rodynamic" which forces .dynamic to be read-only. In this case DT_DEBUG will not be emited. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D33251 llvm-svn: 304024
* [InstSimplify] Move a variable declaration to make simplifyAndOfICmps look ↵Craig Topper2017-05-261-1/+1
| | | | | | more like simplifyOrOfICmps. NFC llvm-svn: 304023
* [InstSimplify] Use commutable matchers to shorten some codeCraig Topper2017-05-261-13/+5
| | | | | | | | This code was replicated two additional times to handle commuted cases, but I think a commutable matcher can take care of it. Differential Revision: https://reviews.llvm.org/D33585 llvm-svn: 304022
* [InstSimplify] Use m_APInt instead of m_ConstantInt in ((V + N) & C1) | (V & ↵Craig Topper2017-05-262-11/+50
| | | | | | | | | | C2) handling in order to support splat vectors. The tests here are have operands commuted to provide more coverage. I also commuted one of the instructions in the scalar tests so the 4 tests cover the 4 commuted variations Differential Revision: https://reviews.llvm.org/D33599 llvm-svn: 304021
* DebugInfo: Do not emit empty CUsDavid Blaikie2017-05-2614-74/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistent with GCC and addresses a shortcoming with ThinLTO where many imported CUs may end up being empty (because the functions imported from them either ended up not being used (and were then discarded, since they're imported as available_externally) or optimized away entirely). Test cases previously testing empty CUs (either intentionally, or because they didn't need anything more complicated) had a trivial 'int' or similar basic type added to their retained types list. This is a first order approximation - a deeper implementation could do things like: 1) Be more lazy about construction of the CU - for example if two CUs containing a single identical retained type are linked together, with this change one of the two CUs will be produced but empty (since a duplicate type won't be produced). 2) Go further and invert all the CU links the same way the subprogram link is inverted - keep named CU lists of retained types, macros, etc, and have those link back to the CU. Then if they're emitted, the CU is emitted, but never otherwise - this would allow the metadata itself to be dropped earlier too, though it seems unlikely that's an important optimization as there shouldn't be many CUs relative to the number of other entities. llvm-svn: 304020
* PMB: Run the whole-program-devirt pass during LTO at --lto-O0.Peter Collingbourne2017-05-262-0/+22
| | | | | | | | | | The whole-program-devirt pass needs to run at -O0 because only it knows about the llvm.type.checked.load intrinsic: it needs to both lower the intrinsic itself and handle it in the summary. Differential Revision: https://reviews.llvm.org/D33571 llvm-svn: 304019
* [InstCombine] Pass the DominatorTree, AssumptionCache, and context ↵Craig Topper2017-05-263-4/+7
| | | | | | | | | | instruction to a few calls to isKnownPositive, isKnownNegative, and isKnownNonZero Every other place in InstCombine that uses these methods in ValueTracking already pass this information. This makes the remaining sites consistent. Differential Revision: https://reviews.llvm.org/D33567 llvm-svn: 304018
* CodeGen: Define Swift's legal vector types for AArch64, ARMArnold Schwaighofer2017-05-263-0/+47
| | | | | | rdar://32401301 llvm-svn: 304017
* [ELF] - Attemp to fix botGeorge Rimar2017-05-261-1/+1
| | | | | | http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/8549/steps/build_Lld/logs/stdio llvm-svn: 304016
* [AMDGPU][MC][GFX9] Corrected encoding of flat_scratch* for SDWA opcodesDmitry Preobrazhensky2017-05-262-1/+5
| | | | | | | | | | See bug 33171: https://bugs.llvm.org/show_bug.cgi?id=33171 Reviewers: Sam Kolton Differential Revision: https://reviews.llvm.org/D33553 llvm-svn: 304015
* Avoid a couple uses of OutputSections.Rafael Espindola2017-05-261-5/+12
| | | | | | After fabricateDefaultCommands we can look at the script commands. llvm-svn: 304014
* Only define __SIZEOF_FLOAT128__ on x86 as intended in r304012Reid Kleckner2017-05-262-2/+3
| | | | | | GCC only defines it on x86. llvm-svn: 304013
* Enable __float128 for mingw for GCC compatibility and define ↵Reid Kleckner2017-05-263-4/+13
| | | | | | | | | | | | __SIZEOF_FLOAT128__ on x86 GCC defines __FLOAT128__ on Power and __SIZEOF_FLOAT128__ on x86. We're just following the inconsistency for now so users have some way to test. Effectively merges this patch as requested by Martell Malone: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/0107-enable-__float128-for-X86-MinGW.patch llvm-svn: 304012
* Revert r304002 "[DWARF] - Make collectAddressRanges() return section index ↵George Rimar2017-05-2618-100/+42
| | | | | | | | in addition to Low/High PC" Revert it again. Now another bot unhappy: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/8750 llvm-svn: 304011
* [LSAN-ARM] Marking new test unsupported on ARMHF due to bot failuresRenato Golin2017-05-261-0/+3
| | | | | | | | | The test was meant for Darwin anyway, so I'm not even sure it's supposed to run on Linux. If it was, then we need time to investigate, but since the test is new, there's no point in reverting the whole patch because of it. llvm-svn: 304010
* Avoid using EhFrameHdr->Sections.Rafael Espindola2017-05-261-2/+4
| | | | | | This is a necessary step for moving clearOutputSections earlier. llvm-svn: 304009
* Order writable executable sections before writable ones.Rafael Espindola2017-05-269-198/+212
| | | | | | | | | | | | | | On SPARC, .plt is both writeable and executable. The current way sections are sorted means that lld puts it after .data/.bss. but it really needs to be close to .test to make sure branches into .plt don't overflow. I'd argue that because .bss is supposed to come last on all architectures, we should change the default sort order such that writable and executable sections come before sections that are just writeable. read-only executable sections should still come after sections that are just read-only of course. This diff makes this change. llvm-svn: 304008
* [ScopInfo] Translate mapToDimension to isl C++ [NFC]Tobias Grosser2017-05-261-46/+18
| | | | llvm-svn: 304007
* Update MS mangling EBNF, NFCReid Kleckner2017-05-261-0/+2
| | | | llvm-svn: 304006
* Revert "Export the required symbol from DynamicLibraryTests"Roger Ferrer Ibanez2017-05-262-2/+0
| | | | | | This breaks sanitizer-x86_64-linux-fast buildbot. llvm-svn: 304005
* DebugInfo: Don't include locations for debug-having code inlined into ↵David Blaikie2017-05-262-1/+12
| | | | | | | | | | | | | | | nodebug functions This produced 'strange' DWARF anyway - the CU would have no ranges (or at least not a range including the inlined code) nor any subprogram or inlined_subroutine - yet the line table would have entries for these instructions. (this actually becomes more relevant with changes coming after this, where a CU without any contents will be omitted entirely - so there would be no line table to put this on anyway) llvm-svn: 304004
* AMDGPU/GlobalISel: Mark 32-bit float constants as legalTom Stellard2017-05-263-0/+26
| | | | | | | | | | | | Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D33212 llvm-svn: 304003
* [DWARF] - Make collectAddressRanges() return section index in addition to ↵George Rimar2017-05-2618-42/+100
| | | | | | | | | | | | | | | | | | Low/High PC This change is intended to use for LLD in D33183. Problem we have in LLD when building .gdb_index is that we need to know section which address range belongs to. Previously it was solved on LLD side by providing fake section addresses with use of llvm::LoadedObjectInfo interface. We assigned file offsets as addressed. Then after obtaining ranges lists, for each range we had to find section ID's. That not only was slow, but also complicated implementation and was the reason of incorrect behavior when sections share the same offsets, like D33176 shows. This patch makes DWARF parsers to return section index as well. That solves problem mentioned above. Differential revision: https://reviews.llvm.org/D33184 llvm-svn: 304002
* LivePhysRegs: Fix addLiveOutsNoPristines() for return blocks past PEIMatthias Braun2017-05-262-31/+100
| | | | | | | | | | | | | | | | | Re-commit r303938 and r303954 with a fix for addLiveIns(): the internal addPristines() function must be called on an empty set or it may accidentally reset saved registers. - addLiveOutsNoPristines() needs to add callee saved registers that are actually saved and restored somewhere to the set (they are not pristine). - Cleanup/rewrite the code for addLiveOuts()/addLiveOutsNoPristines(). This fixes the problem from D32156. Differential Revision: https://reviews.llvm.org/D32464 llvm-svn: 304001
* Adding a const overload of DesignatedInitExpr::getDesignator().Aaron Ballman2017-05-261-0/+3
| | | | llvm-svn: 304000
OpenPOWER on IntegriCloud