summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Implemented tracing using ContextIlya Biryukov2017-12-146-58/+90
| | | | | | | | | | | | Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall Subscribers: klimek, luckygeck, cfe-commits Differential Revision: https://reviews.llvm.org/D40488 llvm-svn: 320706
* ObjectFile: remove ReadSectionData/MemoryMapSectionData mutual recursionPavel Labath2017-12-143-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These two functions were calling each other, while handling different branches of the if(IsInMemory()). This had a reason at some point in the past, but right now it's just confusing. I resolve this by removing the MemoryMapSectionData function and inlining the !IsInMemory branch into ReadSectionData. There isn't anything mmap-related in this function anyway, as the decision whether to mmap is handled at a higher level. This is a preparatory step to make ObjectFileELF be able to decompress compressed sections (I want to make sure that all calls reading section data are routed through a single piece of code). Reviewers: clayborg Subscribers: emaste, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D41169 llvm-svn: 320705
* Remove stderr message from GDBRemoteCommunicationServerLLGSPavel Labath2017-12-141-7/+2
| | | | | | | | A similar error message is printed again in lldb-gdbserver.cpp, so the user will see the message twice. Also, this is generic library code, we shouldn't really be using stderr here. llvm-svn: 320704
* [mips] Add partial support for R6 in the long branch passSimon Dardis2017-12-142-201/+425
| | | | | | | | | | | | | | | | | | | | MIPSR6 introduced several new jump instructions and deprecated the use of the 'j' instruction. For microMIPS32R6, 'j' was removed entirely and it only has non delay slot jumps. This patch adds support for MIPSR6 by using some R6 instructions-- 'bc' instead of 'j', 'jic $reg, 0' instead of 'jalr $zero, $reg'-- and modifies the sequences not to use delay slots for R6. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: dschuff, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D40786 llvm-svn: 320703
* Renamed test file to use proper naming conventionIlya Biryukov2017-12-141-1/+1
| | | | | | | Also changed the order of CHECK statements. CHEKC-NOT must come before CHECK in skipped-function-bodies.cpp llvm-svn: 320702
* [clangd] Add a FileSymbols container that manages symbols from multiple files.Eric Liu2017-12-145-1/+195
| | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41232 llvm-svn: 320701
* [ScalarEvolution] Fix base condition in isNormalAddRecPHI.Bjorn Pettersson2017-12-142-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The function is meant to recurse until it comes upon the phi it's looking for. However, with the current condition, it will recurse until it finds anything _but_ the phi. The function will even fail for simple cases like: %i = phi i32 [ %inc, %loop ], ... ... %inc = add i32 %i, 1 because the base condition will not happen when the phi is recursed to, and the recursion will end with a 'false' result since the previous instruction is a phi. Reviewers: sanjoy, atrick Reviewed By: sanjoy Subscribers: Ka-Ka, bjope, llvm-commits Committing on behalf of: Bevin Hansson (bevinh) Differential Revision: https://reviews.llvm.org/D40946 llvm-svn: 320700
* [InlineCost] Tracking Values through PHI NodesHaicheng Wu2017-12-142-6/+642
| | | | | | | | | | | | This patch fix this FIXME in visitPHI() FIXME: We should potentially be tracking values through phi nodes, especially when they collapse to a single value due to deleted CFG edges during inlining. Differential Revision: https://reviews.llvm.org/D38594 llvm-svn: 320699
* Revert "[DAGCombine] Move AND nodes to multiple load leaves"Benjamin Kramer2017-12-142-421/+355
| | | | | | This reverts commit r320679. Causes miscompiles. llvm-svn: 320698
* Warn if we find a Unicode homoglyph for a symbol in an identifier.Richard Smith2017-12-143-1/+86
| | | | | | | | | | | | | | | | Specifically, warn if: * we find a character that the language standard says we must treat as an identifier, and * that character is not reasonably an identifier character (it's a punctuation character or similar), and * it renders identically to a valid non-identifier character in common fixed-width fonts. Some tools "helpfully" substitute the surprising characters for the expected characters, and replacing semicolons with Greek question marks is a common "prank". llvm-svn: 320697
* [Frontend] Treat function with skipped body as definitionIlya Biryukov2017-12-142-2/+11
| | | | | | | | | | | | | | | | Summary: This fixes an invalid warning about missing definition of a function when parsing with SkipFunctionBodies=true Reviewers: bkramer, sepavloff Reviewed By: sepavloff Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D41189 llvm-svn: 320696
* [clangd] Fix a potential use-after-move bug.Eric Liu2017-12-141-1/+2
| | | | llvm-svn: 320695
* [clangd] Construct SymbolSlab from YAML format.Haojian Wu2017-12-146-6/+255
| | | | | | | | | | | | | | Summary: This will be used together with D40548 for the global index source (experimental). Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D41178 llvm-svn: 320694
* Any Target Asm comments should start from MachineInstr::TAsmComments value.Andrew V. Tischenko2017-12-142-2/+7
| | | | llvm-svn: 320693
* Inserting several lit tests to reflect current behaviourOmer Paparo Bivas2017-12-142-0/+198
| | | | | Change-Id: I1b8188dc3c6c7c0f455715364ece7d35ef485f2f llvm-svn: 320692
* [AVX512] Adding support for load truncate store of I1Michael Zuckerman2017-12-142-0/+154
| | | | | | | | | | store operation on a truncated memory (load) of vXi1 is poorly supported by LLVM and most of the time end with an assertion. This patch fixes this issue. Differential Revision: https://reviews.llvm.org/D39547 Change-Id: Ida5523dd09c1ad384acc0a27e9e59273d28cbdc9 llvm-svn: 320691
* [X86] Add FMA4 schedule testsSimon Pilgrim2017-12-141-0/+758
| | | | llvm-svn: 320690
* [X86] Add FMA3 schedule testsSimon Pilgrim2017-12-141-477/+1742
| | | | | | Rewrote to use inline asm for full coverage llvm-svn: 320689
* [clangd] Symbol index interfaces and an in-memory index implementation.Eric Liu2017-12-146-0/+238
| | | | | | | | | | | | | | | | | | | | Summary: o Index interfaces to support using different index sources (e.g. AST index, global index) for code completion, cross-reference finding etc. This patch focuses on code completion. The following changes in the original patch has been split out. o Implement an AST-based index. o Add an option to replace sema code completion for qualified-id with index-based completion. o Implement an initial naive code completion index which matches symbols that have the query string as substring. Reviewers: malaperle, sammccall Reviewed By: sammccall Subscribers: hokein, klimek, malaperle, mgorny, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D40548 llvm-svn: 320688
* [PM][InstCombine] fixing omission of AliasAnalysis in new-pass-manager's ↵Fedor Sergeev2017-12-144-4/+28
| | | | | | | | | | | | | | | | | | version of InstCombine Summary: Passing AliasAnalysis results instead of nullptr appears to work just fine. A couple new-pass-manager tests updated to align with new order of analyses. Reviewers: chandlerc, spatel, craig.topper Reviewed By: chandlerc Subscribers: mehdi_amini, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D41203 llvm-svn: 320687
* Remove redundant includes from lib/Target/AArch64.Fedor Sergeev2017-12-141-1/+0
| | | | llvm-svn: 320686
* [CodeGen] Print MCSymbol operands as <mcsymbol sym> in both MIR and debug outputFrancis Visoiu Mistrih2017-12-144-5/+38
| | | | | | | | | Work towards the unification of MIR and debug output by printing `<mcsymbol sym>` instead of `<MCSym=sym>`. Only debug syntax is affected. llvm-svn: 320685
* [CodeGen] Move printing MO_Metadata operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-143-6/+27
| | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 320684
* [CodeGen] Print live-out register lists as liveout(...) in both MIR and ↵Francis Visoiu Mistrih2017-12-143-18/+37
| | | | | | | | | | | debug output Work towards the unification of MIR and debug output by printing `liveout(...)` instead of `<regliveout>`. Only debug syntax is affected. llvm-svn: 320683
* [CodeGen] Print global addresses as @foo in both MIR and debug outputFrancis Visoiu Mistrih2017-12-1411-136/+172
| | | | | | | | | | | | Work towards the unification of MIR and debug output by printing `@foo` instead of `<ga:@foo>`. Also print target flags in the MIR format since most of them are used on global address operands. Only debug syntax is affected. llvm-svn: 320682
* [CodeGen] Print external symbols as $symbol in both MIR and debug outputFrancis Visoiu Mistrih2017-12-148-24/+71
| | | | | | | | | Work towards the unification of MIR and debug output by printing `$symbol` instead of `<es:symbol>`. Only debug syntax is affected. llvm-svn: 320681
* [Verifier] Check that GEP indexes has correct typesIgor Laevsky2017-12-143-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D40391 llvm-svn: 320680
* [DAGCombine] Move AND nodes to multiple load leavesSam Parker2017-12-142-355/+421
| | | | | | | | | | | | | | | | | | | | | | | | Recommitting rL319773, which was reverted due to a recursive issue causing timeouts. This happened because I failed to check whether the discovered loads could be narrowed further. In the case of a tree with one or more narrow loads, that could not be further narrowed, as well as a node that would need masking, an AND could be introduced which could then be visited and recombined again with the same load. This could again create the masking load, with would be combined again... We now check that the load can be narrowed so that this process stops. Original commit message: Search from AND nodes to find whether they can be propagated back to loads, so that the AND and load can be combined into a narrow load. We search through OR, XOR and other AND nodes and all bar one of the leaves are required to be loads or constants. The exception node then needs to be masked off meaning that the 'and' isn't removed, but the loads(s) are narrowed still. Differential Revision: https://reviews.llvm.org/D41177 llvm-svn: 320679
* [clangd] Fix the unitttest build error on buildbot.Haojian Wu2017-12-141-0/+1
| | | | llvm-svn: 320678
* [COFF] Error out if 20 bit thumb branches are out of rangeMartin Storsjo2017-12-143-0/+14
| | | | | | | | | This is similar to what was added in SVN r277838 for 24 bit branch instructions. Differential Revision: https://reviews.llvm.org/D41163 llvm-svn: 320677
* [COFF] Sort .pdata for arm64Martin Storsjo2017-12-142-1/+88
| | | | | | | | | | This works for linking the output from the MSVC compiler. The pdata entries for arm64 seem to be 8 bytes in the same (or at least similar) form to arm. Differential Revision: https://reviews.llvm.org/D41160 llvm-svn: 320676
* [X86] Make ANY_EXTEND from vXi1 Custom for more types.Craig Topper2017-12-146-9524/+774
| | | | | | We should be able to support ANY_EXTEND for any types we support ZERO_EXTEND for. llvm-svn: 320675
* [SelectionDAG][X86] Improve legalization of v32i1 CONCAT_VECTORS of v16i1 ↵Craig Topper2017-12-147-6850/+523
| | | | | | | | | | for AVX512F. A v32i1 CONCAT_VECTORS of v16i1 uses promotion to v32i8 to legalize the v32i1. This results in a bunch of extract_vector_elts and a build_vector that ultimately gets scalarized. This patch checks to see if v16i8 is legal and inserts a any_extend to that so that we can concat v16i8 to v32i8 and avoid creating the extracts. llvm-svn: 320674
* [X86] Remove redundant setOperationAction calls.Craig Topper2017-12-141-2/+0
| | | | | | These calls already exist earlier under AVX2 feature. llvm-svn: 320673
* [LV] Support efficient vectorization of an induction with redundant castsDorit Nuzman2017-12-146-25/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | D30041 extended SCEVPredicateRewriter to improve handling of Phi nodes whose update chain involves casts; PSCEV can now build an AddRecurrence for some forms of such phi nodes, under the proper runtime overflow test. This means that we can identify such phi nodes as an induction, and the loop-vectorizer can now vectorize such inductions, however inefficiently. The vectorizer doesn't know that it can ignore the casts, and so it vectorizes them. This patch records the casts in the InductionDescriptor, so that they could be marked to be ignored for cost calculation (we use VecValuesToIgnore for that) and ignored for vectorization/widening/scalarization (i.e. treated as TriviallyDead). In addition to marking all these casts to be ignored, we also need to make sure that each cast is mapped to the right vector value in the vector loop body (be it a widened, vectorized, or scalarized induction). So whenever an induction phi is mapped to a vector value (during vectorization/widening/ scalarization), we also map the respective cast instruction (if exists) to that vector value. (If the phi-update sequence of an induction involves more than one cast, then the above mapping to vector value is relevant only for the last cast of the sequence as we allow only the "last cast" to be used outside the induction update chain itself). This is the last step in addressing PR30654. llvm-svn: 320672
* Fix a build bot failure.Igor Kudrin2017-12-141-1/+1
| | | | llvm-svn: 320671
* [X86][AES]: Adding full coverage of MC encoding for the AES and AVXAES isa ↵Gadi Haber2017-12-144-0/+1016
| | | | | | | | | | | | | | | sets.<NFC> NFC. Adding MC regressions tests to cover the AES and AVXAES ISA sets both 32 and 64 bit. This patch is part of a larger task to cover MC encoding of all X86 ISA Sets. started in revision: https://reviews.llvm.org/D39952 Reviewers: zvi, craig.topper, m_zuckerman, RKSimon Differential Revision: https://reviews.llvm.org/D41154 Change-Id: I2564f9797628d0c070c4766f837f399337fb87d2 llvm-svn: 320670
* [SelectionDAG] When legalizing the result type of CONCAT_VECTORS, take into ↵Craig Topper2017-12-143-328/+245
| | | | | | | | | | account whether the input type also needs to be promoted. If so go ahead and get the promoted input vector to extract from. Previously, we would create a bunch of any_extends of extract_vector_elts with illegal input type that needs to be promoted. The legalization of those extract_vector_elts would then potentially introduce a truncate. So now we have a bunch of any_extends of truncates. By legalizing both parts together we avoid creating these extra nodes. The test changes seem to be because we were previously combining the build_vector with the any_extend before the any_extend got combined with the truncate. llvm-svn: 320669
* [ELF] Prevent crash in writing an .ARM.exidx sentinel entry.Igor Kudrin2017-12-142-9/+39
| | | | | | | | | | | | We might crash in 'ARMExidxSentinelSection::writeTo()' because it expected the sentinel entry to be put in the same 'InputSectionDescription' as the last real entry. This assumption fails if the last output section command for .ARM.exidx is anything but an input section description, because in this case 'OutputSection::addSection()' creates a new 'InputSectionDescription'. Differential Revision: https://reviews.llvm.org/D41105 llvm-svn: 320668
* Fix crash on invalid.Rafael Espindola2017-12-143-1/+10
| | | | | | | We would fail an assert if a shared library had a local symbol after sh_info. llvm-svn: 320667
* MC/AsmPrinter: Reduce code duplication.Matthias Braun2017-12-145-43/+36
| | | | | | | | | | Factor out duplicated code emitting mach-o version-min specifiers. This should be NFC but happens to fix a bug where the code in MCMachoStreamer didn't take the version skew between darwin and macos versions into account. llvm-svn: 320666
* [scudo] Disabling the interface test on armhfKostya Kortchinsky2017-12-141-0/+1
| | | | | | | | | | | | | | | | | | Summary: I will investigate the breakage tomorrow, disable on armhf to turn the bots green over the night. http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/2952/steps/ninja%20check%202/logs/FAIL%3A%20Scudo-armhf%3A%3A%20interface.cpp This is post https://reviews.llvm.org/D41128. Reviewers: alekseyshl Subscribers: aemerson, kristof.beyls, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D41218 llvm-svn: 320665
* [XRay][compiler-rt] Coalesce calls to mprotect to reduce patching overheadDean Michael Berris2017-12-144-137/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change, XRay would conservatively patch sections of the code one sled at a time. Upon testing/profiling, this turns out to take an inordinate amount of time and cycles. For an instrumented clang binary, the cycles spent both in the patching/unpatching routine constituted 4% of the cycles -- this didn't count the time spent in the kernel while performing the mprotect calls in quick succession. With this change, we're coalescing the number of calls to mprotect from being linear to the number of instrumentation points, to now being a lower constant when patching all the sleds through `__xray_patch()` or `__xray_unpatch()`. In the case of calling `__xray_patch_function()` or `__xray_unpatch_function()` we're now doing an mprotect call once for all the sleds for that function (reduction of at least 2x calls to mprotect). Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41153 llvm-svn: 320664
* Set of corrections for MSan/NetBSDKamil Rytarowski2017-12-144-11/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Changes: - Don't attempt to intercept GLIBC specific functions like __strtol_internal. This is required to stop intercepting it as we leak dlerror(3) for dlsym(3) that cannot manage to find a symbol. - Correct interception of fstatat(2). - Don't run a test for fgetgrent_r() that is missing on NetBSD. - Correct link_map location (offset) in Obj_Entry on x86_64 and i386. - Stop intercepting getpshared-like functions in pthread(3). This is feature is not enabled by default on NetBSD as it's unfinished. - Switch intercepting from UTMP to UTMPX functions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, kcc Reviewed By: vitalybuka Subscribers: llvm-commits, srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41053 llvm-svn: 320663
* [WebAssembly] Update YAML expected output after llvm changeSam Clegg2017-12-149-15/+14
| | | | | | | | See: https://reviews.llvm.org/D41202 Differential Revision: https://reviews.llvm.org/D41210 llvm-svn: 320662
* MC: Add support for mach-o build_versionMatthias Braun2017-12-1413-118/+360
| | | | | | | | LC_BUILD_VERSION is a new load command superseding the previously used LC_XXX_MIN_VERSION commands. This adds an assembler directive along with encoding/streaming support. llvm-svn: 320661
* [asan] Use linker initialization for the allocatorKuba Mracek2017-12-141-3/+3
| | | | | | | | This saves ~2 MB of dirty memory footprint. Can be a big deal on mobile devices especially when running multiple processes with ASan. Differential Revision: https://reviews.llvm.org/D40627 llvm-svn: 320660
* [sanitizer] Use MADV_FREE on Darwin/BSD to release pages to the OSKuba Mracek2017-12-142-1/+7
| | | | | | | | MADV_DONTNEED on Linux actually mark the pages as free to be overwritten with zeroes, but on Darwin and BSD, it's just an advisory flag (the OS cannot discard the content). We should use MADV_FREE on Darwin and BSD. Differential Revision: https://reviews.llvm.org/D40666 llvm-svn: 320659
* [CMake] Pass LLVM_HAVE_LINK_VERSION_SCRIPT to external projectsPetr Hosek2017-12-131-0/+1
| | | | | | | | Some external projects depend on this LLVM CMake variable. Differential Revision: https://reviews.llvm.org/D41205 llvm-svn: 320658
* [cmake] Add support for case-sensitive Windows SDKsShoaib Meenai2017-12-131-12/+77
| | | | | | | | | | When the Windows SDK is hosted on a case-sensitive filesystem (e.g. when compiling on Linux and not using ciopfs), we can automatically generate a VFS overlay for headers and symlinks for libraries. Differential Revision: https://reviews.llvm.org/D41156 llvm-svn: 320657
OpenPOWER on IntegriCloud