summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Make DataLayout Non-Optional in the ModuleMehdi Amini2015-03-04163-973/+617
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: DataLayout keeps the string used for its creation. As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no longer canonicalized, you can't rely on two "equals" DataLayout having the same string returned by getStringRepresentation(). Get rid of DataLayoutPass: the DataLayout is in the Module The DataLayout is "per-module", let's enforce this by not duplicating it more than necessary. One more step toward non-optionality of the DataLayout in the module. Make DataLayout Non-Optional in the Module Module->getDataLayout() will never returns nullptr anymore. Reviewers: echristo Subscribers: resistor, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D7992 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231270
* Revert "unique_ptrify ValID::ConstantStructElts"Reid Kleckner2015-03-042-17/+11
| | | | | | | | | | | | | | | | | | | | | This reverts r231200 and r231204. The second one added an explicit move ctor for MSVC. This change broke the clang-cl self-host due to weirdness in MSVC's implementation of std::map::insert. Somehow we lost our rvalue ref-ness when going through variadic placement new: template <class _Objty, class... _Types> void construct(_Objty *_Ptr, _Types &&... _Args) { // construct _Objty(_Types...) at _Ptr ::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...); } For some reason, Clang decided to call the deleted std::pair copy constructor at this point. Needs further investigation, once I can build. llvm-svn: 231269
* Revert the test commit.Wei Mi2015-03-041-1/+0
| | | | llvm-svn: 231264
* Test commit. It will be reverted in the next commit.Wei Mi2015-03-041-0/+1
| | | | llvm-svn: 231262
* Update the out-of-date dwarf expressions in these testcases.Adrian Prantl2015-03-042-4/+4
| | | | llvm-svn: 231261
* Fix DwarfExpression::AddMachineRegExpression so it doesn't read past theAdrian Prantl2015-03-043-14/+18
| | | | | | | end of an expression that ends with DW_OP_plus. Caught by the ASAN build bots. llvm-svn: 231260
* R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32Marek Olsak2015-03-044-1/+33
| | | | | | Required by OpenGL (ARB_gpu_shader5). llvm-svn: 231259
* Test commit. Removed an unnecessary spaceNemanja Ivanovic2015-03-041-1/+1
| | | | llvm-svn: 231257
* Explicitly default ilistTest::Node's copy constructorDavid Blaikie2015-03-041-1/+2
| | | | | | | In the presence of a user-declared dtor, calling an implicit copy ctor is deprecated in C++11. llvm-svn: 231256
* Revert r231221, "Devirtualize ~parser<T> by making it protected in base ↵NAKAMURA Takumi2015-03-041-15/+10
| | | | | | | | classes and making derived classes final" It broke seflhosting. llvm-svn: 231254
* Revert r231132, "Correctly handle -pass-remarks in the gold plugin.", for ↵NAKAMURA Takumi2015-03-042-19/+5
| | | | | | now, to suppress log floodng in LTO. llvm-svn: 231253
* Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how ↵JF Bastien2015-03-048-26/+66
| | | | | | | | | | | | | | | | | | | | | AtomicRMWInsts are expanded. Summary: In PNaCl, most atomic instructions have their own @llvm.nacl.atomic.* function, each one, with a few exceptions, represents a consistent behaviour across all NaCl-supported targets. Unfortunately, the atomic RMW operations nand, [u]min, and [u]max aren't directly represented by any such @llvm.nacl.atomic.* function. This patch refines shouldExpandAtomicRMWInIR in TargetLowering so that a future `Le32TargetLowering` class can selectively inform the caller how the target desires the atomic RMW instruction to be expanded (ie via load-linked/store-conditional for ARM/AArch64, via cmpxchg for X86/others?, or not at all for Mips) if at all. This does not represent a behavioural change and as such no tests were added. Patch by: Richard Diamond. Reviewers: jfb Reviewed By: jfb Subscribers: jfb, aemerson, t.p.northover, llvm-commits Differential Revision: http://reviews.llvm.org/D7713 llvm-svn: 231250
* [mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generatorJozef Kolek2015-03-044-3/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D7609 llvm-svn: 231249
* [PowerPC] Remove unnecessary and incomplete commentaryBill Schmidt2015-03-041-412/+0
| | | | | | | | | | This "itinerary class map" in PPCSchedule.td is incomplete and redundant with the actual code. As it provides no value, we've decided to remove it. No functional change. llvm-svn: 231246
* [X86][FastISel] Simplify the logic in method X86SelectSIToFP.Andrea Di Biagio2015-03-042-23/+15
| | | | | | | | | | | | | | | | The target-independent selection algorithm in FastISel already knows how to select a SINT_TO_FP if the target is SSE but not AVX. On targets that have SSE but not AVX, the tablegen'd 'fastEmit' functions for ISD::SINT_TO_FP know how to select instruction X86::CVTSI2SSrr (for an i32 to f32 conversion) and X86::CVTSI2SDrr (for an i32 to f64 conversion). This patch simplifies the logic in method X86SelectSIToFP knowing that the code would not be reachable if the subtarget doesn't have AVX. No functional change intended. llvm-svn: 231243
* asan: do not instrument direct inbounds accesses to stack variablesDmitry Vyukov2015-03-042-263/+333
| | | | | | | | | | | | | | | Do not instrument direct accesses to stack variables that can be proven to be inbounds, e.g. accesses to fields of structs on stack. But it eliminates 33% of instrumentation on webrtc/modules_unittests (number of memory accesses goes down from 290152 to 193998) and reduces binary size by 15% (from 74M to 64M) and improved compilation time by 6-12%. The optimization is guarded by asan-opt-stack flag that is off by default. http://reviews.llvm.org/D7583 llvm-svn: 231241
* [mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC.Toma Tabacu2015-03-043-16/+17
| | | | | | | | | | | | | | | | Summary: Use more reasonable names for these pseudo-instructions. As there's only one definition tied to any one of these classes, I named them with abbreviated versions of their respective class' name. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7831 llvm-svn: 231240
* [mips] Keep the parameter list of Filler::searchRange() consistent. NFC.Vasileios Kalintiris2015-03-041-9/+9
| | | | | | | | | | | | | | Summary: Move the "Filler" parameter to the end of the parameter list as it is, conceptually, the only output parameter of that function. Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7726 llvm-svn: 231239
* [MBP] Fix a really horrible bug in MachineBlockPlacement, but behindChandler Carruth2015-03-042-9/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a flag for now. First off, thanks to Daniel Jasper for really pointing out the issue here. It's been here forever (at least, I think it was there when I first wrote this code) without getting really noticed or fixed. The key problem is what happens when two reasonably common patterns happen at the same time: we outline multiple cold regions of code, and those regions in turn have diamonds or other CFGs for which we can't just topologically lay them out. Consider some C code that looks like: if (a1()) { if (b1()) c1(); else d1(); f1(); } if (a2()) { if (b2()) c2(); else d2(); f2(); } done(); Now consider the case where a1() and a2() are unlikely to be true. In that case, we might lay out the first part of the function like: a1, a2, done; And then we will be out of successors in which to build the chain. We go to find the best block to continue the chain with, which is perfectly reasonable here, and find "b1" let's say. Laying out successors gets us to: a1, a2, done; b1, c1; At this point, we will refuse to lay out the successor to c1 (f1) because there are still un-placed predecessors of f1 and we want to try to preserve the CFG structure. So we go get the next best block, d1. ... wait for it ... Except that the next best block *isn't* d1. It is b2! d1 is waaay down inside these conditionals. It is much less important than b2. Except that this is exactly what we didn't want. If we keep going we get the entire set of the rest of the CFG *interleaved*!!! a1, a2, done; b1, c1; b2, c2; d1, f1; d2, f2; So we clearly need a better strategy here. =] My current favorite strategy is to actually try to place the block whose predecessor is closest. This very simply ensures that we unwind these kinds of CFGs the way that is natural and fitting, and should minimize the number of cache lines instructions are spread across. It also happens to be *dead simple*. It's like the datastructure was specifically set up for this use case or something. We only push blocks onto the work list when the last predecessor for them is placed into the chain. So the back of the worklist *is* the nearest next block. Unfortunately, a change like this is going to cause *soooo* many benchmarks to swing wildly. So for now I'm adding this under a flag so that we and others can validate that this is fixing the problems described, that it seems possible to enable, and hopefully that it fixes more of our problems long term. llvm-svn: 231238
* [mips] Specify the correct value type when combining a CMovFP node.Vasileios Kalintiris2015-03-041-4/+2
| | | | | | | | | This commit fixes a bug introduced in r230956 where we were creating CMovFP_{T,F} nodes with multiple return value types (one for each operand). With this change the return value type of the new node is the same as the value type of the True/False operands of the original node. llvm-svn: 231237
* Add a flag to experiment with outlining optional branches.Daniel Jasper2015-03-042-2/+96
| | | | | | | | | | | | | In a CFG with the edges A->B->C and A->C, B is an optional branch. LLVM's default behavior is to lay the blocks out naturally, i.e. A, B, C, in order to improve code locality and fallthroughs. However, if a function contains many of those optional branches only a few of which are taken, this leads to a lot of unnecessary icache misses. Moving B out of line can work around this. Review: http://reviews.llvm.org/D7719 llvm-svn: 231230
* Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot ↵Kristof Beyls2015-03-049-192/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | handle yet. As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers ld.bfd and ld.gold currently only support a subset of the whole range of AArch64 ELF TLS relocations. Furthermore, they assume that some of the code sequences to access thread-local variables are produced in a very specific sequence. When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize the instructions. Even if that wouldn't be the case, it's good to produce the exact sequence, as that ensures that linkers can perform optimizing relaxations. This patch: * implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang would grow an -mtls-size option to allow support for both, but that's not part of this patch. * by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation) is added to enable generation of local dynamic code sequence, but is off by default. * makes sure that the exact expected code sequence for local dynamic and general dynamic accesses is produced, by making use of a new pseudo instruction. The patch also removes two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ). llvm-svn: 231227
* [Tablegen] Use correct result number variables with the pattern nodes they ↵Craig Topper2015-03-041-2/+2
| | | | | | go with when handling SDTCisSameAs. No functional change as they are always both 0 unless you try to define a multi result type profile that uses SDTCisSame on one of the other results. llvm-svn: 231226
* Explicitly default DenseMapTest::CtorTest::operator=David Blaikie2015-03-041-0/+1
| | | | | | | Using the implicit default copy assignment operator in the presence of a user-declared copy ctor is deprecated in C++11. llvm-svn: 231225
* Remove explicit RNSuccIterator copy assignment in favor of implicit defaultDavid Blaikie2015-03-041-20/+0
| | | | | | | | Asserting that the source and destination iterators are from the same region is unnecessary - there's no reason to disallow reassignment from any regions, so long as they aren't compared. llvm-svn: 231224
* use = default instead of {}David Blaikie2015-03-041-2/+2
| | | | llvm-svn: 231223
* Make format_object_base explicitly copyable, so format_objects can be copied ↵David Blaikie2015-03-041-0/+1
| | | | | | | | | without relying on the implicit copy ctor Use of the implicit copy ctor is deprecated in C++11 in the presence of a user declared dtor. llvm-svn: 231222
* Devirtualize ~parser<T> by making it protected in base classes and making ↵David Blaikie2015-03-041-10/+15
| | | | | | | | | derived classes final These objects are never owned/destroyed polymorphically, so there's no need for a virtual dtor. llvm-svn: 231221
* Avoid copying parser objectsDavid Blaikie2015-03-041-2/+2
| | | | | | | Use of their copy members is deprecated since they have a user-declared dtor. llvm-svn: 231220
* [DAGCombine] Fix a bug in a BUILD_VECTOR combineMichael Kuperstein2015-03-042-2/+23
| | | | | | | | | | When trying to convert a BUILD_VECTOR into a shuffle, we try to split a single source vector that is twice as wide as the destination vector. We can not do this when we also need the zero vector to create a blend. This fixes PR22774. Differential Revision: http://reviews.llvm.org/D8040 llvm-svn: 231219
* Make OptionValue explicitly copyableDavid Blaikie2015-03-041-0/+8
| | | | | | | | | Since OptionValue (& its base classes) have user-declared dtors, use of the implicit copy ctor/assignment operator is deprecated in C++11. Provide them explicitly (defaulted) to avoid depending on this deprecated feature. llvm-svn: 231218
* Devirtualize OptionValue::~OptionValue in favor of protected in the base, ↵David Blaikie2015-03-041-5/+19
| | | | | | | | | | with final derived classes These objects are never polymorphically owned, so there's no need for virtual dtors - just make the dtor protected in the base classes, and make the derived classes final. llvm-svn: 231217
* [MC][Target] Implement support for R_X86_64_SIZE{32,64}.Davide Italiano2015-03-044-0/+22
| | | | | | | Differential Revision: D7990 Reviewed by: rafael, majnemer llvm-svn: 231216
* [llvm-pdbdump] Display full enum definitions.Zachary Turner2015-03-0415-63/+188
| | | | | | | | | | | This will now display enum definitions both at the global scope as well as nested inside of classes. Additionally, it will no longer display enums at the global scope if the enum is nested. Instead, it will omit the definition of the enum globally and instead emit it in the corresponding class definition. llvm-svn: 231215
* Revert "[ADT] fail-fast iterators for DenseMap"Chaoren Lin2015-03-042-138/+20
| | | | | | | | | | | | This reverts commit 4b7263d855006988854036b4a4891fcf19aebe65. r231125 http://reviews.llvm.org/D7931 This was causing many LLDB tests to fail on OS X, Linux, and FreeBSD. https://bpaste.net/show/6a23e1f53623 llvm-svn: 231214
* Move emitDIE and emitAbbrevs to AsmPrinter. NFC.Frederic Riss2015-03-046-68/+74
| | | | | | | | | | | | | | (They are called emitDwarfDIE and emitDwarfAbbrevs in their new home) llvm-dsymutil wants to reuse that code, but it doesn't have a DwarfUnit or a DwarfDebug object to call those. It has access to an AsmPrinter though. Having emitDIE in the AsmPrinter also removes the DwarfFile dependency on DwarfDebug, and thus the patch drops that field. Differential Revision: http://reviews.llvm.org/D8024 llvm-svn: 231210
* Constify AsmPrinter passed to DIE methods.Frederic Riss2015-03-042-48/+48
| | | | llvm-svn: 231209
* Fix the test for r231201. We don't crash anymore.Filipe Cabecinhas2015-03-041-1/+1
| | | | llvm-svn: 231207
* Workaround MSVC not providing implicit move membersDavid Blaikie2015-03-041-0/+8
| | | | llvm-svn: 231204
* Object: Add range iterators to Archive symbolsRui Ueyama2015-03-041-3/+5
| | | | | | Also define operator* for symbol iterator just like Archive children iterator. llvm-svn: 231203
* Use report_fatal_error instead of unreachable for -fast-isel-abortMehdi Amini2015-03-041-3/+3
| | | | | | | Suggestion by Andrea Di Biagio From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231201
* unique_ptrify ValID::ConstantStructEltsDavid Blaikie2015-03-042-11/+9
| | | | llvm-svn: 231200
* LLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to ↵David Blaikie2015-03-041-1/+6
| | | | | | the presence of a user-declared dtor llvm-svn: 231199
* Use the vanilla func_end symbol for .size.Rafael Espindola2015-03-048-14/+11
| | | | | | No need to create yet another temp symbol. llvm-svn: 231198
* Remove MCStreamer include which isn't used here. NFCPete Cooper2015-03-041-1/+0
| | | | llvm-svn: 231195
* This file should always have included MCAssembler and not MCStreamer. NFCPete Cooper2015-03-041-1/+1
| | | | llvm-svn: 231194
* Remove MCStreamer.h include from MCContext.h and explictly include it where ↵Pete Cooper2015-03-047-1/+6
| | | | | | necessary. NFC llvm-svn: 231193
* Recommit r231168: unique_ptrify LiveRange::segmentSetDavid Blaikie2015-03-043-14/+9
| | | | | | | | | | | | | | | | | | | | | | | GCC 4.7's libstdc++ doesn't have std::map::emplace, but it does have std::unordered_map::emplace, and the use case here doesn't appear to need ordering. The container has been changed in a separate/precursor patch, and now this patch should hopefully build cleanly even with GCC 4.7. & then I realized the order of the container did matter, so extra handling of ordering was added in r231189. Original commit message: This makes LiveRange non-copyable, and LiveInterval is already non-movable (due to the explicit dtor), so now it's non-copyable and non-movable. Fix the one case where we were relying on the (deprecated in C++11) implicit copy ctor of LiveInterval (which happened to work because the ctor created an object with a null segmentSet, so double-deleting the null pointer was fine). llvm-svn: 231192
* Weaken the check for a specific movl on the twoaddr-coalesce-3Eric Christopher2015-03-041-2/+1
| | | | | | | test - we only care that there are two moves in the loop and not which part is relative to which register anyhow. llvm-svn: 231191
* Reverse the order libc++ and libc++abi are added in CMake.Eric Fiselier2015-03-041-1/+3
| | | | llvm-svn: 231190
OpenPOWER on IntegriCloud