summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-pdbutil] Create a "bytes" subcommand.Zachary Turner2017-06-2211-152/+307
| | | | | | | | | | | | | | | | | | | This idea originally came about when I was doing some deep investigation of why certain bytes in a PDB that we round-tripped differed from their original bytes in the source PDB. I found myself having to hack up the code in many places to dump the bytes of this substream, or that record. It would be nice if we could just do this for every possible stream, substream, debug chunk type, etc. It doesn't make sense to put this under dump because there's just so many options that would detract from the more common use case of just dumping deserialized records. So making a new subcommand seems like the most logical course of action. In doing so, we already have two command line options that are suitable for this new subcommand, so start out by moving them there. llvm-svn: 306056
* [llvm-pdbutil] Rename "raw" to "dump".Zachary Turner2017-06-2214-138/+139
| | | | | | | | | Now you run llvm-pdbutil dump <options>. This is a followup after having renamed the tool, whereas before raw was obviously just the style of dumping, whereas now "dump" is the action to perform with the "util". llvm-svn: 306055
* [Hexagon] Use LivePhysRegs to fix up kills in HexagonGenMuxKrzysztof Parzyszek2017-06-224-52/+69
| | | | | | Remove the previous, manual shuffling of the kill flags. llvm-svn: 306054
* Simplify WinCOFFObjectWriter::recordRelocation.Rafael Espindola2017-06-221-14/+5
| | | | | | | | | It looks like that when this code was written recordRelocation could be called with A-B where A and B are in the same section. The expression evaluation logic these days makes sure those are folded, so some of this code was dead. llvm-svn: 306053
* [LoopDeletion] Update exits correctly when multiple duplicate edges from an ↵Anna Thomas2017-06-222-9/+97
| | | | | | | | | | | | | | | | | | | | | | | | | exiting block Summary: Currently, we incorrectly update exit blocks of loops when there are multiple edges from a single exiting block to the exit block. This can happen when we have switches as the terminator of the exiting blocks. The fix here is to correctly update the phi nodes in the exit block, and remove all incoming values *except* for one which is from the preheader. Note: Currently, this error can manifest only while deleting non-executed loops. However, it is possible to trigger this error in invariant loops, once we enhance the logic around the exit conditions for the loop check. Reviewers: chandlerc, dberlin, sanjoy, efriedma Reviewed by: efriedma Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D34516 llvm-svn: 306048
* [AVX-512] Remove and autoupgrade the masked integer compare intrinsicsCraig Topper2017-06-2211-2814/+4263
| | | | | | | | | | | | | | | | | Summary: These intrinsics aren't used by clang and haven't been for a while. There's some really terrible codegen in the 32-bit target for avx512bw due to i64 not being legal. But as I said these intrinsics aren't used by clang even before this patch so this codegen reflects our clang behavior today. Reviewers: spatel, RKSimon, zvi, igorb Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34389 llvm-svn: 306047
* Updated llvm-objdump for arm64 Mach-O MH_KEXT_BUNDLE file types soKevin Enderby2017-06-223-2/+16
| | | | | | | | | it symbolically disassembles the __text section from the __TEXT_EXEC segment not the usual __TEXT segment by default. rdar://30590208 llvm-svn: 306046
* [MC] Fix const qualifier warningEkaterina Vaartis2017-06-221-2/+2
| | | | llvm-svn: 306045
* [BasicAA] Add type check and Value equality check around code added in r305481.Craig Topper2017-06-221-5/+8
| | | | | | | | This matches the checks done at the beginning of isKnownNonEqual that this code is partially emulating. Without this we can get assertion failures due to the bit widths of the KnownBits not matching. llvm-svn: 306044
* Fix build break by using llvm::make_unique instead of std::make_unique.Adrian McCarthy2017-06-222-2/+5
| | | | llvm-svn: 306043
* Add IDs and clone methods to NativeRawSymbolAdrian McCarthy2017-06-228-13/+29
| | | | | | | | | | | | All NativeRawSymbols will have a unique symbol ID (retrievable via getSymIndexId). For now, these are initialized to 0, but soon the NativeSession will be responsible for creating the raw symbols, and it will assign unique IDs. The symbol cache in the NativeSession will also require the ability to clone raw symbols, so I've provided implementations for that as well. llvm-svn: 306042
* Make IPDBSession::getGlobalScope a non-const methodAdrian McCarthy2017-06-226-11/+8
| | | | | | | | | | | | There doesn't seem to be a compelling reason why this method should be const other than it was possible with the DIA implementation. The native session is going to act as a symbol factory and cache. This could be acheived with mutable (and the existing const_cast), but it seems cleaner to accept that this method affects the state of the session. This change eliminates an existing const_cast. llvm-svn: 306041
* [x86] add/sub (X==0) --> sbb(neg X)Sanjay Patel2017-06-222-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our handling of select-of-constants is lumpy in IR (https://reviews.llvm.org/D24480), lumpy in DAGCombiner, and lumpy in X86ISelLowering. That's why we only had the 'sbb' codegen in 1 out of the 4 tests. This is a step towards smoothing that out. First, show that all of these IR forms are equivalent: http://rise4fun.com/Alive/mx Second, show that the 'sbb' version is faster/smaller. IACA output for SandyBridge (later Intel and AMD chips are similar based on Agner's tables): This is the "obvious" x86 codegen (what gcc appears to produce currently): | Num Of | Ports pressure in cycles | | | Uops | 0 - DV | 1 | 2 - D | 3 - D | 4 | 5 | | --------------------------------------------------------------------- | 1* | | | | | | | | xor eax, eax | 1 | 1.0 | | | | | | CP | test edi, edi | 1 | | | | | | 1.0 | CP | setnz al | 1 | | 1.0 | | | | | CP | neg eax This is the adc version: | 1* | | | | | | | | xor eax, eax | 1 | 1.0 | | | | | | CP | cmp edi, 0x1 | 2 | | 1.0 | | | | 1.0 | CP | adc eax, 0xffffffff And this is sbb: | 1 | 1.0 | | | | | | | neg edi | 2 | | 1.0 | | | | 1.0 | CP | sbb eax, eax If IACA is trustworthy, then sbb became a single uop in Broadwell, so this will be clearly better than the alternatives going forward. llvm-svn: 306040
* MC: Fix dumping of MCFragment valuesSam Clegg2017-06-221-2/+4
| | | | | | | | | | Without this cast the "char" overload of operator<< is chosen and the values is output as an ascii rather than an integer. Differential Revision: https://reviews.llvm.org/D34486 llvm-svn: 306039
* Silence warnings about hidden virtual methods.Zachary Turner2017-06-222-0/+2
| | | | | | | Patch by Sergey Andreenko. Differential Revision: https://reviews.llvm.org/D34429 llvm-svn: 306038
* Updated llvm-objdump symbolic disassembly with x86_64 Mach-O MH_KEXT_BUNDLEKevin Enderby2017-06-225-13/+83
| | | | | | | | | file types so it symbolically disassembles operands using the external relocation entries. rdar://31521343 llvm-svn: 306037
* Keep the original symbol name when renamed.Rui Ueyama2017-06-226-14/+25
| | | | | | | | | | | | | | Previously, when symbol A is renamed B, both A and B end up having the same name. This is because name is a symbol's attribute, and we memcpy symbols for symbol renaming. This pathc saves the original symbol name and restore it after memcpy to keep the original name. This patch shouldn't change program's meaning, but names in symbol tables make more sense than before. llvm-svn: 306036
* Add a common error checking for some invalid expressions.Rafael Espindola2017-06-226-13/+22
| | | | | | | This refactors a bit of duplicated code and fixes an assertion failure on ELF. llvm-svn: 306035
* [AMDGPU] Add intrinsics for tbuffer load and store - build error fixDavid Stuttard2017-06-221-2/+1
| | | | | | | Variable was unused in non-debug build (used in assert) causing compile time warning and eventual build failure llvm-svn: 306034
* [Sema] Add -Wunguarded-availability-newAlex Lorenz2017-06-224-6/+228
| | | | | | | | | | | | | | | The new compiler warning -Wunguarded-availability-new is a subset of -Wunguarded-availability. It is on by default. It only warns about uses of APIs that have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and tvOS >= 11. We decided to use this kind of solution as we didn't want to turn on -Wunguarded-availability by default, because we didn't want our users to get warnings about uses of old APIs in their existing projects. rdar://31054725 Differential Revision: https://reviews.llvm.org/D34264 llvm-svn: 306033
* [x86] add tests for select --> sbb transform; NFCSanjay Patel2017-06-221-0/+62
| | | | llvm-svn: 306032
* [AMDGPU] Add intrinsics for tbuffer load and storeDavid Stuttard2017-06-2219-146/+895
| | | | | | | | | | | | | | | Intrinsic already existed for llvm.SI.tbuffer.store Needed tbuffer.load and also re-implementing the intrinsic as llvm.amdgcn.tbuffer.* Added CodeGen tests for the 2 new variants added. Left the original llvm.SI.tbuffer.store implementation to avoid issues with existing code Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, tpr Differential Revision: https://reviews.llvm.org/D30687 llvm-svn: 306031
* [Hexagon] Fix typo in a testcaseKrzysztof Parzyszek2017-06-221-1/+1
| | | | llvm-svn: 306030
* [InstCombine] Teach foldSelectICmpAndOr to recognize (select (icmp slt ↵Craig Topper2017-06-222-21/+47
| | | | | | | | | | | | | | | | | | | (trunc (X)), 0), Y, (or Y, C2)) Summary: InstCombine likes to turn (icmp eq (and X, C1), 0) into (icmp slt (trunc (X)), 0) sometimes. This breaks foldSelectICmpAndOr's ability to recognize (select (icmp eq (and X, C1), 0), Y, (or Y, C2))->(or (shl (and X, C1), C3), y). This patch tries to recover this. I had to flip around some of the early out checks so that I could create a new And instruction during the compare processing without it possibly never getting used. Reviewers: spatel, majnemer, davide Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34184 llvm-svn: 306029
* [ThinLTO] Remove unnecessary include of Linker.h (NFC)Teresa Johnson2017-06-221-1/+0
| | | | | | | | The ModuleLinker is no longer used by ThinLTO, so this is not needed. Patch by Benoit Belley <Benoit.Belley@autodesk.com> llvm-svn: 306028
* [InstCombine] Add one use checks to or/and->xnor foldingCraig Topper2017-06-222-10/+10
| | | | | | | | | | If the components of the and/or had multiple uses, this transform created an additional instruction. This patch makes sure we remove one of the components. Differential Revision: https://reviews.llvm.org/D34498 llvm-svn: 306027
* Simplify the gdb-remote unit testsPavel Labath2017-06-225-236/+126
| | | | | | | | | Instead of every test creating a client-server combo, do that in the SetUp method of the test fixture. This also means that we can rely on gtest to not run the test if the SetUp method fails and delete the if(HasFailure) calls. llvm-svn: 306013
* [Hexagon] Handle a global operand to A2_addi when creating duplexesKrzysztof Parzyszek2017-06-223-27/+63
| | | | llvm-svn: 306012
* [InstCombine] reverse bitcast + bitwise-logic canonicalization (PR33138)Sanjay Patel2017-06-226-55/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 parts to this patch made simultaneously to avoid a regression. We're reversing the canonicalization that moves bitwise vector ops before bitcasts. We're moving bitwise vector ops *after* bitcasts instead. That's the 1st and 3rd hunks of the patch. The motivation is that there's only one fold that currently depends on the existing canonicalization (see next), but there are many folds that would automatically benefit from the new canonicalization. PR33138 ( https://bugs.llvm.org/show_bug.cgi?id=33138 ) shows why/how we have these patterns in IR. There's an or(and,andn) pattern that requires an adjustment in order to continue matching to 'select' because the bitcast changes position. This match is unfortunately complicated because it requires 4 logic ops with optional bitcast and sext ops. Test diffs: 1. The bitcast.ll and bitcast-bigendian.ll changes show the most basic difference - bitcast comes before logic. 2. There are also tests with no diffs in bitcast.ll that verify that we're still doing folds that were enabled by the previous canonicalization. 3. icmp-xor-signbit.ll shows the payoff. We don't need to adjust existing icmp patterns to look through bitcasts. 4. logical-select.ll contains several tests for the or(and,andn) --> select fold to verify that we are still handling those cases. The lone diff shows the movement of the bitcast from the new canonicalization rule. Differential Revision: https://reviews.llvm.org/D33517 llvm-svn: 306011
* [X86] Add support for "probe-stack" attributewhitequark2017-06-226-19/+93
| | | | | | | | | | | This commit adds prologue code emission for stack probe function calls. Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D34387 llvm-svn: 306010
* [ARM] Create relocations for beq.w branches to ARM function syms.Florian Hahn2017-06-222-0/+40
| | | | | | | | | | | | | | | | | | Summary: The ARM ELF ABI requires the linker to do interworking for wide conditional branches from Thumb code to ARM code. That was pointed out by @peter.smith in the comments for D33436. Reviewers: rafael, peter.smith, echristo Reviewed By: peter.smith Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits, peter.smith Differential Revision: https://reviews.llvm.org/D34447 llvm-svn: 306009
* [InstCombine] add peekThroughBitcast() helper; NFCSanjay Patel2017-06-222-6/+14
| | | | | | This is an NFC portion of D33517. We have similar helpers in the backend. llvm-svn: 306008
* [mips] Allow $AT to be used as a register namePetar Jovanovic2017-06-224-1/+4
| | | | | | | | | | | This patch allows $AT to be used as a register name in assembly files. Currently only $at is recognized as a valid register name. Patch by Stanislav Ocovaj. Differential Revision: https://reviews.llvm.org/D34348 llvm-svn: 306007
* [DAG] Add Target Store Merge pass ordering functionNirav Dave2017-06-222-1/+6
| | | | | | | Allow targets to specify if they should merge stores before or after legalization. llvm-svn: 306006
* Revert "[Support] Add RetryAfterSignal helper function" and subsequent fixPavel Labath2017-06-226-64/+25
| | | | | | | | | | | The fix in r306003 uncovered a pretty fundamental problem that libc++ implementation of std::result_of does not handle the prototype of open(2) correctly (presumably because it contains ...). This makes the whole function unusable in its current form, so I am also reverting the original commit (r305892), which introduced the function, at least until I figure out a way to solve the libc++ issue. llvm-svn: 306005
* [Hexagon] Recognize potential offset overflow for store-imm to stackKrzysztof Parzyszek2017-06-222-4/+190
| | | | | | | Reserve an extra scavenging stack slot if the offset field in store- -immediate instructions may overflow. llvm-svn: 306004
* [Support] Fix return type deduction in RetryAfterSignalPavel Labath2017-06-222-5/+10
| | | | | | | | | | | | | | | | | | The default value of the ResultT template argument (which was there only to avoid spelling out the long std::result_of template multiple times) was being overriden by function call template argument deduction. This manifested itself as a compiler error when calling the function as FILE *X = RetryAfterSignal(nullptr, fopen, ...) because the function would try to assign the result of fopen to nullptr_t, but a more insidious side effect was that RetryAfterSignal(-1, read, ...) would return "int" instead of "ssize_t", losing precision along the way. I fix this by having the function take the argument in a way that prevents argument deduction from kicking in and add a test that makes sure the return type is correct. llvm-svn: 306003
* [Solaris] replace Solaris.h hack with a set of better hacksKamil Rytarowski2017-06-224-19/+17
| | | | | | | | | | | | | | | | | | | Summary: Got rid of unwieldy -include Solaris.h portability solution, replacing it with interposed header and moving endian defines into Host.h. Fixes PR28370. Reviewers: joerg, alekseyshl, mgorny Reviewed By: joerg Subscribers: llvm-commits, mgorny, ro, krytarowski Patch by Fedor Sergeev. Differential Revision: https://reviews.llvm.org/D3413 llvm-svn: 306002
* [Testing/Support] Remove the const_cast in TakeExpectedPavel Labath2017-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: The const_cast in the "const" version of TakeExpected was quite dangerous, as the function does indeed modify the apparently const argument. I assume the reason the const overload was added was to make the function bind to xvalues(temporaries). That can be also achieved with rvalue references, so I use that instead. Using the ASSERT macros on const Expected objects will now become illegal, but I believe that is correct, as it is not actually possible to inspect the error stored in an Expected object without modifying it. Reviewers: zturner, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34405 llvm-svn: 306001
* Revert [mips] Adds support for R_MIPS_26, HIGHER, HIGHEST relocations in ↵Sagar Thakur2017-06-224-124/+15
| | | | | | | | RuntimeDyld Reverting due to build bot failures llvm-svn: 306000
* [AMDGPU] SDWA: remove support for VOP2 instructions that have only 64-bit ↵Sam Kolton2017-06-222-11/+76
| | | | | | | | | | | | | | | | encoding Summary: Despite that this instructions are listed in VOP2, they are treated as VOP3 in specs. They should not support SDWA. There are no real instructions for them, but there are pseudo instructions. Reviewers: arsenm, vpykhtin, cfang Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D34403 llvm-svn: 305999
* Don't conditionalize Neon instructions, even in IT blocks.Kristof Beyls2017-06-225-38/+64
| | | | | | | | | | | | | | This has been deprecated since ARMARM v7-AR, release C.b, published back in 2012. This also removes test/CodeGen/Thumb2/ifcvt-neon.ll that originally was introduced to check that conditionalization of Neon instructions did happen when generating Thumb2. However, the test had evolved and was no longer testing that. Rather than trying to adapt that test, this commit introduces test/CodeGen/Thumb2/ifcvt-neon-deprecated.mir, since we can now use the MIR framework to write nicer/more maintainable tests. llvm-svn: 305998
* [mips] Adds support for R_MIPS_26, HIGHER, HIGHEST relocations in RuntimeDyldSagar Thakur2017-06-224-15/+124
| | | | | | | | | After the N64 static relocation model support was added to llvm it is required to add its support in RuntimeDyld also because lldb uses ExecutionEngine for evaluating expressions. Reviewed by sdardis Differential: D31649 llvm-svn: 305997
* [index] Add the "SpecializationOf" relation to the forward declarationsAlex Lorenz2017-06-222-15/+17
| | | | | | | | | | | | | | of class template specializations This commit fixes an issue where a forward declaration of a class template specialization was not related to the base template. We need to relate even forward declarations because specializations don't have to be defined. rdar://32869409 Differential Revision: https://reviews.llvm.org/D34462 llvm-svn: 305996
* [mips] Implement the ".rdata" MIPS assembly directive.Simon Dardis2017-06-222-0/+35
| | | | | | | | | | | | | | Rather than creating a separate ".rdata" section distinct from the customary ".rodata" in ELF, ".rdata" switches to the ".rodata" section. This patch relands r305949 and r305950 with the correct commit message and addresses nit raised during review. Patch By: John Baldwin! Differential Revision: https://reviews.llvm.org/D34452 llvm-svn: 305995
* Test commitEkaterina Vaartis2017-06-221-1/+1
| | | | llvm-svn: 305994
* [ARM] Add .w aliases of MOV with shifted operandJohn Brawn2017-06-223-2/+30
| | | | | | | | These appear to have been simply missing. Differential Revision: https://reviews.llvm.org/D34461 llvm-svn: 305993
* [ARM] Clean up choice of narrow instructions in ARMAsmParser, NFCJohn Brawn2017-06-221-33/+27
| | | | | | | | | | | This patch makes a couple of changes to how we decide whether to use the narrow or wide encoding of thumb2 instructions: * Common out the detection of the .w qualifier * Check for the CPSR operand in a consistent way Differential Revision: https://reviews.llvm.org/D34460 llvm-svn: 305992
* [analyzer] Do not continue to analyze a path if the constraints contradict ↵Gabor Horvath2017-06-223-9/+17
| | | | | | | | with builtin assume Differential Revision: https://reviews.llvm.org/D34502 llvm-svn: 305991
* Revert "Enable vectorizer-maximize-bandwidth by default."Diana Picus2017-06-2212-77/+68
| | | | | | This reverts commit r305960 because it broke self-hosting on AArch64. llvm-svn: 305990
OpenPOWER on IntegriCloud