summaryrefslogtreecommitdiff
path: root/unittests
AgeCommit message (Collapse)Author
2018-08-13Merging r339411:Hans Wennborg
------------------------------------------------------------------------ r339411 | gbiv | 2018-08-10 07:14:43 +0200 (Fri, 10 Aug 2018) | 17 lines [MemorySSA] "Fix" lifetime intrinsic handling MemorySSA currently creates MemoryAccesses for lifetime intrinsics, and sometimes treats them as clobbers. This may/may not be the best way forward, but while we're doing it, we should consider MayAlias/PartialAlias to be clobbers. The ideal fix here is probably to remove all of this reasoning about lifetimes from MemorySSA + put it into the passes that need to care. But that's a wayyy broader fix that needs some consensus, and we have miscompiles + a release branch today, and this should solve the miscompiles just as well. differential revision is D43269. Landing without an explicit LGTM (and without using the special please-autoclose-this syntax) so we can still use that revision as a place to decide what the right fix here is. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339545 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01[DebugInfo] Have custom std::reverse_iterator<DWARFDie>Jonas Devlieghere
The DWARFDie is a lightweight utility wrapper that stores a pointer to a compile unit and a debug info entry. Currently, its iterator (used for walking over its children) stores a DWARFDie and returns a const reference when dereferencing it. When the iterator is modified (by incrementing or decrementing it), this reference becomes invalid. This was happening when calling reverse on it, because the std::reverse_iterator is keeping a temporary copy of the iterator (see https://en.cppreference.com/w/cpp/iterator/reverse_iterator for a good illustration). The relevant code in libcxx: reference operator*() const {_Iter __tmp = current; return *--__tmp;} When dereferencing the reverse iterator, we decrement and return a reference to a DWARFDie stored in the stack frame of this function, resulting in UB at runtime. This patch specifies the std::reverse_iterator for DWARFDie to do the right thing. Differential revision: https://reviews.llvm.org/D49679 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338506 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31[CodeView] Minimal support for S_UNAMESPACE recordsAlexandre Ganea
Differential Revision: https://reviews.llvm.org/D50007 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338417 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31[VPlan] Introduce VPLoopInfo analysis.Diego Caballero
The patch introduces loop analysis (VPLoopInfo/VPLoop) for VPBlockBases. This analysis will be necessary to perform some H-CFG transformations and detect and introduce regions representing a loop in the H-CFG. Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48816 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338346 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30[VPlan] Introduce VPlan-based dominator analysis.Diego Caballero
The patch introduces dominator analysis for VPBlockBases and extend VPlan's GraphTraits specialization with the required interfaces. Dominator analysis will be necessary to perform some H-CFG transformations and to introduce VPLoopInfo (LoopInfo analysis on top of the VPlan representation). Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48815 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338310 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30[ORC] Add SerializationTraits for std::set and std::map.Lang Hames
Also, make SerializationTraits for pairs forward the actual pair template type arguments to the underlying serializer. This allows, for example, std::pair<StringRef, bool> to be passed as an argument to an RPC call expecting a std::pair<std::string, bool>, since there is an underlying serializer from StringRef to std::string that can be used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338305 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27Revert "[WebAssembly] Added default stack-only instruction mode for MC."Wouter van Oortmerssen
This reverts commit d3c9af4179eae7793d1487d652e2d4e23844555f. (SVN revision 338164) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338176 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27[WebAssembly] Added default stack-only instruction mode for MC.Wouter van Oortmerssen
Summary: Moved Explicit Locals pass to last. Made that pass obligatory. Made it convert from register to stack based instructions, and removed the registers. Fixes to related code that was expecting register based instructions. Added the correct testing flag to all tests, depending on what the format they were expecting so far. Translated one test to stack format as example: reg-stackify-stack.ll tested: llvm-lit -v `find test -name WebAssembly` unittests/MC/* Reviewers: dschuff, sunfish Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D49160 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338164 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26[DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst usersVedant Kumar
LowerDbgDeclare inserts a dbg.value before each use of an address described by a dbg.declare. When inserting a dbg.value before a CallInst use, however, it fails to append DW_OP_deref to the DIExpression. The DW_OP_deref is needed to reflect the fact that a dbg.value describes a source variable directly (as opposed to a dbg.declare, which relies on pointer indirection). This patch adds in the DW_OP_deref where needed. This results in the correct values being shown during a debug session for a program compiled with ASan and optimizations (see https://reviews.llvm.org/D49520). Note that ConvertDebugDeclareToDebugValue is already correct -- no changes there were needed. One complication is that SelectionDAG is unable to distinguish between direct and indirect frame-index (FRAMEIX) SDDbgValues. This patch also fixes this long-standing issue in order to not regress integration tests relying on the incorrect assumption that all frame-index SDDbgValues are indirect. This is a necessary fix: the newly-added DW_OP_derefs cannot be lowered properly otherwise. Basically the fix prevents a direct SDDbgValue with DIExpression(DW_OP_deref) from being dereferenced twice by a debugger. There were a handful of tests relying on this incorrect "FRAMEIX => indirect" assumption which actually had incorrect DW_AT_locations: these are all fixed up in this patch. Testing: - check-llvm, and an end-to-end test using lldb to debug an optimized program. - Existing unit tests for DIExpression::appendToStack fully cover the new DIExpression::append utility. - check-debuginfo (the debug info integration tests) Differential Revision: https://reviews.llvm.org/D49454 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338069 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26[ADT] Replace std::isprint by llvm::isPrint.Michael Kruse
The standard library functions ::isprint/std::isprint have platform- and locale-dependent behavior which makes LLVM's output less predictable. In particular, regression tests my fail depending on the implementation of these functions. Implement llvm::isPrint in StringExtras.h with a standard behavior and replace all uses of ::isprint/std::isprint by a call it llvm::isPrint. The function is inlined and does not look up language settings so it should perform better than the standard library's version. Such a replacement has already been done for isdigit, isalpha, isxdigit in r314883. gtest does the same in gtest-printers.cc using the following justification: // Returns true if c is a printable ASCII character. We test the // value of c directly instead of calling isprint(), which is buggy on // Windows Mobile. inline bool IsPrintableAscii(wchar_t c) { return 0x20 <= c && c <= 0x7E; } Similar issues have also been encountered by Julia: https://github.com/JuliaLang/julia/issues/7416 I noticed the problem myself when on Windows isprint('\t') started to evaluate to true (see https://stackoverflow.com/questions/51435249) and thus caused several unit tests to fail. The result of isprint doesn't seem to be well-defined even for ASCII characters. Therefore I suggest to replace isprint by a platform-independent version. Differential Revision: https://reviews.llvm.org/D49680 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338034 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26dwarfgen: Add support for generating the debug_str_offsets section, take 3Pavel Labath
Previous version of this patch failed on darwin targets because of different handling of cross-debug-section relocations. This fixes the tests to emit the DW_AT_str_offsets_base attribute correctly in both cases. Since doing this is a non-trivial amount of code, and I'm going to need it in more than one test, I've added a helper function to the dwarfgen DIE class to do it. Original commit message follows: The motivation for this is D49493, where we'd like to test details of debug_str_offsets behavior which is difficult to trigger from a traditional test. This adds the plubming necessary for dwarfgen to generate this section. The more interesting changes are: - I've moved emitStringOffsetsTableHeader function from DwarfFile to DwarfStringPool, so I can generate the section header more easily from the unit test. - added a new addAttribute overload taking an MCExpr*. This is used to generate the DW_AT_str_offsets_base, which links a compile unit to the offset table. I've also added a basic test for reading and writing DW_form_strx forms. Reviewers: dblaikie, JDevlieghere, probinson Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D49670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338031 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26dwarfgen: Don't create an AsmPrinter with an invalid ObjFile loweringPavel Labath
The AsmPrinter created in the tests contained an uninitialized TargetLoweringObjectFile. Things mostly worked regardless, because we used a separate instance of that class to specify sections to emit. This rearanges the object construction order so that we can avoid creating two lowering objects. Instead, we properly initialize the object in the AsmPrinter, and have the DWARF generator store a pointer to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338026 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26[Support] Introduce createStringError helper functionVictor Leschuk
The function in question is copy-pasted lots of times in DWARF-related classes. Thus it will make sense to place its implementation into the Support library. Reviewed by: lhames Differential Revision: https://reviews.llvm.org/D49824 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337995 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25Revert "dwarfgen: Add support for generating the debug_str_offsets section, ↵Pavel Labath
take 2" This reverts commit r337933. The build error is fixed but the test now fails on the darwin buildbots. Investigating... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337935 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25dwarfgen: Add support for generating the debug_str_offsets section, take 2Pavel Labath
This recommits r337910 after fixing an "ambiguous call to addAttribute" error with some compilers (gcc circa 4.9 and MSVC). It seems that these compilers will consider a "false -> pointer" conversion during overload resolution. This creates ambiguity because one I added an overload which takes a MCExpr * as an argument. I fix this by making the new overload take MCExpr&, which avoids the conversion. It also documents the fact that we expect a valid MCExpr object. Original commit message follows: The motivation for this is D49493, where we'd like to test details of debug_str_offsets behavior which is difficult to trigger from a traditional test. This adds the plubming necessary for dwarfgen to generate this section. The more interesting changes are: - I've moved emitStringOffsetsTableHeader function from DwarfFile to DwarfStringPool, so I can generate the section header more easily from the unit test. - added a new addAttribute overload taking an MCExpr*. This is used to generate the DW_AT_str_offsets_base, which links a compile unit to the offset table. I've also added a basic test for reading and writing DW_form_strx forms. Reviewers: dblaikie, JDevlieghere, probinson Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D49670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337933 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25Revert "dwarfgen: Add support for generating the debug_str_offsets section"Pavel Labath
This reverts commit r337910 as it's generating "ambiguous call to addAttribute" errors on some bots. Will resubmit once I get a chance to look into the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337924 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25dwarfgen: Add support for generating the debug_str_offsets sectionPavel Labath
Summary: The motivation for this is D49493, where we'd like to test details of debug_str_offsets behavior which is difficult to trigger from a traditional test. This adds the plubming necessary for dwarfgen to generate this section. The more interesting changes are: - I've moved emitStringOffsetsTableHeader function from DwarfFile to DwarfStringPool, so I can generate the section header more easily from the unit test. - added a new addAttribute overload taking an MCExpr*. This is used to generate the DW_AT_str_offsets_base, which links a compile unit to the offset table. I've also added a basic test for reading and writing DW_form_strx forms. Reviewers: dblaikie, JDevlieghere, probinson Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D49670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337910 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24Recommit r334887: [SmallSet] Add SmallSetIterator.Florian Hahn
Updated to make sure we properly construct/destroy SetIter if it has a non-trivial ctors/dtors, like in MSVC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337818 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[DebugCounters] Keep track of total countsGeorge Burgess IV
This patch makes debug counters keep track of the total number of times we've called `shouldExecute` for each counter, so it's easier to build automated tooling on top of these. A patch to print these counts is coming soon. Patch by Zhizhou Yang! Differential Revision: https://reviews.llvm.org/D49560 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-21[ORC] Re-apply r336760 with fixes.Lang Hames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337637 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20Re-apply r337595 with fix for LLVM_ENABLE_THREADS=Off.Lang Hames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337626 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[ADT] Only run death tests in !NDEBUGBenjamin Kramer
These invoke undefined behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337625 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20Revert r337595 "[ORC] Add new symbol lookup methods to ExecutionSessionBase ↵Reid Kleckner
in preparation for" Breaks the build with LLVM_ENABLE_THREADS=OFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337608 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[ORC] Add new symbol lookup methods to ExecutionSessionBase in preparation forLang Hames
deprecating SymbolResolver and AsynchronousSymbolQuery. Both lookup overloads take a VSO search order to perform the lookup. The first overload is non-blocking and takes OnResolved and OnReady callbacks. The second is blocking, takes a boolean flag to indicate whether to wait until all symbols are ready, and returns a SymbolMap. Both overloads take a RegisterDependencies function to register symbol dependencies (if any) on the query. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337595 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[ORC] Simplify VSO::lookupFlags to return the flags map.Lang Hames
This discards the unresolved symbols set and returns the flags map directly (rather than mutating it via the first argument). The unresolved symbols result made it easy to chain lookupFlags calls, but such chaining should be rare to non-existant (especially now that symbol resolvers are being deprecated) so the simpler method signature is preferable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337594 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[ORC] Replace SymbolResolvers in the new ORC layers with search orders on VSOs.Lang Hames
A search order is a list of VSOs to be searched linearly to find symbols. Each VSO now has a search order that will be used when fixing up definitions in that VSO. Each VSO's search order defaults to just that VSO itself. This is a first step towards removing symbol resolvers from ORC altogether. In practice symbol resolvers tended to be used to implement a search order anyway, sometimes with additional programatic generation of symbols. Now that VSOs support programmatic generation of definitions via fallback generators, search orders provide a cleaner way to achieve the desired effect (while removing a lot of boilerplate). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337593 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20Add llvm::Any.Zachary Turner
This is analogous to std::any which is only available in C++17. Differential Revision: https://reviews.llvm.org/D48807 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337573 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[OpenEmbedded] Add a unittest for aarch64-oe-linuxMandeep Singh Grang
Summary: Added a unittest for aarch64-oe-linux which was missed in D48861. Reviewers: compnerd, rengolin, javed.absar Reviewed By: compnerd Subscribers: kristof.beyls, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D49314 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337479 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[APInt] Keep the original bit width in quotient and remainderKrzysztof Parzyszek
Some trivial cases in udivrem were handled by directly assigning 0 or 1 to APInt objects. This would set the bit width to 1, instead of the bit width of the inputs. A potentially undesirable side effect of that is that with the bit width of 1, 1 equals -1. Differential Revision: https://reviews.llvm.org/D49554 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337478 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17Revert rL337292 due to another MSVC STL problem.Florian Hahn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337303 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17Recommit r334887: [SmallSet] Add SmallSetIterator.Florian Hahn
Spell out destructor, copy/move constructor and assignment operators for MSVC STL, where set<T>::const_iterator is not trivially copy constructible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337292 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[WebAssembly] Remove ELF file support.Sam Clegg
This support was partial and temporary. Now that we have wasm object file support its no longer needed. Differential Revision: https://reviews.llvm.org/D48744 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337222 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[cfi-verify] Support AArch64.Joel Galenson
This patch adds support for AArch64 to cfi-verify. This required three changes to cfi-verify. First, it generalizes checking if an instruction is a trap by adding a new isTrap flag to TableGen (and defining it for x86 and AArch64). Second, the code that ensures that the operand register is not clobbered between the CFI check and the indirect call needs to allow a single dereference (in x86 this happens as part of the jump instruction). Third, we needed to ensure that return instructions are not counted as indirect branches. Technically, returns are indirect branches and can be covered by CFI, but LLVM's forward-edge CFI does not protect them, and x86 does not consider them, so we keep that behavior. In addition, we had to improve AArch64's code to evaluate the branch target of a MCInst to handle calls where the destination is not the first operand (which it often is not). Differential Revision: https://reviews.llvm.org/D48836 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[DomTreeUpdater] Ignore updates when both DT and PDT are nullptrsChijun Sima
Summary: Previously, when both DT and PDT are nullptrs and the UpdateStrategy is Lazy, DomTreeUpdater still pends updates inside. After this patch, DomTreeUpdater will ignore all updates from(`applyUpdates()/insertEdge*()/deleteEdge*()`) in this case. (call `delBB()` still pends BasicBlock deletion until a flush event according to the doc). The behavior of DomTreeUpdater previously documented won't change after the patch. Reviewers: dmgreen, davide, kuhar, brzycki, grosser Reviewed By: kuhar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48974 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336968 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12Reverted r336805 as it broke llvm-clang-x86_64-expensive-checks-win build botGalina Kistanova
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336923 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[Support] Require llvm::Error passed to formatv() to be wrapped in fmt_consume()Sam McCall
Summary: Someone must be responsible for handling an Error. When formatv takes ownership of an Error, the formatv_object destructor must take care of this. Passing an error by value to formatv() is not considered explicit enough to mark the error as handled (see D49013), so we require callers to use a format adapter to confirm this intent. Reviewers: zturner Subscribers: llvm-commits, lhames Differential Revision: https://reviews.llvm.org/D49170 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12[Dominators] Add isUpdateLazy() method to the DomTreeUpdaterChijun Sima
Summary: Previously, when people need to deal with DTU with different UpdateStrategy using different actions, they need to ``` if (DTU.getUpdateStrategy() == DomTreeUpdater::UpdateStrategy::Lazy) { ... } if (DTU.getUpdateStrategy() == DomTreeUpdater::UpdateStrategy::Eager) { ... } ``` After the patch, they can avoid code patterns above ``` if (DTU.isUpdateLazy()){ ... } if (!DTU.isUpdateLazy()){ ... } ``` Reviewers: kuhar, brzycki, dmgreen Reviewed By: kuhar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49056 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336886 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[DebugInfo] Make children iterator bidirectionalJonas Devlieghere
Make the DIE iterator bidirectional so we can move to the previous sibling of a DIE. Differential revision: https://reviews.llvm.org/D49173 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336823 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Recommit r334887: [SmallSet] Add SmallSetIterator.Florian Hahn
This version now uses the subset of is_trivially_XXX provided by GCC 4.8 and llvm/Support/type_traits.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336805 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Recommit r336653: [VPlan] Add VPlanTestBase.h with helperFlorian Hahn
The original version caused a memsan failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336792 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11Revert r336760: "[ORC] Add unit tests for the reexports utility that were..."Lang Hames
This patch broke a few buildbots. I will investigate and re-apply when I have a fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336767 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[ORC] Remove a shadowing definition.Lang Hames
There is already a VSO member V in the CoreAPIsStandardTest test fixture. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336761 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[ORC] Add unit tests for the reexports utility that were left out of r336741,Lang Hames
and fix a bug that these exposed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336760 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[ORC] Drop constexpr in unit test to appease a bot.Lang Hames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336758 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11[ORC] Use a gtest fixture to remove a bunch of boilerplate in CoreAPIsTest.cpp.Lang Hames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336757 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[ORC] Generalize alias materialization to support re-exports (i.e. aliasing ofLang Hames
symbols in another VSO). Also fixes a bug where chained aliases within a single VSO would deadlock on materialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336741 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Revert r336653 "[VPlan] Add VPlanTestBase.h with helper class to build VPlan ↵Evgeniy Stepanov
for tests." Memory leaks in tests. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/6289/steps/check-llvm%20asan/logs/stdio Direct leak of 192 byte(s) in 1 object(s) allocated from: #0 0x554ea8 in operator new(unsigned long) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:106 #1 0x56cef1 in llvm::VPlanTestBase::doAnalysis(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanTestBase.h:53:14 #2 0x56bec4 in llvm::VPlanTestBase::buildHCFG(llvm::BasicBlock*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanTestBase.h:57:3 #3 0x571f1e in llvm::(anonymous namespace)::VPlanHCFGTest_testVPInstructionToVPRecipesInner_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp:119:15 #4 0xed2291 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc #5 0xed44c8 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:2656:11 #6 0xed5890 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:2774:28 #7 0xef3634 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:4649:43 #8 0xef27e0 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc #9 0xebbc23 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46 #10 0xebbc23 in main /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/UnitTestMain/TestMain.cpp:51 #11 0x7f65569592e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) and more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336718 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[Support] Harded JSON against invalid UTF-8.Sam McCall
Parsing invalid UTF-8 input is now a parse error. Creating JSON values from invalid UTF-8 now triggers an assertion, and (in no-assert builds) substitutes the unicode replacement character. Strings retrieved from json::Value are always valid UTF-8. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336657 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10[VPlan] Add VPlanTestBase.h with helper class to build VPlan for tests.Florian Hahn
Reviewers: dcaballe, hsaito, rengolin Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D49032 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336653 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09llvm: Add support for "-fno-delete-null-pointer-checks"Manoj Gupta
Summary: Support for this option is needed for building Linux kernel. This is a very frequently requested feature by kernel developers. More details : https://lkml.org/lkml/2018/4/4/601 GCC option description for -fdelete-null-pointer-checks: This Assume that programs cannot safely dereference null pointers, and that no code or data element resides at address zero. -fno-delete-null-pointer-checks is the inverse of this implying that null pointer dereferencing is not undefined. This feature is implemented in LLVM IR in this CL as the function attribute "null-pointer-is-valid"="true" in IR (Under review at D47894). The CL updates several passes that assumed null pointer dereferencing is undefined to not optimize when the "null-pointer-is-valid"="true" attribute is present. Reviewers: t.p.northover, efriedma, jyknight, chandlerc, rnk, srhines, void, george.burgess.iv Reviewed By: efriedma, george.burgess.iv Subscribers: eraman, haicheng, george.burgess.iv, drinkcat, theraven, reames, sanjoy, xbolva00, llvm-commits Differential Revision: https://reviews.llvm.org/D47895 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336613 91177308-0d34-0410-b5e6-96231b3b80d8