summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] Use dynamic loading for External Functions on Windows.Marcos Pividori2017-02-102-1/+61
| | | | | | | | | | | | | | | | | | | Replace weak aliases with dynamic loading. Weak aliases were generating some problems when linking for MT on Windows. For MT, compiler-rt's libraries are statically linked to the main executable the same than libFuzzer, so if we use weak aliases, we are providing two different default implementations for the same weak function and the linker fails. In this diff I re implement ExternalFunctions() using dynamic loading, so it works in both cases (MD and MT). Also, dynamic loading is simpler, since we are not defining any auxiliary external function, and we don't need to deal with weak aliases. This is equivalent to the implementation using dlsym(RTLD_DEFAULT, FnName) for Posix. Differential revision: https://reviews.llvm.org/D29751 llvm-svn: 294687
* Update test/CodeGen/X86/sse-align-10.ll to use FileCheck instead of grepDavid L. Jones2017-02-101-1/+4
| | | | | | | | Patch by Jorge Gorbe (lethalantidote). Differential Revision: https://reviews.llvm.org/D29797 llvm-svn: 294686
* [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-02-1022-193/+273
| | | | | | minor fixes (NFC). llvm-svn: 294685
* Sink IsExplicitSpecified flag from CXXConstructorDecl and CXXConversionDeclRichard Smith2017-02-104-47/+32
| | | | | | | into FunctionDecl. Makes CXXConversionDecl 8 bytes smaller. No functionality change intended. llvm-svn: 294684
* Check for musl-libc's max_align_t in addition to other variants.David L. Jones2017-02-102-2/+4
| | | | | | | | | | | | | | | | | | Summary: Libcxx will define its own max_align_t when it is not available. However, the availability checks today only check for Clang's definition and GCC's definition. In particular, it does not check for musl's definition, which is the same as GCC's but guarded with a different macro. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D28478 llvm-svn: 294683
* [LoadCombine] Change test to not use instcombine.Michael J. Spencer2017-02-101-1/+4
| | | | llvm-svn: 294682
* Update C style comments to C++ style.Eric Christopher2017-02-101-13/+11
| | | | llvm-svn: 294680
* [WebAssembly] Pass an MCContext to WebAssemblyMCCodeEmitter. NFC.Dan Gohman2017-02-103-6/+10
| | | | llvm-svn: 294679
* Fix syntax errorMatthias Braun2017-02-101-2/+2
| | | | llvm-svn: 294678
* ARMSubtarget.h: Change to one line per enum element; NFCMatthias Braun2017-02-101-9/+56
| | | | | | | Change syntax to have enum elements sorted alphabetically and one per line as that is more merge/cherry pick friendly. llvm-svn: 294677
* Fix the -Werror build by removing an unused default in a fully covered switchDavid Blaikie2017-02-101-2/+0
| | | | llvm-svn: 294676
* [Support] Extend SLEB128 encoding support.Dan Gohman2017-02-102-16/+71
| | | | | | | | Add support for padded SLEB128 values, and support for writing SLEB128 values to buffers rather than to ostreams, similar to the existing ULEB128 support. llvm-svn: 294675
* Add an additional set of braces to deal with subobject initialization.Eric Christopher2017-02-101-1/+1
| | | | llvm-svn: 294674
* Add missing libc++ importEric Fiselier2017-02-101-0/+1
| | | | llvm-svn: 294673
* docs/conf.py: Suppress sphinx highlighting failure warningsMatthias Braun2017-02-101-0/+4
| | | | | | | | | | | | | The pygments syntax highlighting package used by sphinx fails to parse newer LLVM constructs or valid (at least to me) gas constructs like `.secrel32 _function_name + 0`. Disable this particular warning so the build doesn't abort as fixing pygments doesn't seem a workable option here. Differential Revision: https://reviews.llvm.org/D29794 llvm-svn: 294672
* Fix path to libc++'s python test moduleEric Fiselier2017-02-091-1/+1
| | | | llvm-svn: 294671
* [PM] Add Argument Promotion to the pass pipeline.Chandler Carruth2017-02-092-0/+12
| | | | | | | | | | | This needs explicit requires of the optimization remark emission before loop pass pipelines containing LICM as we no longer get it from the inliner -- Argument Promotion may invalidate it. Technically the inliner could also have broken this, but it never came up in testing. Differential Revision: https://reviews.llvm.org/D29595 llvm-svn: 294670
* [BlockGenerator] Use MemoryAccess::getAccessValue to get load instructionTobias Grosser2017-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | When generating code in the BlockGenerator we copy all (interesting) instructions and keep track of the new values in a basic block map. To obtain the original llvm::Value that belongs to a load memory access, we use getAccessValue() instead of getOriginalBaseAddr(). The former always references the instruction we use to load values from. The latter, on the other hand, is obtaine from the corresponding ScopArrayInfo and would not be unique in case ScopArrayInfo objects at some point allow memory accesses with different base addresses. This change is an update on r294566, which only clarified that we need the original memory access, but where we still remained dependent to have one base pointer per scop. This change removes unnecessary uses of MemoryAddress::getOriginalBaseAddr() in preparation for https://reviews.llvm.org/D28518. llvm-svn: 294669
* [NewGVN] Fix test so that it doesn't rely on InstCombine anymore.Davide Italiano2017-02-091-3/+5
| | | | llvm-svn: 294668
* [PM] Port ArgumentPromotion to the new pass manager.Chandler Carruth2017-02-0920-29/+135
| | | | | | | | | | | | | | | Now that the call graph supports efficient replacement of a function and spurious reference edges, we can port ArgumentPromotion to the new pass manager very easily. The old PM-specific bits are sunk into callbacks that the new PM simply doesn't use. Unlike the old PM, the new PM simply does argument promotion and afterward does the update to LCG reflecting the promoted function. Differential Revision: https://reviews.llvm.org/D29580 llvm-svn: 294667
* WholeProgramDevirt: Check that VCP candidate functions are defined before ↵Peter Collingbourne2017-02-092-5/+37
| | | | | | | | evaluating them. This was crashing before. llvm-svn: 294666
* LowerMemIntrinsics: Fix include guardMatthias Braun2017-02-091-2/+2
| | | | | | I hope this fixes the clang-stage2-cmake-modules jenkins build. llvm-svn: 294665
* added missing "savetemps/" in test/COFF/savetemps.llBob Haarman2017-02-091-1/+1
| | | | llvm-svn: 294664
* [PM/LCG] Teach LCG to support spurious reference edges.Chandler Carruth2017-02-092-1/+89
| | | | | | | | | | | | | | | | | | Somewhat amazingly, this only requires teaching it to clean them up when deleting a dead function from the graph. And we already have exactly the necessary data structures to do that in the parent RefSCCs. This allows ArgPromote to work in a much simpler way be merely letting reference edges linger in the graph after the causing IR is deleted. We will clean up these edges when we run any function pass over the IR, but don't remove them eagerly. This avoids all of the quadratic update issues both in the current pass manager and in my previous attempt with the new pass manager. Differential Revision: https://reviews.llvm.org/D29579 llvm-svn: 294663
* Add support for armv7ve flag in clang (PR31358).George Burgess IV2017-02-094-0/+27
| | | | | | | | | | | This is a followup change to add v7ve support to clang for gcc compatibility. Please see r294661. Patch by Manoj Gupta. Differential Revision: https://reviews.llvm.org/D29773 llvm-svn: 294662
* [ARM] Add support for armv7ve triple in llvm (PR31358).George Burgess IV2017-02-099-30/+69
| | | | | | | | | | | | | | | Gcc supports target armv7ve which is armv7-a with virtualization extensions. This change adds support for this in llvm for gcc compatibility. Also remove redundant FeatureHWDiv, FeatureHWDivARM for a few models as this is specified automatically by FeatureVirtualization. Patch by Manoj Gupta. Differential Revision: https://reviews.llvm.org/D29472 llvm-svn: 294661
* add missing python importEric Fiselier2017-02-091-1/+2
| | | | llvm-svn: 294660
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-0/+2
| | | | llvm-svn: 294659
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-3/+3
| | | | llvm-svn: 294658
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-2/+2
| | | | llvm-svn: 294657
* [ScopInfo] Use MemoryAccess::getScopArrayInfo() interface to access Array [NFC]Tobias Grosser2017-02-091-3/+2
| | | | | | | | | | | | | | By using the public interface MemoryAccess::getScopArrayInfo() we avoid the direct access to the ScopArrayInfoMap and as a result also do not need to use the BasePtr as key. This change makes the code cleaner. The const-cast we introduce is a little ugly. We may consider to drop const correctness for getScopArrayInfo() at some point. This change removes unnecessary uses of MemoryAddress::getBaseAddr() in preparation for https://reviews.llvm.org/D28518. llvm-svn: 294655
* [ScopInfo] Use types instead of 'auto' and use more descriptive variable ↵Tobias Grosser2017-02-091-8/+10
| | | | | | | | | | names [NFC] LLVM's coding conventions suggest to use auto only in obvious cases. Hence, we move this code to actually declare the types used. We also replace the variable name 'SAI', with the name 'Array', as this improves readability. llvm-svn: 294654
* [PM/LCG] Teach the LazyCallGraph how to replace a function withoutChandler Carruth2017-02-095-479/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disturbing the graph or having to update edges. This is motivated by porting argument promotion to the new pass manager. Because of how LLVM IR Function objects work, in order to change their signature a new object needs to be created. This is efficient and straight forward in the IR but previously was very hard to implement in LCG. We could easily replace the function a node in the graph represents. The challenging part is how to handle updating the edges in the graph. LCG previously used an edge to a raw function to represent a node that had not yet been scanned for calls and references. This was the core of its laziness. However, that model causes this kind of update to be very hard: 1) The keys to lookup an edge need to be `Function*`s that would all need to be updated when we update the node. 2) There will be some unknown number of edges that haven't transitioned from `Function*` edges to `Node*` edges. All of this complexity isn't necessary. Instead, we can always build a node around any function, always pointing edges at it and always using it as the key to lookup an edge. To maintain the laziness, we need to sink the *edges* of a node into a secondary object and explicitly model transitioning a node from empty to populated by scanning the function. This design seems much cleaner in a number of ways, but importantly there is now exactly *one* place where the `Function*` has to be updated! Some other cleanups that fall out of this include having something to model the *entry* edges more accurately. Rather than hand rolling parts of the node in the graph itself, we have an explicit `EdgeSequence` object that gives us exactly the functionality needed. We also have a consistent place to define the edge iterators and can use them for both the entry edges and the internal edges of the graph. The API used to model the separation between a node and its edges is intentionally very thin as most clients are expected to deal with nodes that have populated edges. We model this exactly as an optional does with an additional method to populate the edges when that is a reasonable thing for a client to do. This is based on API design suggestions from Richard Smith and David Blaikie, credit goes to them for helping pick how to model this without it being either too explicit or too implicit. The patch is somewhat noisy due to shifting around iterator types and new syntax for walking the edges of a node, but most of the functionality change is in the `Edge`, `EdgeSequence`, and `Node` types. Differential Revision: https://reviews.llvm.org/D29577 llvm-svn: 294653
* [WebAssembly] Refactor void return peephole using MaybeRewriteToFallthrough. ↵Dan Gohman2017-02-091-13/+15
| | | | | | NFC. llvm-svn: 294652
* Move libcxx/test/libcxx python package into libcxx/utils/libcxx.Eric Fiselier2017-02-0913-142/+310
| | | | | | | This patch merges the test python package with the newly created package in utils. llvm-svn: 294651
* [InstCombine] allow (X * C2) << C1 --> X * (C2 << C1) for vectorsSanjay Patel2017-02-092-13/+26
| | | | | | | | | | This fold already existed for vectors but only when 'C1' was a splat constant (but 'C2' could be any constant). There were no tests for any vector constants, so I'm adding a test that shows non-splat constants for both operands. llvm-svn: 294650
* [ScopInfo] Use ScopArrayInfo instead of base addressTobias Grosser2017-02-092-18/+18
| | | | | | | | | | | | When building alias groups, we sort different ScopArrays into unrelated groups. Historically we identified arrays through their base pointer, as no ScopArrayInfo class was yet available. This change changes the alias group construction to reference arrays through their ScopArrayInfo object. This change removes unnecessary uses of MemoryAddress::getBaseAddr() in preparation for https://reviews.llvm.org/D28518. llvm-svn: 294649
* De-duplicate some code for creating an AARGetter suitable for the legacy PM.Peter Collingbourne2017-02-094-35/+22
| | | | | | | | I'm about to use this in a couple more places. Differential Revision: https://reviews.llvm.org/D29793 llvm-svn: 294648
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-3/+3
| | | | llvm-svn: 294647
* lit.rst: Fix sphinx complaint about multiple option definitionsMatthias Braun2017-02-091-1/+1
| | | | llvm-svn: 294646
* [docs] Fix typoJonathan Roelofs2017-02-091-2/+2
| | | | llvm-svn: 294645
* Start libc++ python cleanup and consolidation.Eric Fiselier2017-02-0916-10/+27
| | | | | | | | | Libc++ frequently creates and uses utilities written in python. Currently there are python modules under both libcxx/test and libcxx/util. My goal with these changes is to consolidate them into a single package under libcxx/utils/libcxx. llvm-svn: 294644
* list paths explicitly instead of using * inBob Haarman2017-02-091-14/+18
| | | | | | | | | | | | test/COFF/savetemps.ll Reviewers: dyung, ruiu Reviewed By: dyung, ruiu Differential Revision: https://reviews.llvm.org/D29788 llvm-svn: 294643
* Fix build break from r294633.Adrian McCarthy2017-02-092-6/+3
| | | | llvm-svn: 294642
* Disallow explicit instantiation and explicit specialization for deduction ↵Richard Smith2017-02-095-3/+45
| | | | | | guides. llvm-svn: 294641
* [X86] Remove duplicate call to getValueType. NFCI.Simon Pilgrim2017-02-091-4/+3
| | | | llvm-svn: 294640
* Diagnose attempts to explicitly instantiate a template at class scope. ↵Richard Smith2017-02-096-10/+23
| | | | | | Previously Clang would simply ignore the 'template' keyword in this case. llvm-svn: 294639
* [DebugInfo] Added support to Clang FE for generating debug info for ↵Amjad Aboud2017-02-0917-0/+487
| | | | | | | | | | | preprocessor macros. Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info. Added CC1 "-debug-info-macro" flag that enables emitting macro debug info. Differential Revision: https://reviews.llvm.org/D16135 llvm-svn: 294637
* X86: Introduce relocImm-based patterns for cmp.Peter Collingbourne2017-02-094-0/+86
| | | | | | Differential Revision: https://reviews.llvm.org/D28690 llvm-svn: 294636
* AMDGPU: Add pass to expand memcpy/memmove/memsetMatt Arsenault2017-02-096-4/+253
| | | | llvm-svn: 294635
OpenPOWER on IntegriCloud