summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add __builtin_unpredictable and convert to metadataSanjay Patel2015-09-026-3/+93
| | | | | | | | | | | | | | | | | | | | | | | This patch depends on r246688 (D12341). The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details): int foo(); int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; } int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; } Differential Revision: http://reviews.llvm.org/D12458 llvm-svn: 246699
* Updating the code owners list.Aaron Ballman2015-09-021-3/+11
| | | | llvm-svn: 246698
* 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
* When redirecting stdio, use FILE_SHARE_DELETE.Zachary Turner2015-09-021-1/+1
| | | | | | | | | | Some tests were failing because the test would try to delete the file before inferior had exited, but on Windows this will fail by default unless you specify FILE_SHARE_DELETE when opening the file. Can't think of a good reason not to do this, so here it is. llvm-svn: 246682
* 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
* [modules] Don't waste time reading in the names the module file writer gave ↵Richard Smith2015-09-021-7/+1
| | | | | | to blocks. We don't need these names, and decoding the corresponding bitcode has a significant cost. llvm-svn: 246680
* [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
* Added a skeleton plugin for the Clang expression parser, so I can start ↵Sean Callanan2015-09-021-0/+8
| | | | | | factoring stuff into it. llvm-svn: 246677
* [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
* Added an ExpressionParser plugin skeleton with nothing in it (yet).Sean Callanan2015-09-021-10/+18
| | | | llvm-svn: 246674
* 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
* Try to fix FreeBSD build.Zachary Turner2015-09-022-15/+15
| | | | llvm-svn: 246672
* Change Windows XFAIL comment for TestCompletion.pyZachary Turner2015-09-021-33/+32
| | | | | | | | | | Instead of fixing these tests by finding a pexpect replacement, this set of tests can be fixed by re-writing the test to not use pexpect. llvm.org/pr24679 llvm-svn: 246671
* XFAIL tests on Windows that are failing to resolve breakpoints.Zachary Turner2015-09-024-0/+8
| | | | | | llvm.org/pr24668 llvm-svn: 246670
* [Windows] XFAIL test that depend on dynamic value types.Zachary Turner2015-09-022-1/+4
| | | | llvm-svn: 246669
* XFAIL test_thread_state_after_continue on Windows.Zachary Turner2015-09-021-1/+3
| | | | | | https://llvm.org/pr24660 llvm-svn: 246668
* Removed comments that suggested that asserts in the ClangASTImporter should beSean Callanan2015-09-021-2/+2
| | | | | | | debug-only. This is not the case; when they fire we are about to crash or do something horrible anyway, so they should stay in. llvm-svn: 246667
* Improved logging for deported types in the ClangASTImporter.Sean Callanan2015-09-021-2/+10
| | | | llvm-svn: 246666
* [llvm-readobj] MachO: Dump segment command.Davide Italiano2015-09-023-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O arm Arch: arm AddressSize: 32bit Segment { Cmd: LC_SEGMENT Name: Size: 260 vmaddr: 0x0 vmsize: 0x10 fileoff: 408 filesize: 408 maxprot: rwx initprot: rwx nsects: 3 flags: 0x0 } Differential Revision: http://reviews.llvm.org/D12542 llvm-svn: 246665
* MCAssembler.h: Prune unused \param since r246604. [-Wdocumentation]NAKAMURA Takumi2015-09-021-2/+0
| | | | llvm-svn: 246664
* Disable clang-tidy Google checkers when not compiling in C++ mode. None of ↵Aaron Ballman2015-09-027-11/+32
| | | | | | the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246663
* Remove an allocator which was used for just one allocation.Rafael Espindola2015-09-023-8/+5
| | | | llvm-svn: 246662
* Disable clang-tidy readability checkers when not compiling in C++ mode. None ↵Aaron Ballman2015-09-024-1/+19
| | | | | | of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246661
* Move some more functionality into the AST consumer creation factory ↵Aaron Ballman2015-09-021-3/+6
| | | | | | function, before registering matchers with the MatchFinder object. This allows us to set the language options for the ClangTidyContext object appropriately so that they can be used from registerMatchers(), and more closely models the way the clang-tidy tool works. llvm-svn: 246660
* [MS ABI] Number unnamed TagDecls which aren't externally visibleDavid Majnemer2015-09-022-1/+19
| | | | | | | | | | | | TagDecls (structs, enums, etc.) may have the same name for linkage purposes of one another; to disambiguate, we add a number to the mangled named. However, we didn't do this if the TagDecl has a pseudo-name for linkage purposes (it was defined alongside a DeclaratorDecl or a TypeNameDecl). This fixes PR24651. llvm-svn: 246659
* [x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accessesSanjay Patel2015-09-023-34/+32
| | | | | | | | | | | | | | | | | This is a continuation of the fix from: http://reviews.llvm.org/D10662 and discussion in: http://reviews.llvm.org/D12154 Here, we distinguish slow unaligned SSE (128-bit) accesses from slow unaligned scalar (64-bit and under) accesses. Other lowering (eg, getOptimalMemOpType) assumes that unaligned scalar accesses are always ok, so this changes allowsMisalignedMemoryAccesses() to match that behavior. Differential Revision: http://reviews.llvm.org/D12543 llvm-svn: 246658
* [OpenMP] Make helper functoin static. NFC.Benjamin Kramer2015-09-021-1/+1
| | | | llvm-svn: 246657
* Pass a symbol table to getRelocationSymbol instead of returning one.Rafael Espindola2015-09-024-45/+50
| | | | | | | This removes a report_fatal_error from library and avoids checking a section property for every section entry. llvm-svn: 246656
* Fix loop-convert crash.Angel Garcia Gomez2015-09-022-1/+15
| | | | | | | | | | | | Summary: loop-convert no longer crashes when calling a member function using a member pointer which is a member of another record. Reviewers: alexfh, klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D12555 llvm-svn: 246655
* [X86][AVX512VLBW] add support in byte shift and SADAsaf Badouh2015-09-0210-8/+596
| | | | | | | | | add byte shift left/right add SAD - compute sum of absolute differences Differential Revision: http://reviews.llvm.org/D12479 llvm-svn: 246654
* Add newline to test. NFC.Chad Rosier2015-09-021-1/+1
| | | | llvm-svn: 246653
* [Shave]: pass through more clang options to moviCompileDouglas Katzman2015-09-022-4/+5
| | | | llvm-svn: 246652
* [TableGen] Allow TokenTy in intrinsic signaturesJoseph Tremoulet2015-09-029-34/+51
| | | | | | | | | | | | | | | | | Summary: Add the necessary plumbing so that llvm_token_ty can be used as an argument/return type in intrinsic definitions and correspondingly require TokenTy in function types. TokenTy is an opaque type that has no target lowering, but can be used in machine-independent intrinsics. It is required for the upcoming llvm.eh.padparam intrinsic. Reviewers: majnemer, rnk Subscribers: stoklund, llvm-commits Differential Revision: http://reviews.llvm.org/D12532 llvm-svn: 246651
* [Sparc]: GCCInstallationDetector should not care if little-endianDouglas Katzman2015-09-021-1/+1
| | | | llvm-svn: 246650
* Only create alternative thumb disassembler if the main one is armTamas Berghammer2015-09-021-2/+2
| | | | | | | | This fixes a regression caused by r245645 where creating alternative thumb disassembler was enabled even when the main disassembler is already thumb. llvm-svn: 246649
* Fix arm disassambler with specifying armv8.1a architectureTamas Berghammer2015-09-021-10/+18
| | | | | | | | | | | | | | | If no architecture is defined for the disassambler command then it uses the architecture of the target. In case of arm it will be "arm" what is treated as the oldest arm version by the LLVM disassambler causing a lot of invalid opcode in the output. This change forces the use of "armv8.1a" (the newest arm architecture) if no sub architecure was specified (either by the user or by the target) to disassamble all instruction. Differential revision: http://reviews.llvm.org/D12553 llvm-svn: 246648
* Enable a couple of tests in TestExitDuringStep on linuxPavel Labath2015-09-021-2/+0
| | | | | | tests have been reliably passing at least the last 100 runs of the build bot. llvm-svn: 246647
OpenPOWER on IntegriCloud