summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Implement function attribute no_stack_protector.Manoj Gupta2018-05-096-6/+65
| | | | | | | | | | | | | | | | | | | | | | Summary: This attribute tells clang to skip this function from stack protector when -stack-protector option is passed. GCC option for this is: __attribute__((__optimize__("no-stack-protector"))) and the equivalent clang syntax would be: __attribute__((no_stack_protector)) This is used in Linux kernel to selectively disable stack protector in certain functions. Reviewers: aaron.ballman, rsmith, rnk, probinson Reviewed By: aaron.ballman Subscribers: probinson, srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D46300 llvm-svn: 331925
* [llvm-objcopy] Add --strip-symbol (-N) optionPaul Semel2018-05-097-3/+169
| | | | llvm-svn: 331924
* Add SourceManagerForFile helper which sets up SourceManager and dependencies ↵Eric Liu2018-05-096-100/+90
| | | | | | | | | | | | | | | | for a single file with code snippet Summary: This can be used to create a virtual environment (incl. VFS, source manager) for code snippets. Reviewers: sammccall, klimek Reviewed By: sammccall Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D46176 llvm-svn: 331923
* [CMake] Build shared version of runtimes for FuchsiaPetr Hosek2018-05-097-6/+12
| | | | | | | | | Fuchsia is no longer treated as UNIX which means we need to explicitly enable building of shared versions of runtimes. Differential Revision: https://reviews.llvm.org/D46609 llvm-svn: 331922
* [sanitizer] Use tid_t in ThreadListerVitaly Buka2018-05-094-25/+24
| | | | llvm-svn: 331921
* [AMDGPU] Support horizontal vectorization of min/max.Farhana Aleen2018-05-095-33/+718
| | | | | | | | | | | | Author: FarhanaAleen Reviewed By: rampitec Subscribers: AMDGPU Differential Revision: https://reviews.llvm.org/D46604 llvm-svn: 331920
* AMDGPU: Ignore any_extend in mul24 combineMatt Arsenault2018-05-092-12/+65
| | | | | | | | | | If a multiply is truncated, SimplifyDemandedBits sometimes turns a zero_extend of the inputs into an any_extend, which makes the known bits computation unhelpful. Ignore these and compute known bits for the underlying value, since we insert the correct extend type after. llvm-svn: 331919
* [Hexagon] Add patterns for vector shift-and-accumulateKrzysztof Parzyszek2018-05-093-432/+70
| | | | llvm-svn: 331918
* AMDGPU: Handle partial shift reduction for variable shiftsMatt Arsenault2018-05-092-15/+58
| | | | | | | If the variable shift amount has known bits, we can still reduce the shift. llvm-svn: 331917
* AMDGPU: Partially shrink 64-bit shifts if reduced to 16-bitMatt Arsenault2018-05-092-0/+132
| | | | | | | | | This is an extension of an existing combine to reduce wider shls if the result fits in the final result type. This introduces the same combine, but reduces the shift to a middle sized type to avoid the slow 64-bit shift. llvm-svn: 331916
* [sanitizer] Cleanup sorting functionsVitaly Buka2018-05-0912-41/+31
| | | | llvm-svn: 331915
* [cmake, unittests] Fix the CMake file for the LLDB unittests to support ↵Stella Stamenova2018-05-091-2/+2
| | | | | | | | | | | | | | | | multiple configurations Summary: The current setup for the unit tests only works correctly when the generator does not support multiple configurations. When the generator supports multiple configurations, the inputs are not copied to the correct per-configuration directory. This change sets up the build to copy the inputs in each configuration directory. Reviewers: labath, asmith, zturner Reviewed By: labath Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46642 llvm-svn: 331914
* [X86] Fix Broadwell's Shuffle256 schedule classes load latency values.Simon Pilgrim2018-05-091-21/+4
| | | | | | Allows us to remove some unnecessary InstRW overrides. llvm-svn: 331913
* [COFF] Fix dangling StringRefs from SVN 331900Martin Storsjo2018-05-091-2/+2
| | | | llvm-svn: 331912
* [X86] Merge instregex patterns to reduce InstrRW compile time.Simon Pilgrim2018-05-095-1052/+365
| | | | llvm-svn: 331911
* Allow copy elision in path concatenationDavid Bolvansky2018-05-091-1/+3
| | | | | | | | | | | | | | | | | Summary: Just port of libstdc++'s fix to libc++ fs: https://github.com/gcc-mirror/gcc/commit/e6ac4004fe49d785c63bf87aec4b095b5ce1d19f Author of fix: Jonathan Wakely Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: smeenai, christof, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D46593 llvm-svn: 331910
* AMDGPU: Add combine for trunc of bitcast from build_vectorMatt Arsenault2018-05-097-29/+126
| | | | | | | | | | | | If the truncate is only accessing the first element of the vector, we can use the original source value. This helps with some combine ordering issues after operations are lowered to integer operations between bitcasts of build_vector. In particular it stops unnecessarily materializing the unused top half of a vector in some cases. llvm-svn: 331909
* [dfsan] add one more sanitizer-coverage hook to the whitelistKostya Serebryany2018-05-091-0/+2
| | | | llvm-svn: 331908
* [Hexagon] Check the end of the correct container (fix typo)Krzysztof Parzyszek2018-05-091-3/+1
| | | | llvm-svn: 331907
* AMDGPU: Stop special casing constant indexes of extract_vector_eltMatt Arsenault2018-05-091-15/+0
| | | | | | | The same result folds out of the dynamic expansion logic if the index is constant. llvm-svn: 331906
* [tools] Updating PPCallbacks::InclusionDirective callsJulie Hockett2018-05-0910-13/+24
| | | | | | | | | [revision] added SrcMgr::CharacteristicKind to the InclusionDirective callback, this revision updates instances of it in clang-tools-extra. Differential Revision: https://reviews.llvm.org/D46615 llvm-svn: 331905
* [clang] Adding CharacteristicKind to PPCallbacks::InclusionDirectiveJulie Hockett2018-05-0913-48/+89
| | | | | | | | | | | Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This will be useful in https://reviews.llvm.org/D43778 to determine which includes are system headers. Differential Revision: https://reviews.llvm.org/D46614 llvm-svn: 331904
* [llvm-rc] Handle C preprocessor outputMartin Storsjo2018-05-096-1/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | When preprocessing resource scripts (which can easily be done outside of llvm-rc), included headers can leave behind C declarations (despite preprocessing with -DRC_INVOKED), that can't be parsed by a resource compiler. This is handled in all of rc.exe, by parsing the preprocessor output line markers and ignoring content from files named *.h and *.c, documented at [1]. In addition to this filtering, strip out any other preprocessor directive that is left behind (like pragmas) which also can't be handled by the tokenizer. The added test uses both standard #line markers (supported by rc.exe) and GNU style extended line markers, thus this test doesn't pass with rc.exe, but passes with GNU windres. (Windres on the other hand doesn't filter out files named *.c, only *.h.) Differential Revision: https://reviews.llvm.org/D46579 [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa381033(v=vs.85).aspx llvm-svn: 331903
* [llvm-rc] Add support for the RCDATA resource typeMartin Storsjo2018-05-094-0/+21
| | | | | | | | | This is the same as any other user defined resource, but with a specific allocated resource type number. Differential Revision: https://reviews.llvm.org/D46636 llvm-svn: 331902
* [llvm-rc] Allow -1 for control IDs in old style dialogs with 16 bit fieldsMartin Storsjo2018-05-093-4/+7
| | | | | | | | | | | -1 is commonly used as ID for controls that one don't want to refer to later. For DIALOG resources, the IDs are 16 bit numbers, and -1 gets interpreted as UINT32_MAX earlier, which then later is too large to write into a uint16_t. Differential Revision: https://reviews.llvm.org/D46506 llvm-svn: 331901
* [COFF] Allow specifying export forwarding in a def fileMartin Storsjo2018-05-092-0/+14
| | | | | | | | | Previously this was only supported when specified on the command line or in directives. Differential Revision: https://reviews.llvm.org/D46244 llvm-svn: 331900
* [OPENMP] Generate unique names for offloading regions id.Alexey Bataev2018-05-093-2/+151
| | | | | | | It is required to emit unique names for offloading regions ids. Required to support compilation and linking of several compilation units. llvm-svn: 331899
* Reapplying r331819 [GlobalISel][Legalizer] More concise and faster ↵Roman Tereshin2018-05-096-248/+174
| | | | | | | | | widenScalar, NFC The commit was a suspect for clang-cmake-aarch64-global-isel and clang-cmake-aarch64-quick bot failures, proved to be innocent. llvm-svn: 331898
* llvm-mca: Add missing includesDavid Blaikie2018-05-092-1/+5
| | | | | | | Move the header include in the primary source file to the top to validate that it doesn't depend on any other inclusions. llvm-svn: 331897
* [DAGCombiner] In visitBITCAST when trying to constant fold the bitcast, only ↵Craig Topper2018-05-092-15/+13
| | | | | | | | | | call getBitcast if its an fp->int or int->fp conversion even when before legalize ops. Previously if !LegalOperations we would blindly call getBitcast and hope that getNode would constant fold it. But if the conversion is between a vector and a scalar, getNode has no simplification. This means we would just get back the original N. We would then return that N which would make the caller of visitBITCAST think that we used CombineTo and did our own worklist management. This prevents target specific optimizations from being called for vector/scalar bitcasts until after legal operations. llvm-svn: 331896
* [OpenCL] Fix typos in emitted enqueue kernel function namesYaxun Liu2018-05-092-13/+13
| | | | | | | | | | Two typos: vaarg => vararg get_kernel_preferred_work_group_multiple => get_kernel_preferred_work_group_size_multiple Differential Revision: https://reviews.llvm.org/D46601 llvm-svn: 331895
* [libFuzzer] Disable print-func.test on Darwin.Matt Morehouse2018-05-091-0/+1
| | | | | | | | The try-lock guard change seems to be making this test fail on Mac, but I haven't been able to reproduce the failure. Disabling the test on Mac to fix build bot. llvm-svn: 331894
* [X86] Only enable the __ud2 and __int2c builtins if intrin.h has been included.Craig Topper2018-05-091-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D46332 llvm-svn: 331893
* General cleanup to minimize the .debug_types patchGreg Clayton2018-05-0916-335/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | This cleanup is designed to make the https://reviews.llvm.org/D32167 patch smaller and easier to read. Cleanup in this patch: Allow DWARFUnit subclasses to hand out the data that should be used when decoding data for a DIE. The information might be in .debug_info or could be in .debug_types. There is a new virtual function on DWARFUnit that each subclass must override: virtual const lldb_private::DWARFDataExtractor &DWARFUnit::GetData() const; This allows DWARFCompileUnit and eventually DWARFTypeUnit to hand out different data to be used when decoding the DIE information. Add a new pure virtual function to get the size of the DWARF unit header: virtual uint32_t DWARFUnit::GetHeaderByteSize() const = 0; This allows DWARFCompileUnit and eventually DWARFTypeUnit to hand out different offsets where the first DIE starts when decoding DIE information from the unit. Added a new function to DWARFDataExtractor to get the size of an offset: size_t DWARFDataExtractor::GetDWARFSizeOfOffset() const; Removed dead dumping and parsing code in the DWARFDebugInfo class. Inlined a bunch of calls in DWARFUnit for accessors that were just returning integer member variables. Renamed DWARFUnit::Size() to DWARFUnit::GetHeaderByteSize() as it clearly states what it is doing and makes more sense. Differential Revision: https://reviews.llvm.org/D46606 llvm-svn: 331892
* [ScopInfo] Remove bail out condition in buildMinMaxAccess().Michael Kruse2018-05-092-12/+119
| | | | | | | | | | | | | | | | | | | | | The condition was introduced in r267142 to mitigate a long compile-time case. In r306087, a max-computation limit was introduced that should handle the same case while leaving the max disjuncts heuristic it should have replaced intact. Today, the max disjuncts bail-out causes problems in that it prematurely stops SCoPs from being detected, e.g. in SPEC's lbm. This would hit less like if isl_set_coalesce would be called after isl_set_remove_divs (which makes more basic_set likely to be coalescable) instead of before. This patch tries to remove the premature max-disjuncts bail-out condition by using simple_hull() to reduce the computational overhead, instead of directly invalidating that SCoP. Differential Revision: https://reviews.llvm.org/D45066 Contributed-by: Sahil Girish Yerawar <cs15btech11044@iith.ac.in> llvm-svn: 331891
* [sanitizer] Correct 64-bit atomic_store on 32-bit "other" platformsKostya Kortchinsky2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I think there might be something to optimize in `atomic_store`. Currently, if everything goes well (and we have a different new value), we always iterate 3 times. For example, `with a = 0`, `oldval = a`, `newval = 42`, we get: ``` oldval = 0, newval = 42, curval = 0 oldval = 0, newval = 42, curval = 42 oldval = 42, newval = 42, curval = 42 ``` and then it breaks. Unless I am not seeing something, I don't see a point to the third iteration. If the current value is the one we want, we should just break. This means that 2 iterations (with a different newval) should be sufficient to achieve what we want. Reviewers: dvyukov, alekseyshl Reviewed By: dvyukov Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D46597 llvm-svn: 331890
* [InstCombine] snprintf optimizationsDavid Bolvansky2018-05-093-0/+230
| | | | | | | | | | | | Reviewers: spatel, efriedma, majnemer, rja, bkramer Reviewed By: rja, bkramer Subscribers: rja, llvm-commits Differential Revision: https://reviews.llvm.org/D46285 llvm-svn: 331889
* [DAGCombine] Change store merge candidates check cut off to 1024.Amara Emerson2018-05-091-1/+1
| | | | | | | | | | | The previous value of 8192 resulted in severe compile time hits in some pathological cases. rdar://39781410 Differential Revision: https://reviews.llvm.org/D46581 llvm-svn: 331888
* [Hexagon] Fix sanitizer error about using -1u in variable of enum typeKrzysztof Parzyszek2018-05-091-4/+4
| | | | llvm-svn: 331887
* [lit, lldbsuite] Add a bug reference to the failing TestLinuxCore and fix an ↵Stella Stamenova2018-05-092-12/+12
| | | | | | | | | | | | | | | | | | undefined property in dotest.py Summary: 1) In TestLinuxCore rather than skipping the tests on Windows, mark them as expected failures and add a bug reference 2) In dotest.py replace the undefined property in the exceptions with the actual property causing the exception Reviewers: asmith, labath, zturner Reviewed By: labath, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46590 llvm-svn: 331886
* [LV] Change MaxVectorSize bound to 256 in assertion, NFC otherwiseKrzysztof Parzyszek2018-05-091-2/+2
| | | | | | | It's possible to have a vector of 256 bytes in HVX code on Hexagon (vector pair in 128-byte mode). llvm-svn: 331885
* APFloat/x87: Fix string conversion for "unnormal" values (pr35860)Pavel Labath2018-05-092-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Unnormal values are a feature of some very old x87 processors. We handle them correctly for the most part -- the only exception was an unnormal value whose significand happened to be zero. In this case the APFloat was still initialized as normal number (category = fcNormal), but a subsequent toString operation would assert because the math would produce nonsensical values for the zero significand. During review, it was decided that the correct way to fix this is to treat all unnormal values as NaNs (as that is what any >=386 processor will do). The issue was discovered because LLDB would crash when trying to print some "long double" values. Reviewers: skatkov, scanon, gottesmm Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41868 llvm-svn: 331884
* [Hexagon] Simplify MCCodeEmitter, move data to tablesKrzysztof Parzyszek2018-05-092-588/+567
| | | | llvm-svn: 331883
* Fix Windows build for the Predicate.h refactor in r331880Pavel Labath2018-05-091-2/+2
| | | | llvm-svn: 331882
* Add basic compiler-rt builtins support for hexagon.Sid Manning2018-05-0933-1/+5470
| | | | | | Differential Revision: https://reviews.llvm.org/D46364 llvm-svn: 331881
* Modernize and clean-up the Predicate classPavel Labath2018-05-0912-92/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comments on this class were out of date with the implementation, and the implementation itself was inconsistent with our usage of the Timeout class (I started converting everything to use this class back in D27136, but I missed this one). I avoid duplicating the waiting logic by introducing a templated WaitFor function, and make other functions delegate to that. This function can be also used as a replacement for the unused WaitForBitToBeSet functions I removed, if it turns out to be necessary. As this changes the meaning of a "zero" timeout, I tracked down all the callers of these functions and updated them accordingly. Propagating the changes to all the callers of RunShellCommand was a bit too much for this patch, so I stopped there and will continue that in a follow-up patch. I also add some basic unittests for the functions I modified. Reviewers: jingham, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D46580 llvm-svn: 331880
* [OPENMP] Mark global tors/dtors as used.Alexey Bataev2018-05-092-0/+6
| | | | | | | | | | | If the global variables are marked as declare target and they need ctors/dtors, these ctors/dtors are emitted and then invoked by the offloading runtime library. They are not explicitly used in the emitted code and thus can be optimized out. Patch marks these functions as used, so the optimizer cannot remove these function during the optimization phase. llvm-svn: 331879
* [LV] Add lit testcase for bitcast problem. NFCKarl-Johan Karlsson2018-05-091-0/+54
| | | | llvm-svn: 331878
* [OpenCL] Add constant address space to __func__ in AST.Anastasia Stulova2018-05-096-17/+37
| | | | | | | | | | | | Added string literal helper function to obtain the type attributed by a constant address space. Also fixed predefind __func__ expr to use the helper to constract the string literal correctly. Differential Revision: https://reviews.llvm.org/D46049 llvm-svn: 331877
* [Support/Path] Make handling of paths like "///" consistentPavel Labath2018-05-092-26/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Various path functions were not treating paths consisting of slashes alone consistently. For example, the iterator-based accessors decomposed the path "///" into two elements: "/" and ".". This is not too bad, but it is different from the behavior specified by posix: ``` A pathname that contains ***at least one non-slash character*** and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname. ``` More importantly, this was different from how we treated the same path in the filename+parent_path functions, which decomposed this path into "." and "". This was completely wrong as it lost the information that this was an absolute path which referred to the root directory. This patch fixes this behavior by making sure all functions treat paths consisting of (back)slashes alone the same way as "/". I.e., the iterator-based functions will just report one component ("/"), and the filename+parent_path will decompose them into "/" and "". A slightly controversial topic here may be the treatment of "//". Posix says that paths beginning with "//" may have special meaning and indeed we have code which parses paths like "//net/foo/bar" specially. However, as we were already not being consistent in parsing the "//" string alone, and any special parsing for it would complicate the code further, I chose to treat it the same way as longer sequences of slashes (which are guaranteed to be the same as "/"). Another slight change of behavior is in the parsing of paths like "//net//". Previously the last component of this path was ".". However, as in our parsing the "//net" part in this path was the same as the "drive" part in "c:\" and the next slash was the "root directory", it made sense to treat "//net//" the same way as "//net/" (i.e., not to add the extra "." component at the end). Reviewers: zturner, rnk, dblaikie, Bigcheese Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45942 llvm-svn: 331876
OpenPOWER on IntegriCloud