summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IR] Add range accessors for the indices of a GEP instruction.Chandler Carruth2017-02-282-0/+43
| | | | | | | These were noticed as missing in a code review. Add them and the boring unit test to make sure they compile and DTRT. llvm-svn: 296444
* Fix Win bots.Vassil Vassilev2017-02-281-2/+2
| | | | llvm-svn: 296443
* Allow externally dlopen-ed libraries to be registered as permanent libraries.Vassil Vassilev2017-02-283-13/+65
| | | | | | | | | | This is also useful in cases when llvm is in a shared library. First we dlopen the llvm shared library and then we register it as a permanent library in order to keep the JIT and other services working. Patch reviewed by Vedant Kumar (D29955)! llvm-svn: 296442
* Update isl to isl-0.18-304-g1efe43dTobias Grosser2017-02-288-365/+15
| | | | | | This is a normal maintenance update. llvm-svn: 296441
* [ImplicitNullCheck] Add alias analysis usageSanjoy Das2017-02-282-31/+169
| | | | | | | | | | | | | | | | | | | Summary: With this change ImplicitNullCheck optimization uses alias analysis and can use load/store memory access for implicit null check if there are other load/store before but memory accesses do not alias. Patch by Serguei Katkov! Reviewers: sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30331 llvm-svn: 296440
* Refactor {Gnu,}HashTableSection classes.Rui Ueyama2017-02-282-26/+31
| | | | | | | | | | | In other places in LLD, we use write32<E> instead of Elf_Word. This patch uses the same technique in the hash table classes. The hash table classes needs improving as they have almost no comments. We at least need to describe the hash table structure and why we have to support two different on-disk hash tables for the same purpose. I'll do that later. llvm-svn: 296439
* Empty line. NFCIXin Tong2017-02-281-1/+0
| | | | llvm-svn: 296438
* Remove unused typedefs.Rui Ueyama2017-02-281-3/+1
| | | | llvm-svn: 296437
* Remove useless assignments.Rui Ueyama2017-02-281-10/+7
| | | | | | These assignments seem meaningful, but actually all tests pass without them. llvm-svn: 296436
* Merge SymbolTableSection::add{Global,Local} into one function.Rui Ueyama2017-02-283-13/+11
| | | | | | | | Previously, these two functions put their symbols in different queues. Now that the queues have been merged. So there's no point to keep two separate functions. llvm-svn: 296435
* Return early. NFC.Rui Ueyama2017-02-281-0/+1
| | | | llvm-svn: 296434
* Move SymbolTableSection::getOutputSection to SymbolBody::getOutputSection.Rui Ueyama2017-02-285-34/+37
| | | | | | | | | That function doesn't use any member of SymbolTableSection, so I couldn't see a reason to make it a member of that class. The function takes a SymbolBody, so it is more natural to make it a member of SymbolBody. llvm-svn: 296433
* [LoopUnswitch] Common pushing LIC's user to worklist.Xin Tong2017-02-281-4/+2
| | | | llvm-svn: 296432
* Simplify SymbolTableSection<ELFT>::finalizeContents().Rui Ueyama2017-02-281-26/+27
| | | | | | | | | Previously, there were three conditions: .symtab, .dynsym or we are producing a relocatable output. Turned out that the third condition is the same as the first one. This patch removes that third condition and simplify code. llvm-svn: 296431
* Set ABIs correctly for OpenBSD/arm; soft float and aapcs-linux.Brad Smith2017-02-285-0/+17
| | | | llvm-svn: 296430
* Add Triple::thumb to getBitcodeMachineKindSean Silva2017-02-281-0/+1
| | | | | | | | | | | | We really need to find a way to get this info from a single point of truth in the LLVM backend, but it seems that the EM_* constants are buried deep inside the constructors of the MCAsmBackend's. For now, just fill in entries as we run into cases. AFAIK these mappings are largely immutable, so we get a 75% discount on the technical debt (code is duplicated, but little chance of divergence). llvm-svn: 296429
* Revert r296419 since the strings appear to need some tweaking.Filipe Cabecinhas2017-02-282-41/+0
| | | | llvm-svn: 296428
* Add a comment to describe purpose of signal-filtering testEugene Zemtsov2017-02-281-0/+2
| | | | llvm-svn: 296427
* Revert "Add MIR-level outlining pass"Matthias Braun2017-02-2811-1755/+0
| | | | | | | | Revert Machine Outliner for now, as it breaks the asan bot. This reverts commit r296418. llvm-svn: 296426
* This script was meant to be committed with the DebugCounter changes.Daniel Berlin2017-02-281-0/+75
| | | | llvm-svn: 296425
* [non-executable-pc.cpp] Try to fix clang-ppc64be buildbot.Filipe Cabecinhas2017-02-281-1/+1
| | | | llvm-svn: 296424
* Improve SymbolTableSection synthetic section.Rui Ueyama2017-02-282-73/+46
| | | | | | | | | | | | | | | | | The previous code was a bit hard to understand because it unnecessarily distinguished local and non-local symbols. It had NumLocals member variable, but that variable didn't have a number of local symbols but had some value that I cannot describe easily. This patch rewrites SynbolTableSection::finalizeContents and SymbolTableSection::writeTo to make it easy to understand. NumLocals member variable has been removed, and writeGlobalSymbols and writeLocalSymbols have been merged into one function. There's still a piece of code that I think unnecessary. I'm not removing that code in this patch, but will do in a follow-up patch. llvm-svn: 296423
* Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-02-28408-632/+755
| | | | | | | | multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
* [docs] Fix a think-o in the Programmer's Manual.Lang Hames2017-02-281-1/+1
| | | | llvm-svn: 296421
* Add test case for usubo combine. NFC.Amaury Sechet2017-02-281-0/+57
| | | | llvm-svn: 296420
* [asan] Print a "PC is at a non-executable memory region" message if that's ↵Filipe Cabecinhas2017-02-282-0/+41
| | | | | | | | | | | | | | the case Summary: Points the user to look at function pointer assignments. Reviewers: kcc, eugenis, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30432 llvm-svn: 296419
* Add MIR-level outlining passMatthias Braun2017-02-2811-0/+1755
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a patch for the outliner described in the RFC at: http://lists.llvm.org/pipermail/llvm-dev/2016-August/104170.html The outliner is a code-size reduction pass which works by finding repeated sequences of instructions in a program, and replacing them with calls to functions. This is useful to people working in low-memory environments, where sacrificing performance for space is acceptable. This adds an interprocedural outliner directly before printing assembly. For reference on how this would work, this patch also includes X86 target hooks and an X86 test. The outliner is run like so: clang -mno-red-zone -mllvm -enable-machine-outliner file.c Patch by Jessica Paquette<jpaquette@apple.com>! rdar://29166825 Differential Revision: https://reviews.llvm.org/D26872 llvm-svn: 296418
* Add test case for computing known bits of substraction operations. NFCAmaury Sechet2017-02-281-0/+53
| | | | llvm-svn: 296417
* [CGP] Split some critical edges coming out of indirect branchesMichael Kuperstein2017-02-285-13/+477
| | | | | | | | | | | | | | | | | | | | | | Splitting critical edges when one of the source edges is an indirectbr is hard in general (because it requires changing the memory the indirectbr reads). But if a block only has a single indirectbr predecessor (which is the common case), we can simulate splitting that edge by splitting the destination block, and retargeting the *direct* branches. This is motivated by the use of computed gotos in python 2.7: PyEval_EvalFrame() ends up using an indirect branch with ~100 successors, and passing a constant to each of those. Since MachineSink can't break indirect critical edges on demand (and doing this in MIR doesn't look feasible), this causes us to emit about ~100 defs of registers containing constants, which we in the predecessor block, where only one of those constants is used in each successor. So, at each computed goto, we needlessly spill about a 100 constants to stack. The end result is that a clang-compiled python interpreter can be about ~2.5x slower on a simple python reduction loop than a gcc-compiled interpreter. Differential Revision: https://reviews.llvm.org/D29916 llvm-svn: 296416
* [PDB] Make streams carry their own endianness.Zachary Turner2017-02-2841-161/+189
| | | | | | | | | | | | | Before the endianness was specified on each call to read or write of the StreamReader / StreamWriter, but in practice it's extremely rare for streams to have data encoded in multiple different endiannesses, so we should optimize for the 99% use case. This makes the code cleaner and more general, but otherwise has NFC. llvm-svn: 296415
* Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-28408-755/+632
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296414
* [DebugInfo] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-02-2721-159/+244
| | | | | | other minor fixes (NFC). llvm-svn: 296413
* Ah, this was an early exit to leave built products around, it wasn't meant toJason Molenda2017-02-271-1/+0
| | | | | | be checked in. llvm-svn: 296412
* [SLP] Load sorting should not try to sort things that aren't loads.Michael Kuperstein2017-02-272-0/+48
| | | | | | | We may get a VL where the first element is a load, but the others aren't. Trying to sort such VLs can only lead to sorrow. llvm-svn: 296411
* [MC] Implement the COFF directives in MCNullStreamer.Dan Gohman2017-02-271-0/+4
| | | | | | This fixes -filetype=null errors introduced in r296403. llvm-svn: 296410
* AMDGPU: Basic folds for fmed3 intrinsicMatt Arsenault2017-02-275-0/+295
| | | | | | | Constant fold, canonicalize constants to RHS, reduce to minnum/maxnum when inputs are nan/undef. llvm-svn: 296409
* clang-format: Don't leave behind temp files in -i mode on Windows, PR26125, ↵Nico Weber2017-02-272-4/+272
| | | | | | | | | | | | | | | | | | reloaded Second attempt after http://llvm.org/viewvc/llvm-project?rev=296166&view=rev In the first attempt, Code (the memory buffer backing the input file) was reset before overwriteChangedFiles() was called, but overwriteChangedFiles() still reads from it. This time, load the whole input file into memory instead of using mmap when formatting in-place. (Since the test is identical to what was in the repo before chapuni's revert, svn diff doesn't show it – see the above link for the test.) https://reviews.llvm.org/D30385 llvm-svn: 296408
* Remove some code accidentally left in.Zachary Turner2017-02-271-2/+0
| | | | llvm-svn: 296407
* update pbxproj to match cmake config, broken in r296335Tim Hammerquist2017-02-271-22/+16
| | | | llvm-svn: 296406
* [AddressSanitizer] Put shadow at 0 for FuchsiaPetr Hosek2017-02-271-1/+6
| | | | | | | | | | The Fuchsia ASan runtime reserves the low part of the address space. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D30426 llvm-svn: 296405
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-02-2714-223/+297
| | | | | | other minor fixes (NFC). llvm-svn: 296404
* [MC] Factor out non-COFF handling of COFF-specific directives.Dan Gohman2017-02-276-60/+12
| | | | | | | | | Instead of requiring every non-COFF MCObjectStreamer to implement the COFF hooks just to do an llvm_unreachable to say that they're not supported, do the llvm_unreachable in the default implementation, as suggested by rnk in https://reviews.llvm.org/D26722. llvm-svn: 296403
* [WebAssembly] Add some comments and tidy up whitespace.Dan Gohman2017-02-274-5/+6
| | | | llvm-svn: 296402
* AMDGPU: Use v_med3_{f16|i16|u16}Matt Arsenault2017-02-2712-57/+269
| | | | llvm-svn: 296401
* Refactor write{Global,Local}Symbols.Rui Ueyama2017-02-271-19/+15
| | | | | | | | This part of code is hard to understand because NumLocals does not actually mean the number of local symbols but something else (!). We need to rewrite. But before that we need to clean it up. llvm-svn: 296400
* [WebAssembly] Split CFG-sorting into its own pass. NFC.Dan Gohman2017-02-277-223/+302
| | | | | | | CFG sorting was already an independent algorithm from block/loop insertion; this change makes it more convenient to debug. llvm-svn: 296399
* Revert r296366 "[InlineFunction] add nonnull assumptions based on argument ↵Hans Wennborg2017-02-272-41/+23
| | | | | | | | attributes" It causes miscompiles e.g. during self-host of Clang (PR32082). llvm-svn: 296398
* Add missing namespace qualifier.Zachary Turner2017-02-271-1/+1
| | | | llvm-svn: 296397
* AMDGPU: Support v2i16/v2f16 packed operationsMatt Arsenault2017-02-2737-366/+3591
| | | | llvm-svn: 296396
* ISel: We need to notify FastIS of the IMPLICIT_DEF we created in ↵Arnold Schwaighofer2017-02-272-1/+34
| | | | | | | | | | createSwiftErrorEntriesInEntryBlock Otherwise, it will insert instructions before it. rdar://30536186 llvm-svn: 296395
OpenPOWER on IntegriCloud