summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* More MSVC bot appeasement. Explicitly define rvalue methods on SortKey.Pete Cooper2016-03-221-0/+19
| | | | | | | | | | | | | | OwningAtomPtr does not have OwningAtomPtr(OwningAtomPtr&) or the equivalent operator= as we only want to use rvalue references in it. SortKey didn't like this on MSVC as it was synthesizing SortKey(SortKey&) and trying to use the OwningAtomPtr(OwningAtomPtr&) method which was private an unimplemented. Now we explicitly have the methods on SortKey so hopefully the bot will be happier. llvm-svn: 264077
* [WebAssembly] Implement the rotate instructions.Dan Gohman2016-03-224-1/+117
| | | | llvm-svn: 264076
* [clang-tidy] Fix redundant-string-cstr check with msvc 14 headers.Etienne Bergeron2016-03-222-19/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The string constructors are not defined using optional parameters and are not recognize by the checker. The constructor defined in the MSVC header is defined with 1 parameter. Therefore, patterns are not recognized by the checker. The current patch add support to accept constructor with only one parameter. Repro on a Visual Studio 14 installation with the following code: ``` void f1(const std::string &s) { f1(s.c_str()); } ``` In the xstring.h header, the constructors are defined this way: ``` basic_string(const _Myt& _Right) [...] basic_string(const _Myt& _Right, const _Alloc& _Al) [...] ``` The CXXConstructExpr to recognize only contains 1 parameter. ``` CXXConstructExpr 0x3f1a070 <C:\src\llvm\examples\test.cc:6:6, col:14> 'const std::string':'const class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char> >' 'void (const char *) __attribute__((thiscall))' `-CXXMemberCallExpr 0x3f1a008 <col:6, col:14> 'const char *' `-MemberExpr 0x3f19fe0 <col:6, col:8> '<bound member function type>' .c_str 0x3cc22f8 `-DeclRefExpr 0x3f19fc8 <col:6> 'const std::string':'const class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char> >' lvalue ParmVar 0x3f19c80 's' 'const std::string &' ``` Reviewers: aaron.ballman, alexfh Subscribers: aemerson Differential Revision: http://reviews.llvm.org/D18285 llvm-svn: 264075
* Unicode support on Win32.Zachary Turner2016-03-2229-226/+530
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* [clang-tidy] Skip reporting of not applicable fixes.Etienne Bergeron2016-03-222-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Invalid source location are causing clang-tidy to crash when manipulating an invalid file. Macro definitions on the command line have locations in a virtual buffer and therefore don't have a corresponding valid FilePath. A recent patch added path conversion to absolute path. As the FilePath may now be empty, the result of makeAbsolutePath may incorrectly be the folder WorkingDir. The crash occurs in getLocation which is not able to find the appropriate FileEntry (null pointer). ``` SmallString<128> FixAbsoluteFilePath = Fix.getFilePath(); Files.makeAbsolutePath(FixAbsoluteFilePath); FixLoc = getLocation(FixAbsoluteFilePath, Fix.getOffset()); ``` With relative path, the code was not crashing because getLocation was skipping empty path. Example of code: ``` int main() { return X; } ``` With the given command-line: ``` clang-tidy test.cc --checks=misc-macro-* -- -DX=0+0 ``` Reviewers: alexfh, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D18262 llvm-svn: 264073
* Add a hasOperandBundlesOtherThan helper, and use it; NFCSanjoy Das2016-03-222-12/+17
| | | | llvm-svn: 264072
* StaticAnalyzer: Avoid an unintentional copyJustin Bogner2016-03-221-1/+1
| | | | | | | | | | The range here isn't over references, so using `auto &` here incites a copy. Switching to `auto *` would do, but we might as well list an explicit type for clarity. Found by -Wrange-loop-analysis. llvm-svn: 264071
* Appease MSVC bots by changing visibility of AtomVector.Pete Cooper2016-03-221-4/+3
| | | | | | | | | The AtomVector class is an internal detail of File so I moved it to be protected in r264067. However, the MSVC bots don't like the global declarations of type File::AtomVector in File.cpp so it needs to go back to being public for now. llvm-svn: 264070
* [clang-tidy] Fix redundant-string-init check with msvc 14 headers.Etienne Bergeron2016-03-223-15/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The string constructors are not defined using optional parameters and are not recognized by the redundant-string-init checker. The following patch fixes the redundant-string-init checker for the Visual Studio 14 headers file. The matcher now accept both variant (with 1 and 2 parameters). Also added new unittests. Similar issue than: [[ http://reviews.llvm.org/D18285 | review ]] In the xstring.h header, the constructors are defined this way: ``` basic_string(const _Myt& _Right) [...] basic_string(const _Myt& _Right, const _Alloc& _Al) [...] ``` Reviewers: alexfh, hokein Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18293 llvm-svn: 264069
* [tsan] Disable randomized address space on linux aarch64.Yabin Cui2016-03-221-0/+15
| | | | | | | | | | | | | | | | | Summary: After patch https://lkml.org/lkml/2015/12/21/340 is introduced in linux kernel, the random gap between stack and heap is increased from 128M to 36G on 39-bit aarch64. And it is almost impossible to cover this big range. So I think we need to disable randomized virtual space on aarch64 linux. Reviewers: kcc, llvm-commits, eugenis, zatrazz, dvyukov, rengolin Subscribers: rengolin, aemerson, tberghammer, danalbert, srhines, enh Differential Revision: http://reviews.llvm.org/D18003 llvm-svn: 264068
* Use owning pointers instead of raw pointers for Atom's to fix leaks.Pete Cooper2016-03-2227-203/+520
| | | | | | | | | | | | | | | | | | | | | | | | This is a re-commit of r264022 with a fix for MSVC. The issue there was that the code was running DefinedAtom::~Atom() for some value and instead needed to cast to Atom before running ~Atom. Original commit message follows. Currently each File contains an BumpPtrAllocator in which Atom's are allocated. Some Atom's contain data structures like std::vector which leak as we don't run ~Atom when they are BumpPtrAllocate'd. Now each File actually owns its Atom's using an OwningAtomPtr. This is analygous to std::unique_ptr and may be replaced by it if possible. An Atom can therefore only be owned by a single File, so the Resolver now moves them from one File to another. The MachOLinkingContext owns the File's and so clears all the Atom's in ~MachOLinkingContext, then delete's all the File's. This makes sure all Atom's have been destructed before any of the BumpPtrAllocator's in which they run have gone away. Should hopefully fix the remaining leaks. Will keep an eye on the bots to make sure. llvm-svn: 264067
* Make build bots happyDavid Majnemer2016-03-221-1/+0
| | | | | | | BasicBlock's lose their names for some builders, don't mention such names. llvm-svn: 264066
* [MS ABI] Assign an inheritance model for the dest of a member pointer upcastDavid Majnemer2016-03-222-1/+20
| | | | | | | | | While we correctly assigned an inheritance model for the source of a member pointer upcast, we did not do so for the destination. This fixes PR27030. llvm-svn: 264065
* [Perf-training] Using os.devnull instead of a temp fileChris Bieneman2016-03-221-4/+1
| | | | | | | | This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows. Thanks Vedant! llvm-svn: 264064
* [Perf-training] Cleanup based on feedback from Sean SilvasChris Bieneman2016-03-221-11/+6
| | | | | | Sean provided feedback based on r257934 on cfe-commits. This change addresses that feedback. llvm-svn: 264063
* [X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardwareSimon Pilgrim2016-03-226-77/+210
| | | | | | | | | | | | | | Improve vector extension of vectors on hardware without dedicated VSEXT/VZEXT instructions. We already convert these to SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG but can further improve this by using the legalizer instead of prematurely splitting into legal vectors in the combine as this only properly helps for lowering to VSEXT/VZEXT. Removes a lot of unnecessary any_extend + mask pattern - (Fix for PR25718). Reapplied with a fix for PR26953 (missing vector widening legalization). Differential Revision: http://reviews.llvm.org/D17932 llvm-svn: 264062
* [asan] Add ucrtbase.dll to the list of DLLs to interceptReid Kleckner2016-03-221-0/+1
| | | | | | Reduces number of test failures in check-asan-dynamic with VS 2015. llvm-svn: 264061
* [asan] Add one more x86 encoding to the interceptor for strrchrReid Kleckner2016-03-221-0/+1
| | | | llvm-svn: 264060
* [unittests] clang-format a line, NFCVedant Kumar2016-03-221-3/+1
| | | | llvm-svn: 264059
* [tsan] Change nullptr to NULL in one Darwin test.Kuba Brecka2016-03-221-1/+1
| | | | | | Depending on the version of libcxx, nullptr might not be available. Let's use NULL instead. llvm-svn: 264058
* [mips] Make simm6 consistent with the rest. NFC.Daniel Sanders2016-03-221-5/+1
| | | | | | | | | | | | Summary: Reviewers: vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D18147 llvm-svn: 264057
* [mips] Range check simm7.Daniel Sanders2016-03-2210-23/+63
| | | | | | | | | | | | | | Summary: Also renamed li_simm7 to li16_imm since it's not a simm7 and has an unusual encoding (it's a uimm7 except that 0x7f represents -1). Reviewers: vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D18145 llvm-svn: 264056
* clang-format: [JS] do not wrap ES6 imports/exports.Daniel Jasper2016-03-223-22/+38
| | | | | | | | | "import ... from '...';" and "export ... from '...';" should be treated the same as goog.require/provide/module/forwardDeclare calls. Patch by Martin Probst. llvm-svn: 264055
* [mips] Range check simm5.Daniel Sanders2016-03-224-3/+10
| | | | | | | | | | | | | | | Summary: We can't check the error message for this one because there's another lw/sw available that covers a larger range. We therefore check the transition between the two sizes. Reviewers: vkalintiris Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D18144 llvm-svn: 264054
* [mips] Range check vsplat_uimm[1234568].Daniel Sanders2016-03-223-72/+211
| | | | | | | | | | | | Summary: Reviewers: vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D18143 llvm-svn: 264053
* [mips] Range check uimm4_ptr, remove uimm6_ptr, and use correctly sized ↵Daniel Sanders2016-03-223-42/+74
| | | | | | | | | | | | immediates in MSA copy/insert. Reviewers: vkalintiris Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D18142 llvm-svn: 264052
* [PATCH] Force LoopReroll to reset the loop trip count value after reroll.Zinovy Nis2016-03-222-6/+9
| | | | | | | | | | | It's a bug fix. For rerolled loops SE trip count remains unchanged. It leads to incorrect work of the next passes. My patch just resets SE info for rerolled loop forcing SE to re-evaluate it next time it requested. I also added a verifier call in the exisitng test to be sure no invalid SE data remain. Without my fix this test would fail with -verify-scev. Differential Revision: http://reviews.llvm.org/D18316 llvm-svn: 264051
* Moving files that were placed in the wrong directory from r264049.Aaron Ballman2016-03-222-0/+0
| | | | llvm-svn: 264050
* Fix crashes from delayed template parsing code that assumed getBody() would ↵Aaron Ballman2016-03-224-8/+71
| | | | | | | | return non-null. Patch by Etienne Bergeron. llvm-svn: 264049
* Skip some relocations in scanRelocs.Rafael Espindola2016-03-222-25/+30
| | | | | | | | | | | | | When a tls access is optimized, a group of relocations is converted at a time. We were already skipping relocations that were optimized out in relocate, but not in scanRelocs. This is a small optimization. I got here while working on a patch that will always keep scanRelocs and relocate in sync. llvm-svn: 264048
* [ELF] - Process R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations.George Rimar2016-03-221-1/+4
| | | | | | | | | | | | | | | | | R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX relocations were added in latest ABI: https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf They should be generated instead of R_X86_64_GOTPCREL for cases when relaxation is possible. Currently this patch just process them in the same way like R_X86_64_GOTPCREL. That should work for now and we can implement relaxations later. There is no testcases provided as I think there is no way to generate such relocations using llvm-mc atm. Differential revision: http://reviews.llvm.org/D18301 llvm-svn: 264043
* [ELF][gcc compatibility]: support section names with special characters ↵Marina Yatsina2016-03-222-8/+13
| | | | | | | | | | | | (e.g. "/") Adding support for section names with special characters in them (e.g. "/"). GCC successfully compiles such section names. This also fixes PR24520. Differential Revision: http://reviews.llvm.org/D15678 llvm-svn: 264038
* [ASTMatchers] New matcher hasReturnValue addedAlexander Kornienko2016-03-224-0/+35
| | | | | | | | | | | | | | Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue). Reviewers: klimek, sbenza Subscribers: xazax.hun, klimek, cfe-commits Patch by Ádám Balogh! Differential Revision: http://reviews.llvm.org/D17986 llvm-svn: 264037
* Fix warning about extra semicolon. NFC.Vasileios Kalintiris2016-03-221-1/+1
| | | | llvm-svn: 264035
* [ELF][MIPS] Delete GotSection::addMipsLocalEntry methodSimon Atanasyan2016-03-223-16/+13
| | | | | | | | | | Now local symbols have SymbolBody so we can handle all kind of symbols in the GotSection::addEntry method. The patch moves the code from addMipsLocalEntry to addEntry. NFC. Differential Revision: http://reviews.llvm.org/D18302 llvm-svn: 264032
* [OMPT] Make tests require OMPT_BLAMEJonas Hahnfeld2016-03-227-8/+6
| | | | | | | ompt_event_barrier_{begin,end} are optional blame events. In total it doesn't make any sense to test partially built OMPT support. llvm-svn: 264031
* [LLDB]{MIPS] Fix TestPlatformProcessConnect.pyMohit K. Bhakkad2016-03-224-18/+19
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, labath. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D18082 llvm-svn: 264030
* Fix unittests: resize() -> reserve()Mehdi Amini2016-03-221-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264029
* DenseMap resize() is now named reserved(), adapt the call sitesMehdi Amini2016-03-221-2/+2
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264028
* [OMPT] Create infrastructure and add first tests for OMPTJonas Hahnfeld2016-03-228-0/+404
| | | | | | | | | | | | | | | | | | Some basic checks next to the implementation should futher lower the possibility to introduce regressions. (Note that this would have catched the ordering issue fixed in rL258866 and pointed to rL263940.) The tests are implementation dependent in one point because they assume that thread ids are assigned in ascending order. This is not defined by the standard but currently ensured in libomp. We have to think about another way of ordering the threads should this ever be subject to change... Note that this isn't aiming at replacing the implementation independent test-suite at https://github.com/OpenMPToolsInterface/ompt-test-suite! Differential Revision: http://reviews.llvm.org/D16715 llvm-svn: 264027
* Rename DenseMap::resize() into DenseMap::reserve() (NFC)Mehdi Amini2016-03-223-3/+3
| | | | | | | This is more coherent with usual containers. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264026
* [Objective-c] Do not set IsExact to true when the receiver is a class.Akira Hatanaka2016-03-223-3/+13
| | | | | | | | | | | | IsExact shouldn't be set to true in WeakObjectProfileTy::getBaseInfo when the receiver is a class because having a class as the receiver doesn't guarantee that the Base is exact. This is a follow-up to r263818. rdar://problem/25208167 llvm-svn: 264025
* Minor code cleanup. NFC.Junmo Park2016-03-221-1/+1
| | | | llvm-svn: 264024
* Revert "Use owning pointers instead of raw pointers for Atom's to fix leaks."Pete Cooper2016-03-2227-516/+203
| | | | | | | | | | | | This reverts commit r264022. This breaks the Window's bots which don't like that i'm calling ~Atom when the this pointer is a sublcass of Atom. Reverting for now until I try find a better fix. I tried using std::unique_ptr with a custom deleter as a quick fix, but it didn't work well in the YAML parser. llvm-svn: 264023
* Use owning pointers instead of raw pointers for Atom's to fix leaks.Pete Cooper2016-03-2227-203/+516
| | | | | | | | | | | | | | | | | | | | Currently each File contains an BumpPtrAllocator in which Atom's are allocated. Some Atom's contain data structures like std::vector which leak as we don't run ~Atom when they are BumpPtrAllocate'd. Now each File actually owns its Atom's using an OwningAtomPtr. This is analygous to std::unique_ptr and may be replaced by it if possible. An Atom can therefore only be owned by a single File, so the Resolver now moves them from one File to another. The MachOLinkingContext owns the File's and so clears all the Atom's in ~MachOLinkingContext, then delete's all the File's. This makes sure all Atom's have been destructed before any of the BumpPtrAllocator's in which they run have gone away. Should hopefully fix the remaining leaks. Will keep an eye on the bots to make sure. llvm-svn: 264022
* [Perf-training] Fixing an issue with multi-threading PGO generationChris Bieneman2016-03-221-2/+5
| | | | | | When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes. llvm-svn: 264021
* Visual Studio Native Visualizations for constructors and methodsMike Spertus2016-03-221-23/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the class struct A { A(int _i); ~A(); int foo(double d); double bar(A *a) { return 1.3; } }; appears in the VS2015 Locals Window as D 0x02dbb378 struct A |- DeclKind CXXRecord |- Members |- [0] implicit struct A |- [1] Constructor {A(int _i)} |- [2] Destructor {~A()} |- [3] Method {int foo(double d)} |- [4] Method {double bar(struct A *)} |- [Raw View] /* Other stuff */ Note that these changes only benefit VS2015 as VS2013 does not have views and only displays the struct name "A", but the change does no apparent harm in VS2013, so is still a win. llvm-svn: 264020
* Appease the windows buildbotsSanjoy Das2016-03-221-30/+31
| | | | | | | The guess is that the stdout/stderr ordering may differ between windows / unix. llvm-svn: 264019
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-225-6/+1052
| | | | | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 Reworked test case after buildbot failure on windows. Updated patch to integrate r263837 and test case nvptx_target_firstprivate_codegen.cpp. llvm-svn: 264018
* Move -fms-compatibility-version=19 into target cflagsReid Kleckner2016-03-225-20/+7
| | | | | | | This reduces cflags duplication and allows us to build sanitizer_common/tests with clang and the VS 2015 STL. llvm-svn: 264017
OpenPOWER on IntegriCloud