summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[Assembler] Enable nicer diagnostics for inline assembly."Diana Picus2017-02-083-47/+42
| | | | | | This reverts commit r294433 because it seems it broke the buildbots. llvm-svn: 294448
* Revert r294356, "DebugInfo: Track spilled variables in LiveDebugValues"NAKAMURA Takumi2017-02-081-137/+7
| | | | | | | | | | | | | | It caused undefined behavior in VarLoc. As far as I investigated, - VarLoc::VarLoc() treats negative offset value as InvalidKind. Consider the case that (int64_t)MI.getOperand(1).getImm() is negative and whether it satisfies ((uint64_t)Offset < (1ULL << 32)). - Comparison operators in VarLoc behave undefined since VarLoc::Loc.Hash is uninitialized in case of InvalidKind. I guess Offset (in VarLoc) could be made aware of signed, but I am not sure. So I have reverted it for now. llvm-svn: 294447
* [AMDGPU][NFC] De-tabifyKonstantin Zhuravlyov2017-02-081-1/+1
| | | | llvm-svn: 294445
* [ARM] GlobalISel: Add FPR reg bankDiana Picus2017-02-084-2/+30
| | | | | | | | | | | | | Add a register bank for floating point values and select simple instructions using them (add, copies from GPR). This assumes that the hardware can cope with a single precision add (VADDS) instruction, so the legalizer will treat G_FADD as legal and the instruction selector will refuse to select if the hardware doesn't support it. In the future we'll want to be more careful about this, and legalize to libcalls if we have to use soft float. llvm-svn: 294442
* [AMDGPU] Distinguish between S/VGPR allocation and encoding granularitiesKonstantin Zhuravlyov2017-02-082-4/+16
| | | | | | Differential Revision: https://reviews.llvm.org/D29633 llvm-svn: 294441
* [AMDGPU] Move register related queries to subtarget classKonstantin Zhuravlyov2017-02-087-315/+299
| | | | | | Differential Revision: https://reviews.llvm.org/D29318 llvm-svn: 294440
* [AArch64][TableGen] Skip tied result operands for InstAliasAmara Emerson2017-02-081-16/+16
| | | | | | | | | | | | | | | | | | | | | | | This patch checks the number of operands in the resulting instruction instead of just the alias, then skips over tied operands when generating the printing method. This allows us to generate the preferred assembly syntax for the AArch64 'ins' instruction, which should always be displayed as 'mov' according to the ARMARM. Several unit tests have changed as a result, but only to reflect the preferred disassembly. Some other InstAlias patterns (movk/bic/orr) needed a slight adjustment to stop them becoming the default and breaking other unit tests. Patch by Graham Hunter. Differential Revision: https://reviews.llvm.org/D29219 llvm-svn: 294437
* [Assembler] Enable nicer diagnostics for inline assembly.Sanne Wouda2017-02-083-42/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enables source location in diagnostic messages from the backend. This is after parsing, during finalization. This requires the SourceMgr, the inline assembly string buffer, and DiagInfo to still be alive after EmitInlineAsm returns. This patch creates a single SourceMgr for inline assembly inside the AsmPrinter. MCContext gets a pointer to this SourceMgr. Using one SourceMgr per call to EmitInlineAsm would make it difficult for MCContext to figure out in which SourceMgr the SMLoc is located, while a single SourceMgr can figure it out if it has multiple buffers. The Str argument to EmitInlineAsm is copied into a buffer and owned by the inline asm SourceMgr. This ensures that DiagHandlers won't print garbage. (Clang emits a "note: instantiated into assembly here", which refers to this string.) The AsmParser gets destroyed before finalization, which means that the DiagHandlers the AsmParser installs into the SourceMgr will be stale. Restore the saved DiagHandlers. Since now we're using just one SourceMgr for multiple inline asm strings, we need to tell the AsmParser which buffer it needs to parse currently. Hand a buffer id -- returned from SourceMgr:: AddNewSourceBuffer -- to the AsmParser. Reviewers: rnk, grosbach, compnerd, rengolin, rovka, anemet Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29441 llvm-svn: 294433
* [AVR] Add missing #includesDylan McKay2017-02-082-0/+3
| | | | | | | A previous change seems to have remove #includes from header files. This fixes the build. llvm-svn: 294427
* TargetLowering: Remove AddrSpace parameter from GetAddrModeArgumentsMatt Arsenault2017-02-081-7/+6
| | | | | | | It doesn't make any sense to pass in to what is supposed to be parsing the call, and this can be inferred from the pointer output. llvm-svn: 294412
* LSR: Check atomic instruction pointer operandsMatt Arsenault2017-02-081-1/+11
| | | | llvm-svn: 294410
* AMDGPU: Enable InferAddressSpacesMatt Arsenault2017-02-081-0/+1
| | | | llvm-svn: 294408
* [X86] Add test for clflushopt intrinsic and only enable it to be selected if ↵Craig Topper2017-02-082-0/+3
| | | | | | the feature flag is set. llvm-svn: 294407
* [X86] Remove the VMFUNC feature flag. It was only partially implemented and ↵Craig Topper2017-02-082-6/+0
| | | | | | | | we have no support for codegening vmfunc instructions today. If that support ever gets added, the full feature flag support should come along with it. llvm-svn: 294406
* [X86] Remove PCOMMIT instruction support since Intel has deprecated this ↵Craig Topper2017-02-084-8/+0
| | | | | | | | instruction with no plans to release products with it. Intel's documentation for the deprecation https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction llvm-svn: 294405
* Move mnemonicIsValid to Mips target.Craig Topper2017-02-081-0/+14
| | | | | | | | | | | | | | | | | | | | Summary: The Mips target is the only user of mnemonicIsValid. This patch moves this method from AsmMatcherEmitter.cpp to MipsAsmParser.cpp, getting rid of the method in all other targets where it generated warnings about an unused function. Patch by Gonsolo. Reviewers: craig.topper Reviewed By: craig.topper Subscribers: sdardis Differential Revision: https://reviews.llvm.org/D28748 llvm-svn: 294400
* Revert "CVP: Make CVP iterate in an order that maximizes reuse of LVI cache"Daniel Berlin2017-02-081-5/+6
| | | | | | This reverts commit r294398, it seems to be failing on the bots. llvm-svn: 294399
* CVP: Make CVP iterate in an order that maximizes reuse of LVI cacheDaniel Berlin2017-02-081-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After the DFS order change for LVI, i have a few testcases that now take forever. The TL;DR - This is mainly due to the overdefined cache, but that requires predicateinfo to fix[1] In order to maximize reuse of the LVI cache for now, change the order we iterate in. This reduces my testcase from 5 minutes to 4 seconds. I have verified cases like gmic do not get slower. I am playing with whether the order should be postorder or idf. [1] In practice, overdefined anywhere should be overdefined everywhere, so this cache should be global. That also fixes this bug. The problem, however, is that LVI relies on this cache being filled in per-block because it wants different values in different blocks due to precisely the naming issue that predicateinfo fixes. With predicateinfo, making the cache global works fine on individual passes, and also resolves this issue. Reviewers: davide, sanjoy, chandlerc Subscribers: llvm-commits, djasper Differential Revision: https://reviews.llvm.org/D29679 llvm-svn: 294398
* [DAGCombiner] Push truncate through adde when the carry isn't used.Amaury Sechet2017-02-081-0/+12
| | | | | | | | | | | | Summary: As per title. Reviewers: mkuper, spatel, bkramer, RKSimon, zvi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29528 llvm-svn: 294394
* [libFuzzer] Use long long to ensure 64 bits.Marcos Pividori2017-02-083-3/+3
| | | | | | | | | | We should always use unsigned long long to ensure 64 bits. On Windows, unsigned long is 4 bytes. This was the reason why value-profile-cmp4.test was failing on Windows. Differential Revision: https://reviews.llvm.org/D29617 llvm-svn: 294390
* [libFuzzer] Use custom target instead of list of binaries for tests.Marcos Pividori2017-02-084-16/+8
| | | | | | | | | | Update cmake to use a custom target TestBinaries instead of a list of targets. This simplifies cmake, and fix some errors. This way, we don't have to propagate the values into parents directories. We only need to use add_dependencies. Differential Revision: https://reviews.llvm.org/D29593 llvm-svn: 294389
* [libFuzzer] Properly use Handle instead of FD on Windows.Marcos Pividori2017-02-084-1/+12
| | | | | | | | | | | For Windows, sanitizers work with Handles, not with posix file descriptors, because they use the windows-specific API. So we need to convert the fds to handles before passing them to the sanitizer library. After this change, close_fd_mask is fixed for Windows (this fix some tests too). Differential Revision: https://reviews.llvm.org/D29548 llvm-svn: 294388
* [libFuzzer] Change Uninstrumented test name.Marcos Pividori2017-02-083-2/+2
| | | | | | | | | On Windows, executables with the word "uninst" included in their names are associated with administrator privileges. Differential Revision: https://reviews.llvm.org/D29549 llvm-svn: 294387
* [libFuzzer] fuzzer-jobs requires posix.Marcos Pividori2017-02-081-0/+2
| | | | llvm-svn: 294386
* [libFuzzer] Update fuzzer.test to properly set environment variables.Marcos Pividori2017-02-081-1/+1
| | | | | | | | Use env to set environment variables, so it works on Windows and Linux. Differential Revision: https://reviews.llvm.org/D29537 llvm-svn: 294385
* [libFuzzer] Don't add newline character when using echo in tests.Marcos Pividori2017-02-082-3/+3
| | | | | | | | | Add the option "-n", so we don't add a new line character at the end of the file when using echo. (on Windows this means 2 characters). Differential Revision: https://reviews.llvm.org/D29536 llvm-svn: 294384
* [libFuzzer] Disable ulimit test on windows.Marcos Pividori2017-02-081-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29535 llvm-svn: 294383
* [libFuzzer] Remove ? wildcard on tests.Marcos Pividori2017-02-081-7/+10
| | | | | | | | We can not use the wildcard ? on Windows. Differential Revision: https://reviews.llvm.org/D29534 llvm-svn: 294382
* [libFuzzer] Update fuzzer-segv to set environment variables.Marcos Pividori2017-02-081-1/+1
| | | | | | | | Use env to set environment variables, so it works on Linux and Windows. Differential Revision: https://reviews.llvm.org/D29533 llvm-svn: 294381
* [libFuzzer] Properly configure tests for Windows.Marcos Pividori2017-02-081-0/+17
| | | | | | | | | | This configuration is necessary, and is included in all tests suites. We need to execute: `config.test_format = lit.formats.ShTest(False)` Otherwise, lit will try to use bash, which generates many problems. Differential Revision: https://reviews.llvm.org/D29529 llvm-svn: 294380
* [libFuzzer] Simplify dump_coverage test.Marcos Pividori2017-02-081-11/+7
| | | | | | | | | | Environment variables are handled differently on Windows. In this case it is not necessary to use environment variables. So, I simplify the test to work on Windows. Differential Revision: https://reviews.llvm.org/D29532 llvm-svn: 294379
* [libFuzzer] Update Load test to work on 32 bits.Marcos Pividori2017-02-081-1/+1
| | | | | | | | | | We should ensure the size of the variable `a` is 8 bytes. Otherwise, this generates a stack buffer overflow inside the memcpy call in 32 bits machines. (We write more bytes than the size of a, when it is 4 bytes) Differential Revision: https://reviews.llvm.org/D29602 llvm-svn: 294378
* [libFuzzer] Update test to consider different exceptions.Marcos Pividori2017-02-082-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29531 llvm-svn: 294377
* [libFuzzer] Temporarily fix Shmem for Windows.Marcos Pividori2017-02-082-0/+65
| | | | | | | | | In this diff, I add stubs for shared memory on Windows. Now we can compile and use libFuzzer without support for shared memory. Differential Revision: https://reviews.llvm.org/D29544 llvm-svn: 294376
* [IRCE] Add a missing invariant checkSanjoy Das2017-02-071-5/+39
| | | | | | | | | | | | | | | | | | | | | | | Currently IRCE relies on the loops it transforms to be (semantically) of the form: for (i = START; i < END; i++) ... or for (i = START; i > END; i--) ... However, we were not verifying the presence of the START < END entry check (i.e. check before the first iteration). We were only verifying that the backedge was guarded by (i + 1) < END. Usually this would work "fine" since (especially in Java) most loops do actually have the START < END check, but of course that is not guaranteed. llvm-svn: 294375
* [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-02-0713-120/+190
| | | | | | minor fixes (NFC). llvm-svn: 294369
* [PowerPC] Fix some Include What You Use warnings; other minor fixes (NFC).Eugene Zelenko2017-02-071-3/+11
| | | | | | This is preparation to reduce MC headers dependencies. llvm-svn: 294368
* [libFuzzer] replace std::random_shuffle with std::shuffle as ↵Kostya Serebryany2017-02-074-10/+7
| | | | | | std::random_shuffle is being deprecated in C++17. Also simplify fuzzer::Random. NFC llvm-svn: 294366
* PredicateInfo: Some compilers are unhappy with naming Use *'s Use. Change ↵Daniel Berlin2017-02-071-13/+13
| | | | | | the name. llvm-svn: 294364
* DebugInfo: Track spilled variables in LiveDebugValuesWolfgang Pieb2017-02-071-7/+137
| | | | | | | | | | | | | When variables are spilled to the stack by the register allocator, keep track of their debug locations in LiveDebugValues and insert DBG_VALUE instructions at the appropriate place. Ensure that the locations are propagated down the dominator tree via the existing mechanisms. Reviewer: aprantl Differential Revision: https://reviews.llvm.org/D29500 llvm-svn: 294356
* Fix a typo in an error message for a check of invalid Mach-O files whereKevin Enderby2017-02-071-1/+1
| | | | | | | | | | | | it was printing the field name fileoff instead of filesize. The original check was added in r278557. This was found in tracking down the problem that lead to the fix in r293842 - [dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade path rdar://30386075 llvm-svn: 294354
* Add PredicateInfo utility and printing passDaniel Berlin2017-02-074-0/+643
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a utility to build extended SSA (see "ABCD: eliminating array bounds checks on demand"), and an intrinsic to support it. This is then used to get functionality equivalent to propagateEquality in GVN, in NewGVN (without having to replace instructions as we go). It would work similarly in SCCP or other passes. This has been talked about a few times, so i built a real implementation and tried to productionize it. Copies are inserted for operands used in assumes and conditional branches that are based on comparisons (see below for more) Every use affected by the predicate is renamed to the appropriate intrinsic result. E.g. %cmp = icmp eq i32 %x, 50 br i1 %cmp, label %true, label %false true: ret i32 %x false: ret i32 1 will become %cmp = icmp eq i32, %x, 50 br i1 %cmp, label %true, label %false true: ; Has predicate info ; branch predicate info { TrueEdge: 1 Comparison: %cmp = icmp eq i32 %x, 50 } %x.0 = call @llvm.ssa_copy.i32(i32 %x) ret i32 %x.0 false: ret i23 1 (you can use -print-predicateinfo to get an annotated-with-predicateinfo dump) This enables us to easily determine what operations are affected by a given predicate, and how operations affected by a chain of predicates. Reviewers: davide, sanjoy Subscribers: mgorny, llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D29519 Update for review comments Fix a bug Nuno noticed where we are giving information about and/or on edges where the info is not useful and easy to use wrong Update for review comments llvm-svn: 294351
* [X86] Disable conditional tail calls (PR31257)Hans Wennborg2017-02-076-182/+2
| | | | | | | | | They are currently modelled incorrectly (as calls, which clobber registers, confusing e.g. Machine Copy Propagation). Reverting until we figure out the proper solution. llvm-svn: 294348
* GlobalISel: translate @llvm.va_end intrinsic.Tim Northover2017-02-071-0/+4
| | | | | | | Turns out no-one actually cares about this one (at least) in tree so we can just drop it entirely. llvm-svn: 294345
* [x86] improve comments for SHRUNKBLEND node creation; NFCSanjay Patel2017-02-072-28/+27
| | | | llvm-svn: 294344
* [ImplicitNullCheck] Extend Implicit Null Check scope by using storesSanjoy Das2017-02-074-67/+102
| | | | | | | | | | | | | | | | | | | | | Summary: This change allows usage of store instruction for implicit null check. Memory Aliasing Analisys is not used and change conservatively supposes that any store and load may access the same memory. As a result re-ordering of store-store, store-load and load-store is prohibited. Patch by Serguei Katkov! Reviewers: reames, sanjoy Reviewed By: sanjoy Subscribers: atrick, llvm-commits Differential Revision: https://reviews.llvm.org/D29400 llvm-svn: 294338
* [x86] use range-for loops; NFCISanjay Patel2017-02-071-8/+6
| | | | llvm-svn: 294337
* [x86] use getSignBit() for clarity; NFCISanjay Patel2017-02-071-4/+3
| | | | llvm-svn: 294333
* Fix the -Werror build for some sign-comparisonsDavid Blaikie2017-02-071-1/+1
| | | | llvm-svn: 294331
* [PowerPC][Altivec] Add vnot extended mnemonicNemanja Ivanovic2017-02-071-0/+1
| | | | | | | | | | Adds the vnot extended mnemonic for the vnor instruction. Committing on behalf of brunoalr (Bruno Rosa). Differential Revision: https://reviews.llvm.org/D29225 llvm-svn: 294330
OpenPOWER on IntegriCloud