summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Relax the overflow checking of R_386_PC16.Rafael Espindola2017-06-103-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the freebsd early boot code fails to link. The issue reduces to 16 bit code at position 0x7000 wanting to jump to position 0x9000. That is represented in the .o file as a relocation with no symbol and an addend of 0x9000 - 2 (The -2 is because i386 uses the ip after the current instruction for jumps). If the addend is interpreted as signed (it should), it is -28674. In a 32 bit architecture, that is the address 0xffff8ffe. To get there from 0x7000 we have to add 4294909950 (too big) or subtract 57346 (too small). We then produce an error. What lld is missing is the fact that at runtime this will actually be a 16 bit architecture and adding 0x1ffe produces 0x8ffe which is the correct result in 16 bits (-28674). Since we have a 16 bit addend and a 16 bit PC, the relocation can move the PC to any 16 bit address and that is the only thing we really need to check: if the address we are pointing to fits in 16 bits. This is unfortunately hard to do since we have to delay subtracting the PC and if we want to do that outside of Target.cpp, we have to move the overflow check out too. An incomplete patch that tries to do that is at https://reviews.llvm.org/D34070 This patch instead just relaxes the check. Since the value we have is the destination minus the PC and the PC is 16 bits, it should fit in 17 bits if the destination fits in 16 too. bfd had a similar issue for some time and got a similar fix: https://sourceware.org/ml/binutils/2005-08/msg00001.html llvm-svn: 305135
* [ICF] Ignore SHF_GROUP flag when comparing two sections.Rui Ueyama2017-06-104-8/+39
| | | | | | | | | | | | | | | | | | | | SHF_GROUP bit doesn't make sense in executables or DSOs, so linkers are expected to remove that bit from section flags. We did that when we create output sections. This patch is to do that earlier than before. Now the flag is dropped when we instantiate input section objects. This change improves ICF. Previously, two sections that differ only in SHF_GROUP flag were not merged, because when the control reached ICF, the flag was still there. Now the flag is dropped before reaching to ICF, so the difference is ignored naturally. This issue was found by pcc. Differential Revision: https://reviews.llvm.org/D34074 llvm-svn: 305134
* Mark a sancov test as unsupported on x86_64h-darwinVedant Kumar2017-06-101-1/+1
| | | | | | Failing bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/6891 llvm-svn: 305133
* [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltinAndrew Kaylor2017-06-0911-28/+68
| | | | | | Differential Revision: https://reviews.llvm.org/D33737 llvm-svn: 305132
* [PowerPC] add memcmp test with one constant operand and equality cmp; NFCSanjay Patel2017-06-091-3/+29
| | | | llvm-svn: 305131
* Revert r305110 to fix buildbotRichard Trieu2017-06-092-37/+1
| | | | llvm-svn: 305130
* [CGP] add a reference to DataLayout in MemCmpExpansion; NFCISanjay Patel2017-06-091-20/+22
| | | | | | | | We're currently passing endian-ness around as a param (and not uniformly), so this eliminates the need for that. I'd like to add a constant fold call too, and that requires a DL. llvm-svn: 305129
* Support operator keywords used in Windows SDK(fix ubsan)Erich Keane2017-06-091-1/+3
| | | | | | | | | UBSan found an issue with a nullptr being assigned to a reference. This was because a following function went back and checked the identifier in the CPPOperatorName case. This patch corrects that location with the original logic as well. llvm-svn: 305128
* [AArch64] Add fallback in FastISel fp16 conversionsI-Jui (Ray) Sung2017-06-092-1/+136
| | | | | | | | | | | | | | | | | Summary: - Fix assertion failures on F16 to/from int types in FastISel by falling back to regular ISel - Add a testcase of various conversion cases with FastISel (-O0) Reviewers: kristof.beyls, jmolloy, SjoerdMeijer Reviewed By: SjoerdMeijer Subscribers: SjoerdMeijer, llvm-commits, srhines, pirama, aemerson, rengolin, javed.absar, kristof.beyls Differential Revision: https://reviews.llvm.org/D33734 llvm-svn: 305127
* 27037: Use correct CVR qualifier on an upcast on method pointer callRichard Smith2017-06-092-1/+16
| | | | | | | | Patch by Taiju Tsuiki! Differential Revision: https://reviews.llvm.org/D33875 llvm-svn: 305126
* [clang-tidy] D33930: Do not pick up by default the LLVM style if passing ↵Vassil Vassilev2017-06-091-0/+4
| | | | | | | | | -format. This adds a new flag -style which is passed to clang-apply-replacements and defaults to file meaning it would pick up the closest .clang-format file in tree. llvm-svn: 305125
* [clang] Cleanup fixit.cAlexander Shaposhnikov2017-06-091-2/+1
| | | | | | | | | | | | This diff removes temporary file t2 in fixit.c and updates the test command accordingly. NFC. Test plan: make check-all Differential revision: https://reviews.llvm.org/D34066 llvm-svn: 305124
* Enable c++1z experimental builds.Vassil Vassilev2017-06-092-0/+4
| | | | | | Patch by David Abdurachmanov! llvm-svn: 305123
* Revert r305117Alex Lorenz2017-06-092-92/+46
| | | | | | It caused `Index/availability.c` test failure on Linux llvm-svn: 305122
* Attempt to fix shared library build: RewriteFrontend depends on ↵Richard Smith2017-06-091-0/+1
| | | | | | Serialization after r305116. llvm-svn: 305121
* [modules] D29951: Load lazily the template specialization in multi-module ↵Vassil Vassilev2017-06-091-38/+47
| | | | | | | | | | | | setups. Currently, we load all template specialization if we have more than one module attached and we touch anything around the template definition. This patch registers the template specializations as lazily-loadable entities. In some TUs it reduces the amount of deserializations by 1%. llvm-svn: 305120
* [Support] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-06-099-239/+309
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 305119
* [modules] Fix that global delete operator get's assigned to a submodule.Vassil Vassilev2017-06-091-0/+2
| | | | | | | | | | | | | | | n the current local-submodule-visibility mode, as soon as we discover a virtual destructor, we declare on demand a global delete operator. However, this causes that this delete operator is owned by the submodule which contains said virtual destructor. This means that other modules no longer can see the global delete operator which is hidden inside another submodule and fail to compile. This patch unhides those global allocation function once they're created to prevent this issue. Patch by Raphael Isemann (D33366)! llvm-svn: 305118
* [libclang] Merge multiple availability clauses when getting the platform'sAlex Lorenz2017-06-092-46/+92
| | | | | | | | | | availability Patch by Ronald Wampler! Differential Revision: https://reviews.llvm.org/D33478 llvm-svn: 305117
* Add -frewrite-imports flag.Richard Smith2017-06-0911-20/+160
| | | | | | | | If specified, when preprocessing, the contents of imported .pcm files will be included in preprocessed output. The resulting preprocessed file can then be compiled standalone without the module sources or .pcm files. llvm-svn: 305116
* [LVI] Fix spelling error in comment. NFCCraig Topper2017-06-091-1/+1
| | | | llvm-svn: 305115
* [LVI] Const correct and rename the LVILatticeVal parameter to ↵Craig Topper2017-06-091-9/+8
| | | | | | | | getPredicateResult. NFC Previously it was non-const reference named Result which would tend to make someone think that it was an outparam when really its an input. llvm-svn: 305114
* Minor clean up of profile rt testsXinliang David Li2017-06-092-3/+3
| | | | llvm-svn: 305113
* Simplify. NFC.Rui Ueyama2017-06-091-6/+5
| | | | llvm-svn: 305112
* [VMRange] Remove unused FindRangeIndexThatContainsValue().Davide Italiano2017-06-092-16/+0
| | | | llvm-svn: 305111
* [ODRHash] Add support for TemplateArgument types.Richard Trieu2017-06-092-1/+37
| | | | | | | Recommit r304592 that was reverted in r304618. r305104 should have fixed the issue. llvm-svn: 305110
* [VMRange] Implement comparison operators using `==` and `<`.Davide Italiano2017-06-091-17/+4
| | | | llvm-svn: 305109
* [pdb] Support CoffSymbolRVA debug subsection.Zachary Turner2017-06-099-0/+169
| | | | llvm-svn: 305108
* [SROA] Fix APInt size when load/store have different address spaceYaxun Liu2017-06-092-7/+40
| | | | | | | | | | | | | | | Currently there is a bug in SROA::presplitLoadsAndStores which causes assertion in GEPOperator::accumulateConstantOffset. Basically it does not consider the situation that the pointer operand of load or store may be in a non-zero address space and its size may be different from the size of a pointer in address space 0. This patch fixes assertion when compiling Blender Cycles kernels for amdgpu backend. Diffferential Revision: https://reviews.llvm.org/D33298 llvm-svn: 305107
* Rename llvm-pdbdump -> llvm-pdbutil.Zachary Turner2017-06-0978-132/+136
| | | | | | | | | | This is to reflect the evolving nature of the tool as being useful for more than just dumping PDBs, as it can do many other things. Differential Revision: https://reviews.llvm.org/D34062 llvm-svn: 305106
* [ADT] Make iterable SmallVector template overrides more specificFrancis Ricci2017-06-092-4/+78
| | | | | | | | | | | | | | | | Summary: This prevents the iterator overrides from being selected in the case where non-iterator types are used as arguments, which is of particular importance in cases where other overrides with identical types exist. Reviewers: dblaikie, bkramer, rafael Subscribers: llvm-commits, efriedma Differential Revision: https://reviews.llvm.org/D33919 llvm-svn: 305105
* [ODRHash] Skip inline namespaces when hashing.Richard Trieu2017-06-092-13/+19
| | | | | | | Speculatively try to fix the underlying issue from r304592, of underlying types being confused when inline namespaces are used. llvm-svn: 305104
* Bringt back -triple so the test passes on non-x86.Benjamin Kramer2017-06-091-1/+1
| | | | llvm-svn: 305103
* [Sink] Fix predicate in legality checkKeno Fischer2017-06-092-1/+19
| | | | | | | | | | | | | | | | | | Summary: isSafeToSpeculativelyExecute is the wrong predicate to use here. All that checks for is whether it is safe to hoist a value due to unaligned/un-dereferencable accesses. However, not only are we doing sinking rather than hoisting, our concern is that the location we're loading from may have been modified. Instead forbid sinking any load across a critical edge. Reviewers: majnemer Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D33179 llvm-svn: 305102
* Add #pragma clang module build/endbuild pragmas for performing a module buildRichard Smith2017-06-0913-168/+377
| | | | | | | | | | | | | | | as part of a compilation. This is intended for two purposes: 1) Writing self-contained test cases for modules: we can now write a single source file test that builds some number of module files on the side and imports them. 2) Debugging / test case reduction. A single-source testcase is much more amenable to reduction, compared to a VFS tarball or .pcm files. llvm-svn: 305101
* I guess /dev/null is a bad idea on windows. Use a temp file instead.Benjamin Kramer2017-06-091-1/+1
| | | | llvm-svn: 305100
* [VMRange] Use llvm::find_if. Thanks to Zachary for the suggestion.Davide Italiano2017-06-091-4/+2
| | | | llvm-svn: 305099
* [AMDGPU] Add intrinsics for alignbit and alignbyte instructionsStanislav Mekhanoshin2017-06-093-2/+35
| | | | | | Differential Revision: https://reviews.llvm.org/D34046 llvm-svn: 305098
* [llvm-cvtres] Don't polute the test directory.Benjamin Kramer2017-06-091-1/+1
| | | | llvm-svn: 305097
* Don't check the raw bits in tests.Rafael Espindola2017-06-094-25/+25
| | | | | | It is not needed since we have the disassemble. llvm-svn: 305096
* Fix -Wreorder-fields warning.Zachary Turner2017-06-091-2/+2
| | | | llvm-svn: 305095
* [ASTMatchers] Fix use after free.Benjamin Kramer2017-06-091-1/+2
| | | | | | Found by asan. llvm-svn: 305094
* Allow VarStreamArray to use stateful extractors.Zachary Turner2017-06-0915-215/+141
| | | | | | | | | | | Previously extractors tried to be stateless with any additional context information needed in order to parse items being passed in via the extraction method. This led to quite cumbersome implementation challenges and awkwardness of use. This patch brings back support for stateful extractors, making the implementation and usage simpler. llvm-svn: 305093
* Implement COFF emission for parsed Windows Resource ( .res) files.Eric Beckmann2017-06-099-54/+849
| | | | | | | | | | | | Summary: Add the WindowsResourceCOFFWriter class for producing the final COFF after all parsing is done. Reviewers: hiraditya!, zturner, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34020 llvm-svn: 305092
* [X86][SSE] Add support for PACKSS nodes to faux shuffle extractionSimon Pilgrim2017-06-092-279/+297
| | | | | | If the inputs won't saturate during packing then we can treat the PACKSS as a truncation shuffle llvm-svn: 305091
* [OpenMP] Prevent unused-variable warning in libomptarget when compiling in ↵Samuel Antao2017-06-091-0/+4
| | | | | | Release mode. llvm-svn: 305090
* Repair 2010-05-31-palignr.c testVassil Vassilev2017-06-091-5/+3
| | | | | | | | | | | | | | | | | | | | This test was silently failing since a long time because it failed to include stdlib.h (as it's running in a freestanding environment). However, because we used just not clang_cc1 instead of the verify mode, this regression was never noticed and the test was just always passing. This adds -ffreestanding to the invocation, so that tmmintrin.h doesn't indirectly include mm_malloc.h, which in turns includes the unavailable stdlib.h. We also run now in the -verify mode to prevent that we silently regress again. I've also updated the test to no longer check the return value of _mm_alignr_epi8 as this is also causing it to fail (and it's not really the job of this test to test this). Patch by Raphael Isemann (D34022) llvm-svn: 305089
* We do not need google test utils if we disabled LLVM_INCLUDE_TESTSVassil Vassilev2017-06-091-1/+4
| | | | | | Fixes embedded uses of llvm where google testing framework is provided outside. llvm-svn: 305088
* support operator keywords used in Windows SDKErich Keane2017-06-094-1/+59
| | | | | | | | | | | | | | | | | | to support operator keywords used in Windows SDK, alter token type when seen in system headers Hello, I submitted D33505 to address this problem, but the proposal was rejected as too big a hammer. This change will allow clang to parse the WindowsSDK header <query.h> which uses the operator name "or" as a field name. Treat cpp operator keywords as ordinary identifiers inside the Microsoft headers, but treat them as usual in the user's program. Original Submitter: Melanie Blower (mibintc) Differential Revision: https://reviews.llvm.org/D33782 llvm-svn: 305087
* [LazyValueInfo] Don't run the more complex predicate handling code for EQ ↵Craig Topper2017-06-091-8/+8
| | | | | | | | | | | | | | | | | | | and NE in getPredicateResult Summary: Unless I'm mistaken, the special handling for EQ/NE should cover everything and there is no reason to fallthrough to the more complex code. For that matter I'm not sure there's any reason to special case EQ/NE other than avoiding creating temporary ConstantRanges. This patch moves the complex code into an else so we only do it when we are handling a predicate other than EQ/NE. Reviewers: anna, reames, resistor, Farhana Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34000 llvm-svn: 305086
OpenPOWER on IntegriCloud