summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix assertion failure in LLParser::ConvertValIDToValueKarl Schimpf2015-09-033-3/+8
| | | | | | | | | | | Summary: Fixes bug 24645. Problem appears to be that the type may be undefined when ConvertValIDToValue is called. Reviewers: kcc Subscribers: llvm-commits llvm-svn: 246779
* Remove binary characters from test file.Karl Schimpf2015-09-031-0/+0
| | | | llvm-svn: 246775
* Fix SEGV in InlineAsm::ConstraintInfo::Parse.Karl Schimpf2015-09-032-1/+2
| | | | | | | | | | | | | Summary: Fixes bug 24646. Previous code was not checking if an index into a vector was valid, resulting in a SEGV. Fixed by assuming the construct can't be parsed when given this input. Reformat and add test. Differential Revision: http://reviews.llvm.org/D12539 llvm-svn: 246774
* Fix SEGV in InlineAsm::ConstraintInfo::Parse.Karl Schimpf2015-09-031-1/+2
| | | | | | | | Fixes bug 24646. Previous code was not checking if an index into a vector was valid, resulting in a SEGV. Fixed by assuming the construct can't be parsed when given this input. llvm-svn: 246773
* check for fastness before merging in DAGCombiner::MergeConsecutiveStores() Sanjay Patel2015-09-033-12/+101
| | | | | | | | | | | | | | | | Use and check the 'IsFast' optional parameter to TLI.allowsMemoryAccess() any time we have a merged access candidate. Without this patch, we were generating unaligned 16-byte (SSE) memops for x86 targets where those accesses are slow. This change was mentioned in: http://reviews.llvm.org/D10662 and http://reviews.llvm.org/D10905 and will help solve PR21711. Differential Revision: http://reviews.llvm.org/D12573 llvm-svn: 246771
* [AArch64] Improve load/store optimizer to handle LDUR + LDR.Chad Rosier2015-09-032-21/+182
| | | | | | | | | | | This patch allows the mixing of scaled and unscaled load/stores to form load/store pairs. PR24465 http://reviews.llvm.org/D12116 Many thanks to Ahmed and Michael for fixes and code review. llvm-svn: 246769
* [AArch64] Reuse MayLoad. NFC.Chad Rosier2015-09-031-1/+1
| | | | llvm-svn: 246767
* [mips] Added support for the div, divu, ddiv and ddivu macros which use ↵Daniel Sanders2015-09-0313-1/+511
| | | | | | | | | | | | | | | | traps and breaks in the integrated assembler. Summary: Patch by Scott Egerton Reviewers: vkalintiris, dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11675 llvm-svn: 246763
* Fix IRBuilder CreateBitOrPointerCast for vector typesSilviu Baranga2015-09-032-2/+73
| | | | | | | | | | | | | | | | | Summary: This function was not taking into account that the input type could be a vector, and wasn't properly working for vector types. This caused an assert when building spec2k6 perlbmk for armv8. Reviewers: rengolin, mzolotukhin Subscribers: silviu.baranga, mzolotukhin, rengolin, eugenis, jmolloy, aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D12559 llvm-svn: 246759
* [Docs] Fix Sphinx warningJoseph Tremoulet2015-09-031-1/+1
| | | | | | Title underline was too short. llvm-svn: 246754
* [WinEH] Add llvm.eh.exceptionpointer intrinsicJoseph Tremoulet2015-09-036-3/+99
| | | | | | | | | | | | | | | | | Summary: This intrinsic can be used to extract a pointer to the exception caught by a given catchpad. Its argument has token type and must be a `catchpad`. Also clarify ExtendingLLVM documentation regarding overloaded intrinsics. Reviewers: majnemer, andrew.w.kaylor, sanjoy, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12533 llvm-svn: 246752
* [WinEH] Add cleanupendpad instructionJoseph Tremoulet2015-09-0331-135/+635
| | | | | | | | | | | | | | | | | | | | | | | Summary: Add a `cleanupendpad` instruction, used to mark exceptional exits out of cleanups (for languages/targets that can abort a cleanup with another exception). The `cleanupendpad` instruction is similar to the `catchendpad` instruction in that it is an EH pad which is the target of unwind edges in the handler and which itself has an unwind edge to the next EH action. The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad` argument indicating which cleanup it exits. The unwind successors of a `cleanuppad`'s `cleanupendpad`s must agree with each other and with its `cleanupret`s. Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`. Reviewers: rnk, andrew.w.kaylor, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12433 llvm-svn: 246751
* AVX512: Implemented encoding and intrinsics for vplzcntq, vplzcntd, ↵Igor Breger2015-09-0313-160/+1726
| | | | | | | | | | vpconflictq, vpconflictd Added tests for intrinsics and encoding. Differential Revision: http://reviews.llvm.org/D11931 llvm-svn: 246750
* Tweak llvm/test/tools/gold/X86/parallel.ll to run with pthread-unaware ↵NAKAMURA Takumi2015-09-031-4/+1
| | | | | | | | | ld.gold on Linux. If ld.gold is configured without --enable-thread, ld.gold might not load libpthread.so. Preloading LLVMgold.so loads also libpthread.so. llvm-svn: 246739
* [MergeFuncs] Efficiently defer functions on mergeJF Bastien2015-09-021-28/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces a side table in Merge Functions to efficiently remove functions from the function set when functions they refer to are merged. Previously these functions would need to be compared lg(N) times to find the appropriate FunctionNode in the tree to defer. With the recent determinism changes, this comparison is more expensive. In addition, the removal function would not always actually remove the function from the set (i.e. after remove(F), there would sometimes still be a node in the tree which contains F). With these changes, these functions are properly deferred, and so more functions can be merged. In addition, when there are many merged functions (and thus more deferred functions), there is a speedup: chromium: 48678 merged -> 49380 merged; 6.58s -> 5.49s libxul.so: 41004 merged -> 41030 merged; 8.02s -> 6.94s mysqld: 1607 merged -> 1607 merged (same); 0.215s -> 0.212s (probably noise) Author: jrkoenig Reviewers: jfb, dschuff Subscribers: llvm-commits, nlewycky Differential revision: http://reviews.llvm.org/D12537 llvm-svn: 246735
* [libFuzzer] deprecate the -tokens flag. This was a bad idea because the ↵Kostya Serebryany2015-09-023-4/+5
| | | | | | corpus with this flag contains encrypted inputs, not the real inputs, which complicates interoperation with other fuzzers. Instead we'll need to implement AFL dictionary support llvm-svn: 246734
* [X86] Require 32-byte alignment for 32-byte VMOVNTs.Ahmed Bougacha2015-09-025-10/+27
| | | | | | | | | | | | | | | | We used to accept (and even test, and generate) 16-byte alignment for 32-byte nontemporal stores, but they require 32-byte alignment, per SDM. Found by inspection. Instead of hardcoding 16 in the patfrag, check for natural alignment. Also fix the autoupgrade and the various tests. Also, use explicit -mattr instead of -mcpu: I stared at the output several minutes wondering why I get 2x movntps for the unaligned case (which is the ideal output, but needs some work: see FIXME), until I remembered corei7-avx implies +slow-unaligned-mem-32. llvm-svn: 246733
* Add Myriad into enum VendorTypeDouglas Katzman2015-09-022-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D12540 llvm-svn: 246732
* [X86] Cleanup nontemporal tests a little. NFC.Ahmed Bougacha2015-09-022-11/+11
| | | | | Also: add a missing test for movntiq. llvm-svn: 246730
* IR: Remove an unused AssemblyWriter constructor. NFCJustin Bogner2015-09-021-29/+5
| | | | llvm-svn: 246729
* [libFuzzer] remove the section about '-tokens' as I am going to deprecate ↵Kostya Serebryany2015-09-021-23/+1
| | | | | | this option llvm-svn: 246728
* [RewriteStatepointsForGC] Delete stale comment [NFC]Philip Reames2015-09-021-3/+0
| | | | llvm-svn: 246722
* [RewriteStatepointsForGC] Pull a function out of anon namespace [NFC]Philip Reames2015-09-021-1/+5
| | | | | | Thanks to David Blaikie for noticing in previous commit. llvm-svn: 246721
* IR: Remove a redundant function. NFCJustin Bogner2015-09-022-11/+0
| | | | | | | Function::print isn't interestingly different from Value::print. Just let the only caller (in PrintCallGraphPass) call the Value version. llvm-svn: 246720
* [X86] Cleanup nontemporal fragments. NFCI.Ahmed Bougacha2015-09-021-15/+6
| | | | | | | | We can chain other fragments to avoid repeating conditions. This also fixes a potential bug (that realistically can't happen), where we would match indexed nontemporal stores for i32/i64. llvm-svn: 246719
* [RewriteStatepointsForGC] Bugfix for change 246133Philip Reames2015-09-021-16/+16
| | | | | | | | Fix a bug in change 246133. I didn't handle the case where we had a cycle in the use graph and could add an instruction we were about to erase back on to the worklist. Oddly, I have not been able to write a small test case for this, even with the AssertingVH added. I have confirmed the basic theory for the fix on a large failing example, but all attempts to reduce that to something appropriate for a test case have failed. Differential Revision: http://reviews.llvm.org/D12575 llvm-svn: 246718
* Fix release build warning for unused functionPhilip Reames2015-09-021-1/+2
| | | | llvm-svn: 246717
* [RewriteStatepointsForGC] Improve debug output [NFC]Philip Reames2015-09-022-30/+70
| | | | llvm-svn: 246713
* [PowerPC] Cleanup cost model for unaligned vector loads/storesHal Finkel2015-09-024-23/+1022
| | | | | | | | | | I'm adding a regression test to better cover code generation for unaligned vector loads and stores, but there's no functional change to the code generation here. There is an improvement to the cost model for unaligned vector loads and stores, mostly for QPX (for which we were not previously accounting for the permutation-based loads), and the cost model implementation is cleaner. llvm-svn: 246712
* Move twice-repeated clang path operation into a new function.Douglas Katzman2015-09-023-2/+26
| | | | | | And make it more robust in the edge case of exactly "./" as input. llvm-svn: 246711
* Small docs fixPiotr Padlewski2015-09-021-1/+1
| | | | | | http://reviews.llvm.org/D12572 llvm-svn: 246705
* [lit] Add basic flaky test retry functionalityReid Kleckner2015-09-023-2/+16
| | | | | | | | | | The plan is to use this for the sanitizer test suite on Windows. See PR24554 for more details on why we need this. Tested manually by injecting rand() into a sanitizer test and watching what it does. llvm-svn: 246704
* assuem(X) handling in GVN bugfixPiotr Padlewski2015-09-022-1/+60
| | | | | | | | | | There was infinite loop because it was trying to change assume(true) into assume(true) Also added handling when assume(false) appear http://reviews.llvm.org/D12516 llvm-svn: 246697
* Constant propagation after hitting assume(cmp) bugfixPiotr Padlewski2015-09-025-13/+71
| | | | | | | | | Last time code run into assertion `BBE.isSingleEdge()` in lib/IR/Dominators.cpp:200. http://reviews.llvm.org/D12170 llvm-svn: 246696
* Constant propagation after hiting llvm.assumePiotr Padlewski2015-09-022-3/+190
| | | | | | | | | | | After hitting @llvm.assume(X) we can: - propagate equality that X == true - if X is icmp/fcmp (with eq operation), and one of operand is constant we can change all variables with constants in the same BasicBlock http://reviews.llvm.org/D11918 llvm-svn: 246695
* [RemoveDuplicatePHINodes] Start over after removing a PHI.Benjamin Kramer2015-09-022-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes RemoveDuplicatePHINodes more effective and fixes an assertion failure. Triggering the assertions requires a DenseSet reallocation so this change only contains a constructive test. I'll explain the issue with a small example. In the following function there's a duplicate PHI, %4 and %5 are identical. When this is found the DenseSet in RemoveDuplicatePHINodes contains %2, %3 and %4. define void @F() { br label %1 ; <label>:1 ; preds = %1, %0 %2 = phi i32 [ 42, %0 ], [ %4, %1 ] %3 = phi i32 [ 42, %0 ], [ %5, %1 ] %4 = phi i32 [ 42, %0 ], [ 23, %1 ] %5 = phi i32 [ 42, %0 ], [ 23, %1 ] br label %1 } after RemoveDuplicatePHINodes runs the function looks like this. %3 has changed and is now identical to %2, but RemoveDuplicatePHINodes never saw this. define void @F() { br label %1 ; <label>:1 ; preds = %1, %0 %2 = phi i32 [ 42, %0 ], [ %4, %1 ] %3 = phi i32 [ 42, %0 ], [ %4, %1 ] %4 = phi i32 [ 42, %0 ], [ 23, %1 ] br label %1 } If the DenseSet does a reallocation now it will reinsert all keys and stumble over %3 now having a different hash value than it had when inserted into the map for the first time. This change clears the set whenever a PHI is deleted and starts the progress from the beginning, allowing %3 to be deleted and avoiding inconsistent DenseSet state. This potentially has a negative performance impact because it rescans all PHIs, but I don't think that this ever makes a difference in practice. llvm-svn: 246694
* fix underlineSanjay Patel2015-09-021-1/+1
| | | | llvm-svn: 246693
* use "unpredictable" metadata in fast-isel when splitting comparesSanjay Patel2015-09-022-1/+56
| | | | | | | | This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch. Differential Revision: http://reviews.llvm.org/D12342 llvm-svn: 246692
* use "unpredictable" metadata in SelectionDAG when splitting comparesSanjay Patel2015-09-022-6/+33
| | | | | | | | This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch. Differential Revision: http://reviews.llvm.org/D12343 llvm-svn: 246691
* [libFuzzer] honour -only_ascii=1 when reading the initial corpus. Also, ↵Kostya Serebryany2015-09-023-5/+10
| | | | | | remove ugly #ifdef llvm-svn: 246689
* add unpredictable metadata type for control flowSanjay Patel2015-09-026-8/+37
| | | | | | | | | | | | | | | This patch defines 'unpredictable' metadata. This metadata can be used to signal to the optimizer or backend that a branch or switch is unpredictable, and therefore, it's probably better to not split a compound predicate into multiple branches such as in CodeGenPrepare::splitBranchCondition(). This was discussed in: https://llvm.org/bugs/show_bug.cgi?id=23827 Dependent patches to alter codegen and expose this in clang to follow. Differential Revision; http://reviews.llvm.org/D12341 llvm-svn: 246688
* [AArch64] More consistently separate asm opc and operands with '\t'.Ahmed Bougacha2015-09-021-30/+30
| | | | | | Somehow missed these in r246686. llvm-svn: 246687
* [AArch64] Consistently separate asm opc and operands with '\t'.Ahmed Bougacha2015-09-021-17/+17
| | | | | | | | Some of the instructions use ' ', which drives OCD-me nuts. Let's put an end to this. NFC-ish: hopefully nobody cares about whitespace. llvm-svn: 246686
* test: Only warn about missing substitutions for required toolsJustin Bogner2015-09-021-25/+40
| | | | | | | | | | | | | Every time lit is invoked, I get warnings like so: lit.py: lit.cfg:286: note: Did not find llvm-go in /Users/bogner/build/llvm/./bin lit.py: lit.cfg:286: note: Did not find Kaleidoscope-Ch3 in /Users/bogner/build/llvm/./bin Since these tools are only built in certain configs, these warnings are superfluous. Change it so that we only warn about tools that are built in all configs. llvm-svn: 246684
* IR: Invert a condition to make it more legible. NFCJustin Bogner2015-09-021-18/+16
| | | | | | Also updates the style to more modern conventions. llvm-svn: 246681
* [ValueTracking] Minor comment change in testJames Molloy2015-09-021-2/+1
| | | | | | This test was updated in r246678 - fix a copypasta in a comment noticed post-commit. llvm-svn: 246679
* [ValueTracking] Look through casts when both operands are casts.James Molloy2015-09-022-5/+59
| | | | | | | | | | | We only looked through casts when one operand was a constant. We can also look through casts when both operands are non-constant, but both are in fact the same cast type. For example: %1 = icmp ult i8 %a, %b %2 = zext i8 %a to i32 %3 = zext i8 %b to i32 %4 = select i1 %1, i32 %2, i32 %3 llvm-svn: 246678
* [llvm-reaodbj] Simplify code. No functional change (intended).Davide Italiano2015-09-021-24/+8
| | | | llvm-svn: 246676
* [PowerPC] Don't always consider P8Altivec-only masks in LowerVECTOR_SHUFFLEHal Finkel2015-09-022-6/+36
| | | | | | | | | | | LowerVECTOR_SHUFFLE needs to decide whether to pass a vector shuffle off to the TableGen-generated matching code, and it does this by testing the same predicates used by the TableGen files. Unfortunately, when we added new P8Altivec-only predicates, we started universally testing them in LowerVECTOR_SHUFFLE, and if then matched when targeting a system prior to a P8, we'd end up with a selection failure. llvm-svn: 246675
* Reapply r246012 [dsymutil] Emit real dSYM companion binaries.Frederic Riss2015-09-025-3/+778
| | | | | | | | | | | | | | | | | | | | | | | With a fix for big endian machines. Thanks to Daniel Sanders for the debugging! Original commit message: The binaries containing the linked DWARF generated by dsymutil are not standard relocatable object files like emitted did previsously. They should be dSYM companion files, which means they have a different file type in the header, but also a couple other peculiarities: - they contain the segments and sections from the original binary in their load commands, but not the actual contents. This means they get an address and a size, but their offset is always 0 (but these are not virtual sections) - they also conatin all the defined symbols from the original binary This makes MC a really bad fit to emit these kind of binaries. The approach that was used in this patch is to leverage MC's section layout for the debug sections, but to use a replacement for MachObjectWriter that lives in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter were reused too. llvm-svn: 246673
OpenPOWER on IntegriCloud