summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed"Adrian Prantl2015-06-272-19/+14
| | | | | | This reverts commit 240890. Breaking the gdb buildbot. llvm-svn: 240893
* Don't use %llc_dwarf for target-specific tests.Benjamin Kramer2015-06-272-4/+2
| | | | | | Should fix running them on windows. llvm-svn: 240892
* [SDAG] Now that we have a way to communicate the exact bit on sdiv use it to ↵Benjamin Kramer2015-06-275-21/+34
| | | | | | | | | | | | | | | | | simplify sdiv by a constant. We had a hack in SDAGBuilder in place to work around this but now we can avoid that. Call BuildExactSDIV from BuildSDIV so DAGCombiner can perform this trick automatically. The added check in DAGCombiner is necessary to prevent exact sdiv by pow2 from regressing as the target-specific pow2 lowering is not aware of exact bits yet. This is mostly covered by existing tests. One side effect is that we get the better lowering for exact vector sdivs now too :) llvm-svn: 240891
* Debug Info: One more bitfield bugfix. While yesterday's r240853 fixedAdrian Prantl2015-06-272-17/+22
| | | | | | | | | | the DW_AT_bit_offset computation, the byte offset is in fact also endian-dependent as it needs to point to the storage unit containing the most-significant bit of the the bitfield. I'm so looking forward to emitting the endian-agnostic DWARF 3 version instead. llvm-svn: 240890
* [Sema] Unions cannot have virtual functions.Davide Italiano2015-06-273-0/+12
| | | | | | | | PR: PR23931 Differential Revision: http://reviews.llvm.org/D10752 Reviewed by: rsmith llvm-svn: 240889
* Fix typo. NFC.Alex Denisov2015-06-271-2/+2
| | | | llvm-svn: 240888
* [mips] Fold duplicate big-endian disassembler tests together.Daniel Sanders2015-06-2714-1398/+122
| | | | llvm-svn: 240887
* Add ABI/SysV-mips(64) to Makefile buildKeno Fischer2015-06-271-1/+1
| | | | | | The Makefile build was broken without this. llvm-svn: 240886
* [mips] Sort big-endian disassembler tests by opcode.Daniel Sanders2015-06-2714-2205/+2193
| | | | llvm-svn: 240885
* [mips] Make little-endian disassembler test filenames consistent.Daniel Sanders2015-06-273-0/+0
| | | | | | Most are named *-el.txt. Renamed the three that were *-le.txt llvm-svn: 240884
* [mips] Add COP0 register class and use it in M[FT]C0/DM[FT]C0.Daniel Sanders2015-06-2744-36/+234
| | | | | | | | | | | | | | | | | Summary: Previously it (incorrectly) used GPR's. Patch by Simon Dardis. A couple small corrections by myself. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10567 llvm-svn: 240883
* [OCaml] Bump ctypes dependency to 0.4.Peter Zotov2015-06-272-7/+7
| | | | | | | | | | | | ctypes 0.3 and earlier contains an interface-definig bug: its ptr_of_raw_address accepts Int64 and not Nativeint. ctypes 0.4 was not released during the 3.6 cycle, and because of that, LLVM 3.6 was released with ctypes 0.3 as a dependency, which now breaks the build on modern ctypes. Unbreak. llvm-svn: 240882
* Properly initialize Module pointerJeroen Ketema2015-06-271-1/+1
| | | | llvm-svn: 240881
* clang-format: Fix language of DisableFormat descriptionBirunthan Mohanathas2015-06-272-2/+2
| | | | | | This is a comment-only change to test commit access. llvm-svn: 240879
* [msan] Fix infinite recursion when _Unwind_Backtrace calls memcpyJay Foad2015-06-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On PPC64, half the msan tests fail with an infinite recursion through GetStackTrace like this: #0 __msan::GetStackTrace #1 __msan_memcpy #2 ?? () from /lib64/libgcc_s.so.1 #3 ?? () from /lib64/libgcc_s.so.1 #4 _Unwind_Backtrace #5 __sanitizer::BufferedStackTrace::SlowUnwindStack #6 __sanitizer::BufferedStackTrace::Unwind #7 __msan::GetStackTrace #8 __interceptor_calloc #9 _dl_allocate_tls #10 pthread_create@@GLIBC_2.17 #11 __interceptor_pthread_create #12 main The problem is that we call _Unwind_Backtrace to get a stack trace; but _Unwind_Backtrace calls memcpy, which we intercept and try to get another stack trace. This patch fixes it in __msan_memcpy by skipping the stack trace if IsInSymbolizer(). This works because GetStackTrace already creates a SymbolizerScope to "block reports from our interceptors during _Unwind_Backtrace". Reviewers: samsonov, wschmidt, eugenis Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10762 llvm-svn: 240878
* [LoopVectorize] Pointer indicies may be wider than the pointerDavid Majnemer2015-06-272-3/+30
| | | | | | | | | | | If we are dealing with a pointer induction variable, isInductionPHI gives back a step value of Stride / size of pointer. However, we might be indexing with a legal type wider than the pointer width. Handle this by inserting casts where appropriate instead of crashing. This fixes PR23954. llvm-svn: 240877
* [PruneEH] A naked, noinline function can return via InlineAsmDavid Majnemer2015-06-272-25/+59
| | | | | | | | | | The PruneEH pass tries to annotate functions as 'noreturn' if it doesn't see a ReturnInst. However, a naked function containing inline assembly can contain control flow leaving the function. This fixes PR23971. llvm-svn: 240876
* [Stackmap] Pre-assemble the stackmap parser test case. (Fix builders).Lang Hames2015-06-273-52/+1
| | | | | | | | This case had been failing on testers that didn't have x86 support. Rather than XFAIL it on testers without x86 support, I've just assembled it and used the raw object as the test input. llvm-svn: 240875
* llvm/test/CodeGen/X86/xor.ll: Appease Win32 targets since r240796.NAKAMURA Takumi2015-06-271-1/+1
| | | | | | | | | %struct.ref_s = type { %union.v, i16, i16 } %union.v = type { i64 } It seems %struct.ref_s is incompatible in tail padding. llvm-svn: 240874
* [opt] Inline a trivial lookup function into the header.Chandler Carruth2015-06-272-5/+3
| | | | | | | | | | | | | | This function is actually *very* hot. It is hard to see currently because the call graph is very recursive, but I'm working to remove that and when I do this function becomes significantly higher on the profile (up to 5%!) and so worth avoiding the call overhead. No specific perf gain I can measure yet (below the noise), but likely to have more impact as we stop cluttering the call graph. Differential Revision: http://reviews.llvm.org/D10788 llvm-svn: 240873
* Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. ↵NAKAMURA Takumi2015-06-271-1/+1
| | | | | | Will fix later. llvm-svn: 240872
* Switch the new COFF linker's symbol table to use a DenseMap ofChandler Carruth2015-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | StringRefs. This uses the LLVM hashing rather than the standard library and a closed addressed hash table rather than chaining. This improves the Windows self-link of LLD by 4.4% (averaged over 10 runs, with well under 1% of variance on each). There is still some room to improve here. Two things I clearly see in the profile: 1) This is one of the biggest stress tests for the LLVM hashing code. It actually consumes something like 3-4% of the link time after the change. 2) The way that StringRef keys are handled in the DenseMap interface is pretty suboptimal. We pay the price of checking for empty and tombstone keys when we could only possibly be looking for a normal key. But fixing this requires invasive API changes. So there is still some headroom here. Differential Revision: http://reviews.llvm.org/D10684 llvm-svn: 240871
* [MC] Ensure that pending labels are flushed when -mc-relax-all flag is usedPetr Hosek2015-06-272-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The current implementation doesn't always flush all pending labels beforeemitting data which can result in an incorrectly placed labels in case when when instruction bundling is enabled and -mc-relax-all flag is being used. To address this issue, we always flush pending labels before emitting data. The change was tested by running PNaCl toolchain trybots with -mc-relax-all flag set. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4063 Test Plan: Regression test attached Reviewers: mseaborn Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D10325 llvm-svn: 240870
* [MC] Align fragments when -mc-relax-all flag is usedPetr Hosek2015-06-273-6/+66
| | | | | | | | | | | | | | | | | | | | | | | Summary: Ensure that fragments are bundle aligned when instruction bundling is enabled and the -mc-relax-all flag is set. This is implicitly assumed by the bundle padding implementation but this assumption does not hold when custom alignment is being used. The change was tested by running PNaCl toolchain trybots with -mc-relax-all flag set. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4063 Test Plan: Regression test attached Reviewers: mseaborn Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D10044 llvm-svn: 240869
* AsmPrinter: Document why DIEValueList uses a linked-list, NFCDuncan P. N. Exon Smith2015-06-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | There are two main reasons why a linked-list makes sense for `DIEValueList`. 1. We want `DIE` to be on a `BumpPtrAllocator` to improve teardown efficiency. Making `DIEValueList` array-based would make that much more complicated. 2. The singly-linked list is fairly memory efficient. The histogram [1] shows that most DIEs have relatively few values, so we often pay less than the 2/3-pointer static overhead of a vector. Furthermore, we don't know ahead of time exactly how many values a `DIE` needs, so a vector-like scheme will on average over-allocate by ~50%. As it happens, that's the same memory overhead as the linked list node. [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-May/085910.html The comment I added to the code is a little more succinct, but I think it's enough to give the idea. llvm-svn: 240868
* IR: Expose ModuleSlotTracker in Value::print()Duncan P. N. Exon Smith2015-06-275-10/+118
| | | | | | | | | | | | | | | | | | | Allow callers of `Value::print()` and `Metadata::print()` to pass in a `ModuleSlotTracker`. This allows them to pay only once for calculating module-level slots (such as Metadata). This is related to PR23865, where there was a huge cost for `MachineFunction::print()`. Although I don't have a *particular* user in mind for this new code, I have hit big slowdowns before when running `opt -debug`, and I think this will be useful. Going forward, if someone hits a big slowdown with `print()` statements, they can create a `ModuleSlotTracker` and send it through. Similarly, adding support to `Value::dump()` and `Metadata::dump()` should be trivial. I added unit tests to be sure the `print()` functions actually behave the same way with and without the slot tracker. llvm-svn: 240867
* LowerBitSets: Ignore bitset entries that do not directly refer to a global.Peter Collingbourne2015-06-272-3/+26
| | | | | | | | | | | | | | | | | It is possible for a global to be substituted with another global of a different type or a different kind (i.e. an alias) at IR link time. One example of this scenario is when a Microsoft ABI vtable is substituted with an alias referring to a larger vtable containing an RTTI reference. This will cause the global to be RAUW'd with a possibly bitcasted reference to the other global. This will of course also affect any references to the global in bitset metadata. The right way to handle such metadata is simply to ignore it. This is sound because the linked module should contain another copy of the bitset entries as applied to the new global. llvm-svn: 240866
* Plug a leak introduced by r240848Duncan P. N. Exon Smith2015-06-271-2/+5
| | | | | | | | | Apparently this obvious leak was never exercised before, but r240848 exposed it. Plug it. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/5075 llvm-svn: 240865
* Fix some compiler warnings about not using override consistently.Greg Clayton2015-06-271-4/+4
| | | | llvm-svn: 240864
* Add original source code to test case as suggested in review.Adrian Prantl2015-06-271-0/+58
| | | | llvm-svn: 240863
* COFF: Use vector::erase instead of reallocating entire vector. NFC.Rui Ueyama2015-06-261-6/+6
| | | | llvm-svn: 240862
* Add test for SBValue.GetNonSyntheticValue in presence of synth provider.Siva Chandra2015-06-264-25/+80
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestFormattersSBAPI Reviewers: granata.enrico Reviewed By: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10783 llvm-svn: 240861
* [StackMaps] Add a lightweight parser for stackmap version 1 sections.Lang Hames2015-06-269-1/+687
| | | | | | | | | | The parser provides a convenient interface for reading llvm stackmap v1 sections in object files. This patch also includes a new option for llvm-readobj, '-stackmap', which uses the parser to pretty-print stackmap sections for debugging/testing purposes. llvm-svn: 240860
* COFF: Avoid vector reallocation. NFC.Rui Ueyama2015-06-261-1/+3
| | | | llvm-svn: 240859
* [asan] Disable 3 tests on Android.Evgeniy Stepanov2015-06-263-1/+8
| | | | | | Different reasons for failing; see source file comments. llvm-svn: 240858
* [asan] Add -pie to uninstrumented executables on interface_test.ccEvgeniy Stepanov2015-06-261-2/+2
| | | | | | This helps Android (which only support PIE) and does not hurt anything else. llvm-svn: 240857
* [asan] Enable 2 tests on Android.Evgeniy Stepanov2015-06-262-8/+0
| | | | | | Due to bionic improvements and "recent" sized-delete changes in clang. llvm-svn: 240856
* [asan] Disable -O1,-O2,-O3 in clang_gcc_abi.cc test.Evgeniy Stepanov2015-06-261-3/+4
| | | | | | | A workaround for PR23971. Fixes the test on Android. llvm-svn: 240855
* [asan] Disable glibc-specific code chunk on Android.Evgeniy Stepanov2015-06-261-1/+1
| | | | | | Fixes quarantine_size_mb.cc test on the Android bot. llvm-svn: 240854
* Debug Info: Fix a bug in the DW_AT_bit_offset calculation that wouldAdrian Prantl2015-06-262-13/+73
| | | | | | | | | result in negative offsets and attempt a better job at documenting the algorithm. rdar://21082998 llvm-svn: 240853
* CodeGen: Create a proper ModuleSlotTracker for MachineInstrDuncan P. N. Exon Smith2015-06-261-2/+7
| | | | | | | | | | | Another follow-up related to r240848: try a little harder to share slot tracking calculations within a single `MachineInstr` dump. This is unrelated to `MachineFunction::print()`, since that should be passing through the function's `ModuleSlotTracker` by now, but could affect the speed of dumping from a debugger if there is more than one IR-level operand. llvm-svn: 240852
* MIR Serialization: Serialize global address machine operands.Alex Lorenz2015-06-269-14/+198
| | | | | | | | | | | | This commit serializes the global address machine operands. This commit doesn't serialize the operand's offset and target flags, it serializes only the global value reference. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10671 llvm-svn: 240851
* [RewriteStatepointsForGC] Generalized vector phi/select handling for base ↵Philip Reames2015-06-262-57/+166
| | | | | | | | | | | | | | | pointers This change extends the detection of base pointers for vector constructs to handle arbitrary phi and select nodes. The existing non-vector code already handles those, so this is basically just extending the vector special case to be less special cased. It still isn't generalized vector handling since we can't handle arbitrary vector instructions (e.g. shufflevectors), but it's a lot closer. The general structure of the change is as follows: * Extend the base defining value relation over a subset of vector instructions and vector typed phi & select instructions. * Move scalarization from before base pointer rewriting to after base pointer rewriting. The extension of the BDV relation is sufficient to find vector base phis for vector inputs. * Preserve the existing special case logic for when the base of a vector element is locally obvious. This general idea could be extended to the scalar case as well. Differential Revision: http://reviews.llvm.org/D10461#inline-84275 llvm-svn: 240850
* [NVPTX] noop when kernel pointers are already globalJingyue Wu2015-06-262-1/+16
| | | | | | | | | | | | | | | | Summary: Some front ends make kernel pointers global already. In that case, handlePointerParams does nothing. Test Plan: more tests in lower-kernel-ptr-arg.ll Reviewers: grosser Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10779 llvm-svn: 240849
* CodeGen: Push the ModuleSlotTracker through MetadataDuncan P. N. Exon Smith2015-06-264-17/+37
| | | | | | | | For another 1% speedup on the testcase in PR23865, push the `ModuleSlotTracker` through to metadata-related printing in `MachineBasicBlock::print()`. llvm-svn: 240848
* Minor style cleanup after 240843 [NFC]Philip Reames2015-06-261-8/+7
| | | | | | Use a for-each loop in one case and rename the function to reflect it's new usage. llvm-svn: 240847
* COFF: Remove dead code.Rui Ueyama2015-06-262-12/+0
| | | | llvm-svn: 240846
* CodeGen: Push the ModuleSlotTracker through MachineOperandsDuncan P. N. Exon Smith2015-06-266-37/+63
| | | | | | | | | Push `ModuleSlotTracker` through `MachineOperand`s, dropping the time for `llc -print-machineinstrs` on the testcase in PR23865 from ~13 seconds to ~9 seconds. Now `SlotTracker::processFunctionMetadata()` accounts for only 8% of the runtime, which seems reasonable. llvm-svn: 240845
* COFF: Add base relocation for delay-import table.Rui Ueyama2015-06-262-22/+41
| | | | | | | | Because the address table of the delay-import table contains absolute address, it needs to be added to the base relocation table. llvm-svn: 240844
* [Verifier] Follow on to 240836Philip Reames2015-06-262-82/+80
| | | | | | Address one missed review comment and do the rename I left out of that patch to make it reviewable. llvm-svn: 240843
OpenPOWER on IntegriCloud