summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* ARM: add tlsldo relocationKai Nacke2014-01-20
| | | | | | | | | | Add support for the symbol(tlsldo) relocation. This is required in order to solve PR18554. Reviewed by R. Golin, A. Korobeynikov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199644 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] llvm_process_sources: Introduce a parameter, ADDITIONAL_HEADERS.NAKAMURA Takumi2014-01-20
| | | | | | | | | | | | | | ADDITIONAL_HEADERS is intended to add header files for IDEs as hint. For example: add_llvm_library(LLVMSupport Host.cpp ADDITIONAL_HEADERS Unix/Host.inc Windows/Host.inc ) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199639 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] Do not generate Tag_DIV_use=AllowDIVExt when hardware div is ↵Artyom Skrobov2014-01-20
| | | | | | non-optional: it should have the default value of AllowDIVIfExists git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199638 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my commit in r199620 that added sections about namespaces to theChandler Carruth2014-01-20
| | | | | | | | | | | | | | | | | | coding standards, and instead fix the existing section. Thanks to Daniel Jasper for pointing out we already had a section devoted to this topic. Instead of adding sections, just hack on this section some. Also fix the example in the anonymous namespace section below it to agree with the new advice. As a re-cap, this switches the LLVM preferred style to never indent namespaces. Having two approaches just led to endless (and utterly pointless) debates about what was "small enough". This wasn't helping anyone. The no-indent rule is easy to understand and doesn't really make anything harder to read. Moreover, with tools like clang-format it is considerably nicer to have simple consistent rules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199637 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r199628: "[AArch64 NEON] Fix a bug caused by undef lane when ↵Chandler Carruth2014-01-20
| | | | | | | | generating VEXT." This test fails the newly added regression tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199631 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a DenseMap iterator invalidation bug causing lots of crashes whenChandler Carruth2014-01-20
| | | | | | | | | | | | | | | | | | | type units were enabled. The crux of the issue is that the addDwarfTypeUnitType routine can end up being indirectly recursive. In this case, the reference into the dense map (TU) became invalid by the time we popped all the way back and used it to add the DIE type signature. Instead, use early return in the case where we can bypass the recursive step and creating a type unit. Then use the pointer to the new type unit to set up the DIE type signature in the case where we have to. I tried really hard to reduce a testcase for this, but it's really annoying. You have to get this to be mid-recursion when the densemap grows. Even if we got a test case for this today, it'd be very unlikely to continue exercising this pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199630 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix all the remaining lost-fast-math-flags bugs I've been able to find. The ↵Owen Anderson2014-01-20
| | | | | | | | | most important of these are cases in the generic logic for combining BinaryOperators. This logic hadn't been updated to handle FastMathFlags, and it took me a while to detect it because it doesn't show up in a simple search for CreateFAdd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199629 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64 NEON] Fix a bug caused by undef lane when generating VEXT.Kevin Qin2014-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199628 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: whitespaceSaleem Abdulrasool2014-01-20
| | | | | | Remove hard tabs in favour of spaces. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199624 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Fix a contradiction in the comments noticed by Anders.Chandler Carruth2014-01-20
| | | | | | | | Have I mentioned that functions returning true on error and false on success are confusing? They're more confusing when their name is "verify". Anyways... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199622 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64 NEON] Accept both #0.0 and #0 for comparing with floating point ↵Kevin Qin2014-01-20
| | | | | | | | | | zero in asm parser. For FCMEQ, FCMGE, FCMGT, FCMLE and FCMLT, floating point zero will be printed as #0.0 instead of #0. To support the history codes using #0, we consider to let asm parser accept both #0.0 and #0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199621 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some wording to the coding standards to say how to indent namespacesChandler Carruth2014-01-20
| | | | | | | | | | | (and to mention namespace ending comments). This is based on a quick discussion on the developer mailing list where there was essentially no objections to a simple and consistent rule. This should avoid future debates about whether or not a namespace is "big enough" to indent. It also matches clang-format's current behavior with LLVM source code which hasn't really seen any opposition in code reviews that I spot checked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199620 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the retrieval of VT after all of the early exits from PerformOrCombine ↵Michael Gottesman2014-01-19
| | | | | | that do not use VT. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199612 91177308-0d34-0410-b5e6-96231b3b80d8
* [APInt] Fix nearestLogBase2 to return correct answers for very large APInt ↵Michael Gottesman2014-01-19
| | | | | | | | and APInt with a bitwidth of 1. I also improved the comments, added some more tests, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199610 91177308-0d34-0410-b5e6-96231b3b80d8
* [APInt] Fixed bug where APInt(UINT32_MAX, 0) would blow up when being ↵Michael Gottesman2014-01-19
| | | | | | | | | | | | | | constructed. This was due to arithmetic overflow in the getNumBits() computation. Now we cast BitWidth to a uint64_t so that does not occur during the computation. After the computation is complete, the uint64_t is truncated when the function returns. I know that this is not something that is likely to happen, but it *IS* a valid input and we should not blow up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199609 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Modernize a bunch of cast combines.Benjamin Kramer2014-01-19
| | | | | | Also make them vector-aware. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199608 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Hoist 3 copies of AddOne/SubOne into a header.Benjamin Kramer2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199605 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Replace a hand-rolled version of isKnownToBeAPowerOfTwo with ↵Benjamin Kramer2014-01-19
| | | | | | the real thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199604 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Teach most integer add/sub/mul/div combines how to deal with ↵Benjamin Kramer2014-01-19
| | | | | | vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199602 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Refactor fmul/fdiv combines to handle vectors.Benjamin Kramer2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199598 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce new scheme of LLVM_TOOLS_BINARY_DIR and LLVM_LIBRARY_DIRNAKAMURA Takumi2014-01-19
| | | | | | | | In LLVM build tree, they points corresponding INTDIR. In Clang standalone tree, they points external dir (llvm-config's --bindir and --libdir). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199595 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add comments in llvm/CMakeLists.txt.NAKAMURA Takumi2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199594 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Deprecate LLVM_TOOLS_BINARY_DIR.NAKAMURA Takumi2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199593 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Prune deprecate usage of CMAKE_RUNTIME_OUTPUT_DIRECTORY.NAKAMURA Takumi2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199592 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a really nasty SROA bug with how we handled out-of-bounds memcpyChandler Carruth2014-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | intrinsics. Reported on the list by Evan with a couple of attempts to fix, but it took a while to dig down to the root cause. There are two overlapping bugs here, both centering around the circumstance of discovering a memcpy operand which is known to be completely outside the bounds of the alloca. First, we need to kill the *other* side of the memcpy if it was added to this alloca. Otherwise we'll factor it into our slicing and try to rewrite it even though we know for a fact that it is dead. This is made more tricky because we can visit the sides in either order. So we have to both kill the other side and skip instructions marked as dead. The latter really should be goodness in every case, but here is a matter of correctness. Second, we need to actually remove the *uses* of the alloca by the memcpy when queuing it for later deletion. Otherwise it may still be using the alloca when we go to promote it (if the rewrite re-uses the existing alloca instruction). Do this by factoring out the use-clobbering used when for nixing a Phi argument and re-using it across the operands of a to-be-deleted instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199590 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM ELF: ensure that the tag types are correctedSaleem Abdulrasool2014-01-19
| | | | | | | | Ensure that the tag types are reflected on a replacement. This is particularly important for the compatibility tag which has multiple representations where the last definition wins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199577 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: update build attributes for ABI r2.09Saleem Abdulrasool2014-01-19
| | | | | | | Update names for the names as per the current ABI errata. Mark deprecated tags as such. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199576 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ARM build attributes into SupportSaleem Abdulrasool2014-01-19
| | | | | | | | | | | | This moves the ARM build attributes definitions and support routines into the Support library. The support routines simply permit the conversion of the value to and from a string representation. The movement is prompted in order to permit access to the constants and string representations from readobj in order to facilitate decoding of the attributes section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199575 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM IAS: remove unnecessary special caseSaleem Abdulrasool2014-01-19
| | | | | | | Tag_nodefaults is even and greater than 32 and thus does not need the special check to fall into the correct category. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199574 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer: A reduction that has multiple uses of the reduction value is notArnold Schwaighofer2014-01-19
| | | | | | | | | | | | | | a reduction. Really. Under certain circumstances (the use list of an instruction has to be set up right - hence the extra pass in the test case) we would not recognize when a value in a potential reduction cycle was used multiple times by the reduction cycle. Fixes PR18526. radar://15851149 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199570 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Make the verifier work independently of any pass manager.Chandler Carruth2014-01-19
| | | | | | | | | | | | | | | | | | | | | | | This makes the 'verifyFunction' and 'verifyModule' functions totally independent operations on the LLVM IR. It also cleans up their API a bit by lifting the abort behavior into their clients and just using an optional raw_ostream parameter to control printing. The implementation of the verifier is now just an InstVisitor with no multiple inheritance. It also is significantly more const-correct, and hides the const violations internally. The two layers that force us to break const correctness are building a DomTree and dispatching through the InstVisitor. A new VerifierPass is used to implement the legacy pass manager interface in terms of the other pieces. The error messages produced may be slightly different now, and we may have slightly different short circuiting behavior with different usage models of the verifier, but generally everything works equivalently and this unblocks wiring the verifier up to the new pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199569 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a const lookup routine to get a BlockAddress constant if there isChandler Carruth2014-01-19
| | | | | | | | one, but not create one. This is useful in the verifier when we want to query the constant if it exists but not create one. To be used in an upcoming commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199568 91177308-0d34-0410-b5e6-96231b3b80d8
* Support AddrSpaceCast in ConstantExpr::getAsInstruction.Eli Bendersky2014-01-18
| | | | | | | | | It's handled similarly to the other casts. CastInst::Create already knows how to handle it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199565 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't refuse to transform constexpr(call(arg, ...)) to call(constexpr(arg), ↵Nick Lewycky2014-01-18
| | | | | | ...)) just because the function has multiple return values even if their return types are the same. Patch by Eduard Burtescu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199564 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Let the assembler reject v5 instructions in v4 mode.Benjamin Kramer2014-01-18
| | | | | | PR18524. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199559 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add llvm-tblgen to dependencies of check-llvm.NAKAMURA Takumi2014-01-18
| | | | | | | llvm-tblgen is not built when external LLVM_TABLEGEN is specified. Even then, llvm-tblgen should be built for testing tblgen itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199558 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Make the (fmul X, -1.0) -> (fsub -0.0, X) transform handle ↵Benjamin Kramer2014-01-18
| | | | | | | | vectors too. PR18532. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199553 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade ConstantFP's negative zero and infinity getters to handle vector types.Benjamin Kramer2014-01-18
| | | | | | Will be used soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199552 91177308-0d34-0410-b5e6-96231b3b80d8
* typoAdrian Prantl2014-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199537 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info (LTO): Move the creation of accessibility flags toAdrian Prantl2014-01-18
| | | | | | | | | getOrCreateSubprogramDIE to avoid attributes being added twice when DIEs are merged. rdar://problem/15842330. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199536 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more instances of dropped fast math flags when optimizing FADD ↵Owen Anderson2014-01-18
| | | | | | instructions. All found by inspection (aka grep). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199528 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an inalloca flag to allocasReid Kleckner2014-01-17
| | | | | | | | | | | | | | | | Summary: The only current use of this flag is to mark the alloca as dynamic, even if its in the entry block. The stack adjustment for the alloca can never be folded into the prologue because the call may clear it and it has to be allocated at the top of the stack. Reviewers: majnemer CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2571 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199525 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add some missing include guardsJustin Bogner2014-01-17
| | | | | | Patch by Daniel Reynaud! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199523 91177308-0d34-0410-b5e6-96231b3b80d8
* Update LangRef to emphasize the difference between "coldcc" and ↵Juergen Ributzka2014-01-17
| | | | | | "preserve_mostcc". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199521 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-column.Rui Ueyama2014-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199519 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump/COFF: Print ordinal base number.Rui Ueyama2014-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199518 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new calling conventions for runtime callsJuergen Ributzka2014-01-17
| | | | | | | | | | | | | | This patch adds two new target-independent calling conventions for runtime calls - PreserveMost and PreserveAll. The target-specific implementation for X86-64 is defined as following: - Arguments are passed as for the default C calling convention - The same applies for the return value(s) - PreserveMost preserves all GPRs - except R11 - PreserveAll preserves all GPRs and all XMMs/YMMs - except R11 Reviewed by Lang and Philip git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199508 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Correct pattern for LSADaniel Sanders2014-01-17
| | | | | | | | | | | | | | Summary: $rs and $rt were the wrong way round in the .td and the testcase wasn't strict enough to detect the mistake. Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2554 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199498 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Split IIIdiv int II_DIV, II_DIVU, II_DDIV, and II_DDIVUDaniel Sanders2014-01-17
| | | | | | | | No functional change since the InstrItinData's were duplicated git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199497 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][sched] Split IIImul and IIImult into subclasses.Daniel Sanders2014-01-17
| | | | | | | | | | | IIImul -> II_MUL IIImult -> II_MULT, II_MULTU, II_MADD, II_MADDU, II_MSUB, II_MSUBU, II_DMULT, II_DMULTU No functional change since the InstrItinData's have been duplicated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199495 91177308-0d34-0410-b5e6-96231b3b80d8