summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [SCEV] Remove comment repeated in cpp file; NFCSanjoy Das2015-10-081-5/+0
| | | | llvm-svn: 249713
* [SCEV] Pick backedge values for phi nodes correctlySanjoy Das2015-10-082-10/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively` assumed all phi nodes in the loop header have the same order of incoming values. This is not correct, and this commit changes `getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively` to lookup the backedge value of a phi node using the loop's latch block. Unfortunately, there is still some code duplication `getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively`. At some point in the future we should extract out a helper class / method that can evolve constant evolution phi nodes across iterations. Fixes 25060. Thanks to Mattias Eriksson for the spot-on analysis! Depends on D13457. Reviewers: atrick, hfinkel Subscribers: materi, llvm-commits Differential Revision: http://reviews.llvm.org/D13458 llvm-svn: 249712
* Handle Archive::getNumberOfSymbols being called in an archive with no symbols.Rafael Espindola2015-10-081-2/+2
| | | | | | No change in llvm, but will be tested from lld. llvm-svn: 249709
* [SystemZ] Fix another assertion failure in tryBuildVectorShuffleUlrich Weigand2015-10-082-1/+39
| | | | | | | | | | | | | | | | This fixes yet another scenario where tryBuildVectorShuffle would attempt to create a BUILD_VECTOR node with an invalid combination of types. This can happen if the incoming BUILD_VECTOR has elements of a type different from the vector element type, which is allowed in certain cases as long as they are all the same type. When one of these elements is used in the residual vector, and UNDEF elements are added to fill up the residual vector, those UNDEFs then have to use the type of the original element, not the vector element type, or else the resulting BUILD_VECTOR will have an invalid type combination. llvm-svn: 249706
* Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying ↵David Blaikie2015-10-084-4/+4
| | | | | | some AST nodes llvm-svn: 249703
* [InstCombine] transform masking off of an FP sign bit into a fabs() ↵Sanjay Patel2015-10-082-4/+62
| | | | | | | | | | | | | | | | | | intrinsic call (PR24886) This is a partial fix for PR24886: https://llvm.org/bugs/show_bug.cgi?id=24886 Without this IR transform, the backend (x86 at least) was producing inefficient code. This patch is making 2 assumptions: 1. The canonical form of a fabs() operation is, in fact, the LLVM fabs() intrinsic. 2. The high bit of an FP value is always the sign bit; as noted in the bug report, this isn't specified by the LangRef. Differential Revision: http://reviews.llvm.org/D13076 llvm-svn: 249702
* [ValueTracking] teach computeKnownBits that a fabs() clears sign bitsSanjay Patel2015-10-082-2/+35
| | | | | | | | | | | | | This was requested in D13076: if we're going to canonicalize to fabs(), ValueTracking should know that fabs() clears sign bits. In this patch (as in D13076), we're not handling vectors yet even though computeKnownBits' fabs() case itself should be vector-ready via the splat in this patch. Fixing this will require follow-on patches to correct other logic that uses 'getScalarType'. Differential Revision: http://reviews.llvm.org/D13222 llvm-svn: 249701
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-083-3/+15
| | | | | | | from malformed Mach-O files that caused a crash because of loops in the class meta data. llvm-svn: 249700
* Windows: Fixed sys::findProgramByName to work with files containing dot in ↵George Rimar2015-10-081-2/+9
| | | | | | | | | | | | their name. Problem was in SearchPathW function that does not attach an extension if file already has one. That does not work for executables like ld.lld2 for example which require to have .exe extension but SearchPath thinks that its "lld2". Solution was to add the extension manually. Differential Revision: http://reviews.llvm.org/D13536 llvm-svn: 249696
* Support for llvm-bcanalyzer dumping of record array strings.Teresa Johnson2015-10-082-3/+30
| | | | | | | | | | | | | | | | | | Summary: Adds support for automatically detecting and printing strings represented by Array abbrev operands, analogous to the string dumping performed for Blob abbrev operands. Enhanced the ThinLTO combined index test to check for the appropriate module and function strings. Reviewers: dexonsmith, joker.eph, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13553 llvm-svn: 249695
* [X86] Disable X86CallFrameOptimization on Darwin in presence of EHFrederic Riss2015-10-082-0/+11
| | | | | | | | | | | | | | We emit 1 compact unwind encoding per function, and this can’t represent the varying stack pointer that will be generated by X86CallFrameOptimization. Disable the optimization on Darwin. (It might be possible to split the function into multiple ranges and emit 1 compact unwind info per range. The compact unwind emission code isn’t ready for that and this kind of info certainly isn’t tested/used anywhere. It might be worth exploring this path if we want to get the space savings at some point though) llvm-svn: 249694
* Fix combined function index abbrev (NFC)Teresa Johnson2015-10-081-3/+0
| | | | | | | | | | | | Removed an unused abbrev op in the VST_CODE_COMBINED_FNENTRY abbrev. I noticed while writing/testing an array string dumper for llvm-bcanalyze that the combined function's VST entry abbrevs contained an old field that I am not using. Everything was working fine since the bitcode writer and reader were in sync on how the record fields were actually being set up and interpreted. llvm-svn: 249691
* Add a helper for getting a section's content as an array.Rafael Espindola2015-10-081-5/+20
| | | | | | It will be used in lld shortly. llvm-svn: 249690
* Fix UBSan test error from r248897 about left shift of unsigned value.Teresa Johnson2015-10-081-3/+11
| | | | | | | Fixed by masking off the upper bits that we are shifting off before doing the left shift. llvm-svn: 249689
* AVX512: vpextrb/w/d/q and vpinsrb/w/d/q implementation.Igor Breger2015-10-088-44/+1161
| | | | | | | | | This instructions doesn't have intrincis. Added tests for lowering and encoding. Differential Revision: http://reviews.llvm.org/D12317 llvm-svn: 249688
* Compute demanded bits for icmp instructionsJames Molloy2015-10-082-0/+29
| | | | | | | | | Instead of bailing out when we see an icmp, we can instead at least say that if the upper bits of both operands are known zero, they are not demanded. This doesn't help with signed comparisons, but it's at least better than bailing out. llvm-svn: 249687
OpenPOWER on IntegriCloud