summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [include-fixer] Add a find-all-symbols tool for include-fixer.Haojian Wu2016-04-2712-0/+1135
| | | | | | | | | | | | | | | | Summary: The find-all-symbols tool generates a yaml symbol database for include-fixer. The symbol matcher is originally written by Xiaoyi Liu. Reviewers: bkramer, djasper Subscribers: cfe-commits, klimek, ioeric Differential Revision: http://reviews.llvm.org/D19482 llvm-svn: 267719
* Clean up the include fixer 'driver' a bit and make the database configurable.Benjamin Kramer2016-04-272-16/+60
| | | | | | | Also add a test for it. The library is covered by unit tests, the driver was not. llvm-svn: 267718
* [ThinLTO] Refine fix to avoid renaming of uses in inline assembly.Teresa Johnson2016-04-272-14/+30
| | | | | | | | | | | | | | | | | Summary: Refine the workaround from r266877 that attempts to prevent renaming of locals in inline assembly, so that in addition to looking for a llvm.used local value, that there is at least one inline assembly call in the module. Otherwise, debug functions added to the llvm.used can block importing/exporting unnecessarily. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19573 llvm-svn: 267717
* tsan: fix windows Go supportDmitry Vyukov2016-04-271-0/+6
| | | | | | Unmap can't unmap arbitrary regions on windows. llvm-svn: 267716
* tsan: fix darwin Go buildDmitry Vyukov2016-04-271-0/+2
| | | | | | syslog_lock is not defined in Go build. llvm-svn: 267714
* tsan: make windows shadow mapping a bijectionDmitry Vyukov2016-04-271-1/+4
| | | | | | | | CheckShadowMapping function started catching that mem->shadow->mem mapping is not bijection. Make it bijection. llvm-svn: 267713
* [ThinLTO] Use valueid instead of bitcode offsets in combined index fileTeresa Johnson2016-04-2713-151/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With the removal of support for lazy parsing of combined index summary records (e.g. r267344), we no longer need to include the summary record bitcode offset in the VST entries for definitions. Change the combined index format to be similar to the per-module index format in using value ids to cross-reference from the summary record to the VST entry (rather than the summary record bitcode offset to cross-reference in the other direction). The visible changes are: 1) Add the value id to the combined summary records 2) Remove the summary offset from the combined VST records, which has the following effects: - No longer need the VST_CODE_COMBINED_GVDEFENTRY record, as all combined index VST entries now only contain the value id and corresponding GUID. - No longer have duplicate VST entries in the case where there are multiple definitions of a symbol (e.g. weak/linkonce), as they all have the same value id and GUID. An implication of #2 above is that in order to hook up an alias to the correct aliasee based on the value id of the aliasee recorded in the combined index alias record, we need to scan the entries in the index for that GUID to find the one from the same module (i.e. the case where there are multiple entries for the aliasee). But the reader no longer has to maintain a special map to hook up the alias/aliasee. Reviewers: joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19481 llvm-svn: 267712
* Remove explain-config testcase that detect hard-coded check.Haojian Wu2016-04-271-2/+0
| | | | | | Remove it for now, we need to better way to figure out how to test it. llvm-svn: 267711
* tsan: fix build Dmitry Vyukov2016-04-271-0/+1
| | | | | error: implicit declaration of function 'abort' is invalid in C99 llvm-svn: 267710
* tsan: fix darwin Go buildDmitry Vyukov2016-04-271-0/+6
| | | | | | | | Ifdef out global variables with destructors. This requires runtime support that is not provided by Go runtime (in particular _dso_handle symbol). llvm-svn: 267709
* NFC. Introduce Value::getPointerDerferecnceableBytesArtur Pilipenko2016-04-273-27/+43
| | | | | | | | | | Extract a part of isDereferenceableAndAlignedPointer functionality to Value::getPointerDerferecnceableBytes. Currently it's a NFC, but in future I'm going to accumulate all the logic about value dereferenceability in this function similarly to Value::getPointerAlignment function (D16144). Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17572 llvm-svn: 267708
* [FIX] Propagate execution domain of invariant loadsJohannes Doerfert2016-04-275-11/+92
| | | | | | | | | | | If the base pointer of an invariant load is is loaded conditionally, that condition needs to hold for the invariant load too. The structure of the program will imply this for domain constraints but not for imprecisions in the modeling. To this end we will propagate the execution context of base pointers during code generation and thus ensure the derived pointer does not access an invalid base pointer. llvm-svn: 267707
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-2714-14/+252
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
* Reduce usage of isRelRelative.Rafael Espindola2016-04-272-69/+23
| | | | | | | | | | It is now used only for relocations that only set the low bits inside a page. Everything else is handled by getRelExpr. I will send a another review renaming and better documenting isRelRelative. llvm-svn: 267705
* Remove flaky decorator from three tests on linuxPavel Labath2016-04-273-3/+0
| | | | | | The flakyness is no longer reproducible, and the tests seem to be passing reliably now. llvm-svn: 267704
* tsan: change tsan/Go interface for obtaining the current ProcessorDmitry Vyukov2016-04-2711-69/+82
| | | | | | | | | | | | | | | Current interface assumes that Go calls ProcWire/ProcUnwire to establish the association between thread and proc. With the wisdom of hindsight, this interface does not work very well. I had to sprinkle Go scheduler with wire/unwire calls, and any mistake leads to hard to debug crashes. This is not something one wants to maintian. Fortunately, there is a simpler solution. We can ask Go runtime as to what is the current Processor, and that question is very easy to answer on Go side. Switch to such interface. llvm-svn: 267703
* Represent TOC relative relocations as GOTREL.Rafael Espindola2016-04-271-10/+19
| | | | | | That way we only need to subtract the offset is relocateOne. llvm-svn: 267702
* Create a .got when PPC64 uses a TOC.Rafael Espindola2016-04-274-33/+60
| | | | | | This simplifies the logic for computing the value of the toc base. llvm-svn: 267701
* Fix a crash in cppcoreguidelines-pro-type-member-init when checking a type ↵Haojian Wu2016-04-272-10/+24
| | | | | | | | | | | | | | | | with a template parameter as a base class. Summary: Fixed a crash in cppcoreguidelines-pro-type-member-init when encountering a type that uses one of its template parameters as a base when compiling for C++98. Patch by Michael Miller! Reviewers: aaron.ballman, alexfh, hokein Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19539 llvm-svn: 267700
* [InstCombine][SSE] Regenerated vector shift testsSimon Pilgrim2016-04-271-356/+505
| | | | llvm-svn: 267699
* Simplify handling of R_PPC64_TOC. NFC.Rafael Espindola2016-04-272-10/+11
| | | | llvm-svn: 267698
* clang-tidy -list-checks should exit with non-zero code when no checks are ↵Alexander Kornienko2016-04-271-0/+4
| | | | | | enabled. llvm-svn: 267697
* [Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and ↵Michael Zuckerman2016-04-279-0/+450
| | | | | | | | VPBROADCAST instruction set . Differential Revision: http://reviews.llvm.org/D19196 llvm-svn: 267696
* [OPENMP] Fix crash on initialization of classes with no init clause inAlexey Bataev2016-04-272-12/+24
| | | | | | | | | | declare reductions. If reduction clause is applied to instance of class with user-defined reduction operation without initialization clause, it may cause a crash. Patch fixes this issue. llvm-svn: 267695
* [mips][microMIPS] Add CodeGen support for SUBU16, SUB, SUBU, DSUB and DSUBU ↵Zlatko Buljan2016-04-279-57/+163
| | | | | | | | instructions Differential Revision: http://reviews.llvm.org/D16676 llvm-svn: 267694
* [mips][microMIPS] Add CodeGen support for SLL16, SRL16, SLL, SLLV, SRA, ↵Zlatko Buljan2016-04-2715-16/+248
| | | | | | | | SRAV, SRL and SRLV instructions Differential Revision: http://reviews.llvm.org/D17989 llvm-svn: 267693
* isSafeToLoadUnconditionally support queries without a contextArtur Pilipenko2016-04-276-14/+27
| | | | | | | | | | This is required to use this function from isSafeToSpeculativelyExecute Reviewed By: hfinkel Differential Revision: http://reviews.llvm.org/D16231 llvm-svn: 267692
* [modules] Fix Decl's Used invariant.Vassil Vassilev2016-04-2711-41/+128
| | | | | | | | | | | | | | | | | | | | The Decl::isUsed has a value for every decl. In non-module builds it is very difficult (but possible) to break this invariant but when we walk up the redecl chain we find the neccessary information. When deserializing the decls from a module it is much more difficult to update correctly this invariant. The patch centralizes the information whether a decl is used in the canonical decl marking the entire entity as being used. Fixes https://llvm.org/bugs/show_bug.cgi?id=27401 Patch by Cristina Cristescu and me. Thanks to Richard Smith who helped to debug and understand the issue! Reviewed by Richard Smith. llvm-svn: 267691
* [Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps ↵Michael Zuckerman2016-04-273-0/+53
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19529 llvm-svn: 267690
* Use DL preferred alignment for alloca in Value::getPointerAlignmentArtur Pilipenko2016-04-272-3/+14
| | | | | | | | | | Teach Value::getPointerAlignment that allocas with no explicit alignment are aligned to preferred alignment of the allocated type. Reviewed By: hfinkel Differential Revision: http://reviews.llvm.org/D17569 llvm-svn: 267689
* Fix compiler warnings in SymbolFilePDBTestsPavel Labath2016-04-271-20/+20
| | | | llvm-svn: 267688
* Don't search compilation database in explain-check test.Haojian Wu2016-04-271-1/+1
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19583 llvm-svn: 267687
* [InstCombine][SSE] Added DemandedBits tests for MOVMSK instructionsSimon Pilgrim2016-04-271-0/+137
| | | | | | MOVMSK zeros the upper bits of the gpr - we should be able to use this. llvm-svn: 267686
* Removed dead code. NFC.George Rimar2016-04-271-1/+0
| | | | llvm-svn: 267685
* [ELF] - Align sections file offsets correctly.George Rimar2016-04-272-4/+102
| | | | | | | | | | | System V ABI 4.1 specifies that program header's p_vaddr should equal p_offset, modulo p_align. (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-83432/index.html). It was possible to violate this using the linkerscript. Patch fixes the issue. Differential revision: http://reviews.llvm.org/D19416 llvm-svn: 267684
* [ClangTidy] Add an 'explain-checks' option to diagnose where each checks ↵Haojian Wu2016-04-275-25/+141
| | | | | | | | | | | | comes from. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18694 llvm-svn: 267683
* tsan: fix windows buildDmitry Vyukov2016-04-271-1/+1
| | | | | warning: '__sanitizer::uptr __sanitizer::GetPreferredBase(const char*)' defined but not used llvm-svn: 267682
* tsan: fix windows buildDmitry Vyukov2016-04-271-1/+1
| | | | llvm-svn: 267681
* tsan: add missing fileDmitry Vyukov2016-04-271-0/+61
| | | | llvm-svn: 267680
* tsan: fix compiler warningDmitry Vyukov2016-04-271-2/+1
| | | | | | | | | tsan_debugging.cc: In function ‘void* __tsan_get_current_report()’: tsan_debugging.cc:61:18: warning: cast from type ‘const __tsan::ReportDesc*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] return (void *)rep; llvm-svn: 267679
* tsan: split thread into logical and physical stateDmitry Vyukov2016-04-2717-96/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | This is reincarnation of http://reviews.llvm.org/D17648 with the bug fix pointed out by Adhemerval (zatrazz). Currently ThreadState holds both logical state (required for race-detection algorithm, user-visible) and physical state (various caches, most notably malloc cache). Move physical state in a new Process entity. Besides just being the right thing from abstraction point of view, this solves several problems: Cache everything on P level in Go. Currently we cache on a mix of goroutine and OS thread levels. This unnecessary increases memory consumption. Properly handle free operations in Go. Frees are issue by GC which don't have goroutine context. As the result we could not do anything more than just clearing shadow. For example, we leaked sync objects and heap block descriptors. This will allow to get rid of libc malloc in Go (now we have Processor context for internal allocator cache). This in turn will allow to get rid of dependency on libc entirely. Potentially we can make Processor per-CPU in C++ mode instead of per-thread, which will reduce resource consumption. The distinction between Thread and Processor is currently used only by Go, C++ creates Processor per OS thread, which is equivalent to the current scheme. llvm-svn: 267678
* [OPENMP] Fix for codegen of captured variables in inlined directives.Alexey Bataev2016-04-277-21/+76
| | | | | | | | Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. llvm-svn: 267677
* Updated doxygen comments for intrinsics.Ekaterina Romanova2016-04-271-48/+33
| | | | | | | (1) Removed \code.. \endcode tags around the instruction name. This matches the doxygen format for all other intrinsics. (2) Did a better formatting for the comments (to fit into 80 columns more compactly). llvm-svn: 267676
* Fixed sphinx warning from r267672Adam Nemet2016-04-271-1/+1
| | | | llvm-svn: 267675
* [Compiler-rt][CFI] Enabling CFI for MIPS64Mohit K. Bhakkad2016-04-271-1/+1
| | | | | | | | | | Reviewers: eugenis Subscribers: jaydeep, sagar, Sanitizers Differential Revision: http://reviews.llvm.org/D19531 llvm-svn: 267674
* [ELF][MIPS] Remove getMipsGpAddr(). NFCSimon Atanasyan2016-04-273-14/+1
| | | | llvm-svn: 267673
* [LoopDist] Add llvm.loop.distribute.enable loop metadataAdam Nemet2016-04-275-13/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D19403 adds a new pragma for loop distribution. This change adds support for the corresponding metadata that the pragma is translated to by the FE. As part of this I had to rethink the flag -enable-loop-distribute. My goal was to be backward compatible with the existing behavior: A1. pass is off by default from the optimization pipeline unless -enable-loop-distribute is specified A2. pass is on when invoked directly from opt (e.g. for unit-testing) The new pragma/metadata overrides these defaults so the new behavior is: B1. A1 + enable distribution for individual loop with the pragma/metadata B2. A2 + disable distribution for individual loop with the pragma/metadata The default value whether the pass is on or off comes from the initiator of the pass. From the PassManagerBuilder the default is off, from opt it's on. I moved -enable-loop-distribute under the pass. If the flag is specified it overrides the default from above. Then the pragma/metadata can further modifies this per loop. As a side-effect, we can now also use -enable-loop-distribute=0 from opt to emulate the default from the optimization pipeline. So to be precise this is the new behavior: C1. pass is off by default from the optimization pipeline unless -enable-loop-distribute or the pragma/metadata enables it C2. pass is on when invoked directly from opt unless -enable-loop-distribute=0 or the pragma/metadata disables it Reviewers: hfinkel Subscribers: joker.eph, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D19431 llvm-svn: 267672
* [Cloning] cloneLoopWithPreheader(): add assert to ensure no sub-loopsVaivaswatha Nagaraj2016-04-272-0/+3
| | | | | | | | | | | | | | Summary: cloneLoopWithPreheader() does not update LoopInfo for sub-loop of the original loop being cloned. Add assert to ensure no sub-loops for loop being cloned. Reviewers: anemet, ashutosh.nema, hfinkel Subscribers: mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D15922 llvm-svn: 267671
* [Support][X86] Add a few more Intel model numbers to getHostCPUName for ↵Craig Topper2016-04-271-0/+4
| | | | | | airmont and knl. llvm-svn: 267670
* [Support][X86] Change the case values in the Intel family 6 code to hex so ↵Craig Topper2016-04-271-68/+66
| | | | | | its easier to compare with Intel's docs. NFC llvm-svn: 267669
OpenPOWER on IntegriCloud