summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* [Stackmaps] Cleanup code. No functional change intended.Juergen Ributzka2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201115 91177308-0d34-0410-b5e6-96231b3b80d8
* LTO API: add lto_module_create_from_memory_with_path.Manman Ren2014-02-10
| | | | | | | | | | | | | | This function adds an extra path argument to lto_module_create_from_memory. The path argument will be passed to makeBuffer to make sure the MemoryBuffer has a name and the created module has a module identifier. This is mainly for emitting warning messages from the linker. When we emit warning message on a module, we can use the module identifier. rdar://15985737 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201114 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the methods in the Mangler const.Rafael Espindola2014-02-10
| | | | | | | | | A const ObjectFile needs to be able to provide its name. For an IRObjectFile, that means being able to call the mangler. Since each IRObjectFile can have a different mangling, it is natural for them to contain a Mangler which is therefore also const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201113 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201108 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: use natural LLVM IR for vshll instructionsTim Northover2014-02-10
| | | | | | | | Similarly to the vshrn instructions, these are simple zext/sext + trunc operations. Using normal LLVM IR should allow for better code, and more sharing with the AArch64 backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201093 91177308-0d34-0410-b5e6-96231b3b80d8
* Make succ_iterator a real random access iterator and clean up a couple of users.Benjamin Kramer2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201088 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: use LLVM IR to represent the vshrn operationTim Northover2014-02-10
| | | | | | | | | | vshrn is just the combination of a right shift and a truncate (and the limits on the immediate value actually mean the signedness of the shift doesn't matter). Using that representation allows us to get rid of an ARM-specific intrinsic, share more code with AArch64 and hopefully get better code out of the mid-end optimisers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201085 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Add DLSA instruction.Matheus Almeida2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201081 91177308-0d34-0410-b5e6-96231b3b80d8
* MCParser: add a single token lookaheadSaleem Abdulrasool2014-02-09
| | | | | | | Some of the more complex directive and macro handling for GAS compatibility requires lookahead. Add a single token lookahead in the MCAsmLexer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201058 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a consistent argument order in TargetLoweringObjectFile.Rafael Espindola2014-02-09
| | | | | | | | | These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201044 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the Mangler by reference.Rafael Espindola2014-02-08
| | | | | | | It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201025 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LLVM_OVERRIDE to a few declarations.Rafael Espindola2014-02-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201022 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment cleanup. Don't repeat the function name in the comment.Rafael Espindola2014-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201001 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment cleanup. Don't repeat the function name in the comment.Rafael Espindola2014-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200999 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove training whitespace.Rafael Espindola2014-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200998 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM-1163: AAPCS-VFP violation when CPRC allocated to stackOliver Stannard2014-02-07
| | | | | | | | | | | | | | According to the AAPCS, when a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable. I have also modified the rules for allocating non-CPRCs to the stack, to make it more explicit that all GPRs must be made unavailable. I cannot think of a case where the old version would produce incorrect answers, so there is no test for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200970 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Resolve a long standing FIXME and properly isel pextr[bw].Jim Grosbach2014-02-07
| | | | | | | | | | | | | | | | | Generalize the AArch64 .td nodes for AssertZext and AssertSext. Use them to match the relevant pextr store instructions. The test widen_load-2.ll requires a slight change because with the stores gone, the remaining instructions are scheduled in a different order. Add test cases for SSE4 and AVX variants. Resolves rdar://13414672. Patch by Adam Nemet <anemet@apple.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200957 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove const_cast for STI when parsing inline asmDavid Peixotto2014-02-06
| | | | | | | | | | | | | | | | | | | | | | In a previous commit (r199818) we added a const_cast to an existing subtarget info instead of creating a new one so that we could reuse it when creating the TargetAsmParser for parsing inline assembly. This cast was necessary because we needed to reuse the existing STI to avoid generating incorrect code when the inline asm contained mode-switching directives (e.g. .code 16). The root cause of the failure was that there was an implicit sharing of the STI between the parser and the MCCodeEmitter. To fix a different but related issue, we now explicitly pass the STI to the MCCodeEmitter (see commits r200345-r200351). The const_cast is no longer necessary and we can now create a fresh STI for the inline asm parser to use. Differential Revision: http://llvm-reviews.chandlerc.com/D2709 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200929 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Fix horrible typos that somehow didn't cause a failure in a C++11Chandler Carruth2014-02-06
| | | | | | | | | | | | build but spectacularly changed behavior of the C++98 build. =] This shows my one problem with not having unittests -- basic API expectations aren't well exercised by the integration tests because they *happen* to not come up, even though they might later. I'll probably add a basic unittest to complement the integration testing later, but I wanted to revive the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200905 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add a new "lazy" call graph analysis pass for the new pass manager.Chandler Carruth2014-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary motivation for this pass is to separate the call graph analysis used by the new pass manager's CGSCC pass management from the existing call graph analysis pass. That analysis pass is (somewhat unfortunately) over-constrained by the existing CallGraphSCCPassManager requirements. Those requirements make it *really* hard to cleanly layer the needed functionality for the new pass manager on top of the existing analysis. However, there are also a bunch of things that the pass manager would specifically benefit from doing differently from the existing call graph analysis, and this new implementation tries to address several of them: - Be lazy about scanning function definitions. The existing pass eagerly scans the entire module to build the initial graph. This new pass is significantly more lazy, and I plan to push this even further to maximize locality during CGSCC walks. - Don't use a single synthetic node to partition functions with an indirect call from functions whose address is taken. This node creates a huge choke-point which would preclude good parallelization across the fanout of the SCC graph when we got to the point of looking at such changes to LLVM. - Use a memory dense and lightweight representation of the call graph rather than value handles and tracking call instructions. This will require explicit update calls instead of some updates working transparently, but should end up being significantly more efficient. The explicit update calls ended up being needed in many cases for the existing call graph so we don't really lose anything. - Doesn't explicitly model SCCs and thus doesn't provide an "identity" for an SCC which is stable across updates. This is essential for the new pass manager to work correctly. - Only form the graph necessary for traversing all of the functions in an SCC friendly order. This is a much simpler graph structure and should be more memory dense. It does limit the ways in which it is appropriate to use this analysis. I wish I had a better name than "call graph". I've commented extensively this aspect. This is still very much a WIP, in fact it is really just the initial bits. But it is about the fourth version of the initial bits that I've implemented with each of the others running into really frustrating problms. This looks like it will actually work and I'd like to split the actual complexity across commits for the sake of my reviewers. =] The rest of the implementation along with lots of wiring will follow somewhat more rapidly now that there is a good path forward. Naturally, this doesn't impact any of the existing optimizer. This code is specific to the new pass manager. A bunch of thanks are deserved for the various folks that have helped with the design of this, especially Nick Lewycky who actually sat with me to go through the fundamentals of the final version here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200903 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable most IR-level transform passes on functions marked 'optnone'.Paul Robinson2014-02-06
| | | | | | | | | | Ideally only those transform passes that run at -O0 remain enabled, in reality we get as close as we reasonably can. Passes are responsible for disabling themselves, it's not the job of the pass manager to do it for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200892 91177308-0d34-0410-b5e6-96231b3b80d8
* Add address space argument to allowsUnalignedMemoryAccess.Matt Arsenault2014-02-05
| | | | | | | On R600, some address spaces have more strict alignment requirements than others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200887 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix layering StringRef copy using BumpPtrAllocator.Nick Kledzik2014-02-05
| | | | | | | | | | | Now to copy a string into a BumpPtrAllocator and get a StringRef to the copy: StringRef myCopy = myStr.copy(myAllocator); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200885 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Don't require analysis results to be const in the new pass manager.Chandler Carruth2014-02-05
| | | | | | | | | | I think this was just over-eagerness on my part. The analysis results need to often be non-const because they need to (in some cases at least) be updated by the transformation pass in order to remain correct. It also makes lazy analyses (a common case) needlessly annoying to write in order to make their entire state mutable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200881 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for not using .loc directives.Rafael Espindola2014-02-05
| | | | | | Clang itself was not using this. The only way to access it was via llc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200862 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix an invalid check for duplicate option categories."Rafael Espindola2014-02-05
| | | | | | | | This reverts commit r200853. It was causing clang/Analysis/checker-plugins.c to crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200858 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an invalid check for duplicate option categories.Alexander Kornienko2014-02-05
| | | | | | | | | | | | | | | | | | | | Summary: The check performed in the comparator is invalid, as some STL implementations enforce strict weak ordering by calling the comparator with the same value. This check was also in a wrong place: the assertion would only fire when -help was used. The new check is performed each time the category is registered (we are not going to have thousands of them, so it's fine to do it in O(N^2)). Reviewers: jordan_rose Reviewed By: jordan_rose CC: cfe-commits, alexmc Differential Revision: http://llvm-reviews.chandlerc.com/D2699 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200853 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Added intrinsic for cvtph2ps.Elena Demikhovsky2014-02-05
| | | | | | | | Added VPTESTNM instruction. Added a pattern to vselect (lit tests will follow). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200823 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes ↵Craig Topper2014-02-05
| | | | | | from X86 matcher table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200821 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix configure to find arc4random via header files.Todd Fiala2014-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISSUE: On Ubuntu 12.04 LTS, arc4random is provided by libbsd.so, which is a transitive dependency of libedit. If a system had libedit on it that was implemented in terms of libbsd.so, then the arc4random test, previously implemented as a linker test, would succeed with -ledit. However, on Ubuntu this would also require a #include <bsd/stdlib.h>. This caused a build breakage on configure-based Ubuntu 12.04 with libedit installed. FIX: This fix changes configure to test for arc4random by searching for it in the standard header files. On Ubuntu 12.04, this test now properly fails to find arc4random as it is not defined in the default header locations. It also tweaks the #define names to match the output of the header check command, which is slightly different than the linker function check #defines. I tested the following scenarios: (1) Ubuntu 12.04 without the libedit package [did not find arc4random, as expected] (2) Ubuntu 12.04 with libedit package [properly did not find arc4random, as expected] (3) Ubuntu 12.04 with most recent libedit, custom built, and not dependent on libbsd.so [properly did not find arc4random, as expected]. (4) FreeBSD 10.0B1 [properly found arc4random, as expected] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200819 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused SF_ThreadLocal.Rafael Espindola2014-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200800 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyLibCalls: Push TLI through the exp2->ldexp transform.Benjamin Kramer2014-02-04
| | | | | | For the odd case of platforms with exp2 available but not ldexp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200795 91177308-0d34-0410-b5e6-96231b3b80d8
* Every target uses .align. Simplify.Rafael Espindola2014-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200782 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR18345: ldr= pseudo instruction produces incorrect code when using in ↵David Peixotto2014-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | inline assembly This patch fixes the ldr-pseudo implementation to work when used in inline assembly. The fix is to move arm assembler constant pools from the ARMAsmParser class to the ARMTargetStreamer class. Previously we kept the assembler generated constant pools in the ARMAsmParser object. This does not work for inline assembly because a new parser object is created for each blob of inline assembly. This patch moves the constant pools to the ARMTargetStreamer class so that the constant pool will remain alive for the entire code generation process. An ARMTargetStreamer class is now required for the arm backend. There was no existing implementation for MachO, only Asm and ELF. Instead of creating an empty MachO subclass, we decided to make the ARMTargetStreamer a non-abstract class and provide default (llvm_unreachable) implementations for the non constant-pool related methods. Differential Revision: http://llvm-reviews.chandlerc.com/D2638 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200777 91177308-0d34-0410-b5e6-96231b3b80d8
* OS X: the correct function is __sincospif_stret, not __sincospi_stretfTim Northover2014-02-04
| | | | | | rdar://problem/13729466 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200771 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM & AArch64: merge NEON absolute compare intrinsicsTim Northover2014-02-04
| | | | | | | | There was an extremely confusing proliferation of LLVM intrinsics to implement the vacge & vacgt instructions. This combines them all into two polymorphic intrinsics, shared across both backends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200768 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Implement the preserve-paths flagJustin Bogner2014-02-04
| | | | | | | | | | | | | | | | Until now, when a path in a gcno file included a directory, we would emit our .gcov file in that directory, whereas gcov always emits the file in the current directory. In doing so, this implements gcov's strange name-mangling -p flag, which is needed to avoid clobbering files when two with the same name exist in different directories. The path mangling is a bit ugly and only handles unix-like paths, but it's simple, and it doesn't make any guesses as to how it should behave outside of what gcov documents. If we decide this should be cross platform later, we can consider the compatibility implications then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200754 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64 & ARM: refactor crypto intrinsics to take scalarsTim Northover2014-02-03
| | | | | | | | | | | | Some of the SHA instructions take a scalar i32 as one argument (largely because they work on 160-bit hash fragments). This wasn't reflected in the IR previously, with ARM and AArch64 choosing different types (<4 x i32> and <1 x i32> respectively) which was ugly. This makes all the affected intrinsics take a uniform "i32", allowing them to become non-polymorphic at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200706 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove outdated & incorrect part of comment.Eli Bendersky2014-02-03
| | | | | | | | This comment was copied over from another class in r34170, where it made sense. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200697 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce SmallPtrSetImpl<T *> which allows insert, erase, count, andChandler Carruth2014-02-03
| | | | | | | | iteration. This alows the majority of operations to be performed without encoding a specific small size. It follows the model of SmallVectorImpl<T>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200688 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the non-templated base class of SmallPtrSet toChandler Carruth2014-02-03
| | | | | | | | | | | 'SmallPtrSetImplBase'. This more closely matches the organization of SmallVector and should allow introducing a SmallPtrSetImpl which serves the same purpose as SmallVectorImpl: isolating the element type from the particular small size chosen. This in turn allows a lot of simplification of APIs by not coding them against a specific small size which is rarely needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200687 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add AsmLexer::BigNum token for integers greater than 64 bitsDavid Woodhouse2014-02-01
| | | | | | | | | | | | | | | | | | | | This will be needed for .octa support, but we don't want to just use the existing AsmLexer::Integer for it and then have to litter all its users with explicit checks for the size, and make them use the new get APIntVal() method. So let the lexer produce an AsmLexer::Integer as before for numbers which are small enough — which appears to cover what was previously a nasty special case handling of numbers which don't fit in int64_t but *do* fit in uint64_t. Where the number is too large even for that, produce an AsmLexer::BigNum instead. We do nothing with these except complain about them for now, but that will be changed shortly... Based on a patch from PaX Team <pageexec@freemail.hu> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200613 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement inalloca codegen for x86 with the new inalloca designReid Kleckner2014-01-31
| | | | | | | | | | | | | | | | Calls with inalloca are lowered by skipping all stores for arguments passed in memory and the initial stack adjustment to allocate argument memory. Now the frontend is responsible for the memory layout, and the backend doesn't have to do any work. As a result these changes are pretty minimal. Reviewers: echristo Differential Revision: http://llvm-reviews.chandlerc.com/D2637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200596 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce line editor library.Peter Collingbourne2014-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This library will be used by clang-query. I can imagine LLDB becoming another client of this library, so I think LLVM is a sensible place for it to live. It wraps libedit, and adds tab completion support. The code is loosely based on the line editor bits in LLDB, with a few improvements: - Polymorphism for retrieving the list of tab completions, based on the concept pattern from the new pass manager. - Tab completion doesn't corrupt terminal output if the input covers multiple lines. Unfortunately this can only be done in a truly horrible way, as far as I can tell. But since the alternative is to implement our own line editor (which I don't think LLVM should be in the business of doing, at least for now) I think it may be acceptable. - Includes a fallback for the case where the user doesn't have libedit installed. Note that this uses C stdio, mainly because libedit also uses C stdio. Differential Revision: http://llvm-reviews.chandlerc.com/D2200 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200595 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce llvm::sys::path::home_directory.Peter Collingbourne2014-01-31
| | | | | | | | | This will be used by the line editor library to derive a default path to the history file. Differential Revision: http://llvm-reviews.chandlerc.com/D2199 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200594 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove another hasRawTextSupport.Rafael Espindola2014-01-31
| | | | | | | | | To remove this one simply move the end of file logic from the asm printer to the target mc streamer. This removes the last call to hasRawTextSupport from lib/Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200590 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix file header for APFloat.hDuncan P. N. Exon Smith2014-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200580 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up whitespaceDuncan P. N. Exon Smith2014-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200579 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the first dynamic elf symbol as SF_FormatSpecific.Rafael Espindola2014-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200578 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify getSymbolFlags.Rafael Espindola2014-01-31
| | | | | | | None of the object formats require extra parsing to compute these flags, so the method cannot fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200574 91177308-0d34-0410-b5e6-96231b3b80d8