- Dec 13, 2016
-
-
Rafael Espindola authored
llvm-svn: 289550
-
Alexander Kornienko authored
llvm-svn: 289549
-
David Callahan authored
Summary: This is last in of a series of patches to evolve ADCE.cpp to support removing of unnecessary control flow. This patch adds the code to update the control and data flow graphs to remove the dead control flow. Also update unit tests to test the capability to remove dead, may-be-infinite loop which is enabled by the switch -adce-remove-loops. Previous patches: D23824 [ADCE] Add handling of PHI nodes when removing control flow D23559 [ADCE] Add control dependence computation D23225 [ADCE] Modify data structures to support removing control flow D23065 [ADCE] Refactor anticipating new functionality (NFC) D23102 [ADCE] Refactoring for new functionality (NFC) Reviewers: dberlin, majnemer, nadav, mehdi_amini Subscribers: llvm-commits, david2050, freik, twoh Differential Revision: https://reviews.llvm.org/D24918 llvm-svn: 289548
-
Alexander Kornienko authored
llvm-svn: 289547
-
Alexander Kornienko authored
Summary: This checker flags the use of C-style memory management functionality and notes about modern alternatives. In an earlier revision it tried to autofix some kind of patterns, but that was a bad idea. Since memory management can be so widespread in a program, manual updating is most likely necessary. Maybe for special cases, there could be later additions to this basic checker. This is the first checker I wrote and I never did something with clang (only compiling programs). So whenever I missed conventions or did plain retarded stuff, feel free to point it out! I am willing to fix them and write a better checker. I hope the patch does work, I never did this either. On a testapply in my repository it did, but I am pretty unconfident in my patching skills :) Reviewers: aaron.ballman, hokein, alexfh, malcolm.parsons Subscribers: cfe-commits, JDevlieghere, nemanjai, Eugene.Zelenko, Prazek, mgorny, modocache Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26167 Patch by Jonas Toth! llvm-svn: 289546
-
Artur Pilipenko authored
llvm-svn: 289545
-
Neil Hickey authored
Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64. This change makes sure single-precision floating point types are used if the cl_fp64 extension is not supported by the target. Also removed the check to see whether the OpenCL version is >= 1.2, as this has been incorporated into the extension setting code. Differential Revision: https://reviews.llvm.org/D24235 llvm-svn: 289544
-
Alexander Kornienko authored
llvm-svn: 289543
-
Alexander Kornienko authored
llvm-svn: 289542
-
Haojian Wu authored
Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27713 llvm-svn: 289541
-
Artur Pilipenko authored
Build failed because of unused variable in product mode. llvm-svn: 289540
-
Ulrich Weigand authored
This doesn't work at all on big-endian systems, even just reading in the magic bytes in the binary .sancov file header gets byte order wrong. llvm-svn: 289539
-
Artur Pilipenko authored
Match a pattern where a wide type scalar value is loaded by several narrow loads and combined by shifts and ors. Fold it into a single load or a load and a bswap if the targets supports it. Assuming little endian target: i8 *a = ... i32 val = a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 24) => i32 val = *((i32)a) i8 *a = ... i32 val = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3] => i32 val = BSWAP(*((i32)a)) This optimization was discussed on llvm-dev some time ago in "Load combine pass" thread. We came to the conclusion that we want to do this transformation late in the pipeline because in presence of atomic loads load widening is irreversible transformation and it might hinder other optimizations. Eventually we'd like to support folding patterns like this where the offset has a variable and a constant part: i32 val = a[i] | (a[i + 1] << 8) | (a[i + 2] << 16) | (a[i + 3] << 24) Matching the pattern above is easier at SelectionDAG level since address reassociation has already happened and the fact that the loads are adjacent is clear. Understanding that these loads are adjacent at IR level would have involved looking through geps/zexts/adds while looking at the addresses. The general scheme is to match OR expressions by recursively calculating the origin of individual bits which constitute the resulting OR value. If all the OR bits come from memory verify that they are adjacent and match with little or big endian encoding of a wider value. If so and the load of the wider type (and bswap if needed) is allowed by the target generate a load and a bswap if needed. Reviewed By: hfinkel, RKSimon, filcab Differential Revision: https://reviews.llvm.org/D26149 llvm-svn: 289538
-
Artur Pilipenko authored
llvm-svn: 289537
-
Egor Churaev authored
Reviewers: Anastasia Subscribers: bader, yaxunl, cfe-commits Differential Revision: https://reviews.llvm.org/D27671 llvm-svn: 289536
-
Egor Churaev authored
Summary: Although the feature was introduced only in OpenCL C v2.0 spec., it's useful for OpenCL 1.x too and doesn't require HW support. Reviewers: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D27453 llvm-svn: 289535
-
Simon Pilgrim authored
We don't need to extract+test the sign bit of the known ones/zeros, we can use sext which will handle all of this. llvm-svn: 289534
-
Tobias Grosser authored
clang-format has been updated in r289531 to keep labels and values on the same line. This change updates Polly to the new formatting style. llvm-svn: 289533
-
Simon Dardis authored
N32 relocations are only correct for individual relocations at the moment. Support for relocation composition will follow in a later patch. Patch By: Daniel Sanders Reviwers: vkalintiris, atanasyan Differential Revision: https://reviews.llvm.org/D27467 llvm-svn: 289532
-
Daniel Jasper authored
We have previously done that for <<-operators. This patch also adds this logic for "," and "+". Before: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); After: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); llvm-svn: 289531
-
Simon Dardis authored
llvm-svn: 289530
-
Simon Dardis authored
In certain cases it is possible that transient instructions such as %reg = IMPLICIT_DEF as a single instruction in a basic block to reach the MipsHazardSchedule pass. This patch teaches MipsHazardSchedule to properly look through such cases. Reviewers: vkalintiris, zoran.jovanovic Differential Revision: https://reviews.llvm.org/D27209 llvm-svn: 289529
-
Diana Picus authored
Apparently I missed this one when I moved ValueHandler back in r288658. Sorry! llvm-svn: 289528
-
Peter Smith authored
When compiling -fpie and linking with the --pie option the R_ARM_GOTBREL relocation to D is resolved by writing the value of D into the .got slot and emitting an R_ARM_RELATIVE relocation for it. This changes adds the R_ARM_RELATIVE relocation to the switch in relocateOne() so we can process the GotSection relocation to write the value of the variable as well as emitting the dynamic relocation. Differential revision: https://reviews.llvm.org/D27678 llvm-svn: 289527
-
Renato Golin authored
llvm-svn: 289526
-
Daniel Jasper authored
Before: vector<int> v { 12 } GUARDED_BY(mutex); After: vector<int> v{12} GUARDED_BY(mutex); llvm-svn: 289525
-
Malcolm Parsons authored
Reviewers: alexfh, aaron.ballman, hokein Subscribers: mgorny, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27520 llvm-svn: 289524
-
Craig Topper authored
Only the lower bits of the input element are used. And only the lower element can be undef since the upper bits are zeroed. Have InstCombineCalls call SimplifyDemandedVectorElts for these intrinsics to reuse this support. llvm-svn: 289523
-
NAKAMURA Takumi authored
llvm-svn: 289522
-
Rong Xu authored
Summary: Since we don't break BBs for function calls. We might get some insane counts (wrap of unsigned) in the presence of noreturn calls. This patch sets these counts to zero instead of the wrapped number. Reviewers: davidxl Subscribers: xur, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D27602 llvm-svn: 289521
-
Jason Molenda authored
llvm-svn: 289520
-
Davide Italiano authored
llvm-svn: 289519
-
Jason Molenda authored
llvm-svn: 289518
-
Dylan McKay authored
Summary: This pass will be used to relax instructions which use out of bounds memory accesses to equivalent operations that can work with the addresses. The pass currently implements relaxation for the STDWPtrQRr instruction. Without this pass, an assertion error would be hit in the pseudo expansion pass. In the future, we will need to add more instructions to this pass. We can do that on a case-by-case basic. Reviewers: arsenm, kparzysz Subscribers: wdng, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D27650 llvm-svn: 289517
-
Mike Aizatsky authored
llvm-svn: 289516
-
Mike Aizatsky authored
llvm-svn: 289515
-
Saleem Abdulrasool authored
lib/CodeGen/CGExpr.cpp:2511:2: warning: extra ';' [-Wpedantic] }; ^ Clean up warning from gcc 6. llvm-svn: 289514
-
Shoaib Meenai authored
The macOS thread-local variable finalizer routines do not handle the case where a termination function registers another termination function correctly, causing this test to fail. I've filed a radar for this; mark the test XFAIL in the meantime. See [1] for more details. [1] http://lists.llvm.org/pipermail/cfe-dev/2016-November/051376.html Differential Revision: https://reviews.llvm.org/D27434 llvm-svn: 289513
-
Stephan T. Lavavej authored
After r289363, these tests were triggering MSVC x64 warning C4267 "conversion from 'size_t' to 'int', possible loss of data" by taking 0, 2, and 10 as std::size_t, then constructing error_code(int, const error_category&) or error_condition(int, const error_category&) from that (N4618 19.5.3.2 [syserr.errcode.constructors]/3, 19.5.4.2 [syserr.errcondition.constructors]/3). The fix is simple: take these ints as int, pass them to the int-taking constructor, and perform a value-preserving static_cast<std::size_t> when comparing them to `std::size_t result`. Fixes D27691. llvm-svn: 289512
-
Dominic Chen authored
Summary: Split out formatting and style changes from D26061 Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26691 llvm-svn: 289511
-