summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-12-28Revert "[memcpyopt] Teach memcpyopt to optimize across basic blocks"Reid Kleckner
This reverts r321138. It seems there are still underlying issues with memdep. PR35519 seems to still be present if debug info is enabled. We end up losing a memcpy. Somehow during store to memset merging, we insert the memset after the memcpy or fail to update the memdep analysis to account for the newly inserted memset of a pair. Reduced test case: #include <assert.h> #include <stdio.h> #include <string> #include <utility> #include <vector> void do_push_back( std::vector<std::pair<std::string, std::vector<std::string>>>* crls) { crls->push_back(std::make_pair(std::string(), std::vector<std::string>())); } int __attribute__((optnone)) main() { // Put some data in the vector and then remove it so we take the push_back // fast path. std::vector<std::pair<std::string, std::vector<std::string>>> crl_set; crl_set.push_back({"asdf", {}}); crl_set.pop_back(); printf("first word in vector storage: %p\n", *(void**)crl_set.data()); // Do the push_back which may fail to initialize the data. do_push_back(&crl_set); auto* first = &crl_set.back().first; printf("first word in vector storage (should be zero): %p\n", *(void**)crl_set.data()); assert(first->empty()); puts("ok"); } Compile with libc++, enable optimizations, and enable debug info: $ clang++ -stdlib=libc++ -g -O2 t.cpp -o t.exe -Wl,-rpath=llvm/build/lib This program will assert with this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321510 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-28AMDGPU: Add MMO to atomic_inc/decMatt Arsenault
This doesn't really change anything because these already had custom node wrappers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321508 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-27[NFC] Extract out a helper function for SimplifyCall(CS, Q)Philip Reames
This simplifies code, but the real motivation is that it lets me clean up some downstream code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321466 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-25COFF: fix IMAGE_FILE_MACHINE_AM33Martell Malone
PE COFF spec value is 0x1D3 not 0x13 https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321447 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22[SimplifyCFG] Don't do if-conversion if there is a long dependence chainGuozhi Wei
If after if-conversion, most of the instructions in this new BB construct a long and slow dependence chain, it may be slower than cmp/branch, even if the branch has a high miss rate, because the control dependence is transformed into data dependence, and control dependence can be speculated, and thus, the second part can execute in parallel with the first part on modern OOO processor. This patch checks for the long dependence chain, and give up if-conversion if find one. Differential Revision: https://reviews.llvm.org/D39352 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321377 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22[ThinLTO][CachePruning] explicitly disable pruningBen Dunbobbin
In https://reviews.llvm.org/rL321077 and https://reviews.llvm.org/D41231 I fixed a regression in the c-api which prevented the pruning from being *effectively* disabled. However this approach, helpfully recommended by @labath, is cleaner. It is also nice to remove the weasel words about effectively disabling from the api comments. Differential Revision: https://reviews.llvm.org/D41497 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321376 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22(Re-landing) Expose a TargetMachine::getTargetTransformInfo functionSanjoy Das
Re-land r321234. It had to be reverted because it broke the shared library build. The shared library build broke because there was a missing LLVMBuild dependency from lib/Passes (which calls TargetMachine::getTargetIRAnalysis) to lib/Target. As far as I can tell, this problem was always there but was somehow masked before (perhaps because TargetMachine::getTargetIRAnalysis was a virtual function). Original commit message: This makes the TargetMachine interface a bit simpler. We still need the std::function in TargetIRAnalysis to avoid having to add a dependency from Analysis to Target. See discussion: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119749.html I avoided adding all of the backend owners to this review since the change is simple, but let me know if you feel differently about this. Reviewers: echristo, MatzeB, hfinkel Reviewed By: hfinkel Subscribers: jholewinski, jfb, arsenm, dschuff, mcrosier, sdardis, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D41464 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321375 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22Rewrite the cached map used for locating the most precise DIE amongChandler Carruth
inlined subroutines for a given address. This is essentially the hot path of llvm-symbolizer when extracting inlined frames during symbolization. Previously, we would read every subprogram and every inlined subroutine, building a std::map across the entire PC space to the best DIE, and then do only a handful of queries as we symbolized a backtrace. A huge fraction of the time was spent building the map itself. This patch changes it two a two-level system. First, we just build a map from PC-interval to DWARF subprograms. These are required to be disjoint and so constructing this is pretty easy. Second, we build a map *just* for the inlined subroutines within the subprogram containing the query address. This allows us to look at far fewer DIEs and build a *much* smaller set of cached maps in the llvm-symbolizer case where only a few address get symbolized during the entire run. It also builds both interval maps in a very different way. It constructs a single flat vector of pairs that maps from offset -> index. The indices point into collections of DIE objects, but can also be "tombstones" (-1) to mark gaps. In the case of subprograms, this mostly just simplifies the data structure a bit. For inlined subroutines, because we carefully split them as we build the map, we end up in many cases having no holes and not having to store both start and stop offsets. Finally, the PC ranges for the inlined subroutines are compressed into 32-bits by making them relative to the base PC of the outer subprogram. This means that if you have a single function body with over 2gb of executable code in it, we will stop mapping address past the first 2gb of that function into inlined subroutines and just give you the subprogram. This doesn't seem like a problem. ;] All of this combines to make llvm-symbolizer *well* over 2x faster for symbolizing backtraces out of LLVM's unittests. Death-test heavy unit tests are running >2x faster. I'm still going to look at completely disabling symbolization there, but figured while I had a good benchmark we should make symbolization a bit better. Sadly, the logic to build the flat interval map for the inlined subroutines is fairly complex. I'm not super happy about this and welcome any simplifying suggestions. Huge thanks to Dave Blaikie who helped walk me through what the various things I needed to do in DWARF to make this work. Differential Revision: https://reviews.llvm.org/D40987 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22[Inliner] Restrict soft-float inlining penalty.Eli Friedman
The penalty is currently getting applied in a bunch of places where it doesn't make sense, like bitcasts (which are free) and calls (which were getting the call penalty applied twice). Instead, just apply the penalty to binary operators and floating-point casts. While I'm here, also fix getFPOpCost() to do the right thing in more cases, so we don't have to dig into function attributes. Differential Revision: https://reviews.llvm.org/D41522 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22Add hasProfileData() to check if a function has profile data. NFC.Easwaran Raman
Summary: This replaces calls to getEntryCount().hasValue() with hasProfileData that does the same thing. This refactoring is useful to do before adding synthetic function entry counts but also a useful cleanup IMO even otherwise. I have used hasProfileData instead of hasRealProfileData as David had earlier suggested since I think profile implies "real" and I use the phrase "synthetic entry count" and not "synthetic profile count" but I am fine calling it hasRealProfileData if you prefer. Reviewers: davidxl, silvas Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41461 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[ModRefInfo] Add must alias info to ModRefInfo.Alina Sbirlea
Summary: Add an additional bit to ModRefInfo, ModRefInfo::Must, to be cleared for known must aliases. Shift existing Mod/Ref/ModRef values to include an additional most significant bit. Update wrappers that modify ModRefInfo values to reflect the change. Notes: * ModRefInfo::Must is almost entirely cleared in the AAResults methods, the remaining changes are trying to preserve it. * Only some small changes to make custom AA passes set ModRefInfo::Must (BasicAA). * GlobalsModRef already declares a bit, who's meaning overlaps with the most significant bit in ModRefInfo (MayReadAnyGlobal). No changes to shift the value of MayReadAnyGlobal (see AlignedMap). FunctionInfo.getModRef() ajusts most significant bit so correctness is preserved, but the Must info is lost. * There are cases where the ModRefInfo::Must is not set, e.g. 2 calls that only read will return ModRefInfo::NoModRef, though they may read from exactly the same location. Reviewers: dberlin, hfinkel, george.burgess.iv Subscribers: llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D38862 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321309 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[DWARF v5] Rework of string offsets table readerWolfgang Pieb
Reorganizes the DWARF consumer to derive the string offsets table contribution's format from the contribution header instead of (incorrectly) from the unit's format. Reviewers: JDevliegehere, aprantl Differential Revision: https://reviews.llvm.org/D41146 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321295 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[YAML] Refactor escaping unittestsFrancis Visoiu Mistrih
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321284 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[Support] Remove MemoryBuffer::getNewUninitMemBufferPavel Labath
There is nothing useful that can be done with a read-only uninitialized buffer without const_casting its contents to initialize it. A better solution is to obtain a writable buffer (WritableMemoryBuffer::getNewUninitMemBuffer), and then convert it to a read-only buffer after initialization. All callers of this function have already been updated to do this, so this function is now unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321257 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[WebAssembly] Remove unneeded sub-directorySam Clegg
This is the only wasm def (and likely likely will be for the foreseeable) file so no need for a sub-directory Differential Revision: https://reviews.llvm.org/D41476 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321246 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21Revert "Expose a TargetMachine::getTargetTransformInfo function"Sanjoy Das
This reverts commit r321234. It breaks the -DBUILD_SHARED_LIBS=ON build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321243 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[WebAssembly] Fix local references to weak aliasesSam Clegg
When weak aliases are used with in same translation unit we need to be able to directly reference to alias and not just the thing it is aliases. We do this by defining both a wasm import and a wasm export in this case that result in a single Symbol. This change is a partial revert of rL314245. A corresponding lld change address the previous issues we had with this. See: https://github.com/WebAssembly/tool-conventions/issues/34 Differential Revision: https://reviews.llvm.org/D41472 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321242 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21Expose a TargetMachine::getTargetTransformInfo functionSanjoy Das
Summary: This makes the TargetMachine interface a bit simpler. We still need the std::function in TargetIRAnalysis to avoid having to add a dependency from Analysis to Target. See discussion: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119749.html I avoided adding all of the backend owners to this review since the change is simple, but let me know if you feel differently about this. Reviewers: echristo, MatzeB, hfinkel Reviewed By: hfinkel Subscribers: jholewinski, jfb, arsenm, dschuff, mcrosier, sdardis, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D41464 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20TableGen: Allow setting SDNodeProperties on intrinsicsMatt Arsenault
Allows preserving MachineMemOperands on intrinsics through selection. For reasons I don't understand, this is a static property of the pattern and the selector deliberately goes out of its way to drop if not present. Intrinsics already inherit from SDPatternOperator allowing them to be used directly in instruction patterns. SDPatternOperator has a list of SDNodeProperty, but you currently can't set them on the intrinsic. Without SDNPMemOperand, when the node is selected any memory operands are always dropped. Allowing setting this on the intrinsics avoids needing to introduce another equivalent target node just to have SDNPMemOperand set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321212 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[ICP] Expose unconditional call promotion interfaceMatthew Simpson
This patch modifies the indirect call promotion utilities by exposing and using an unconditional call promotion interface. The unconditional promotion interface (i.e., call promotion without creating an if-then-else) can be used if it's known that an indirect call has only one possible callee. The existing conditional promotion interface uses this unconditional interface to promote an indirect call after it has been versioned and placed within the "then" block. A consequence of unconditional promotion is that the fix-up operations for phi nodes in the normal destination of invoke instructions are changed. This is necessary because the existing implementation assumed that an invoke had been versioned, creating a "merge" block where a return value bitcast could be placed. In the new implementation, the edge between a promoted invoke's parent block and its normal destination is split if needed to add a bitcast for the return value. If the invoke is also versioned, the phi node merging the return value of the promoted and original invoke instructions is placed in the "merge" block. Differential Revision: https://reviews.llvm.org/D40751 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321210 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[hwasan] Implement -fsanitize-recover=hwaddress.Evgeniy Stepanov
Summary: Very similar to AddressSanitizer, with the exception of the error type encoding. Reviewers: kcc, alekseyshl Subscribers: cfe-commits, kubamracek, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D41417 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321203 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[PGO] Function section hotness prefix should look at all blocksTeresa Johnson
Summary: The function section prefix for PGO based layout (e.g. hot/unlikely) should look at the hotness of all blocks not just the entry BB. A function with a cold entry but a very hot loop should be placed in the hot section, for example, so that it is located close to other hot functions it may call. For SamplePGO it was already looking at the branch weights on calls, and I made that code conditional on whether this is SamplePGO since it was essentially a noop for instrumentation PGO anyway. Reviewers: davidxl Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D41395 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321197 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[JumpTables] Let targets decide which switch instructions are suitableNemanja Ivanovic
This commits the non-controversial part of https://reviews.llvm.org/D41029 (making the queries virtual). The PPC-specific portion of this will be committed in a subsequent patch once some of the finer points are ironed out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321182 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20Revert r320548:[SLP] Vectorize jumbled memory loadsMohammad Shahid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321181 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20Add optional SelectionDAG* parameter to SValue::dump and SDValue::dumprKrzysztof Parzyszek
These functions simply call their counterparts in the associated SDNode, which do take an optional SelectionDAG. This change makes the legalization debug trace a little easier to read, since target-specific nodes will now have their names shown instead of "Unknown node #123". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321180 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[SCEV] Fix Typo. NFC.Javed Absar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321179 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[NVPTX] Initial adaptation of MCAsmStreamer/MCTargetStreamer for debug info ↵Alexey Bataev
in Cuda. Summary: Initial changes in interfaces of MCAsmStreamer/MCTargetStreamer for correct debug info emission for Cuda. 1. PTX foramt does not support `.ascii` directives. Added the ability to nullify it. 2. The initial function label must follow the first debug `.loc` directive, not be followed by. 3. DWARF sections must be enclosed in braces. Reviewers: hfinkel, probinson, jlebar, rafael, echristo Subscribers: sdardis, nemanjai, llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D40033 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321178 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[globalisel][tablegen] Allow ImmLeaf predicates to use InstructionSelector ↵Daniel Sanders
members NFC for currently supported targets. This resolves a problem encountered by targets such as RISCV that reference `Subtarget` in ImmLeaf predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-20[memcpyopt] Teach memcpyopt to optimize across basic blocksDan Gohman
This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows it to eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%. This is r319482 and r319483, along with fixes for PR35519: fix the optimization that merges stores into memsets to preserve cached memdep info, and fix memdep's non-local caching strategy to not assume that larger queries are always more conservative than smaller ones. Fixes PR28958 and PR35519. Differential Revision: https://reviews.llvm.org/D40802 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321138 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[CodeGen] Move printing MO_BlockAddress operands to MachineOperand::printFrancis Visoiu Mistrih
Work towards the unification of MIR and debug output by refactoring the interfaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[CodeGen] Refactor printOffset from MO and MIRPrinterFrancis Visoiu Mistrih
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321109 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[CodeGen] Move printing MO_CFIIndex operands to MachineOperand::printFrancis Visoiu Mistrih
Work towards the unification of MIR and debug output by refactoring the interfaces. Before this patch we printed "<call frame instruction>" in the debug output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[ThinLTO][C-API] Correct api commentsBen Dunbobbin
Negative values never disabled the pruning - they simply set high values for the pruning interval. The behaviour now is that negative values set the maximum pruning interval (which appears to have been the intention from the start) see https://reviews.llvm.org/D41231. I have adjusted the comments to reflect this, removed any inaccurate statements, and corrected any typos I spotted in the English. Differential Revision: https://reviews.llvm.org/D41279 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[Support][CachePruning] Disable cache pruning regression fixBen Dunbobbin
borked by: rL284966 (see: https://reviews.llvm.org/D25730). Previously, Interval was unsigned (see: CachePruning.h), replacing the type with std::chrono::seconds (which is signed) causes a regression in behaviour because the c-api intends negative values to translate to large positive intervals to *effectively* disable the pruning (see comments on: setCachePruningInterval()). Differential Revision: https://reviews.llvm.org/D41231 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[Support] Add WritableMemoryBuffer classPavel Labath
Summary: The motivation here is LLDB, where we need to fixup relocations in mmapped files before their contents can be read correctly. The MemoryBuffer class does exactly what we need, *except* that it maps the file in read-only mode. WritableMemoryBuffer reuses the existing machinery for opening and mmapping a file. The only difference is in the argument to the mapped_file_region constructor -- we create a private copy-on-write mapping, so that we can make changes to the mapped data, but the changes aren't carried over to the underlying file. This patch is based on an initial version by Zachary Turner. Reviewers: mehdi_amini, rnk, rafael, dblaikie, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40291 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19Fix: [YAML] Always double quote UTF-8 charactersFrancis Visoiu Mistrih
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321069 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[YAML] Always double quote UTF-8 charactersFrancis Visoiu Mistrih
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19[FuzzMutate] Don't crash when mutator is unable to find operationIgor Laevsky
Differential Revision: https://reviews.llvm.org/D41009 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321062 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-19TargetLowering: Fix off-by-one errorMatthias Braun
This problem was present for a while, but somehow asan didn't catch it before the refactoring in r321036. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18LiveStacks: Rename LiveStack.{h|cpp} to LiveStacks.{h|cpp}; NFCMatthias Braun
Filenames should match the name of the class they contain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18X86/AArch64/ARM: Factor out common sincos_stret logic; NFCIMatthias Braun
Note: - X86ISelLowering: setLibcallName(SINCOS) was superfluous as InitLibcalls() already does it. - ARMISelLowering: Setting libcallnames for sincos/sincosf seemed superfluous as in the darwin case it wouldn't be used while for all other cases InitLibcalls already does it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18AArch64/X86: Factor out common bzero logic; NFCMatthias Braun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header."Paul Robinson
Adds missing support for DW_FORM_data16. Update of r320852/r320886, fixing the unittest again, this time use a raw char string for the test data. Differential Revision: https://reviews.llvm.org/D41090 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321011 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18[IR] Support the new TBAA metadata format in IR verifierIvan A. Kosarev
Differential Revision: https://reviews.llvm.org/D40438 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321007 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18[YAML] Add support for non-printable charactersFrancis Visoiu Mistrih
LLVM IR function names which disable mangling start with '\01' (https://www.llvm.org/docs/LangRef.html#identifiers). When an identifier like "\01@abc@" gets dumped to MIR, it is quoted, but only with single quotes. http://www.yaml.org/spec/1.2/spec.html#id2770814: "The allowed character range explicitly excludes the C0 control block allowed), the surrogate block #xD800-#xDFFF, #xFFFE, and #xFFFF." http://www.yaml.org/spec/1.2/spec.html#id2776092: "All non-printable characters must be escaped. [...] Note that escape sequences are only interpreted in double-quoted scalars." This patch adds support for printing escaped non-printable characters between double quotes if needed. Should also fix PR31743. Differential Revision: https://reviews.llvm.org/D41290 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18[IR] Add MDBuilder helpers for the new TBAA metadata formatIvan A. Kosarev
The new helpers are supposed to be used in clang to generate TBAA information in the new format proposed in this thread: http://lists.llvm.org/pipermail/llvm-dev/2017-November/118748.html Differential Revision: https://reviews.llvm.org/D39956 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18[Memcpy Loop Lowering] Remove the fixed int8 lowering.Sean Fertile
Switch over to the lowering that uses target supplied operand types. Differential Revision: https://reviews.llvm.org/D41201 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320989 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18Constexprify LaneBitmask factory methods.Benjamin Kramer
This avoids global constructors when they're used in a global constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320979 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18[ConstantRange] Support for ashr in ConstantRange computationMax Kazantsev
Extend the ConstantRange implementation to compute the range of possible values resulting from an arithmetic right shift operation. There will be a follow up patch to leverage this constant range infrastructure in LazyValueInfo. Patch by Surya Kumari Jangala! Differential Revision: https://reviews.llvm.org/D40881 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-17Re-commit "Properly handle multi-element and dynamically sized allocas in ↵Bjorn Steinbrink
getPointerDereferenceableBytes()"" llvm-clang-x86_64-expensive-checks-win is still broken, so the failure seems unrelated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320953 91177308-0d34-0410-b5e6-96231b3b80d8