summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug in the conversion to ErrorOr.Rafael Espindola2014-07-041-2/+2
| | | | | | | | | The regular end of the bitcode parsing is in the BitstreamEntry::EndBlock case. Should fix the LTO bootstrap on OS X (this function is only used by ld64). llvm-svn: 212357
* Revert "Convert a few std::strings to StringRef."Rafael Espindola2014-07-044-29/+17
| | | | | | | | | This reverts commit r212342. We can get a StringRef into the current Record, but not one in the bitcode itself since the string is compressed in it. llvm-svn: 212356
* fixed typosSanjay Patel2014-07-041-2/+2
| | | | llvm-svn: 212355
* Ignore llvm specific symbols in the LTOModule.Rafael Espindola2014-07-041-0/+3
| | | | | | | | | | These are the llvm.* globals and functions. I don't think it is possible to test this directly since llvm-lto is not a full linker and will not report duplicated symbols, but this fixes bootstrap with gold and lto enabled. llvm-svn: 212354
* Add support for parsing the not operator in Microsoft inline assemblyEhsan Akhgari2014-07-041-5/+36
| | | | | | This fixes http://llvm.org/PR20202 llvm-svn: 212352
* Ignore llvm.* globals.Rafael Espindola2014-07-042-6/+4
| | | | | | | It is not clear if llvm.global_ctors should or should not be in llvm.metadata, but in practice it is not and we need to ignore it for LTO. llvm-svn: 212351
* TableGen: introduce support for MSBuiltinSaleem Abdulrasool2014-07-046-0/+69
| | | | | | | | | | | | | Add MSBuiltin which is similar in vein to GCCBuiltin. This allows for adding intrinsics for Microsoft compatibility to individual instructions. This is needed to permit the creation of ARM specific MSVC extensions. This is not currently in use, and requires an associated change in clang to enable use of the intrinsics defined by this new class. This merely sets the LLVM portion of the infrastructure in place to permit the use of this functionality. A separate set of changes will enable the new intrinsics. llvm-svn: 212350
* Implement LTOModule on top of IRObjectFile.Rafael Espindola2014-07-045-168/+117
| | | | | | | | | | | | | IRObjectFile provides all the logic for producing mangled names and getting symbols from inline assembly. LTOModule then adds logic for linking specific tasks, like constructing llvm.compiler_user or extracting linker options from the bitcode. The rule of the thumb is that IRObjectFile has the functionality that is needed by both LTO and llvm-ar. llvm-svn: 212349
* Avoid mangling names twice. No functionality change.Rafael Espindola2014-07-042-19/+28
| | | | llvm-svn: 212348
* Mark intrinsic functions as llvm-specific.Rafael Espindola2014-07-042-0/+11
| | | | llvm-svn: 212347
* [mips][mips64r6] Set ELF e_flags for MIPS32r6/MIPS64r6. Also do MIPS-I to MIPS-VDaniel Sanders2014-07-042-1/+49
| | | | | | Differential Revision: http://reviews.llvm.org/D4386 llvm-svn: 212346
* [mips] Add tests for the 'ret', 'call', and 'indirectbr' LLVM IR instruction.Daniel Sanders2014-07-043-0/+353
| | | | | | | | | | | | | | | | | | | | | Summary: The tests in this directory are intended to test a single IR instruction with as few dependencies on other instructions as possible. The aim is to be very confident that each LLVM-IR instruction is implemented correctly and with the optimal sequence of instructions, as well as to make it easy to tell what is tested, and make it easier to bring up new ISA revisions in the future. This gives us a good foundation on which to test bigger things. These particular tests will allow testing that MIPS32r6/MIPS64r6 generate the correct return instruction for returns, calls, and indirect branches. This will be a bit tricky since the assembly text is identical but the instruction is actually different. On MIPS32r6/MIPS64r6 'jr $rs' has been removed in favour of the equivalent 'jalr $zero, $rs'. 'jr $rs' remains as an alias for 'jalr $zero, $rs'. Differential Revision: http://reviews.llvm.org/D4266 llvm-svn: 212345
* Don't include llvm.metadata variables in archive symbol tables.Rafael Espindola2014-07-043-0/+9
| | | | llvm-svn: 212344
* Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.Rafael Espindola2014-07-042-5/+5
| | | | llvm-svn: 212343
* Convert a few std::strings to StringRef.Rafael Espindola2014-07-044-17/+29
| | | | llvm-svn: 212342
* Convert these functions to use ErrorOr.Rafael Espindola2014-07-042-10/+11
| | | | llvm-svn: 212341
* Remove unused old-style error handling.Rafael Espindola2014-07-042-12/+6
| | | | | | If needed, an ErrorOr should be used. llvm-svn: 212340
* GlobalDCE: Delete available_externally initializers if it allows removing ↵Benjamin Kramer2014-07-042-4/+74
| | | | | | | | | | | | the value the initializer is referring to. This is useful for functions that are not actually available externally but referenced by a vtable of some kind. Clang emits functions like this for the MS ABI. PR20182. llvm-svn: 212337
* llvm/test/CodeGen/XCore/dwarf_debug.ll: Fix not to be affected by *-win32.NAKAMURA Takumi2014-07-041-1/+1
| | | | llvm-svn: 212335
* llvm/test/CodeGen/X86/vector-gep.ll: Appease to add -mtriple=i686-linux.NAKAMURA Takumi2014-07-041-1/+1
| | | | | | This doesn't pass if stack alignment is not 16, like cygming, *bsd. llvm-svn: 212334
* ARM: when falling back to scattered relocs, keep the type.Tim Northover2014-07-042-3/+41
| | | | | | | | | | The linker relies on relocation type info (e.g. is it a branch?) to perform the correct actions, so we should keep that even when we end up using a scattered relocation for whatever reason. rdar://problem/17553104 llvm-svn: 212333
* llvm-readobj: fix MachO relocatoin printing a bit.Tim Northover2014-07-047-73/+88
| | | | | | | | | | | | | | | | There were two issues here: 1. At the very least, scattered relocations cannot use the same code to determine the corresponding symbol being referred to. For some reason we pretend there is no symbol, even when one actually exists in the symtab, so to match this behaviour getRelocationSymbol should simply return symbols_end for scattered relocations. 2. Printing "-" when we can't get a symbol (including the scattered case, but not exclusively), isn't that helpful. In both cases there *is* interesting information in that field, so we should print it. As hex will do. Small part of rdar://problem/17553104 llvm-svn: 212332
* InstCombine: Strength reduce sadd.with.overflow into a regular nsw add if we ↵Benjamin Kramer2014-07-042-0/+28
| | | | | | | | can prove that it cannot overflow. PR20194 llvm-svn: 212331
* [mips][mips64r6] Correct the encoding of dmuh, dmuhu, dmul, and dmulu.Daniel Sanders2014-07-043-12/+12
| | | | | | | | We have detected a documentation bug in the encoding tables of the released MIPS64r6 specification that has resulted in the wrong encodings being used for these instructions in LLVM. This commit corrects them. llvm-svn: 212330
* Phabricator doc: Explicit the fact that the patch needs to be there before ↵Sylvestre Ledru2014-07-041-0/+1
| | | | | | the commit llvm-svn: 212328
* [x86] Relax the line in this check to pacify build bots.Chandler Carruth2014-07-041-1/+1
| | | | | | | I still don't love testing the comments, but its the only sane way to check shuffle instructions... llvm-svn: 212326
* [x86] Move some check lines to be slightly easier for me to find.Chandler Carruth2014-07-041-2/+2
| | | | | | (meant to put this cleanup in the previous patch, sorry) llvm-svn: 212325
* [x86] Generalize BuildVectorSDNode::getConstantSplatValue to work forChandler Carruth2014-07-047-113/+148
| | | | | | | | | | | | | | | | | | | | | | | | any constant, constant FP, or undef splat and to tolerate any undef lanes in a splat, then replace all uses of isSplatVector in X86's lowering with it. This fixes issues where undef lanes in an otherwise splat vector would prevent the splat logic from firing. It is a touch more awkward to use this interface, but it is much more accurate. Suggestions for better interface structuring welcome. With this fix, the code generated with the widening legalization strategy for widen_cast-4.ll is *dramatically* improved as the special lowering strategies for a v16i8 SRA kick in even though the high lanes are undef. We also get a slightly different choice for broadcasting an aligned memory location, and use vpshufd instead of vbroadcastss. This looks like a minor win for pipelining and domain crossing, but a minor loss for the number of micro-ops. I suspect its a wash, but folks can easily tweak the lowering if they want. llvm-svn: 212324
* Add an explicit bool operator to SDValue to make it easier to test forChandler Carruth2014-07-041-0/+3
| | | | | | | a non-null node. In particular, this makes it easier to use condition variables with SDValues, etc. llvm-svn: 212323
* [X86] Limit maximum nop length on SilvermontAlexey Volkov2014-07-043-3/+15
| | | | | | | | | | | Silvermont can only decode one instruction per cycle if the instruction exceeds 8 bytes. Also in Silvermont instructions with more than 3 prefixes will cause 3 cycle penalty. Maximum nop length is limited to 7 bytes when used for padding on Silvermont. For other x86 processors max nop length remains unchanged 15 bytes. Differential Revision: http://reviews.llvm.org/D4374 llvm-svn: 212321
* XCore target: remove incorrect DebugLoc entries from prologueRobert Lytton2014-07-043-5/+49
| | | | | | | | Summary: This was causing the prologue_end to be incorrectly positioned. Differential Revision: http://reviews.llvm.org/D4122 llvm-svn: 212318
* Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like ↵NAKAMURA Takumi2014-07-041-0/+5
| | | | | | | | cygming. This makes unittests run with BUILD_SHARED_LIBS on DLL platforms. llvm-svn: 212316
* [CMake] Introduce LLVM_ENABLE_PLUGINS as an internal option. ↵NAKAMURA Takumi2014-07-042-8/+17
| | | | | | | | | | | BUILD_SHARED_LIBS may not control enable/disable plugins. FIXME: Make this configurable. FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for plugins. We may rename it. I introduced config.enable_shared in r120273. llvm-svn: 212315
* [CMake] Introduce LLVM_SHLIB_OUTPUT_INTDIR.NAKAMURA Takumi2014-07-042-1/+7
| | | | | | For now, its user is configure_lit_site_cfg(). llvm-svn: 212314
* [CMake] Fix set_output_directory to do nothing if *_OUTPUT_INTDIR was not given.NAKAMURA Takumi2014-07-041-0/+5
| | | | llvm-svn: 212313
* Fix prefix comparison from r212308Alp Toker2014-07-041-1/+2
| | | | llvm-svn: 212310
* Move function dependent resetting of a subtarget variable out of theEric Christopher2014-07-0410-26/+28
| | | | | | | | | | subtarget. This involved having the movt predicate take the current function - since we care about size in instruction selection for whether or not to use movw/movt take the function so we can check the attributes. This required adding the current MachineFunction to FastISel and propagating through. llvm-svn: 212309
* Sink undesirable LTO functions into the old C APIAlp Toker2014-07-043-40/+20
| | | | | | | | | We want to encourage users of the C++ LTO API to reuse memory buffers instead of repeatedly opening and reading the same file contents. This reverts commit r212305 and implements a tidier scheme. llvm-svn: 212308
* InstSimplify: Fix a bug when INT_MIN is in a sdivDavid Majnemer2014-07-042-3/+20
| | | | | | | | | | | | | When INT_MIN is the numerator in a sdiv, we would not properly handle overflow when calculating the bounds of possible values; abs(INT_MIN) is not a meaningful number. Instead, check and handle INT_MIN by reasoning that the largest value is INT_MIN/-2 and the smallest value is INT_MIN. This fixes PR20199. llvm-svn: 212307
* Modify LTOModule::isTargetMatch to take a StringRef instead of a MemoryBuffer.Peter Collingbourne2014-07-032-10/+10
| | | | llvm-svn: 212305
* gold plugin: move target initialization to the top of the onload function.Peter Collingbourne2014-07-031-5/+6
| | | | | | | | | | On at least my machine, ar does not register an all symbols read hook (which previously triggered target initialization), but it does register a claim files hook, which depends on the targets being initialized. Differential Revision: http://reviews.llvm.org/D4372 llvm-svn: 212303
* LTO: rename the various makeLTOModule overloads.Peter Collingbourne2014-07-035-34/+33
| | | | | | | | | This rename makes it easier to identify the specific overload being called in each particular case and makes future refactorings easier. Differential Revision: http://reviews.llvm.org/D4370 llvm-svn: 212302
* Move createIRObjectFile to the IRObjectFile class and return the concrete type.Rafael Espindola2014-07-033-5/+5
| | | | llvm-svn: 212301
* [x86] Clarify that this lowering only applies to vectors and is onlyChandler Carruth2014-07-031-3/+2
| | | | | | used when we have SSE2. llvm-svn: 212300
* Use std::unique_ptr to manage memory. No functionality change.Rafael Espindola2014-07-032-16/+17
| | | | llvm-svn: 212299
* Temporarily revert "Don't try to construct debug LexicalScopes hierarchy for ↵Eric Christopher2014-07-038-212/+44
| | | | | | | | functions that do not have top level debug information." as it appears to be breaking some LTO constructs. This reverts commit r212203. llvm-svn: 212298
* Remove caching of the target machine and initialization of theEric Christopher2014-07-031-10/+5
| | | | | | | subtarget from ARMISelDAGtoDAG. The former is unnecessary and the latter is initialized on each runOnMachineFunction. llvm-svn: 212297
* [CostModel][x86] Improved cost model for alternate shuffles.Andrea Di Biagio2014-07-033-20/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: 1) Improves the cost model for x86 alternate shuffles (originally added at revision 211339); 2) Teaches the Cost Model Analysis pass how to analyze alternate shuffles. Alternate shuffles are a special kind of blend; on x86, we can often easily lowered alternate shuffled into single blend instruction (depending on the subtarget features). The existing cost model didn't take into account subtarget features. Also, it had a couple of "dead" entries for vector types that are never legal (example: on x86 types v2i32 and v2f32 are not legal; those are always either promoted or widened to 128-bit vector types). The new x86 cost model takes into account what target features we have before returning the shuffle cost (i.e. the number of instructions after the blend is lowered/expanded). This patch also teaches the Cost Model Analysis how to identify and analyze alternate shuffles (i.e. 'SK_Alternate' shufflevector instructions): - added function 'isAlternateVectorMask'; - added some logic to check if an instruction is a alternate shuffle and, in case, call the target specific TTI to get the corresponding shuffle cost; - added a test to verify the cost model analysis on alternate shuffles. llvm-svn: 212296
* Add the -just-symbol-name (aka -j) flag to llvm-nm to just print theKevin Enderby2014-07-032-0/+17
| | | | | | | | symbol’s name. On darwin the -j flag is used (often in combinations with other flags) to produce a complete list of symbol names which than can then be reorder and used with ld(1)’s -order_file. llvm-svn: 212294
* [X86] Add ISel patterns to select 'f32_to_f16' and 'f16_to_f32' dag nodes.Andrea Di Biagio2014-07-033-0/+87
| | | | | | | | | | This patch adds tablegen patterns to select F16C float-to-half-float conversion instructions from 'f32_to_f16' and 'f16_to_f32' dag nodes. If the target doesn't have F16C, then 'f32_to_f16' and 'f16_to_f32' are expanded into library calls. llvm-svn: 212293
OpenPOWER on IntegriCloud