summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [codeview] Pass through vftable shape informationReid Kleckner2016-08-313-12/+47
| | | | | | | | | | | | | | | The shape is really just the number of methods in the vftable, since we don't support 16 bit far calls. All calls are near. Encode this number in the size of the artificial __vtbl_ptr_type DIDerivedType that we generate. For DWARF, this will be a normal pointer, but for codeview this will be a wide pointer that gets pattern matched into a VFTableShape record. Insert this type into the element list of all dynamic classes when emitting CodeView, so that the backend can emit the shape even if the vptr lives in a primary base class. Fixes PR28150 llvm-svn: 280255
* [codeview] Emit vtable shape informationReid Kleckner2016-08-315-44/+573
| | | | | | | | | | | | | The shape of the vtable is passed down as the size of the __vtbl_ptr_type. This special pointer type appears both as the pointee type of the vptr type, and by itself in every dynamic class. For classes with multiple vtables, only the shape of the primary vftable is included, as the shape of all secondary vftables will be the same as in the base class. Fixes PR28150 llvm-svn: 280254
* Add more unit tests for StringExtractor hex/endian functions.Zachary Turner2016-08-311-19/+133
| | | | | | | There were a few corner cases that weren't tested for dealing with extraction of an odd number of nibbles. Add tests for those here. llvm-svn: 280253
* [ELF] Linkerscript: define symbols outside SECTIONSPetr Hosek2016-08-314-4/+32
| | | | | | | | | Symbol assignments outside of SECTIONS command need to be created even when SECTIONS command is not used. Differential Revision: https://reviews.llvm.org/D23751 llvm-svn: 280252
* Wrap LIBCXXABI_USE_LLVM_UNWINDER with defined().Logan Chien2016-08-311-2/+2
| | | | | | | | | | | | This commit fixes -Wundef by replacing: #if !LIBCXXABI_USE_LLVM_UNWINDER with: #if !defined(LIBCXXABI_USE_LLVM_UNWINDER) llvm-svn: 280251
* [statepoints][experimental] Add support for live-in semantics of values in ↵Philip Reames2016-08-316-9/+233
| | | | | | | | | | | | | | | | deopt bundles This is a first step towards supporting deopt value lowering and reporting entirely with the register allocator. I hope to build on this in the near future to support live-on-return semantics, but I have a use case which allows me to test and investigate code quality with just the live-in semantics so I've chosen to start there. For those curious, my use cases is our implementation of the "__llvm_deoptimize" function we bind to @llvm.deoptimize. I'm choosing not to hard code that fact in the patch and instead make it configurable via function attributes. The basic approach here is modelled on what is done for the "Live In" values on stackmaps and patchpoints. (A secondary goal here is to remove one of the last barriers to merging the pseudo instructions.) We start by adding the operands directly to the STATEPOINT SDNode. Once we've lowered to MI, we extend the remat logic used by the register allocator to fold virtual register uses into StackMap::Indirect entries as needed. This does rely on the fact that the register allocator rematerializes. If it didn't along some code path, we could end up with more vregs than physical registers and fail to allocate. Today, we *only* fold in the register allocator. This can create some weird effects when combined with arguments passed on the stack because we don't fold them appropriately. I have an idea how to fix that, but it needs this patch in place to work on that effectively. (There's some weird interaction with the scheduler as well, more investigation needed.) My near term plan is to land this patch off-by-default, experiment in my local tree to identify any correctness issues and then start fixing codegen problems one by one as I find them. Once I have the live-in lowering fully working (both correctness and code quality), I'm hoping to move on to the live-on-return semantics. Note: I don't have any *known* miscompiles with this patch enabled, but I'm pretty sure I'll find at least a couple. Thus, the "experimental" tag and the fact it's off by default. Differential Revision: https://reviews.llvm.org/D24000 llvm-svn: 280250
* [X86][SSE] Improve awareness of (v)cvtpd2ps implicit zeroing of upper ↵Simon Pilgrim2016-08-312-13/+12
| | | | | | | | | | 64-bits of xmm result Associate x86_sse2_cvtpd2ps with X86ISD::VFPROUND to avoid inserting unnecessary zeroing shuffles. Differential Revision: https://reviews.llvm.org/D23797 llvm-svn: 280249
* [SLP] Arguments should be camel case, and start with an upper case letter. NFC.Chad Rosier2016-08-312-3/+3
| | | | llvm-svn: 280248
* Changing a code block to text because Sphinx does not like it on the builder ↵Aaron Ballman2016-08-311-2/+2
| | | | | | (http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12517/steps/docs-llvm-html/logs/stdio) llvm-svn: 280247
* Clang patch r280064 introduced ways to set the FP exceptions and denormalSjoerd Meijer2016-08-315-10/+96
| | | | | | | | | | types. This is the LLVM counterpart and it adds options that map onto FP exceptions and denormal build attributes allowing better fp math library selections. Differential Revision: https://reviews.llvm.org/D24070 llvm-svn: 280246
* clang-format: Set default WebKit style to use C++11.Daniel Jasper2016-08-311-1/+0
| | | | | | | | | The WebKit style page says to use nullptr, so this should be fine: https://webkit.org/code-style-guidelines/ This fixes: llvm.org/PR30220 llvm-svn: 280245
* Fixed spill stack objects are mutableKrzysztof Parzyszek2016-08-313-4/+74
| | | | | | Differential Revision: https://reviews.llvm.org/D24039 llvm-svn: 280244
* Remove redundant argument. NFC.Rafael Espindola2016-08-312-18/+14
| | | | llvm-svn: 280243
* Internalize common variables.Rafael Espindola2016-08-315-11/+35
| | | | | | | | | | | Before this lld was always creating common symbols itself. It worked, but prevented them from being internalized when possible. Now it preserves common symbols is the bitcode and they are internalized. Fixes pr30184. llvm-svn: 280242
* Fix comments about IndirectBrInst in Instructions.hChad Rosier2016-08-311-4/+2
| | | | | | | Patch by yo (Chiang, Yi-Yo) <yo@skymizer.com>. Differential Revision: https://reviews.llvm.org/D23982 llvm-svn: 280241
* [clang-format-vim] Support vim linked against py3Luke Drummond2016-08-311-7/+11
| | | | | | | | | | | | clang-format.py previously only worked in vim compiled against python2. This patch adds the necessary syntax changes to make this work with vim linked against python3, which is now shipped by default for at least Ubuntu16 and Arch. Differential Revision: https://reviews.llvm.org/D23319 Subscribers: cfe-commits llvm-svn: 280240
* Revert "[SimplifyCFG] Improve FoldValueComparisonIntoPredecessors to handle ↵James Molloy2016-08-311-20/+6
| | | | | | | | more cases" This reverts commit r280218. This *also* causes buildbot errors. Sigh. Not a successful day all around! llvm-svn: 280239
* Changing a code block to text because Sphinx does not like it on the builder ↵Aaron Ballman2016-08-311-1/+1
| | | | | | (http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12516/steps/docs-llvm-html/logs/stdio) llvm-svn: 280238
* Delete unnecessary template.Rafael Espindola2016-08-317-40/+28
| | | | llvm-svn: 280237
* [clang-tidy docs] Add missing option docs.Haojian Wu2016-08-3119-12/+217
| | | | | | | | | | Reviewers: alexfh, Eugene.Zelenko, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D23918 llvm-svn: 280236
* [docs] Fix docs build error.Haojian Wu2016-08-311-0/+1
| | | | llvm-svn: 280235
* Revert "[SimplifyCFG] Change the algorithm in SinkThenElseCodeToEnd"James Molloy2016-08-312-187/+86
| | | | | | This reverts commit r280216 - it caused buildbot failures. llvm-svn: 280234
* Revert "[SimplifyCFG] Handle tail-sinking of more than 2 incoming branches"James Molloy2016-08-317-222/+49
| | | | | | This reverts commit r280217. r280216 caused buildbot failures - backing out the entire chain. llvm-svn: 280233
* Revert "[SimplifyCFG] Add a workaround to fix PR30188"James Molloy2016-08-312-33/+0
| | | | | | This reverts commit r280219. r280216 caused buildbot failures - backing out the entire chain. llvm-svn: 280232
* Revert "[SimplifyCFG] Fix bootstrap failure after r280220"James Molloy2016-08-312-44/+5
| | | | | | This reverts commit r280228. r280216 caused buildbot failures - backing out the entire sequence. llvm-svn: 280231
* Use abstraction in AArch64AsmPrinter::lowerSTACKMAP. NFCIDiana Picus2016-08-311-1/+1
| | | | | | Use functionality from StackMapOpers instead of hardcoding an operand access. llvm-svn: 280230
* Typo fixes. NFCDiana Picus2016-08-312-2/+2
| | | | llvm-svn: 280229
* [SimplifyCFG] Fix bootstrap failure after r280220James Molloy2016-08-312-5/+44
| | | | | | We check that a sinking candidate is used by only one PHI node during our legality checks. However for instructions that are used by other sinking candidates our heuristic is less conservative. This can result in a candidate actually being illegal when we come to sink it because of how we sunk a predecessor. Do the used-by-only-one-PHI checks again during sinking to ensure we don't crash. llvm-svn: 280228
* Revision r280064 adds new options -fdenormal-fp-math and passes through optionSjoerd Meijer2016-08-311-0/+3
| | | | | | | | | -ffast-math to CC1, but it included a wrong llvm regression tests which was removed in r280065. Although regression test noexceptionsfpmath.c makes sure -fno-trapping-math ends up as a function attribute, this adds a test that explicitly checks the driver output for -fno-trapping-math. llvm-svn: 280227
* Delete DefinedBitcode.Rafael Espindola2016-08-315-31/+16
| | | | | | | Given that we almost always want to handle it as DefinedRegular, just use DefinedRegular. llvm-svn: 280226
* [LTO/InputFiles] Merge two ifs into one. NFCI.Davide Italiano2016-08-311-5/+3
| | | | llvm-svn: 280225
* [LTO] Simplify unnamed_addr handling logic. NFCI.Davide Italiano2016-08-311-6/+3
| | | | llvm-svn: 280224
* [ELF][MIPS] Support R_MIPS_HIGHER / R_MIPS_HIGHEST relocations calculationSimon Atanasyan2016-08-312-0/+41
| | | | llvm-svn: 280223
* [ELF][MIPS] Inline function. NFCSimon Atanasyan2016-08-311-3/+2
| | | | llvm-svn: 280222
* AMDGPU/SI: Handle aliases in AMDGPUAlwaysInlinePassNikolay Haustov2016-08-312-0/+37
| | | | | | | | | | | | | | | | | Summary: Simply replace usage of aliases to functions with aliasee. This came up when bitcode linking to builtin library and calls to aliases not being resolved. Also made minor improvements to existing test. Reviewers: tstellarAMD, alex-t, vpykhtin Subscribers: arsenm, wdng, rampitec Differential Revision: https://reviews.llvm.org/D24023 llvm-svn: 280221
* Attempt to pacify buildbots after r280217James Molloy2016-08-312-4/+4
| | | | | | | | These clang tests check diagnostics from the backend by giving it an unvectorizable loop. This loop is now vectorized :/ Make it really unvectorizable by making it unprofitable to ifconvert. llvm-svn: 280220
* [SimplifyCFG] Add a workaround to fix PR30188James Molloy2016-08-312-0/+33
| | | | | | | | We're sinking stores, which is a good thing, but in the process creating selects for the store address operand, which SROA/Mem2Reg can't look through, which caused serious regressions. The real fix is in SROA, which I'll be looking into. llvm-svn: 280219
* [SimplifyCFG] Improve FoldValueComparisonIntoPredecessors to handle more casesJames Molloy2016-08-311-6/+20
| | | | | | | | | | | | | | | | | | | A very important case is not handled here: multiple arcs to a single block with a PHI. Consider: a: %1 = icmp %b, 1 br %1, label %c, label %e c: %2 = icmp %b, 2 br %2, label %d, label %e d: br %e e: phi [0, %a], [1, %c], [2, %d] FoldValueComparisonIntoPredecessors will refuse to fold this, as it doesn't know how to deal with two arcs to a common destination with different PHI values. The answer is obvious - just split all conflicting arcs. llvm-svn: 280218
* [SimplifyCFG] Handle tail-sinking of more than 2 incoming branchesJames Molloy2016-08-317-49/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a real restriction in the original version of SinkIfThenCodeToEnd. Now it's been rewritten, the restriction can be lifted. As part of this, we handle a very common and useful case where one of the incoming branches is actually conditional. Consider: if (a) x(1); else if (b) x(2); This produces the following CFG: [if] / \ [x(1)] [if] | | \ | | \ | [x(2)] | \ | / [ end ] [end] has two unconditional predecessor arcs and one conditional. The conditional refers to the implicit empty 'else' arc. This same pattern can also be caused by an empty default block in a switch. We can't sink the call to x() down to end because no call to x() happens on the third incoming arc (assume that x() has sideeffects for the sake of argument; if something is safe to speculate we could indeed sink nevertheless but this cannot happen in the general case and causes many extra selects). We are now able to detect this case and split off the unconditional arcs to a common successor: [if] / \ [x(1)] [if] | | \ | | \ | [x(2)] | \ / | [sink.split] | \ / [ end ] Now we can sink the call to x() into %sink.split. This can cause significant code simplification in many testcases. llvm-svn: 280217
* [SimplifyCFG] Change the algorithm in SinkThenElseCodeToEndJames Molloy2016-08-312-86/+187
| | | | | | | | | | | | | | | | | | | | | | | | | r279460 rewrote this function to be able to handle more than two incoming edges and took pains to ensure this didn't regress anything. This time we change the logic for determining if an instruction should be sunk. Previously we used a single pass greedy algorithm - sink instructions until one requires more than one PHI node or we run out of instructions to sink. This had the problem that sinking instructions that had non-identical but trivially the same operands needed extra logic so we sunk them aggressively. For example: %a = load i32* %b %d = load i32* %b %c = gep i32* %a, i32 0 %e = gep i32* %d, i32 1 Sinking %c and %e would naively require two PHI merges as %a != %d. But the loads are obviously equivalent (and maybe can't be hoisted because there is no common predecessor). This is why we implemented the fairly complex function areValuesTriviallySame(), to look through trivial differences like this. However it's just not clever enough. Instead, throw areValuesTriviallySame away, use pointer equality to check equivalence of operands and switch to a two-stage algorithm. In the "scan" stage, we look at every sinkable instruction in isolation from end of block to front. If it's sinkable, we keep track of all operands that required PHI merging. In the "sink" stage, we iteratively sink the last non-terminator in the source blocks. But when calculating how many PHIs are actually required to be inserted (to work out if we should stop or not) we remove any values that have already been sunk from the set of PHI-merges required, which allows us to be more aggressive. This turns an algorithm with potentially recursive lookahead (looking through GEPs, casts, loads and any other instruction potentially not CSE'd) to two linear scans. llvm-svn: 280216
* [SimplifyCFG] Tail-merge calls with sideeffectsJames Molloy2016-08-312-8/+27
| | | | | | | | | | | | | This was deliberately disabled during my rewrite of SinkIfThenToEnd to keep behaviour at least vaguely consistent with the previous version and keep it as close to NFC as I could. There's no real reason not to merge sideeffect calls though, so let's do it! Small fixup along the way to ensure we don't create indirect calls. Should fix PR28964. llvm-svn: 280215
* [X86][SSE] Improve awareness of fptrunc implicit zeroing of upper 64-bits of ↵Simon Pilgrim2016-08-312-51/+49
| | | | | | | | | | xmm result Add patterns to avoid inserting unnecessary zeroing shuffles when lowering fptrunc to (v)cvtpd2ps Differential Revision: https://reviews.llvm.org/D23797 llvm-svn: 280214
* Fix buildbot bug: Wasn't printing scariness for DoubleFreeFilipe Cabecinhas2016-08-311-0/+1
| | | | llvm-svn: 280213
* [ELF] - Remove VersionScriptParser class and move the members to ScriptParserGeorge Rimar2016-08-315-116/+100
| | | | | | | | | Patch removes VersionScriptParser class and moves the members to ScriptParser It opens road for implementation of VERSION linkerscript command. Differential revision: https://reviews.llvm.org/D23774 llvm-svn: 280212
* [ELF] - Fix (partial) for bug 28843 - Make sure we handle options with ↵George Rimar2016-08-313-3/+20
| | | | | | | | | | | | | | | | | | opposing meanings. As stated in PR28843: we should handle command lines with -target1-rel -target1-abs --demangle --no-demangle Patch implements this for specified options. There are probably other conflicting options can exist, so fix is called "partial". Differential revision: https://reviews.llvm.org/D23867 llvm-svn: 280211
* Add DT_REL(A)COUNT tag to .dynamic sectionEugene Leviant2016-08-316-47/+69
| | | | | | | | | | This patch groups relative relocations in a single block in combrelocs mode and adds DT_RELCOUNT or DT_RELACOUNT tag to .dynamic section Differential revision: https://reviews.llvm.org/D23661 llvm-svn: 280210
* [ELF] - Introduce DiscardPolicy instead of 3 relative bool fields.George Rimar2016-08-314-10/+28
| | | | | | | | | | | DiscardPolicy is enum replacing several boolean options. This approach is not only consistent with what we use for unresolveds (UnresolvedPolicy), but also should help to solve a problem of options with opposing meanings, mentioned in PR28843 Differential revision: https://reviews.llvm.org/D23868 llvm-svn: 280209
* XFail new TestPyObjSynthProvider.py on linux until I can investigate the ↵Pavel Labath2016-08-311-0/+1
| | | | | | cause of the problem llvm-svn: 280208
* Revert r280137 and 280139 and subsequent build fixesPavel Labath2016-08-3111-140/+218
| | | | | | | | | | The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" packet, because the function tries to drop_front more bytes than the packet contains. It's not clear to me whether we should consider this a bug in the caller or the callee, but it any case, it worked before, so I am reverting this until we can figure out what the proper interface should be. llvm-svn: 280207
* [ELF] - Introduce StripPolicy instead of Config->StripAll/StripDebug flags.George Rimar2016-08-314-13/+20
| | | | | | | | | | This approach is not only consistent with UnresolvedPolicy, but also should help to solve a problem of options with opposing meanings, mentioned in PR28843 Differential revision: https://reviews.llvm.org/D23869 llvm-svn: 280206
OpenPOWER on IntegriCloud