summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r304824 "Fix PR23384 (part 3 of 3)"Hans Wennborg2017-06-1916-107/+90
| | | | | | | | | | | | | | | | | This seems to be interacting badly with ASan somehow, causing false reports of heap-buffer overflows: PR33514. > Summary: > The patch makes instruction count the highest priority for > LSR solution for X86 (previously registers had highest priority). > > Reviewers: qcolombet > > Differential Revision: http://reviews.llvm.org/D30562 > > From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 305720
* [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methodsAlex Lorenz2017-06-193-1/+53
| | | | | | | | | | | This change avoid a crash that occurred when skipping to EOF while parsing an ObjC interface/implementation. rdar://31963299 Differential Revision: https://reviews.llvm.org/D34185 llvm-svn: 305719
* Fix a threading bug.Rui Ueyama2017-06-191-0/+5
| | | | llvm-svn: 305718
* Fix -Wsign-compare in ScopInfo.cppReid Kleckner2017-06-191-2/+2
| | | | | | llvm::Loop::getNumBlocks returns an unsigned int, not a long. llvm-svn: 305717
* Fix build and PDB test on LinuxReid Kleckner2017-06-192-5/+5
| | | | llvm-svn: 305716
* [Dominators] Clean up typedefs in GenericDomTreeConstruction. NFC.Jakub Kuderski2017-06-191-21/+24
| | | | | | | | | | | | | | Summary: This patch cleans up GenericDomTreeConstruction by replacing typedefs with usings and replaces `typename GraphT::NodeRef` with `NodePtr` to make the file more readable. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34254 llvm-svn: 305715
* Replace CRLF with LF.Rui Ueyama2017-06-191-9/+9
| | | | llvm-svn: 305714
* [PDB] Start emitting source file and line informationReid Kleckner2017-06-1914-57/+995
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a first step towards getting line info to show up in VS and windbg. So far, only llvm-pdbutil can parse the PDBs that we produce. cvdump doesn't like something about our file checksum tables. I'll have to dig into that next. This patch adds a new DebugSubsectionRecordBuilder which takes bytes directly from some other producer, such as a linker, and sticks it into the PDB. Line tables only need to be relocated. No data needs to be rewritten. File checksums and string tables, on the other hand, need to be re-done. Reviewers: zturner, ruiu Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D34257 llvm-svn: 305713
* Revert "Add lsan interceptors for libdispatch functions on darwin"Francis Ricci2017-06-199-268/+6
| | | | | | This reverts r305695 llvm-svn: 305712
* CodeGen: Cast temporary variable to proper address spaceYaxun Liu2017-06-198-57/+102
| | | | | | | | | | | | | | | | In C++ all variables are in default address space. Previously change has been made to cast automatic variables to default address space. However that is not sufficient since all temporary variables need to be casted to default address space. This patch casts all temporary variables to default address space except those for passing indirect arguments since they are only used for load/store. This patch only affects target having non-zero alloca address space. Differential Revision: https://reviews.llvm.org/D33706 llvm-svn: 305711
* [Dominators] Clean up GenericDomTree.h. NFC.Jakub Kuderski2017-06-191-42/+37
| | | | | | | | | | | | | | | | | | | | | Summary: This patch cleans up GenericDomTree.h by: - removing unnecessary <NodeT> in DomTreeNodeBase - removing unnecessary std::move on bools - changing type of DFSNumIn/DFSNumOut from int to unsigned (since the members were used as unsigned anyway) The changes don't affect behavior -- everything works as before. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34229 llvm-svn: 305710
* [ScheduleOptimizer] Fix minor typo [NFC]Tobias Grosser2017-06-191-1/+1
| | | | llvm-svn: 305709
* [CodeView] Fix dumping of public symbol record flagsReid Kleckner2017-06-199-7/+51
| | | | | | | I noticed nonsensical type information while dumping PDBs produced by MSVC. llvm-svn: 305708
* [NewGVN] Simplify findConditionEquivalence(). NFCI.Davide Italiano2017-06-191-3/+1
| | | | llvm-svn: 305707
* Remove brackets, NFC.Dinar Temirbulatov2017-06-191-4/+2
| | | | llvm-svn: 305706
* [InstCombine] Cleanup some duplicated one use checksCraig Topper2017-06-193-14/+8
| | | | | | | | | | | | | | | | | | | Summary: These 4 patterns have the same one use check repeated twice for each. Once without a cast and one with. But the cast has no effect on what method is called. For the OR case I believe it is always profitable regardless of the number of uses since we'll never increase the instruction count. For the AND case I believe it is profitable if the pair of xors has one use such that we'll get rid of it completely. Or if the C value is something freely invertible, in which case the not doesn't cost anything. Reviewers: spatel, majnemer Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34308 llvm-svn: 305705
* [Reassociate] Support some reassociation of vector xorsCraig Topper2017-06-192-10/+21
| | | | | | | | | | | | | | | | | Summary: Currently we don't try to do anything with vector xors. This patch adds support for removing duplicate pairs from a chain of vector xors as its pretty easy to support. We still dont' try to combine the xors with and/ors, but I might try that in a future patch. Reviewers: mcrosier, davide, resistor Reviewed By: mcrosier Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34338 llvm-svn: 305704
* [Reassociate] Make one of the helper methods static because it doesn't use ↵Craig Topper2017-06-192-4/+2
| | | | | | any class variables. NFC llvm-svn: 305703
* [AMDGPU][mc][tests][NFC] Bulk ISA tests: Massive update. Add Gfx9 dasm tests.Artem Tamazov2017-06-195-82692/+259228
| | | | | | | | | | | A new Gfx9 dasm test added with approx 29000 cases. Existing tests extended by (approx.): * Gfx7 asm: 5000 test cases * Gfx8 asm: 5000 test cases * Gfx9 asm: 14400 test cases * Gfx8 dasm: 5200 test cases llvm-svn: 305702
* Allow truncated and extend memory operations in Store Merge. NFCI.Nirav Dave2017-06-191-24/+46
| | | | | | | | | | As all store merges checks are based on the memory operation performed, allow use of truncated stores and extended loads as valid input candidates for merging. Relanding after fixing selection between truncated and normal store. llvm-svn: 305701
* [LLD][LinkerScript] Add support for segment NONE.Andrew Ng2017-06-192-4/+53
| | | | | | | | | | | | | This patch adds support for segment NONE in linker scripts which enables the specification that a section should not be assigned to any segment. Note that GNU ld does not disallow the definition of a segment named NONE, which if defined, effectively overrides the behaviour described above. This feature has been copied. Differential Revision: https://reviews.llvm.org/D34203 llvm-svn: 305700
* [JumpThreading][LVI] Invalidate LVI information after blocks are mergedAnna Thomas2017-06-192-0/+118
| | | | | | | | | | | | | | | | | | | Summary: After a single predecessor is merged into a basic block, we need to invalidate the LVI information for the new merged block, when LVI is not provably true for all of instructions in the new block. The test cases added show the correct LVI information using the LVI printer pass. Reviewers: reames, dberlin, davide, sanjoy Reviewed by: dberlin, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34108 llvm-svn: 305699
* [TRE] Improve code motion in TRE, use AA to tell whether a load can be moved ↵Xin Tong2017-06-192-19/+54
| | | | | | | | | | | | | | | | before a call that writes to memory. Summary: use AA to tell whether a load can be moved before a call that writes to memory. Reviewers: dberlin, davide, sanjoy, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, llvm-commits Differential Revision: https://reviews.llvm.org/D34115 llvm-svn: 305698
* Add test for store merge with noimplicitfloatNirav Dave2017-06-191-0/+23
| | | | llvm-svn: 305697
* clang-format: Fix C99 designated initializers corner casesFrancois Ferrand2017-06-194-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes the missing space before the designated initializer when `Cpp11BracedListStyle=false` : const struct A a = { .a = 1, .b = 2 }; ^ Also, wrapping between opening brace and designated array initializers used to have an excessive penalty (like breaking between an expression and the subscript operator), leading to unexpected wrapping: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = {[1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; instead of: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = { [1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; Finally, designated array initializers are not binpacked, just like designated member initializers. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, krasimir, klimek Differential Revision: https://reviews.llvm.org/D33491 llvm-svn: 305696
* Add lsan interceptors for libdispatch functions on darwinFrancis Ricci2017-06-199-6/+268
| | | | | | | | | | | | | | | Summary: This is required for standalone LSan to work with libdispatch worker threads, and is a slimmed down version of the functionality provided for ASan in asan_mac.cc. Reviewers: alekseyshl, kubamracek, glider, kcc Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D34247 llvm-svn: 305695
* [AArch64] Fix order of checks in shouldScheduleAdjacent.Florian Hahn2017-06-191-2/+2
| | | | | | | We need to check the opcode of FirstMI before accessing the operands. This caused a buildbot failure during bootstrapping on AArch64. llvm-svn: 305694
* Use range for loops. NFCI.Simon Pilgrim2017-06-191-4/+2
| | | | llvm-svn: 305693
* AMDGPU/GlobalISel: Mark G_BITCAST s32 <--> <2 x s16> legalTom Stellard2017-06-192-0/+30
| | | | | | | | | | | | 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/D34129 llvm-svn: 305692
* [GlobalISel][X86] Fold FI/G_GEP into LDR/STR instruction addressing mode.Igor Breger2017-06-198-175/+248
| | | | | | | | | | | | | | Summary: Implement some of the simplest addressing modes.It should help to test ABI. Reviewers: zvi, guyblank Reviewed By: guyblank Subscribers: rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D33888 llvm-svn: 305691
* Recommit rL305677: [CodeGen] Add generic MacroFusion passFlorian Hahn2017-06-197-253/+245
| | | | | | | | | | | | | Use llvm::make_unique to avoid ambiguity with MSVC. This patch adds a generic MacroFusion pass, that is used on X86 and AArch64, which both define target-specific shouldScheduleAdjacent functions. This generic pass should make it easier for other targets to implement macro fusion and I intend to add macro fusion for ARM shortly. Differential Revision: https://reviews.llvm.org/D34144 llvm-svn: 305690
* Add pretty-printer for wait(2) statuses and modernize the code handling themPavel Labath2017-06-1913-224/+160
| | | | | | | | | | | | | | | Summary: A number of places were trying to decode the result of wait(). Add a simple utility function that does that and a struct that encapsulates the decoded result. Then also provide a pretty-printer for that class. Reviewers: zturner, krytarowski, eugene Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D33998 llvm-svn: 305689
* Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"Christof Douma2017-06-199-377/+363
| | | | | | | This reverts commit 305684. This patch breaks extra/tools/clang-tidy llvm-svn: 305688
* Tweak SysV_arm64 function entry unwind planPavel Labath2017-06-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The motivation for this is to make sure the first row of the plan compares equal to the first row of a generic debug_frame unwind plan. Right now, the code in FuncUnwinders::GetUnwindPlanAtNonCallSite considers them unequal because they specify the return address in a different way (SetReturnAddressRegister(LR) vs. an explicit PC=LR rule). This means that FuncUnwinders would always choose the debug_frame unwind plan, which is not correct, as that one is usually not correct at all locations. Right now this is basically a noop because we don't have parse any debug_frame plans, but it fixes some test failures when merging D33504 in. I have to say I don't understand the full implications of the switch to SetReturnAddressRegister() way of doing things, but given that all of our other unwind plans (eh_frame, instruction profiling) do it this way, it sounds like the right thing to do. Reviewers: tberghammer, jasonmolenda, omjavaid Subscribers: aemerson, javed.absar, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D34199 llvm-svn: 305687
* Delete ProcessLauncherPosixPavel Labath2017-06-197-433/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ProcessLauncherPosix was using posix_spawn for launching the process, but this function is not available on all platforms we support, and even where it was avaialable, it did not support the full range of options we require for launching (most importantly, launching in stop-on-entry mode). For these reasons, the set of ifdefs around these functions has grown untractably large, and we were forced to implement our own launcher from more basic primitives anyway (ProcessLauncherPosixFork -- used on Linux, Android, and NetBSD). Therefore, I remove this class, and move the relevant parts of the code to the darwin-specific Host.mm file. This is the platform that code was originally written for anyway, and it's the only platform where this implementation makes sense (e.g. the lack of the "thread-specific working directory" concept makes these functions racy on all other platforms). This allows us to remove a lot of ifdefs and simplify the code. Effectively, the only change this introduces is that FreeBSD will now use the fork-based launcher instead of posix_spawnp. That sholdn't be a problem as this approach works at least on one other BSD-based system already. Reviewers: krytarowski, emaste, jingham Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34236 llvm-svn: 305686
* Move the test from r305678 to a separte file with 'REQUIRES: system-darwin'Alex Lorenz2017-06-192-9/+10
| | | | | | Otherwise it will fail on non-macOS systems. llvm-svn: 305685
* [NFC] Refactor DiagnosticRenderer to use FullSourceLocChristof Douma2017-06-199-363/+377
| | | | | | | | | | | | | | | | Move the DiagnosticRenderer and its dependents to using FullSourceLocs instead of a SourceLocation and SourceManager pointer. The changeset is rather large but entirely mechanical. This is step one to allow DiagnosticRenderer to take either llvm::SMLocs or clang::SourceLocations. Patch by Sanne Wouda Review: https://reviews.llvm.org/D31709 Change-Id: If351a112cdf6718e2d3ef6721b8da9c6376b32dd llvm-svn: 305684
* [ARM] GlobalISel: Support G_ICMP for s8 and s16Diana Picus2017-06-193-3/+76
| | | | | | Widen to s32 (like all other binary ops). llvm-svn: 305683
* [scudo] Enabling MIPS support for ScudoSagar Thakur2017-06-194-8/+83
| | | | | | | | | Adding MIPS 32-bit and 64-bit support for Scudo. Reviewed by cryptoad, sdardis. Differential: D31803 llvm-svn: 305682
* Revert r305677 [CodeGen] Add generic MacroFusion pass.Florian Hahn2017-06-197-245/+253
| | | | | | This causes Windows buildbot failures do an ambiguous call. llvm-svn: 305681
* Add missing OS check to r305678Alex Lorenz2017-06-191-2/+4
| | | | | | | That commit failed on non-macOS buildbots as I've forgotten to make sure that the system on which Clang is running on is actually macOS. llvm-svn: 305680
* [ELF] Emit only one error if -z max-page-size without valueJames Henderson2017-06-192-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r305364, Rui changed the mechanism that parses -z option values slightly. This caused a bug, as demonstrated by this test, which now fails: --- # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o # RUN: ld.lld %t.o -o %t -z max-page-size .global _start _start: nop --- Before, the link succeeded and set the max-page-size to the target default. After we get the following two error messages: "invalid max-page-size: " "max-page-size: value isn't a power of 2" The latter error is because an uninitialised variable ends up being passed back to getMaxPageSize). This change ensures we only get the first error. Reviewers: ruiu Differential Revision: https://reviews.llvm.org/D34234 llvm-svn: 305679
* [driver][macOS] Pick the system version for the deployment targetAlex Lorenz2017-06-192-1/+29
| | | | | | | | | | | | | | if the SDK is newer than the system This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 305678
* [CodeGen] Add generic MacroFusion pass.Florian Hahn2017-06-197-253/+245
| | | | | | | | | | | | | | | | | | Summary: This patch adds a generic MacroFusion pass, that is used on X86 and AArch64, which both define target-specific shouldScheduleAdjacent functions. This generic pass should make it easier for other targets to implement macro fusion and I intend to add macro fusion for ARM shortly. Reviewers: craig.topper, evandro, t.p.northover, atrick, MatzeB Reviewed By: MatzeB Subscribers: atrick, aemerson, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34144 llvm-svn: 305677
* [ScheduleOptimizer] Move isolateFullPartialTiles and ↵Tobias Grosser2017-06-193-96/+96
| | | | | | isolateAndUnrollMatMulInnerLoops to C++ llvm-svn: 305676
* [CodeGen] Emit aliasing metadata for new arrays.Michael Kruse2017-06-194-11/+28
| | | | | | | | | | | | Ensure that all array base pointers are assigned before generating aliasing metadata by allocating new arrays beforehand. Before this patch, getBasePtr() returned nullptr for new arrays because the arrays were created at a later point. Nullptr did not match to any array after the created array base pointers have been assigned and when the loads/stores are generated. llvm-svn: 305675
* [CodeGen] Deterministic aliasing metadata order. NFC.Michael Kruse2017-06-191-1/+2
| | | | | | | Replace DenseMap by a MapVector to enure that aliasing metadata is always emitted in the same order. llvm-svn: 305674
* [ELF] make default for get{ARM,AArch64}UndefinedRelativeWeakVA unreachablePeter Smith2017-06-191-2/+25
| | | | | | | | | | | | | | The get{ARM,AArch64}UndefinedRelativeWeakVA() functions should only be called for PC-relative relocations. Complete the supported pc-relative relocations in the switch statement and make the default case unreachable. The R_ARM_TARGET relocation can be evaluated as R_ARM_REL32 but it is only used in the context of exception tables, and is never output with respect to a weak reference so it does not appear in the switch statement. Differential Revision: https://reviews.llvm.org/D34138 llvm-svn: 305673
* [ARM] GlobalISel: Support G_ICMP for i32 and pointersDiana Picus2017-06-197-0/+576
| | | | | | | | | | | | | | Add support throughout the pipeline: - mark as legal for s32 and pointers - map to GPRs - lower to a sequence of instructions, which moves 0 or 1 into the result register based on the flags set by a CMPrr We have copied from FastISel a helper function which maps CmpInst predicates into ARMCC codes. Ideally, we should be able to move it somewhere that both FastISel and GlobalISel can use. llvm-svn: 305672
* [X86] Simplify vector-shuffle-v48 test. NFC.Guy Blank2017-06-191-42/+39
| | | | llvm-svn: 305670
OpenPOWER on IntegriCloud