summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LibFuzzer] Add missing #include<string>Dan Liew2016-05-261-0/+1
| | | | | | | This partially fixes the compilation of the LibFuzzer unit test on OSX using AppleClang. llvm-svn: 270926
* Fix gcc libunwind build.Asiri Rathnayake2016-05-263-8/+8
| | | | | | | | | | | | | | | | | | r270692 seems to have broken gcc builds of libunwind. This is because statements like: static_assert(check_fit<Registers_or1k, unw_context_t>::does_fit, "or1k registers do not fit into unw_context_t"); Do not work when static_assert is a macro taking two parameters, the extra comma separating the template parameters confuses the pre-processor. The fix is to change those statements to: static_assert((check_fit<Registers_or1k, unw_context_t>::does_fit), "or1k registers do not fit into unw_context_t"); Also fixed a gcc warning about a trivial un-intended narrowing. Differential revision: http://reviews.llvm.org/D20119 llvm-svn: 270925
* [LoopUnrollAnalyzer] Fix a crash in analyzeLoopUnrollCost.Michael Zolotukhin2016-05-262-20/+46
| | | | | | | | | Condition might be simplified to a Constant, but it doesn't have to be ConstantInt, so we should dyn_cast, instead of cast. This fixes PR27886. llvm-svn: 270924
* PR26055: Speed up LiveDebugValues::transferDebugValue()Adrian Prantl2016-05-261-43/+85
| | | | | | | | | | | | | | | | | | | | | | | | | This patch builds upon r270776 and speeds up LiveDebugValues::transferDebugValue() by adding an index that maps each DebugVariable to its open VarLoc. The transferDebugValue() function needs to close all open ranges for a given DebugVariable. Iterating over the set bits of OpenRanges is prohibitively slow in practice. I experimented with using the sorted map of VarLocs in the UniqueVector to iterate only over the range of VarLocs with a given DebugVariable, but the binary search turned out to be even more expensive than just iterating over the set bits in OpenRanges. Instead, this patch exploits the fact that there can only be one open location for each DebugVariable and redundantly stores this location in a DenseMap. This patch brings the time spent in the LiveDebugValues pass down to an almost neglectiable amount. http://llvm.org/bugs/show_bug.cgi?id=26055 http://reviews.llvm.org/D20636 rdar://problem/24091200 llvm-svn: 270923
* [libFuzzer] refactor: hide CurrentUnitData inside an interface function. NFCKostya Serebryany2016-05-263-28/+37
| | | | llvm-svn: 270922
* [Docs][WritingAnLLVMBackend] Makefiles are deprecatedChris Bieneman2016-05-261-15/+13
| | | | | | | | | | | | | | Summary: * docs/WritingAnLLVMBackend.rst: Makefiles are no longer used. The users should use CMakeLists.txt. In order to add the target, the TARGETS_TO_BUILD is replaced with LLVM_ALL_TARGETS. Reviewers: gribozavr, void, beanz Subscribers: llvm-commits Patch By: Visoiu Mistrih Francis (thegameg) Differential Revision: http://reviews.llvm.org/D20700 llvm-svn: 270921
* [obj2yaml][yaml2obj] Support for MachO lazy bindingsChris Bieneman2016-05-265-0/+472
| | | | | | This adds support for YAML round tripping dyld info lazy bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld, and can have DONE opcodes in the middle of the opcode lists. llvm-svn: 270920
* [Kaleidoscope][BuildingAJIT] Remove leftover debugging output statements.Lang Hames2016-05-261-4/+0
| | | | llvm-svn: 270919
* [Kaleidoscope][BuildingAJIT] Fix strong emphasis markup by removing whitespace.Lang Hames2016-05-261-2/+2
| | | | llvm-svn: 270918
* [Kaleidoscope][BuildingAJIT] Add docs for Chapter 3 of the Building A JITLang Hames2016-05-261-0/+47
| | | | | | tutorial. llvm-svn: 270917
* [Error] Make ECError only constructible via errorCodeToError.Lang Hames2016-05-261-3/+4
| | | | | | | This enforces idiomatic usage of ECError removing the option to construct them using make_error. llvm-svn: 270916
* Add myself as the code owner for SCEV and IndVarSimplifySanjoy Das2016-05-261-1/+5
| | | | llvm-svn: 270915
* [Kaleidoscope][BuildingAJIT] Add explicit dependence on TransformUtils to ↵Lang Hames2016-05-261-0/+1
| | | | | | Chapter3. llvm-svn: 270914
* [LibFuzzer] Emit error if LLVM_USE_SANITIZER is not correctly set.Dan Liew2016-05-261-0/+6
| | | | | | | | | | Previously CMake would successfully configure and compile (with warnings about ``-fsanitize-coverage=...`` being unused) but the tests LibFuzzer tests would fail. Differential Revision: http://reviews.llvm.org/D20662 llvm-svn: 270913
* [LibFuzzer] Allow LibFuzzer to be built in modes other than RELEASE.Dan Liew2016-05-267-14/+37
| | | | | | | | | | | | Previously the flags were only being set correctly when the build type was "Release". Now the build should work properly for all the supported build types. When building libFuzzer the optimization level respects whatever is used for the rest of LLVM but for the LibFuzzer tests we force -O0. Differential Revision: http://reviews.llvm.org/D20558 llvm-svn: 270912
* [obj2yaml][yaml2obj] Support for MachO weak bindingsChris Bieneman2016-05-265-16/+163
| | | | | | This adds support for YAML round tripping dyld info weak bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld. llvm-svn: 270911
* [ELF][MIPS] Handle section symbol points to the .MIPS.options / .reginfo sectionSimon Atanasyan2016-05-264-2/+28
| | | | | | | | | | | | | | MIPS .reginfo and .MIPS.options sections are consumed by the linker, and the linker produces a single output section. But it is possible that input files contain section symbol points to the corresponding input section. In case of generation a relocatable output we need to write such symbols to the output file. Fixes bug 27878. Differential Revision: http://reviews.llvm.org/D20688 llvm-svn: 270910
* [Kaleidoscope][BuildingAJIT] Add code for Chapter 3.Lang Hames2016-05-264-0/+1385
| | | | llvm-svn: 270909
* [Orc] Don't create empty globals modules in the CompileOnDemandLayer.Lang Hames2016-05-261-7/+14
| | | | | | | | Global variables and aliases are emitted eagerly, but there may not be any in the incoming module. In that case, we can save some memory and compile time by not building, emitting and tracking an empty globals module. llvm-svn: 270908
* Update for llvm change.Rafael Espindola2016-05-261-3/+7
| | | | llvm-svn: 270907
* coff: fix weak alias to local.Rafael Espindola2016-05-263-33/+104
| | | | | | | | | | We were creating a weak external that tried to reference a static symbol. That would always fail to link with link.exe. We now create an external symbol in the same position as the local and refer to that. This works with link.exe and matches what gas does. llvm-svn: 270906
* [libFuzzer] when there is a leak in the existing corpus report the ↵Kostya Serebryany2016-05-263-23/+12
| | | | | | reproducer properly llvm-svn: 270905
* Produce better pretty stack traces from crashes in template instantiation: addRichard Smith2016-05-263-6/+17
| | | | | | | | pretty stack trace entries for all cases where we instantiate the definition of something, and include the fully-qualified name with template arguments in the name of the instantiated entity. llvm-svn: 270904
* Don't use recursion to print out the PrettyStackTrace after a crash. If theRichard Smith2016-05-262-20/+36
| | | | | | | crash was due to a stack overflow, chances are good that this would also cause a stack overflow. llvm-svn: 270903
* Add new .def file to module map.Richard Smith2016-05-261-0/+1
| | | | llvm-svn: 270902
* [obj2yaml][yaml2obj] Support for MachO bind opcodesChris Bieneman2016-05-265-17/+276
| | | | | | This adds support for YAML round tripping dyld info bind opcodes. Bind opcodes can have signed or unsigned LEB128 data, and they can have symbols associated with them. llvm-svn: 270901
* [libFuzzer] reimplement the way we do -only_ascii to allow more 'const' in ↵Kostya Serebryany2016-05-265-13/+20
| | | | | | function declarations. Add a test for -only_ascii. NFC intended llvm-svn: 270900
* [Kaleidoscope][BuildingAJIT] Fix a bug in the symbol resolver in Chapter2.Lang Hames2016-05-261-1/+1
| | | | | | | | | | | Symbol resolution should be done on the top layer of the stack unless there's a good reason to do otherwise. In this case it would have worked because OptimizeLayer::addModuleSet eagerly passes all modules down to the CompileLayer, meaning that searches in CompileLayer will find the definitions. In later chapters where the top layer's addModuleSet isn't a pass-through, this would break. llvm-svn: 270899
* [Hexagon] Enable the post-RA schedulerKrzysztof Parzyszek2016-05-267-25/+100
| | | | | | | | | The aggressive anti-dependency breaker can rename the restored callee- saved registers. To prevent this, mark these registers are live on all paths to the return/tail-call instructions, and add implicit use operands for them to these instructions. llvm-svn: 270898
* Re-commit r270748 "clang-cl: Treat dllimport explicit template instantiation ↵Hans Wennborg2016-05-266-19/+119
| | | | | | | | | | definitions as declarations (PR27810, PR27811)" Also make explicit instantiation decls not apply to nested classes when targeting MSVC. That dll attributes are not inherited by inner classes might be the explanation for MSVC's behaviour here. llvm-svn: 270897
* [AArch64] Generate rev16/rev32 from bswap + srl when upper bits are known zero.Chad Rosier2016-05-262-1/+58
| | | | | | | | | | | | | | | | | Canonicalize (srl (bswap i32 x), 16) to (rotr (bswap i32 x), 16), if the high 16-bits of x are zero. Similarly, canonicalize (srl (bswap i64 x), 32) to (rotr (bswap i64 x), 32), if the high 32-bits of x are zero. test_rev_w_srl16: test_rev_w_srl16: and w8, w0, #0xffff and w8, w0, #0xffff rev w8, w8 ---> rev16 w0, w8 lsr w0, w8, #16 test_rev_x_srl32: test_rev_x_srl32: rev x8, x8 ---> rev32 x0, x8 lsr x0, x8, #32 llvm-svn: 270896
* [AMDGPU] Remove individual debugger options + update featuresKonstantin Zhuravlyov2016-05-263-21/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D20336 llvm-svn: 270895
* AMDGPU/SI: Enable load-store-opt by default.Changpeng Fang2016-05-2626-93/+80
| | | | | | | | | | Summary: Enable load-store-opt by default, and update LIT tests. Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D20694 llvm-svn: 270894
* [BasicAA] Extend inbound GEP negative offset logic to GlobalVariablesMichael Kuperstein2016-05-263-12/+31
| | | | | | | | | | | | | | r270777 improved the precision of alloca vs. inbounbds GEP alias queries: if we have (a) an inbounds GEP and (b) a pointer based on an alloca, and the beginning of the object the GEP points to would have a negative offset with respect to the alloca, then the GEP can not alias pointer (b). This makes the same logic fire when (b) is based on a GlobalVariable instead of an alloca. Differential Revision: http://reviews.llvm.org/D20652 llvm-svn: 270893
* [MemCpyOpt] Don't perform callslot optimization across may-throw callsDavid Majnemer2016-05-263-2/+48
| | | | | | | | | An exception could prevent a store from occurring but MemCpyOpt's callslot optimization would fire anyway, causing the store to occur. This fixes PR27849. llvm-svn: 270892
* Make sure that we succeed in starting a definition before we complete it and ↵Greg Clayton2016-05-262-32/+80
| | | | | | | | | | | | | | | | emit an error if we fail to start the definition. ClangASTContext::StartTagDeclarationDefinition(...) was starting definitions for any TagType instances that have TagDecl, but ClangASTContext::CompleteTagDeclarationDefinition(...) was getting the type to a CXXRecordDecl with: clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); The problem is that getAsCXXRecordDecl() might dig a bit deeper into a type and dig out a different decl, which means we might call ClangASTContext::StartTagDeclarationDefinition(...), but it might not do anything, and then we might call ClangASTContext::CompleteTagDeclarationDefinition(...) and it might try to complete something that didn't have its definition started and this will crash. This change fixes that, and also makes sure that starting a definition succeeds before any calls to ClangASTContext::CompleteTagDeclarationDefinition(). <rdar://problem/24091798> llvm-svn: 270891
* Fix for OMP_PROC_BIND=spread strategyJonathan Peyton2016-05-261-4/+14
| | | | | | | | | | | | | | | | The OMP_PROC_BIND=spread strategy fails to assign the master thread the correct place partition after the first parallel region. Other threads in the hot team will remember their place_partition, but the master's place partition is restored to what it was before entering the parallel region. So when the hot team is used for subsequent parallel regions, the master has lost this info. This fix calls __kmp_partition_places to update only the master thread's place partition in the spread case when there are no other changes to the hot team. Patch by Terry Wilmarth Differential Revision: http://reviews.llvm.org/D20539 llvm-svn: 270890
* coff: fix the section of weak symbols.Rafael Espindola2016-05-262-14/+17
| | | | llvm-svn: 270889
* [BBVectorize] Don't vectorize selects with a scalar condition and vector ↵Michael Kuperstein2016-05-262-1/+41
| | | | | | | | | | operands. This fixes PR27879. Differential Revision: http://reviews.llvm.org/D20659 llvm-svn: 270888
* Add test/CodeGen/MIR/Hexagon/lit.local.cfgKrzysztof Parzyszek2016-05-261-0/+2
| | | | | | Require that Hexagon is a registered target. llvm-svn: 270887
* [OpenMP] Codegen for target update directive.Samuel Antao2016-05-264-27/+331
| | | | | | | | | | | | Summary: This patch implements the code generation for the `target update` directive. The implemntation relies on the logic already in place for target data standalone directives, i.e. target enter/exit data. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D20650 llvm-svn: 270886
* Do not rename registers that do not start an independent live rangeKrzysztof Parzyszek2016-05-262-0/+60
| | | | llvm-svn: 270885
* Make LIBOMP_USE_ITT_NOTIFY a setting that can be enabled or disabledJonathan Peyton2016-05-264-5/+9
| | | | | | | | | | | | | On Blue Gene/Q, having LIBOMP_USE_ITT_NOTIFY support compiled into a statically-linked binary causes a failure at runtime because dlopen fails. This patch changes LIBOMP_USE_ITT_NOTIFY to a cacheable configuration setting that can be disabled. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D20517 llvm-svn: 270884
* coff: fix the value of weak definitions.Rafael Espindola2016-05-262-1/+34
| | | | | | It looks like this doesn't get a lot of use. llvm-svn: 270883
* [OpenMP] Parsing and sema support for the from clauseSamuel Antao2016-05-2621-40/+532
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `from` clause. Patch based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18488 llvm-svn: 270882
* Don't allocate in APInt::slt. NFC.Pete Cooper2016-05-262-25/+37
| | | | | | | | | | | | | | | | | | | | | | | APInt::slt was copying the LHS and RHS in to temporaries then making them unsigned so that it could use an unsigned comparision. It did this even on the paths which were trivial to give results for, such as the sign bit of the LHS being set while RHS was not set. This changes the logic to return out immediately in the trivial cases, and use an unsigned comparison in the remaining cases. But this time, just use the unsigned comparison directly without creating any temporaries. This works because, for example: true = (-2 slt -1) = (0xFE ult 0xFF) Also added some tests explicitly for slt with APInt's larger than 64-bits so that this new code is tested. Using the memory for 'opt -O2 verify-uselistorder.lto.opt.bc -o opt.bc' (see r236629 for details), this reduces the number of allocations from 26.8M to 23.9M. llvm-svn: 270881
* [OpenMP] Parsing and sema support for the to clauseSamuel Antao2016-05-2625-186/+768
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `to` clause. Patch based on the original post by Kelvin Li. Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18597 llvm-svn: 270880
* [CaptureTracking] Volatile operations capture their memory locationDavid Majnemer2016-05-263-12/+46
| | | | | | | | | | The memory location that corresponds to a volatile operation is very special. They are observed by the machine in ways which we cannot reason about. Differential Revision: http://reviews.llvm.org/D20555 llvm-svn: 270879
* [OpenMP] Parsing and sema support for target update directiveSamuel Antao2016-05-2627-7/+552
| | | | | | | | | | | | | | | Summary: This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch. This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`. This patch is based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D15944 llvm-svn: 270878
* Init member structs in constructor.Artem Belevich2016-05-261-3/+9
| | | | | | | Fixes build error on windows where MSVC does not support list initialization inside member initializer list. llvm-svn: 270877
OpenPOWER on IntegriCloud