summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move summary dead stripping before regular LTO.Evgeniy Stepanov2017-06-022-14/+28
| | | | | | | | | This way dead stripping results are recorded in combined summary and can be used in regular LTO passes. Differential Revision: https://reviews.llvm.org/D33615 llvm-svn: 304577
* [x86] fix formatting; NFCISanjay Patel2017-06-021-8/+9
| | | | llvm-svn: 304576
* [OpenCL] Harden function pointer diagnostics.Alexey Bader2017-06-024-2/+14
| | | | | | | | | | | | | | Summary: Improve OpenCL type checking by rejecting function pointer types. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33821 llvm-svn: 304575
* AMDGPU: Register AMDGPUAlwaysInlineMatt Arsenault2017-06-023-3/+10
| | | | llvm-svn: 304574
* Re-land "COFF: migrate def parser from LLD to LLVM"Reid Kleckner2017-06-028-140/+329
| | | | | | | | | | | | | | | | | | | | | | This reverts commit r304561 and re-lands r303490 & co. The fix was to use "SymbolName" when translating LLD's internal export list to lib/Object's short export struct. The SymbolName reflects the actual symbol name, which may include fastcall and stdcall mangling bits not included in the /EXPORT or .def file EXPORTS name: @@ -434,8 +434,7 @@ std::vector<COFFShortExport> createCOFFShortExportFromConfig() { std::vector<COFFShortExport> Exports; for (Export &E1 : Config->Exports) { COFFShortExport E2; - E2.Name = E1.Name; + // Use SymbolName, which will have any stdcall or fastcall qualifiers. + E2.Name = E1.SymbolName; E2.ExtName = E1.ExtName; E2.Ordinal = E1.Ordinal; E2.Noname = E1.Noname; llvm-svn: 304573
* Add test case for LLD/COFF for stdcall exports in .def filesReid Kleckner2017-06-021-0/+25
| | | | | | | | The .def file parser changes I reverted broke this test case, and exported "__imp__foo" instead of "__imp__foo@8". This was http://crbug.com/728726. llvm-svn: 304572
* AMDGPU: Make auto waitcnt before barrier a featureKonstantin Zhuravlyov2017-06-026-11/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D33793 llvm-svn: 304571
* [clang-tidy] check for __func__/__FUNCTION__ in lambdasAlexander Kornienko2017-06-028-0/+228
| | | | | | | | | | | | Add a clang-tidy check for using func__/FUNCTION__ inside lambdas. This evaluates to the string operator(), which is almost never useful and almost certainly not what the author intended. Patch by Bryce Liu! Differential Revision: https://reviews.llvm.org/D33497 llvm-svn: 304570
* [TargetLowering] fix formatting; NFCSanjay Patel2017-06-021-2/+1
| | | | llvm-svn: 304569
* [Modules] Fix use after scope.Benjamin Kramer2017-06-021-1/+2
| | | | | | Found by asan. llvm-svn: 304568
* [LazyValueInfo] Fix formatting NFC.Craig Topper2017-06-021-1/+1
| | | | llvm-svn: 304567
* Tidy up a bit of r304516, use SmallVector::assign rather than for loopDavid Blaikie2017-06-024-32/+36
| | | | | | | | | | | | | | | | This might give a few better opportunities to optimize these to memcpy rather than loops - also a few minor cleanups (StringRef-izing, templating (to avoid std::function indirection), etc). The SmallVector::assign(iter, iter) could be improved with the use of SFINAE, but the (iter, iter) ctor and append(iter, iter) need it to and don't have it - so, workaround it for now rather than bothering with the added complexity. (also, as noted in the added FIXME, these assign ops could potentially be optimized better at least for non-trivially-copyable types) llvm-svn: 304566
* Verify a couple more fields in STATEPOINT instructionsPhilip Reames2017-06-022-4/+25
| | | | | | | While doing so, clarify the comments and update them to reflect current reality. Note: I'm going to let this sit for a week or so before adding further verification. I want to give this time to cycle through bots and merge it into our downstream tree before pushing this further. llvm-svn: 304565
* Add placeholder for more extensive verification of psuedo opsPhilip Reames2017-06-0214-23/+35
| | | | | | | | | | This initial patch doesn't actually do much useful. It's just to show where the new code goes. Once this is in, I'll extend the verification logic to check more useful properties. For those curious, the more complicated version of this patch already found one very suspicious thing. Differential Revision: https://reviews.llvm.org/D33819 llvm-svn: 304564
* [LazyValueInfo] Make solveBlockValueBinaryOp take a BinaryOperator* instead ↵Craig Topper2017-06-021-14/+14
| | | | | | of Instruction*. This removes a cast of getOpcode to BinaryOps. llvm-svn: 304563
* [InstCombine] fix icmp with not op and constant to work with splat vector ↵Sanjay Patel2017-06-022-5/+4
| | | | | | constant llvm-svn: 304562
* Revert "COFF: migrate def parser from LLD to LLVM"Reid Kleckner2017-06-028-328/+140
| | | | | | | | | | This reverts commits r303490, r303491, r303493, and r303494. This caused http://crbug.com/728726. Essentially, exporting stdcall functions doesn't appear to work after this change. Reduced test case soon. llvm-svn: 304561
* [LazyValueInfo] Fix typo in comment. NFCCraig Topper2017-06-021-1/+1
| | | | llvm-svn: 304560
* [InstSimplify][ConstantFolding] Teach constant folding how to handle icmp ↵Craig Topper2017-06-022-1/+8
| | | | | | | | | | | | | | | | | | | null, (inttoptr x) as well as it handles icmp (inttoptr x), null Summary: The constant folding code currently assumes that the constant expression will always be on the left and the simple null will be on the right. But that's not true at least on the path from InstSimplify. This patch adds support to ConstantFolding to detect the reversed case. Reviewers: spatel, dberlin, majnemer, davide, joey Reviewed By: joey Subscribers: joey, llvm-commits Differential Revision: https://reviews.llvm.org/D33801 llvm-svn: 304559
* [InstCombine] improve perf by not creating a known non-canonical instructionSanjay Patel2017-06-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op1 (RHS) is a constant, so putting it on the LHS makes us churn through visitICmp an extra time to canonicalize it: INSTCOMBINE ITERATION #1 on cmpnot IC: ADDING: 3 instrs to worklist IC: Visiting: %notx = xor i8 %x, -1 IC: Visiting: %cmp = icmp sgt i8 %notx, 42 IC: Old = %cmp = icmp sgt i8 %notx, 42 New = <badref> = icmp sgt i8 -43, %x IC: ADD: %cmp = icmp sgt i8 -43, %x IC: ERASE %1 = icmp sgt i8 %notx, 42 IC: ADD: %notx = xor i8 %x, -1 IC: DCE: %notx = xor i8 %x, -1 IC: ERASE %notx = xor i8 %x, -1 IC: Visiting: %cmp = icmp sgt i8 -43, %x IC: Mod = %cmp = icmp sgt i8 -43, %x New = %cmp = icmp slt i8 %x, -43 IC: ADD: %cmp = icmp slt i8 %x, -43 IC: Visiting: %cmp = icmp slt i8 %x, -43 IC: Visiting: ret i1 %cmp If we create the swapped ICmp directly, we go faster: INSTCOMBINE ITERATION #1 on cmpnot IC: ADDING: 3 instrs to worklist IC: Visiting: %notx = xor i8 %x, -1 IC: Visiting: %cmp = icmp sgt i8 %notx, 42 IC: Old = %cmp = icmp sgt i8 %notx, 42 New = <badref> = icmp slt i8 %x, -43 IC: ADD: %cmp = icmp slt i8 %x, -43 IC: ERASE %1 = icmp sgt i8 %notx, 42 IC: ADD: %notx = xor i8 %x, -1 IC: DCE: %notx = xor i8 %x, -1 IC: ERASE %notx = xor i8 %x, -1 IC: Visiting: %cmp = icmp slt i8 %x, -43 IC: Visiting: ret i1 %cmp llvm-svn: 304558
* Update select.ll expected results. NFCAmaury Sechet2017-06-021-0/+31
| | | | llvm-svn: 304557
* generic: add missing get_work_dim includeJan Vesely2017-06-021-0/+1
| | | | | | | | Fixes few piglits since clang r304193 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 304556
* [InstCombine] fix/add tests for icmp with not ops; NFCSanjay Patel2017-06-021-10/+40
| | | | | | | The existing test was not minimal, and there was no coverage for the variants with a constant or vector types. llvm-svn: 304555
* AMDGPUAnnotateUniformValue should always treat volatile loads as divergentAlexander Timofeev2017-06-023-1/+17
| | | | llvm-svn: 304554
* ASTPrinter: Objective-C method declarations don't need a space afterAlex Lorenz2017-06-024-10/+17
| | | | | | | | the return type rdar://32332039 llvm-svn: 304553
* [AArch64][Falkor] Model immediate forwarding.Geoff Berry2017-06-021-13/+28
| | | | llvm-svn: 304552
* [AMDGPU] Turn on the new waitcnt insertion pass. Adjust tests.Mark Searles2017-06-0222-46/+22
| | | | | | | | | -enable-si-insert-waitcnts=1 becomes the default -enable-si-insert-waitcnts=0 to use old pass Differential Revision: https://reviews.llvm.org/D33730 llvm-svn: 304551
* [mips][microMIPS] Extending size reduction pass with LBU16, LHU16, SB16 and SH16Zoran Jovanovic2017-06-022-0/+97
| | | | | | | | | | | | | | Author: milena.vujosevic.janicic Reviewers: sdardis The patch extends size reduction pass for MicroMIPS. The following instructions are examined and transformed, if possible: LBU instruction is transformed into 16-bit instruction LBU16 LHU instruction is transformed into 16-bit instruction LHU16 SB instruction is transformed into 16-bit instruction SB16 SH instruction is transformed into 16-bit instruction SH16 Differential Revision: https://reviews.llvm.org/D33091 llvm-svn: 304550
* [Hexagon] Return 0 from getDotNewPredOp when .new opcode does not existKrzysztof Parzyszek2017-06-022-3/+45
| | | | | | | This allows using this function to test if an instruction can be converted to a .new form. llvm-svn: 304549
* Regenerate sse3.ll test results. NFCAmaury Sechet2017-06-021-0/+18
| | | | llvm-svn: 304548
* Regenerate and-sink.ll test results. NFCAmaury Sechet2017-06-021-39/+94
| | | | llvm-svn: 304547
* Regenerate shrink-compare.ll test results. NFCAmaury Sechet2017-06-021-32/+97
| | | | llvm-svn: 304546
* [OrderedBasicBlock] Return false for comesBefore(A, A)Benjamin Kramer2017-06-024-3/+63
| | | | | | | So far it would return true for the first uncached query, then cached queries return false. llvm-svn: 304545
* cmake: Put PROCESS_VM_READV detection results into Config.hPavel Labath2017-06-025-27/+19
| | | | | | | | | | Reviewers: beanz, eugene Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D33771 llvm-svn: 304544
* [CodeGen] Track trip counts per-scop for performance measurement.Siddharth Bhat2017-06-025-104/+173
| | | | | | | | | | | | | | | | | | | - Add a counter that is incremented once on exit from a scop. - Test cases got split into two: one to test the cycles, and another one to test trip counts. - Sample output: ```name=sample-output.txt scop function, entry block name, exit block name, total time, trip count warmup, %entry.split, %polly.merge_new_and_old, 5180, 1 f, %entry.split, %polly.merge_new_and_old, 409944, 500 g, %entry.split, %polly.merge_new_and_old, 1226, 1 ``` Differential Revision: https://reviews.llvm.org/D33822 llvm-svn: 304543
* Tie the macOS tests in test/Integration to the latest macOS SDKAlex Lorenz2017-06-024-0/+6
| | | | | | | | This change will ensure that these tests won't fail when a new SDK that utilizes new compiler features is used. See https://reviews.llvm.org/D32178 for more context. llvm-svn: 304542
* [lit][macOS] Add a utility function to find the platform SDK versionAlex Lorenz2017-06-021-0/+14
| | | | | | | | | on macOS This function will be used to tie Clang's Integeration tests to a particular SDK version. See https://reviews.llvm.org/D32178 for more context. llvm-svn: 304541
* [X86] Don't fold into memory operands into insertps in the generated folding ↵Benjamin Kramer2017-06-022-0/+19
| | | | | | | | | | | | tables. insertps behaves differently, the register form selects from an input register based on the immediate operand while the memory form just loads the given address. We have custom code to change the immediate in cases where that's legal, so completely remove insertps from the generated tables. llvm-svn: 304540
* [ELF] - Following commit for r304531 to fix BB.George Rimar2017-06-021-2/+2
| | | | | | | Not sure why I did not faced that locally earlier, llvm-readobj did not have -s flag for 2/3 tests. llvm-svn: 304539
* Avoid calling report_fatal_error in the destructor of raw_fd_ostreamAlex Lorenz2017-06-021-0/+2
| | | | | | | | | | | | | when saving a module timestamp file This commit doesn't include a test as it requires a test that reproduces a file write/close error that couldn't really be constructed artificially. rdar://31860650 Differential Revision: https://reviews.llvm.org/D33357 llvm-svn: 304538
* [GlobalMerge] Don't merge globals that may be preemptedJohn Brawn2017-06-022-0/+5
| | | | | | | | | | | When a global may be preempted it needs to be accessed directly, instead of indirectly through a MergedGlobals symbol, for the preemption to work. This fixes PR33136. Differential Revision: https://reviews.llvm.org/D33727 llvm-svn: 304537
* [ARM] GlobalISel: Support struct params/returnsDiana Picus2017-06-023-7/+82
| | | | | | | | | | | | Very very similar to the support for arrays. As with arrays, we don't support returning large structs that wouldn't fit in R0-R3. Most front-ends would likely use sret arguments for that anyway. The only significant difference is that when splitting a struct, we need to make sure we set the correct original alignment on each member, otherwise it may get split incorrectly between stack and registers. llvm-svn: 304536
* clang/test/CodeGenCXX/unaligned-member-qualifier.cpp: Satisfy x86_thiscallcc.NAKAMURA Takumi2017-06-021-4/+4
| | | | llvm-svn: 304535
* clang-rename: add new -force optionMiklos Vajna2017-06-026-7/+28
| | | | | | | | | | | | | | | | | Summary: The use-case is when renaming a widely used name, like a lower-level class in a codebase and clang-rename is simply invoked for each translation unit based on the compile database. In this case it's not interesting to show errors: not finding the symbol means there is simply nothing to do. Reviewers: klimek Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D32403 llvm-svn: 304534
* [CodeGen] Print performance counter information in CSV.Siddharth Bhat2017-06-022-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | This ensures that tools can parse performance information which Polly generates easily. - Sample output: ```name=out.csv scop function, entry block name, exit block name, total time warmup, %entry.split, %polly.merge_new_and_old, 1960 f, %entry.split, %polly.merge_new_and_old, 1238 g, %entry.split, %polly.merge_new_and_old, 1218 ``` - Example code to parse output: ```lang=python, name=example-parse.py import asciitable import sys table = asciitable.read('out.csv', delimiter=',') asciitable.write(table, sys.stdout, delimiter=',') ``` llvm-svn: 304533
* nits in TargetLowering.cpp . NFCAmaury Sechet2017-06-021-13/+20
| | | | llvm-svn: 304532
* [ELF] - Assign SHF_INFO_LINK flag to REL[A] sections.George Rimar2017-06-022-1/+9
| | | | | | | | | | | | | | | | | | | | Spec says: (http://www.sco.com/developers/gabi/latest/ch4.sheader.html) sh_info This member holds extra information, whose interpretation depends on the section type. If the sh_flags field for this section header includes the attribute SHF_INFO_LINK, then this member represents a section header table index. SHF_INFO_LINK The sh_info field of this section header holds a section header table index. Since sh_info for SHT_REL[A] sections should contain the section header index of the section to which the relocation applies, this is consistent with spec to put this flag. Behavior matches both bfd and gold as well. Differential revision: https://reviews.llvm.org/D33763 llvm-svn: 304531
* [ARM] Cortex-A57 scheduling model for ARM backend (AArch32)Javed Absar2017-06-0219-11/+2404
| | | | | | | | | | | | | | | This patch implements the Cortex-A57 scheduling model. The main code is in ARMScheduleA57.td, ARMScheduleA57WriteRes.td. Small changes in cpp,.h files to support required scheduling predicates. Scheduling model implemented according to: http://infocenter.arm.com/help/topic/com.arm.doc.uan0015b/Cortex_A57_Software_Optimization_Guide_external.pdf. Patch by : Andrew Zhogin (submitted on his behalf, as requested). Rewiewed by: Renato Golin, Diana Picus, Javed Absar, Kristof Beyls. Differential Revision: https://reviews.llvm.org/D28152 llvm-svn: 304530
* [NFC] [CodeGen] Bail out of per-scop performance reporting if not supported.Siddharth Bhat2017-06-021-0/+8
| | | | | | | | | | We should bail out if performance monitoring is not supported, since we would have no information to print per-scop, and `FinalStartBB`, `ReturnFromFinal` would be `nullptr`. Assert that these are not `nullptr` if performance monitoring is supported. llvm-svn: 304529
* [CodeGen] Extend Performance Counter to track per-scop information.Siddharth Bhat2017-06-027-33/+211
| | | | | | | | | | | | | | | Previously, we would generate one performance counter for all scops. Now, we generate both the old information, as well as a per-scop performance counter to generate finer grained information. This patch needed a way to generate a unique name for a `Scop`. The start region, end region, and function name combined provides a unique `Scop` name. So, `Scop` has a new public API to provide its start and end region names. Differential Revision: https://reviews.llvm.org/D33723 llvm-svn: 304528
OpenPOWER on IntegriCloud