summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Start removing implicit conversions to/from list iterators, NFCDuncan P. N. Exon Smith2015-10-096-18/+18
| | | | | | | Start removing implicit conversions to/from list iterators in CodeGen, ala r249782 for IR. A lot more to go after this. llvm-svn: 249851
* Revert "Support: Partially revert r249782 to unbreak clang build"Duncan P. N. Exon Smith2015-10-091-4/+4
| | | | | | | | This reverts commit r249783, fully reinstating r249782. I've fixed the bug in clang: it was a non-const iterator that dereferenced to const (but had an implicit conversion to non-const). llvm-svn: 249850
* Make HeaderLineno a local variable.Dehao Chen2015-10-091-12/+8
| | | | | | | | http://reviews.llvm.org/D13576 As we are using hierarchical profile, there is no need to keep HeaderLineno a member variable. This is because each level of the inline stack will have its own header lineno. One should use the head lineno of its own inline stack level instead of the actual symbol. llvm-svn: 249848
* Fix pdb.test when python is not on PATHReid Kleckner2015-10-091-1/+1
| | | | llvm-svn: 249847
* Fixed two bugs in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-094-0/+29
| | | | | | | | | | | from malformed Mach-O files that caused crashes. The first because the offset in a dyld bind table entry was out of range. The second because their was no image info section and the routine printing it did not have the need check to see the section did not exist. rdar://22983603 llvm-svn: 249845
* ValueTracking: use getAlignment in isAlignedArtur Pilipenko2015-10-091-14/+1
| | | | | | | | Reviewed By: reames Differential Revision: http://reviews.llvm.org/D13517 llvm-svn: 249841
* [dsymutil] Prevent warningFrederic Riss2015-10-091-1/+2
| | | | llvm-svn: 249836
* Improve ISel across lane float min/max reductionJun Bum Lim2015-10-092-12/+79
| | | | | | | | | | | | | | | | | | | | In vectorized float min/max reduction code, the final "reduce" step is sub-optimal. In AArch64, this change wll combine : svn0 = vector_shuffle t0, undef<2,3,u,u> fmin = fminnum t0,svn0 svn1 = vector_shuffle fmin, undef<1,u,u,u> cc = setcc fmin, svn1, ole n0 = extract_vector_elt cc, #0 n1 = extract_vector_elt fmin, #0 n2 = extract_vector_elt fmin, #1 result = select n0, n1,n2 into : result = llvm.aarch64.neon.fminnmv t0 This change extends r247575. llvm-svn: 249834
* [SystemZ] Remove unused code in SystemZElimCompare.cppJonas Paulsson2015-10-091-19/+7
| | | | | | | The Reference IndirectDef and IndirectUse members were unused and therefore removed. llvm-svn: 249824
* Vector element extraction without stack operations on Power 8Nemanja Ivanovic2015-10-094-23/+1749
| | | | | | | | | | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D12032 This patch builds onto the patch that provided scalar to vector conversions without stack operations (D11471). Included in this patch: - Vector element extraction for all vector types with constant element number - Vector element extraction for v16i8 and v8i16 with variable element number - Removal of some unnecessary COPY_TO_REGCLASS operations that ended up unnecessarily moving things around between registers Not included in this patch (will be in upcoming patch): - Vector element extraction for v4i32, v4f32, v2i64 and v2f64 with variable element number - Vector element insertion for variable/constant element number Testing is provided for all extractions. The extractions that are not implemented yet are just placeholders. llvm-svn: 249822
* [MemCpyOpt] Fix wrong merging adjacent nontemporal stores into memset calls.Andrea Di Biagio2015-10-092-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass MemCpyOpt doesn't check if a store instruction is nontemporal. As a consequence, adjacent nontemporal stores are always merged into a memset call. Example: ;;; define void @foo(<4 x float>* nocapture %p) { entry: store <4 x float> zeroinitializer, <4 x float>* %p, align 16, !nontemporal !0 %p1 = getelementptr inbounds <4 x float>, <4 x float>* %dst, i64 1 store <4 x float> zeroinitializer, <4 x float>* %p1, align 16, !nontemporal !0 ret void } !0 = !{i32 1} ;;; In this example, the two nontemporal stores are combined to a memset of zero which does not preserve the nontemporal hint. Later on the backend (tested on a x86-64 corei7) expands that memset call into a sequence of two normal 16-byte aligned vector stores. opt -memcpyopt example.ll -S -o - | llc -mcpu=corei7 -o - Before: xorps %xmm0, %xmm0 movaps %xmm0, 16(%rdi) movaps %xmm0, (%rdi) With this patch, we no longer merge nontemporal stores into calls to memset. In this example, llc correctly expands the two stores into two movntps: xorps %xmm0, %xmm0 movntps %xmm0, 16(%rdi) movntps %xmm0, (%rdi) In theory, we could extend the usage of !nontemporal metadata to memcpy/memset calls. However a change like that would only have the effect of forcing the backend to expand !nontemporal memsets back to sequences of store instructions. A memset library call would not have exactly the same semantic of a builtin !nontemporal memset call. So, SelectionDAG will have to conservatively expand it back to a sequence of !nontemporal stores (effectively undoing the merging). Differential Revision: http://reviews.llvm.org/D13519 llvm-svn: 249820
* [EarlyCSE] Address post commit review for r249523.Arnaud A. de Grandmaison2015-10-091-10/+10
| | | | llvm-svn: 249814
* [SystemZ] Remove superfluous braces in SystemZShortenInst.cppJonas Paulsson2015-10-091-2/+2
| | | | llvm-svn: 249812
* [SystemZ] Minor bugfixes.Jonas Paulsson2015-10-092-4/+5
| | | | | | | | | | | | | | LLCH, LLHH and CLIH had the wrong register classes for the def-operand. Tie operands if changing opcode to an instruction with tied ops. Comment typo fix. These fixes were needed in order to make regression test case SystemZ/asm-18.ll pass with -verify-machineinstrs (not used by default). Reviewed by Ulrich Weigand. llvm-svn: 249811
* [SystemZ] Bugfix in SystemZAsmParser.cpp.Jonas Paulsson2015-10-091-4/+6
| | | | | | | | | Let parseRegister() allow RegFP Group if expecting RegV Group, since the %f register prefix yields the FP group even while used with vector instructions. Reviewed by Ulrich Weigand. llvm-svn: 249810
* [libFuzzer] don't print large artifacts to stderrKostya Serebryany2015-10-091-6/+7
| | | | llvm-svn: 249808
* [libFuzzer] add -artifact_prefix flagKostya Serebryany2015-10-096-6/+15
| | | | llvm-svn: 249807
* ARM: tweak WoA frame loweringSaleem Abdulrasool2015-10-092-8/+30
| | | | | | | | | | Accept r11 when targeting Windows on ARM rather than just low registers. Because we are in a thumb-2 only mode, this may be slightly more expensive in code size, but results in better code for the environment since it spills the frame register, which is generally desired for fast stack walking as per the ABI. llvm-svn: 249804
* [SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCISanjoy Das2015-10-091-4/+4
| | | | | | | | | The current implementation of `StrengthenNoWrapFlags` is agnostic to the order of `Ops`, so this commit should not change anything semantic. An upcoming change will make `StrengthenNoWrapFlags` sensitive to the order of `Ops`. llvm-svn: 249802
* Re-enable the coff-dwarf test on WindowsReid Kleckner2015-10-091-0/+4
| | | | | | Apparently system-windows was only a clang lit suite feature. llvm-svn: 249797
* Revert "Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on ↵Reid Kleckner2015-10-098-134/+25
| | | | | | | | | | Win64""" This reverts commit r249794. Apparently my checkouts are full of unexpected surprises today. llvm-svn: 249796
* Fix coff-dwarf test for non-Windows platforms that cannot demangle MS C++ namesReid Kleckner2015-10-091-0/+3
| | | | llvm-svn: 249795
* Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64""Reid Kleckner2015-10-098-25/+134
| | | | | | | | This reverts commit r249032. TODO write commit msg llvm-svn: 249794
* [WinEH] Fix cleanup state numberingJoseph Tremoulet2015-10-092-4/+120
| | | | | | | | | | | | | | | | | | | Summary: - Recurse from cleanupendpads to their cleanuppads, to make sure the cleanuppad is visited if it has a cleanupendpad but no cleanupret. - Check for and avoid double-processing cleanuppads, to allow for them to have multiple cleanuprets (plus cleanupendpads). - Update Cxx state numbering to visit toplevel cleanupendpads and to recurse from cleanupendpads to their preds, to ensure we number any funclets in inlined cleanups. SEH state numbering already did this. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13374 llvm-svn: 249792
* [SEH] Fix llvm.eh.exceptioncode fast register allocation assertionReid Kleckner2015-10-093-4/+3
| | | | | | I called the wrong MachineBasicBlock::addLiveIn() overload. llvm-svn: 249786
* Address review comments, remove error case and return 0 instead as required ↵Reid Kleckner2015-10-097-30/+33
| | | | | | by tests llvm-svn: 249785
* [llvm-symbolizer] Make --relative-address work with DWARF contextsReid Kleckner2015-10-0911-31/+79
| | | | | | | | | | | | | | | | Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be passed virtual addresses. llvm-symbolizer is now responsible for adding ImageBase to module offsets when --relative-offset is passed. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12883 llvm-svn: 249784
* Support: Partially revert r249782 to unbreak clang buildDuncan P. N. Exon Smith2015-10-091-4/+4
| | | | | | | | | Apparently the iterators in `clang::CFGBlock` have an auto-conversion to `CFGBlock *`, but the dereference operator gives `const CFGBlock &`. Until I have a moment to fix that, revert the GenericDomTree chagnes from r249782. llvm-svn: 249783
* IR: Remove implicit iterator conversions from lib/IR, NFCDuncan P. N. Exon Smith2015-10-0816-77/+95
| | | | | | | | | | | | | | | | | | | | | | | | Stop converting implicitly between iterators and pointers/references in lib/IR. For convenience, I've added a `getIterator()` accessor to `ilist_node` so that callers don't need to know how to spell the iterator class (i.e., they can use `X.getIterator()` instead of `Function::iterator(X)`). I'll eventually disallow these implicit conversions entirely, but there's a lot of code, so it doesn't make sense to do it all in one patch. One library or so at a time. Why? To root out cases of `getNextNode()` and `getPrevNode()` being used in iterator logic. The design of `ilist` makes that invalid when the current node could be at the back of the list, but it happens to "work" right now because of a bug where those functions never return `nullptr` if you're using a half-node sentinel. Before I can fix the function, I have to remove uses of it that rely on it misbehaving. (Maybe the function should just be deleted anyway? But I don't want deleting it -- potentially a huge project -- to block fixing ilist/iplist.) llvm-svn: 249782
* [RS4GC] Refactoring to make a later change easier, NFCISanjoy Das2015-10-083-20/+27
| | | | | | | | | | | | | | Summary: These non-semantic changes will help make a later change adding support for deopt operand bundles more streamlined. Reviewers: reames, swaroop.sridhar Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D13491 llvm-svn: 249779
* [IRBuilder] Change the `gc.statepoint` creation interfaceSanjoy Das2015-10-082-18/+18
| | | | | | | | This is to enable me to address review for D13491 -- `Flags` is a bitfield of `StatepointFlags`, not an individual item out of the enum, so it should be represented as an `uint32_t`. llvm-svn: 249778
* [PlaceSafeopints] Extract out `callsGCLeafFunction`, NFCSanjoy Das2015-10-083-28/+30
| | | | | | | | | | | | | Summary: This will be used in a later change to RewriteStatepointsForGC. Reviewers: reames, swaroop.sridhar Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13490 llvm-svn: 249777
* [RS4GC] Don't copy ADT's unneccessarily, NFCISanjoy Das2015-10-081-3/+3
| | | | | | | | | | | | Summary: Use `const auto &` instead of `auto` in `makeStatepointExplicit`. Reviewers: reames, swaroop.sridhar Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13454 llvm-svn: 249776
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-084-3/+34
| | | | | | | | | from malformed Mach-O files that caused a crash because of a section header had a size that extended past the end of the file. rdar://22983603 llvm-svn: 249768
* Support: Stop relying on iterator auto-conversion, NFCDuncan P. N. Exon Smith2015-10-081-6/+6
| | | | | | | | | | | | | | Stop relying on ilist implicit conversions from `value_type&` to `iterator` in YAMLParser.cpp. I eventually want to outlaw this entirely. It encourages `getNextNode()` and `getPrevNode()` in iterator logic, which is extremely fragile (and relies on them never returning `nullptr`). FTR, there's nothing nefarious going on in this case, it was just easy to clean up since the callers really wanted iterators to begin with. llvm-svn: 249767
* Enable gtest SEH when building with clang-clReid Kleckner2015-10-081-4/+0
| | | | | | | Clang supports SEH well enough that this should work out of the box. If it doesn't, we'll hear about it. llvm-svn: 249766
* AArch64: Stop using MachineInstr::getNextNode()Duncan P. N. Exon Smith2015-10-081-4/+4
| | | | | | | | | | | | | Stop using `getNextNode()` to get an insertion point (at least, in this one place). Instead, use iterator logic directly. The `getNextNode()` interface isn't actually supposed to work for creating iterators; it's supposed to return `nullptr` (not a real iterator) if this is the last node. It's currently broken and will "happen" to work, but if we ever fix the function, we'll get some strange failures in places like this. llvm-svn: 249764
* MC: Stop using Fragment::getNextNode()Duncan P. N. Exon Smith2015-10-081-7/+7
| | | | | | | | | | | | | Stop using `getNextNode()` to get an iterator to a fragment (at least, in this one place). Instead, use iterator logic directly. The `getNextNode()` interface isn't actually supposed to work for creating iterators; it's supposed to return `nullptr` (not a real iterator) if this is the last node. It's currently broken and will "happen" to work, but if we ever fix the function, we'll get some strange failures in places like this. llvm-svn: 249763
* [dsymutil] Try to find lipo first besides dsymutil before looking up the PATH.Frederic Riss2015-10-083-6/+12
| | | | | | | | Even if we don't have it in PATH, lipo should usually exist in the same directory as dsymutil. Keep the fallback looking up the PATH, it's very useful when testing a non-installed executable. llvm-svn: 249762
* PowerPC: Don't use getNextNode() for insertion pointDuncan P. N. Exon Smith2015-10-081-5/+5
| | | | | | | | | | | | | Stop using `getNextNode()` to create an insertion point for machine instructions (at least, in this one place). Instead, use an iterator. As a drive-by, clean up dump statements to use iterator logic. The `getNextNode()` interface isn't actually supposed to work for insertion points; it's supposed to return `nullptr` if this is the last node. It's currently broken and will "happen" to work, but if we ever fix the function, we'll get some strange failures. llvm-svn: 249758
* New MSan mapping layout (llvm part).Evgeniy Stepanov2015-10-082-11/+21
| | | | | | | | | | | | | | | | | | This is an implementation of https://github.com/google/sanitizers/issues/579 It has a number of advantages over the current mapping: * Works for non-PIE executables. * Does not require ASLR; as a consequence, debugging MSan programs in gdb no longer requires "set disable-randomization off". * Supports linux kernels >=4.1.2. * The code is marginally faster and smaller. This is an ABI break. We never really promised ABI stability, but this patch includes a courtesy escape hatch: a compile-time macro that reverts back to the old mapping layout. llvm-svn: 249753
* Add Triple::isAndroid().Evgeniy Stepanov2015-10-086-9/+9
| | | | | | | This is a simple refactoring that replaces Triple.getEnvironment() checks for Android with Triple.isAndroid(). llvm-svn: 249750
* Fix another UBSan test error from r248897 and follow on fix r249689Teresa Johnson2015-10-082-11/+101
| | | | | | | While here fix a few more issues with potential overflow and add new tests for these cases. Ensured that test now passes with UBSan. llvm-svn: 249745
* Remove a '#' so that we can check either form for the various targets.Eric Christopher2015-10-081-1/+1
| | | | llvm-svn: 249734
* Move the MMX subtarget feature out of the SSE set of features and intoEric Christopher2015-10-087-171/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | its own variable. This is needed so that we can explicitly turn off MMX without turning off SSE and also so that we can diagnose feature set incompatibilities that involve MMX without SSE. Rationale: // sse3 __m128d test_mm_addsub_pd(__m128d A, __m128d B) { return _mm_addsub_pd(A, B); } // mmx void shift(__m64 a, __m64 b, int c) { _mm_slli_pi16(a, c); _mm_slli_pi32(a, c); _mm_slli_si64(a, c); _mm_srli_pi16(a, c); _mm_srli_pi32(a, c); _mm_srli_si64(a, c); _mm_srai_pi16(a, c); _mm_srai_pi32(a, c); } clang -msse3 -mno-mmx file.c -c For this code we should be able to explicitly turn off MMX without affecting the compilation of the SSE3 function and then diagnose and error on compiling the MMX function. This matches the existing gcc behavior and follows the spirit of the SSE/MMX separation in llvm where we can (and do) turn off MMX code generation except in the presence of intrinsics. Updated a couple of tests, but primarily tested with a couple of tests for turning on only mmx and only sse. This is paired with a patch to clang to take advantage of this behavior. llvm-svn: 249731
* Re-apply r249644: Handle inline stacks in gcov-encoded sample profiles.Diego Novillo2015-10-088-54/+151
| | | | | | | | | | | | | This fixes memory allocation problems by making the merge operation keep the profile readers around until the merged profile has been emitted. This is needed to prevent the inlined function names to disappear from the function profiles. Since all the names are kept as references, once the reader disappears, the names are also deallocated. Additionally, XFAIL on big-endian architectures. The test case uses a gcov file generated on a little-endian system. llvm-svn: 249724
* [bpf] Do not expand UNDEF SDNode during insn selection loweringAlexei Starovoitov2015-10-084-11/+69
| | | | | | | | | | | | | | | | | | o Before this patch, BPF backend will expand UNDEF node to i64 constant 0. o For second pass of dag combiner, legalizer will run through each to-be-processed dag node. o If any new SDNode is generated and has an undef operand, dag combiner will put undef node, newly-generated constant-0 node, and any node which uses these nodes in the working list. o During this process, it is possible undef operand is generated again, and this will form an infinite loop for dag combiner pass2. o This patch allows UNDEF to be a legal type. Signed-off-by: Yonghong Song <yhs@plumgrid.com> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> llvm-svn: 249718
* [SCEV] Bring some methods up to coding style; NFCSanjoy Das2015-10-082-39/+34
| | | | | | | | - Start methods with lower case - Reflow a comment - Delete header comment repeated in .cpp file llvm-svn: 249716
* [WinEH] Relax assertion in the presence of stack realignmentReid Kleckner2015-10-082-5/+85
| | | | | | The code is correct as is, but we should test it. llvm-svn: 249715
* [PowerPC] Add R_PPC64_GLOB_DAT and R_PPC64_RELATIVE to PowerPC64.defHal Finkel2015-10-081-0/+4
| | | | | | | These are not used by LLVM proper, but will be used by upcoming commits to lld (and will receive test coverage there). llvm-svn: 249714
OpenPOWER on IntegriCloud