summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] Impl GNU style symbols printingHemant Kulkarni2016-03-213-40/+220
| | | | | | | | Implements "readelf -sW and readelf -DsW" Differential Revision: http://reviews.llvm.org/D18224 llvm-svn: 263952
* [Orc] Switch RPC Procedure to take a function type, rather than an arg list.Lang Hames2016-03-213-64/+58
| | | | | | No functional change, just a little more readable. llvm-svn: 263951
* APFloat: Add frexpMatt Arsenault2016-03-213-2/+161
| | | | llvm-svn: 263950
* AMDGPU: Add frexp_mant intrinsicMatt Arsenault2016-03-213-2/+70
| | | | llvm-svn: 263948
* clang-cl: support __cdecl-on-struct anachronismReid Kleckner2016-03-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: The Microsoft compiler emits warning C4229: anachronism used : modifiers on data are ignored for struct {} __cdecl s; but ICU's gendict can generate such (and does when building LibreOffice), so accepting this in clang-cl too would be useful. Reviewers: rnk Patch by Stephan Bergmann Differential Revision: http://reviews.llvm.org/D16628 llvm-svn: 263947
* [tsan] Adding a test case for r263939 ("Add some NULL pointer checks into ↵Kuba Brecka2016-03-211-0/+20
| | | | | | the debugging API") llvm-svn: 263946
* Implement constant folding for bitreverseMatt Arsenault2016-03-215-2/+166
| | | | llvm-svn: 263945
* Revert "[ELF] SHF_MERGE section with 0 entsize is not fatal"Rafael Espindola2016-03-214-7/+5
| | | | | | | | | This reverts commit r263664. The reason we were getting broken files was lld -r, and that has been fixed. llvm-svn: 263944
* clang-format: Make include sorting's main include detection configurable.Daniel Jasper2016-03-215-3/+73
| | | | | | | | | | This patch adds a regular expression to configure suffixes of an included file to check whether it is the "main" include of the current file. Previously, clang-format has allowed arbitrary suffixes on the formatted file, which is still the case when no IncludeMainRegex is specified. llvm-svn: 263943
* [AArch64] Fix a -Wdocumentation warning. NFC.Chad Rosier2016-03-211-2/+2
| | | | llvm-svn: 263942
* [IndVars] Fix PR26974: make sure replaceCongruentIVs doesn't break LCSSASilviu Baranga2016-03-212-0/+61
| | | | | | | | | | | | | | | | | | | Summary: replaceCongruentIVs can break LCSSA when trying to replace IV increments since it tries to replace all uses of a phi node with another phi node while both of the phi nodes are not necessarily in the processed loop. This will cause an assert in IndVars. To fix this, we add a check to make sure that the replacement maintains LCSSA. Reviewers: sanjoy Subscribers: mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D18266 llvm-svn: 263941
* [OMPT] Fix wrong parent_task_id in serialized parallel_begin with GCCJonas Hahnfeld2016-03-211-10/+15
| | | | | | | | | | Without this patch a simple '#pragma omp parallel num_threads(1)' leads to ompt_event_parallel_begin: parent_task_id=3, [...], parallel_id=2, [...] ompt_event_parallel_end: parallel_id=2, task_id=4, [...] Differential Revision: http://reviews.llvm.org/D16714 llvm-svn: 263940
* [tsan] Add some NULL pointer checks into the debugging APIKuba Brecka2016-03-211-5/+5
| | | | | | | | `__tsan_get_report_thread` and others can crash if a stack trace is missing, let's add the missing checks. Differential Revision: http://reviews.llvm.org/D18306 llvm-svn: 263939
* Remove debug output. Sorry for the noise.NAKAMURA Takumi2016-03-211-1/+1
| | | | llvm-svn: 263936
* [DAGCombine] Catch the case where extract_vector_elt can cause an any_ext ↵Silviu Baranga2016-03-212-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | while processing AND SDNodes Summary: extract_vector_elt can cause an implicit any_ext if the types don't match. When processing the following pattern: (and (extract_vector_elt (load ([non_ext|any_ext|zero_ext] V))), c) DAGCombine was ignoring the possible extend, and sometimes removing the AND even though it was required to maintain some of the bits in the result to 0, resulting in a miscompile. This change fixes the issue by limiting the transformation only to cases where the extract_vector_elt doesn't perform the implicit extend. Reviewers: t.p.northover, jmolloy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18247 llvm-svn: 263935
* clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp: Satisfy -Asserts.NAKAMURA Takumi2016-03-211-7/+7
| | | | llvm-svn: 263934
* Eliminated trailing whitespaces from test. NFC.George Rimar2016-03-211-16/+16
| | | | llvm-svn: 263933
* Fixed -mcpu flagElena Demikhovsky2016-03-211-1/+1
| | | | | | "core-avx" does not exist; I changed to "nehalem" llvm-svn: 263932
* clang/test/Frontend/plugin-annotate-functions.c requires the target ↵NAKAMURA Takumi2016-03-211-0/+1
| | | | | | examples/AnnotateFunctions. llvm-svn: 263931
* Reorder data members to be consistent with member initializers, to silence ↵Faisal Vali2016-03-211-6/+6
| | | | | | warnings. llvm-svn: 263922
* [Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)Faisal Vali2016-03-2122-88/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement lambda capture of *this by copy. For e.g.: struct A { int d = 10; auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; } }; auto L = A{}.foo(); // A{}'s lifetime is gone. // Below is still ok, because *this was captured by value. assert(L(10) == 20); assert(L(100) == 120); If the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined. Implementation Strategy: - amend the parser to accept *this in the lambda introducer - add a new king of capture LCK_StarThis - teach Sema::CheckCXXThisCapture to handle by copy captures of the enclosing object (i.e. *this) - when CheckCXXThisCapture does capture by copy, the corresponding initializer expression for the closure's data member direct-initializes it thus making a copy of '*this'. - in codegen, when assigning to CXXThisValue, if *this was captured by copy, make sure it points to the corresponding field member, and not, unlike when captured by reference, what the field member points to. - mark feature as implemented in svn Much gratitude to Richard Smith for his carefully illuminating reviews! llvm-svn: 263921
* clang-cl: Add a comment about /Oy- (see r245913).Nico Weber2016-03-211-0/+1
| | | | llvm-svn: 263920
* [COFF] Don't call memcpy with a NULL argumentDavid Majnemer2016-03-201-1/+2
| | | | | | | | | | | | | Some declarations of memcpy (like glibc's for example) are attributed with notnull which makes it UB for NULL to get passed in, even if the memcpy count is zero. To account for this, guard the memcpy with an appropriate precondition. This should fix the last UBSan bug, exposed by the test suite, in the COFF linker. llvm-svn: 263919
* [COFF] Remove undefined behavior from ObjectFile::createWeakExternalDavid Majnemer2016-03-202-15/+7
| | | | | | | | | | | | | | | LLD type-punned an integral type and a pointer type using a pointer field. This is problematic because the pointer type has alignment greater than some of the integral values. This would be less problematic if a union was used but it turns out the integral values are only present for a short, transient, amount of time. Let's remove this undefined behavior by skipping the punning altogether by storing the state in a separate memory location: a vector which informs us which symbols to process for weak externs. llvm-svn: 263918
* [X86][SSE] Add vector integer division by constant testsSimon Pilgrim2016-03-205-1241/+4954
| | | | | | Expanded tests and split into sdiv/srem and udiv/urem cases for 128 and 256 bit vectors. llvm-svn: 263917
* [NVPTX] Adds a new address space inference pass.Jingyue Wu2016-03-206-19/+678
| | | | | | | | | | | | | | | | | | | Summary: The old address space inference pass (NVPTXFavorNonGenericAddrSpaces) is unable to convert the address space of a pointer induction variable. This patch adds a new pass called NVPTXInferAddressSpaces that overcomes that limitation using a fixed-point data-flow analysis (see the file header comments for details). The new pass is experimental and not enabled by default. Users can turn it on by setting the -nvptx-use-infer-addrspace flag of llc. Reviewers: jholewinski, tra, jlebar Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D17965 llvm-svn: 263916
* Visual Studio Visualizers for clang::FunctionDeclMike Spertus2016-03-201-2/+42
| | | | | | | Readably displays a FunctionDecl in the Visual Studio Locals Window something like: void g(int, double d, struct A && arr) llvm-svn: 263915
* [gold] Emit a diagnostic in case we fail to remove a file.Davide Italiano2016-03-201-2/+6
| | | | llvm-svn: 263914
* [tsan] Allow -fsanitize=thread for iOS-style simulator targetsDevin Coughlin2016-03-202-1/+27
| | | | | | | | | Update the clang driver to allow -fsanitize=thread when targeting x86_64 iOS and tvOS simulators. Also restrict TSan targeting OS X to only be supported on x86_64 and not i386. Differential Revision: http://reviews.llvm.org/D18280 llvm-svn: 263913
* [VFS] Fix test to use more restrict set of headersBruno Cardoso Lopes2016-03-201-5/+5
| | | | llvm-svn: 263912
* [X86][SSE] Tidyup setTargetShuffleZeroElements to match ↵Simon Pilgrim2016-03-201-4/+4
| | | | | | | | computeZeroableShuffleElements Based on feedback for D14261 llvm-svn: 263911
* [tsan] Build TSan dylibs for iOS-style simulatorsDevin Coughlin2016-03-201-0/+1
| | | | | | | | | | | Update the compiler-rt cmake to build TSan dylibs for iOS-style simulators when the corresponding COMPILER_RT_ENABLE_FOO_OS setting is enabled. Differential Revision: http://reviews.llvm.org/D18277 Part of rdar://problem/24048382 llvm-svn: 263910
* AST: Fix some bogus indentation. NFCJustin Bogner2016-03-201-2/+2
| | | | | | Noticed by Liu Xin. Thanks! llvm-svn: 263909
* Fixed -Wdocumentation warningSimon Pilgrim2016-03-201-6/+6
| | | | llvm-svn: 263908
* [X86][SSE] Detect zeroable shuffle elements from different value typesSimon Pilgrim2016-03-203-58/+81
| | | | | | | | Improve computeZeroableShuffleElements to be able to peek through bitcasts to extract zero/undef values from BUILD_VECTOR nodes of different element sizes to the shuffle mask. Differential Revision: http://reviews.llvm.org/D14261 llvm-svn: 263906
* [clang-tidy] Update check for API change in r263895.Benjamin Kramer2016-03-201-2/+4
| | | | | | | for range stmts now have split begin and ends, just apply OR to the condition. Should unbreak the build. llvm-svn: 263900
* Attempt to fix MSVC build (no __attribute__ there)Pavel Labath2016-03-201-0/+1
| | | | llvm-svn: 263899
* AVX512BW: Enable v32i1/v64i1 BUILD_VECTORIgor Breger2016-03-202-0/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D18211 llvm-svn: 263898
* [ELF][MIPS] Add case demonstrates creation redundant MIPS GOT entries for ↵Simon Atanasyan2016-03-201-1/+18
| | | | | | non-local symbols. NFC. llvm-svn: 263897
* Mark C++ features implemented in Clang 3.8 as done now that 3.8 has released.Richard Smith2016-03-201-3/+3
| | | | llvm-svn: 263896
* P0184R0: Allow types of 'begin' and 'end' expressions in range-based for ↵Richard Smith2016-03-2015-68/+109
| | | | | | loops to differ. llvm-svn: 263895
* [ELF] Update x86_64 relocations to 0.99.8 ABIGeorge Rimar2016-03-201-1/+2
| | | | | Added: R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX llvm-svn: 263894
* Reapply [2] [VFS] Add 'overlay-relative' field to YAML filesBruno Cardoso Lopes2016-03-208-29/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r261552 and r263748. Fixed testcase to reapply. The VFS overlay mapping between virtual paths and real paths is done through the 'external-contents' entries in YAML files, which contains hardcoded paths to the real files. When a module compilation crashes, headers are dumped into <name>.cache/vfs directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script generated for reproduction uses -ivfsoverlay pointing to file to gather the mapping between virtual paths and files inside <name>.cache/vfs. Currently, we are only capable of reproducing such crashes in the same machine as they happen, because of the hardcoded paths in 'external-contents'. To be able to reproduce a crash in another machine, this patch introduces a new option in the VFS yaml file called 'overlay-relative'. When it's equal to 'true' it means that the provided path to the YAML file through the -ivfsoverlay option should also be used to prefix the final path for every 'external-contents'. Example, given the invocation snippet "... -ivfsoverlay <name>.cache/vfs/vfs.yaml" and the following entry in the yaml file: "overlay-relative": "true", "roots": [ ... "type": "directory", "name": "/usr/include", "contents": [ { "type": "file", "name": "stdio.h", "external-contents": "/usr/include/stdio.h" }, ... Here, a file manager request for virtual "/usr/include/stdio.h", that will map into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h. This is a useful feature for debugging module crashes in machines other than the one where the error happened. Differential Revision: http://reviews.llvm.org/D17457 rdar://problem/24499339 llvm-svn: 263893
* Suppress a -Wunused-variable warning in release builds.Craig Topper2016-03-201-0/+1
| | | | llvm-svn: 263892
* Better visualization of clang::BuiltinType in VisualStudioMike Spertus2016-03-201-0/+26
| | | | | | Whenever possible, use C++ names for visualizing builtin types. E.g., "long double" instead of "LongDouble" llvm-svn: 263891
* Visual Studio Visualizer for clang::FunctionProtoTypeMike Spertus2016-03-201-0/+32
| | | | | | Displays return type and parameters for the Function Protoype object in the Locals window. llvm-svn: 263890
* Use a range-based for loop. NFC.Michael Kuperstein2016-03-201-4/+4
| | | | llvm-svn: 263889
* [Sema] Make type deduction work with some overloadable functionsGeorge Burgess IV2016-03-192-0/+71
| | | | | | | | | | | Some functions can't have their address taken. If we encounter an overload set where only one of the candidates can have its address taken, we should automatically select that candidate's type in type deduction. Differential Revision: http://reviews.llvm.org/D15591 llvm-svn: 263888
* [Sema] Allow casting of some overloaded functionsGeorge Burgess IV2016-03-195-14/+215
| | | | | | | | | | | Some functions can't have their address taken. If we encounter an overload set where only one of the candidates can have its address taken, we should automatically select that candidate in cast expressions. Differential Revision: http://reviews.llvm.org/D17701 llvm-svn: 263887
* Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.Mehdi Amini2016-03-194-0/+91
| | | | | | | | | | | | | Summary: Also expose getters and setters in the C API, so that the change can be tested. Reviewers: nhaehnle, axw, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18260 From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> llvm-svn: 263886
OpenPOWER on IntegriCloud