summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Use the overloaded std::abs rather than C's abs(int) to address Clang's ↵David Blaikie2014-02-261-1/+1
| | | | | | -Wabsolute-value llvm-svn: 202286
* Use count 0.Rafael Espindola2014-02-261-4/+1
| | | | | | Thanks to Roman Divacky for the suggestion. llvm-svn: 202283
* Fix typo. Thanks to Roman Divacky for noticing it.Rafael Espindola2014-02-262-11/+12
| | | | llvm-svn: 202277
* Compare DataLayout by Value, not by pointer.Rafael Espindola2014-02-266-1/+30
| | | | | | | | This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! llvm-svn: 202276
* Use a sorted array to store the information about a few address spaces.Rafael Espindola2014-02-262-33/+44
| | | | | | | | | We don't have any test with more than 6 address spaces, so a DenseMap is probably not the correct answer. An unsorted array would also be OK, but we have to sort it for printing anyway. llvm-svn: 202275
* Move these functions out of line. A DenseMap lookup is not a simple operation.Rafael Espindola2014-02-262-21/+29
| | | | llvm-svn: 202274
* Fix PR18165: LSR must avoid scaling factors that exceed the limit on ↵Andrew Trick2014-02-262-0/+100
| | | | | | | | truncated use. Patch by Michael Zolotukhin! llvm-svn: 202273
* llvm-symbolizer: use dynamic symbol table if the regular one is stripped.Alexey Samsonov2014-02-264-29/+50
| | | | llvm-svn: 202265
* Move getELFDynamicSymbolIterators to a public header.Alexey Samsonov2014-02-262-25/+23
| | | | llvm-svn: 202264
* [CMake] BUILD_SHARED_LIBS: Fixup for r202261: Give PULIC to system_libs in ↵NAKAMURA Takumi2014-02-261-1/+9
| | | | | | LLVMSupport. llvm-svn: 202263
* Ensure bitcode encoding of instructions and their operands stays stable.Michael Kuperstein2014-02-2614-0/+583
| | | | | | | | This includes instructions with aggregate operands (insert/extract), instructions with vector operands (insert/extract/shuffle), binary arithmetic and bitwise instructions, conversion instructions and terminators. Work was done by lama.saba@intel.com. llvm-svn: 202262
* [CMake] Work around to use target_link_libraries(PUBLIC) in ↵NAKAMURA Takumi2014-02-261-0/+7
| | | | | | | BUILD_SHARED_LIBS mode. FIXME: It may be PRIVATE since SO knows its dependent libs. llvm-svn: 202261
* [CMake] Move LLVMBUILD_LIB_DEPS stuff from add_llvm_library (and ↵NAKAMURA Takumi2014-02-261-13/+30
| | | | | | LLVm-Config) to llvm_add_library to centralize target_link_libraries. llvm-svn: 202260
* AArch64: simplify tbl/tbx polymorphismTim Northover2014-02-262-100/+100
| | | | | | | | | 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. llvm-svn: 202258
* ARMv8 IfConversion must skip narrow instructions that a) define CPSR and b) ↵Artyom Skrobov2014-02-264-16/+139
| | | | | | wouldn't affect CPSR in an IT block llvm-svn: 202257
* Stop test/CodeGen/ARM/a15.ll targetting non-ARM targets.Daniel Sanders2014-02-261-1/+1
| | | | | | | | | | | | | | | | | 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 llvm-svn: 202256
* [mips] Treat -mcpu=generic the same way as an empty CPU string.Daniel Sanders2014-02-262-2/+2
| | | | | | | | | | | | | | | | | 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 llvm-svn: 202253
* [SROA] Use the correct index integer size in GEPs through non-defaultChandler Carruth2014-02-262-6/+11
| | | | | | | | | | | address spaces. This isn't really a correctness issue (the values are truncated) but its much cleaner. Patch by Matt Arsenault! llvm-svn: 202252
* Add two helpers to IRBuilder to flesh the interface out to N-widthChandler Carruth2014-02-261-0/+11
| | | | | | integers. Complements the interfaces it is wrapping. llvm-svn: 202251
* [SROA] Teach SROA how to handle pointers from address spaces other thanChandler Carruth2014-02-264-10/+149
| | | | | | | | | | | | | | | 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. llvm-svn: 202247
* [SROA] Split the alignment computation complete for the memcpy rewritingChandler Carruth2014-02-262-16/+32
| | | | | | | | | | | | | 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. llvm-svn: 202242
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-263-4/+17
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 202241
* [x86] Add same itinerary to SYSEXIT64 as SYSEXIT for consistency.Craig Topper2014-02-261-2/+2
| | | | llvm-svn: 202240
* [CMake] Introduce cmake_policy(CMP0022) for ↵NAKAMURA Takumi2014-02-261-0/+15
| | | | | | | | | | | | 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. llvm-svn: 202239
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-263-12/+12
| | | | llvm-svn: 202238
* [x86] Remove some unused instruction format classes.Craig Topper2014-02-261-12/+0
| | | | llvm-svn: 202234
* [x86] Simplify disassembler code slightly.Craig Topper2014-02-262-8/+12
| | | | llvm-svn: 202233
* [SROA] The original refactoring inspired by the addrspace patch inChandler Carruth2014-02-261-21/+21
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 202232
* [SROA] Yet another slight refactoring that simplifies an API in theChandler Carruth2014-02-261-20/+19
| | | | | | | | | | | | | | | | 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. llvm-svn: 202231
* [SROA] Simplify the computing of alignment: we only ever need theChandler Carruth2014-02-261-30/+16
| | | | | | | | | | | | | | | 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. llvm-svn: 202230
* [SROA] Use NewOffsetBegin in the unsplit case for memset merely forChandler Carruth2014-02-261-3/+4
| | | | | | | | | | | | | | | | | 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. llvm-svn: 202229
* [SROA] Use the members for New{Begin,End}Offset in the rewrite helpersChandler Carruth2014-02-261-14/+8
| | | | | | | | | | | | | | | 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. llvm-svn: 202228
* [SROA] Compute the New{Begin,End}Offset values once for each allocaChandler Carruth2014-02-261-40/+24
| | | | | | | | | | | | | | 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. llvm-svn: 202227
* Use StringRef in raw_fd_ostream constructorBen Langmuir2014-02-262-4/+3
| | | | llvm-svn: 202225
* [SROA] Fix PR18615 with some long overdue simplifications to the boundsChandler Carruth2014-02-262-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 202224
* Remove spurious emacs major mode marker, these should only go on .h files.Nick Lewycky2014-02-261-1/+1
| | | | llvm-svn: 202222
* 80-col.Eric Christopher2014-02-261-1/+2
| | | | llvm-svn: 202221
* Formatting fixups.Eric Christopher2014-02-261-2/+2
| | | | llvm-svn: 202220
* Delete two declared overloads of CallInst::CallInst that are never defined ↵Nick Lewycky2014-02-261-4/+0
| | | | | | or used. No functionality change. llvm-svn: 202218
* Constify the Optnone checks in IR passes.Paul Robinson2014-02-264-8/+8
| | | | llvm-svn: 202213
* Simplify base64 routine a bit.Rui Ueyama2014-02-251-2/+2
| | | | llvm-svn: 202210
* Exception handling docs: Describe landingpad clauses' meanings in more detailMark Seaborn2014-02-251-6/+55
| | | | | | | | | | | | | | | | 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. llvm-svn: 202209
* Add DIUnspecifiedParameter, so we can pretty-print it.Adrian Prantl2014-02-252-0/+13
| | | | | | This will be used for testcases in CFE. llvm-svn: 202207
* fix crash in SmallDenseMap copy constructorDuncan P. N. Exon Smith2014-02-252-1/+29
| | | | | | | | | Prevent a crash in the SmallDenseMap copy constructor whenever the other map is not in small mode. <rdar://problem/14292693> llvm-svn: 202206
* Use DataLayout from the module when easily available.Rafael Espindola2014-02-2522-30/+58
| | | | | | | | | | | | | | | | | 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. llvm-svn: 202204
* Attempt to unbreak an MSVC buildbot by switching to %llc_dwarf.Adrian Prantl2014-02-251-1/+1
| | | | llvm-svn: 202202
* DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are ↵David Blaikie2014-02-252-1/+5
| | | | | | disabled llvm-svn: 202201
* Address review comments for r202188.Adrian Prantl2014-02-254-37/+30
| | | | | | | | | This is refactoring / simplifying code, updating comments and enabling the testcase on non-x86 platforms. No functionality change. llvm-svn: 202199
* Fix resetting the DataLayout in a Module.Rafael Espindola2014-02-254-11/+38
| | | | | | | | | | | | | | | 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. llvm-svn: 202198
* [reassociate] Switch two std::sort calls into std::stable_sort calls asChandler Carruth2014-02-251-2/+2
| | | | | | | | | | | | | | | 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. llvm-svn: 202196
OpenPOWER on IntegriCloud