summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [CMake] Work around to use target_link_libraries(PUBLIC) in ↵NAKAMURA Takumi2014-02-26
| | | | | | | | BUILD_SHARED_LIBS mode. FIXME: It may be PRIVATE since SO knows its dependent libs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202261 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move LLVMBUILD_LIB_DEPS stuff from add_llvm_library (and ↵NAKAMURA Takumi2014-02-26
| | | | | | LLVm-Config) to llvm_add_library to centralize target_link_libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202260 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: simplify tbl/tbx polymorphismTim Northover2014-02-26
| | | | | | | | | The table argument is always 128-bit (and interpreted as <16 x i8>) so the extra specifier for it is just clutter. No user-visible behaviour change, so no tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202258 91177308-0d34-0410-b5e6-96231b3b80d8
* ARMv8 IfConversion must skip narrow instructions that a) define CPSR and b) ↵Artyom Skrobov2014-02-26
| | | | | | wouldn't affect CPSR in an IT block git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202257 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop test/CodeGen/ARM/a15.ll targetting non-ARM targets.Daniel Sanders2014-02-26
| | | | | | | | | | | | | | | | | Summary: Fixes an issue where a test attempts to use -mcpu=cortex-a15 on non-ARM targets. This triggers an assertion on MIPS since it doesn't know what ABI to use by default for unrecognized processors. Reviewers: rengolin Reviewed By: rengolin CC: llvm-commits, aemerson, rengolin Differential Revision: http://llvm-reviews.chandlerc.com/D2876 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202256 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Treat -mcpu=generic the same way as an empty CPU string.Daniel Sanders2014-02-26
| | | | | | | | | | | | | | | | | Summary: This should fix the MCJIT unit tests that were broken by r201792 on the MIPS buildbot. MIPS currently uses the default implementation of sys::getHostCPUName() which always returns "generic". For now, we will accept "generic" and coerce it to "mips32" or "mips64" depending on the target architecture like we do for empty CPU names. Reviewers: jacksprat, matheusalmeida Reviewed By: jacksprat Differential Revision: http://llvm-reviews.chandlerc.com/D2878 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202253 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Use the correct index integer size in GEPs through non-defaultChandler Carruth2014-02-26
| | | | | | | | | | | address spaces. This isn't really a correctness issue (the values are truncated) but its much cleaner. Patch by Matt Arsenault! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202252 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two helpers to IRBuilder to flesh the interface out to N-widthChandler Carruth2014-02-26
| | | | | | integers. Complements the interfaces it is wrapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202251 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Teach SROA how to handle pointers from address spaces other thanChandler Carruth2014-02-26
| | | | | | | | | | | | | | | the default. Based on the patch by Matt Arsenault, D1764! I switched one place to use the more direct pointer type to compute the desired address space, and I reworked the memcpy rewriting section to reflect significant refactorings that this patch helped inspire. Thanks to several of the folks who helped review and improve the patch as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202247 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Split the alignment computation complete for the memcpy rewritingChandler Carruth2014-02-26
| | | | | | | | | | | | | to work independently for the slice side and the other side. This allows us to only compute the minimum of the two when we actually rewrite to a memcpy that needs to take the minimum, and preserve higher alignment for one side or the other when rewriting to loads and stores. This fix was inspired by seeing the result of some refactoring that makes addrspace handling better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202242 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-26
| | | | | | | | | | | | | | | | | | | increase opportunity for parallel build. target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library, although final targets have dependencies to whole dependent libraries. It makes most libraries can be built in parallel. target_link_libraries(PRIVATE) is used to shaared library. Each dependent library is linked to the target.so, and its user will not see its grandchildren. For example, - libclang.so has sufficient libclang*.a(s). - c-index-test requires just only libclang.so. FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202241 91177308-0d34-0410-b5e6-96231b3b80d8
* [x86] Add same itinerary to SYSEXIT64 as SYSEXIT for consistency.Craig Topper2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202240 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce cmake_policy(CMP0022) for ↵NAKAMURA Takumi2014-02-26
| | | | | | | | | | | | target_link_libraries(INTERFACE|PRIVATE). For now, use both keywords, INTERFACE and PRIVATE via the variable, - ${cmake_2_8_12_INTERFACE} - ${cmake_2_8_12_PRIVATE} They could be cleaned up when we introduce 2.8.12. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202239 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8
* [x86] Remove some unused instruction format classes.Craig Topper2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202234 91177308-0d34-0410-b5e6-96231b3b80d8
* [x86] Simplify disassembler code slightly.Craig Topper2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202233 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] The original refactoring inspired by the addrspace patch inChandler Carruth2014-02-26
| | | | | | | | | | | | | | | | | | | | | | D1764, which in turn set off the other refactorings to make 'getSliceAlign()' a sensible thing. There are two possible inputs to the required alignment of a memory transfer intrinsic: the alignment constraints of the source and the destination. If we are *only* introducing a (potentially new) offset onto one side of the transfer, we don't need to consider the alignment constraints of the other side. Use this to simplify the logic feeding into alignment computation for unsplit transfers. Also, hoist the clamp of the magical zero alignment for these intrinsics to the more customary one alignment early. This lets several other conditions melt away. No functionality changed. There is a further improvement this exposes which *will* change functionality, but that's arriving in a separate patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202232 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Yet another slight refactoring that simplifies an API in theChandler Carruth2014-02-26
| | | | | | | | | | | | | | | | rewriting logic: don't pass custom offsets for the adjusted pointer to the new alloca. We always passed NewBeginOffset here. Sometimes we spelled it BeginOffset, but only when they were in fact equal. Whats worse, the API is set up so that you can't reasonably call it with anything else -- it assumes that you're passing it an offset relative to the *original* alloca that happens to fall within the new one. That's the whole point of NewBeginOffset, it's the clamped beginning offset. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202231 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Simplify the computing of alignment: we only ever need theChandler Carruth2014-02-26
| | | | | | | | | | | | | | | alignment of the slice being rewritten, not any arbitrary offset. Every caller is really just trying to compute the alignment for the whole slice, never for some arbitrary alignment. They are also just passing a type when they have one to see if we can skip an explicit alignment in the IR by using the type's alignment. This makes for a much simpler interface. Another refactoring inspired by the addrspace patch for SROA, although only loosely related. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202230 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Use NewOffsetBegin in the unsplit case for memset merely forChandler Carruth2014-02-26
| | | | | | | | | | | | | | | | | consistency with memcpy rewriting, and fix a latent bug in the alignment management for memset. The alignment issue is that getAdjustedAllocaPtr is computing the *relative* offset into the new alloca, but the alignment isn't being set to the relative offset, it was using the the absolute offset which is into the old alloca. I don't think its possible to write a test case that actually reaches this code where the resulting alignment would be observably different, but the intent was clearly to use the relative offset within the new alloca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202229 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Use the members for New{Begin,End}Offset in the rewrite helpersChandler Carruth2014-02-26
| | | | | | | | | | | | | | | rather than passing them as arguments. While I generally prefer actual arguments, in this case the readability loss is substantial. By using members we avoid repeatedly calculating the offsets, and once we're using members it is useful to ensure that those names *always* refer to the original-alloca-relative new offset for a rewritten slice. No functionality changed. Follow-up refactoring, all toward getting the address space patch merged. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202228 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Compute the New{Begin,End}Offset values once for each allocaChandler Carruth2014-02-26
| | | | | | | | | | | | | | slice being rewritten. We had the same code scattered across most of the visits. Instead, compute the new offsets and the slice size once when we start to visit a particular slice, and use the member variables from then on. This reduces quite a bit of code duplication. No functionality changed. Refactoring inspired to make it easier to apply the address space patch to SROA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202227 91177308-0d34-0410-b5e6-96231b3b80d8
* Use StringRef in raw_fd_ostream constructorBen Langmuir2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202225 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Fix PR18615 with some long overdue simplifications to the boundsChandler Carruth2014-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | checking in SROA. The primary change is to just rely on uge for checking that the offset is within the allocation size. This removes the explicit checks against isNegative which were terribly error prone (including the reversed logic that led to PR18615) and prevented us from supporting stack allocations larger than half the address space.... Ok, so maybe the latter isn't *common* but it's a silly restriction to have. Also, we used to try to support a PHI node which loaded from before the start of the allocation if any of the loaded bytes were within the allocation. This doesn't make any sense, we have never really supported loading or storing *before* the allocation starts. The simplified logic just doesn't care. We continue to allow loading past the end of the allocation in part to support cases where there is a PHI and some loads are larger than others and the larger ones reach past the end of the allocation. We could solve this a different and more conservative way, but I'm still somewhat paranoid about this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202224 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious emacs major mode marker, these should only go on .h files.Nick Lewycky2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202222 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-col.Eric Christopher2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202221 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting fixups.Eric Christopher2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202220 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete two declared overloads of CallInst::CallInst that are never defined ↵Nick Lewycky2014-02-26
| | | | | | or used. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202218 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify the Optnone checks in IR passes.Paul Robinson2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202213 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify base64 routine a bit.Rui Ueyama2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202210 91177308-0d34-0410-b5e6-96231b3b80d8
* Exception handling docs: Describe landingpad clauses' meanings in more detailMark Seaborn2014-02-25
| | | | | | | | | | | | | | | | The original text is very terse, so I've expanded on it. Specifically, in the original text: * "The selector value is a positive number if the exception matched a type info" -- It wasn't clear that this meant "if the exception matched a 'catch' clause". * "If nothing is matched, the behavior of the program is `undefined`_." -- It's actually implementation-defined in C++ rather than undefined, as the new text explains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202209 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DIUnspecifiedParameter, so we can pretty-print it.Adrian Prantl2014-02-25
| | | | | | This will be used for testcases in CFE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202207 91177308-0d34-0410-b5e6-96231b3b80d8
* fix crash in SmallDenseMap copy constructorDuncan P. N. Exon Smith2014-02-25
| | | | | | | | | Prevent a crash in the SmallDenseMap copy constructor whenever the other map is not in small mode. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202206 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DataLayout from the module when easily available.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | | | | Eventually DataLayoutPass should go away, but for now that is the only easy way to get a DataLayout in some APIs. This patch only changes the ones that have easy access to a Module. One interesting issue with sometimes using DataLayoutPass and sometimes fetching it from the Module is that we have to make sure they are equivalent. We can get most of the way there by always constructing the pass with a Module. In fact, the pass could be changed to point to an external DataLayout instead of owning one to make this stricter. Unfortunately, the C api passes a DataLayout, so it has to be up to the caller to make sure the pass and the module are in sync. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202204 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to unbreak an MSVC buildbot by switching to %llc_dwarf.Adrian Prantl2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202202 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are ↵David Blaikie2014-02-25
| | | | | | disabled git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202201 91177308-0d34-0410-b5e6-96231b3b80d8
* Address review comments for r202188.Adrian Prantl2014-02-25
| | | | | | | | | This is refactoring / simplifying code, updating comments and enabling the testcase on non-x86 platforms. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202199 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix resetting the DataLayout in a Module.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | | No tool does this currently, but as everything else in a module we should be able to change its DataLayout. Most of the fix is in DataLayout to make sure it can be reset properly. The test uses Module::setDataLayout since the fact that we mutate a DataLayout is an implementation detail. The module could hold a OwningPtr<DataLayout> and the DataLayout itself could be immutable. Thanks to Philip Reames for pushing me in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202198 91177308-0d34-0410-b5e6-96231b3b80d8
* [reassociate] Switch two std::sort calls into std::stable_sort calls asChandler Carruth2014-02-25
| | | | | | | | | | | | | | | their inputs come from std::stable_sort and they are not total orders. I'm not a huge fan of this, but the really bad std::stable_sort is right at the beginning of Reassociate. After we commit to stable-sort based consistent respect of source order, the downstream sorts shouldn't undo that unless they have a total order or they are used in an order-insensitive way. Neither appears to be true for these cases. I don't have particularly good test cases, but this jumped out by inspection when looking for output instability in this pass due to changes in the ordering of std::sort. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202196 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Don't unconditionally unroll loops with private memory accessesTom Stellard2014-02-25
| | | | | | | This causes the size of the scrypt kernel to explode and eats all the memory on some systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202195 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Custom select 64-bit ADDTom Stellard2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202194 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Add an off-by-default *strict* inbounds check to SROA. I had SROAChandler Carruth2014-02-25
| | | | | | | | | | implemented this way a long time ago and due to the overwhelming bugs that surfaced, moved to a much more relaxed variant. Richard Smith would like to understand the magnitude of this problem and it seems fairly harmless to keep some flag-controlled logic to get the extremely strict behavior here. I'll remove it if it doesn't prove useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202193 91177308-0d34-0410-b5e6-96231b3b80d8
* Account for 128-bit integer operations in PPCCTRLoopsHal Finkel2014-02-25
| | | | | | | We need to abort the formation of counter-register-based loops where there are 128-bit integer operations that might become function calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202192 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to set a dummy DataLayout. It is parsed now.Rafael Espindola2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202191 91177308-0d34-0410-b5e6-96231b3b80d8
* Store a DataLayout in Module.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | Now that DataLayout is not a pass, store one in Module. Since the C API expects to be able to get a char* to the datalayout description, we have to keep a std::string somewhere. This patch keeps it in Module and also uses it to represent modules without a DataLayout. Once DataLayout is mandatory, we should probably move the string to DataLayout itself since it won't be necessary anymore to represent the special case of a module without a DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202190 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Support variadic functions.Adrian Prantl2014-02-25
| | | | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202188 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug info: Support variadic functions."Adrian Prantl2014-02-25
| | | | | | This reverts commit r202184 because of buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202187 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove outdated comments.Manman Ren2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202186 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Support variadic functions.Adrian Prantl2014-02-25
| | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE. rdar://problem/13690847 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202184 91177308-0d34-0410-b5e6-96231b3b80d8
* [XCore] Add intrinsic for CLRPT (clear port time) instruction.Richard Osborne2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202172 91177308-0d34-0410-b5e6-96231b3b80d8