[llvm-branch-commits] [cfe-branch] r339538 - Merging r339428 and r339494:
Author: hans Date: Mon Aug 13 00:59:11 2018 New Revision: 339538 URL: http://llvm.org/viewvc/llvm-project?rev=339538&view=rev Log: Merging r339428 and r339494: r339428 | theraven | 2018-08-10 14:53:13 +0200 (Fri, 10 Aug 2018) | 18 lines Add Windows support for the GNUstep Objective-C ABI V2. Summary: Introduces funclet-based unwinding for Objective-C and fixes an issue where global blocks can't have their isa pointers initialised on Windows. After discussion with Dustin, this changes the name mangling of Objective-C types to prevent a C++ catch statement of type struct X* from catching an Objective-C object of type X*. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall, DHowett-MSFT Subscribers: mgrang, mstorsjo, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D50144 r339494 | dyung | 2018-08-11 04:46:47 +0200 (Sat, 11 Aug 2018) | 2 lines Make the section boundary checks on Windows not depend on the order as they are emitted in reverse when the compiler is built by Visual C++. Modified: cfe/branches/release_70/ (props changed) cfe/branches/release_70/include/clang/Driver/Options.td cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp cfe/branches/release_70/lib/CodeGen/CGException.cpp cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp cfe/branches/release_70/lib/CodeGen/CGObjCRuntime.cpp cfe/branches/release_70/lib/CodeGen/CGObjCRuntime.h cfe/branches/release_70/lib/CodeGen/CodeGenFunction.h cfe/branches/release_70/lib/Driver/ToolChains/Clang.cpp cfe/branches/release_70/test/CodeGenObjC/gnu-init.m cfe/branches/release_70/test/CodeGenObjC/gnustep2-proto.m cfe/branches/release_70/test/CodeGenObjCXX/arc-marker-funclet.mm cfe/branches/release_70/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm cfe/branches/release_70/test/CodeGenObjCXX/msabi-objc-extensions.mm cfe/branches/release_70/test/CodeGenObjCXX/msabi-objc-types.mm Propchange: cfe/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 00:59:11 2018 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:338552-338553,338602,338627,338749,338942,339128,339170,339210,339281,339317 +/cfe/trunk:338552-338553,338602,338627,338749,338942,339128,339170,339210,339281,339317,339428,339494 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_70/include/clang/Driver/Options.td URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/include/clang/Driver/Options.td?rev=339538&r1=339537&r2=339538&view=diff == --- cfe/branches/release_70/include/clang/Driver/Options.td (original) +++ cfe/branches/release_70/include/clang/Driver/Options.td Mon Aug 13 00:59:11 2018 @@ -1488,7 +1488,7 @@ def fobjc_weak : Flag<["-"], "fobjc-weak HelpText<"Enable ARC-style weak references in Objective-C">; // Objective-C ABI options. -def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group, Flags<[CC1Option]>, +def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Specify the target Objective-C runtime kind and version">; def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group; def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group; Modified: cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp?rev=339538&r1=339537&r2=339538&view=diff == --- cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp (original) +++ cfe/branches/release_70/lib/AST/MicrosoftMangle.cpp Mon Aug 13 00:59:11 2018 @@ -445,7 +445,7 @@ void MicrosoftCXXNameMangler::mangle(con mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD)); else if (const VarDecl *VD = dyn_cast(D)) mangleVariableEncoding(VD); - else + else if (!isa(D)) llvm_unreachable("Tried to mangle unexpected NamedDecl!"); } @@ -1884,13 +1884,13 @@ void MicrosoftCXXNameMangler::mangleType llvm_unreachable("placeholder types shouldn't get to name mangling"); case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; case BuiltinType::ObjCClass: -mangleArtificalTagType(TTK_Struct, "objc_class"); +mangleArtificalTagType(TTK_Struct, ".objc_class"); break; case BuiltinType::ObjCSel: -mangleArtifi
[llvm-branch-commits] [llvm-branch] r339539 - Merging r339225:
Author: hans Date: Mon Aug 13 01:03:40 2018 New Revision: 339539 URL: http://llvm.org/viewvc/llvm-project?rev=339539&view=rev Log: Merging r339225: r339225 | thopre | 2018-08-08 11:35:26 +0200 (Wed, 08 Aug 2018) | 11 lines Support inline asm with multiple 64bit output in 32bit GPR Summary: Extend fix for PR34170 to support inline assembly with multiple output operands that do not naturally go in the register class it is constrained to (eg. double in a 32-bit GPR as in the PR). Reviewers: bogner, t.p.northover, lattner, javed.absar, efriedma Reviewed By: efriedma Subscribers: efriedma, tra, eraman, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D45437 Added: llvm/branches/release_70/test/CodeGen/ARM/inlineasm-operand-implicit-cast.ll - copied unchanged from r339225, llvm/trunk/test/CodeGen/ARM/inlineasm-operand-implicit-cast.ll Removed: llvm/branches/release_70/test/CodeGen/ARM/inline-asm-operand-implicit-cast.ll Modified: llvm/branches/release_70/ (props changed) llvm/branches/release_70/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Propchange: llvm/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 01:03:40 2018 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339190,339316,339319 +/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339190,339225,339316,339319 Modified: llvm/branches/release_70/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=339539&r1=339538&r2=339539&view=diff == --- llvm/branches/release_70/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/branches/release_70/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Aug 13 01:03:40 2018 @@ -7768,10 +7768,29 @@ void SelectionDAGBuilder::visitInlineAsm SDValue Val = RetValRegs.getCopyFromRegs(DAG, FuncInfo, getCurSDLoc(), Chain, &Flag, CS.getInstruction()); -// FIXME: Why don't we do this for inline asms with MRVs? -if (CS.getType()->isSingleValueType() && CS.getType()->isSized()) { - EVT ResultType = TLI.getValueType(DAG.getDataLayout(), CS.getType()); - +llvm::Type *CSResultType = CS.getType(); +unsigned numRet; +ArrayRef ResultTypes; +SmallVector ResultValues(1); +if (CSResultType->isSingleValueType()) { + numRet = 1; + ResultValues[0] = Val; + ResultTypes = makeArrayRef(CSResultType); +} else { + numRet = CSResultType->getNumContainedTypes(); + assert(Val->getNumOperands() == numRet && + "Mismatch in number of output operands in asm result"); + ResultTypes = CSResultType->subtypes(); + ArrayRef ValueUses = Val->ops(); + ResultValues.resize(numRet); + std::transform(ValueUses.begin(), ValueUses.end(), ResultValues.begin(), + [](const SDUse &u) -> SDValue { return u.get(); }); +} +SmallVector ResultVTs(numRet); +for (unsigned i = 0; i < numRet; i++) { + EVT ResultVT = TLI.getValueType(DAG.getDataLayout(), ResultTypes[i]); + SDValue Val = ResultValues[i]; + assert(ResultTypes[i]->isSized() && "Unexpected unsized type"); // If the type of the inline asm call site return value is different but // has same size as the type of the asm output bitcast it. One example // of this is for vectors with different width / number of elements. @@ -7782,22 +7801,24 @@ void SelectionDAGBuilder::visitInlineAsm // This can also happen for a return value that disagrees with the // register class it is put in, eg. a double in a general-purpose // register on a 32-bit machine. - if (ResultType != Val.getValueType() && - ResultType.getSizeInBits() == Val.getValueSizeInBits()) { -Val = DAG.getNode(ISD::BITCAST, getCurSDLoc(), - ResultType, Val); - - } else if (ResultType != Val.getValueType() && - ResultType.isInteger() && Val.getValueType().isInteger()) { -// If a result value was tied to an input value, the computed result may -// have a wider width than the expected result. Extract the relevant -// portion. -Val = DAG.getNode(ISD::TRUNCATE, getCurSDLoc(), ResultType, Val); + if (ResultVT != Val.getValueType() && +
[llvm-branch-commits] [llvm-branch] r339541 - Merging r339073:
Author: hans Date: Mon Aug 13 01:13:43 2018 New Revision: 339541 URL: http://llvm.org/viewvc/llvm-project?rev=339541&view=rev Log: Merging r339073: r339073 | stella.stamenova | 2018-08-07 00:37:44 +0200 (Tue, 07 Aug 2018) | 14 lines [lit, python] Always add quotes around the python path in lit Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests. Reviewers: asmith, zturner, alexshap, jakehehrlich Reviewed By: zturner, alexshap, jakehehrlich Subscribers: mehdi_amini, nemanjai, eraman, kbarton, jakehehrlich, steven_wu, dexonsmith, stella.stamenova, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50206 Modified: llvm/branches/release_70/ (props changed) llvm/branches/release_70/test/BugPoint/compile-custom.ll llvm/branches/release_70/test/BugPoint/unsymbolized.ll llvm/branches/release_70/test/Other/opt-bisect-legacy-pass-manager.ll llvm/branches/release_70/test/TableGen/JSON.td llvm/branches/release_70/test/ThinLTO/X86/cache.ll llvm/branches/release_70/test/tools/llvm-cov/showLineExecutionCounts.cpp llvm/branches/release_70/test/tools/llvm-objcopy/auto-remove-shndx.test llvm/branches/release_70/test/tools/llvm-objcopy/many-sections.test llvm/branches/release_70/test/tools/llvm-objcopy/remove-shndx.test llvm/branches/release_70/test/tools/llvm-objcopy/strict-no-add.test llvm/branches/release_70/test/tools/llvm-symbolizer/pdb/pdb.test llvm/branches/release_70/test/tools/llvm-symbolizer/ppc64.test llvm/branches/release_70/utils/lit/lit/llvm/config.py llvm/branches/release_70/utils/lit/tests/Inputs/shtest-env/lit.cfg llvm/branches/release_70/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt llvm/branches/release_70/utils/lit/tests/Inputs/shtest-format/lit.cfg llvm/branches/release_70/utils/lit/tests/Inputs/shtest-shell/dev-null.txt llvm/branches/release_70/utils/lit/tests/Inputs/shtest-shell/lit.cfg llvm/branches/release_70/utils/lit/tests/Inputs/shtest-shell/redirects.txt llvm/branches/release_70/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt llvm/branches/release_70/utils/lit/tests/Inputs/shtest-timeout/lit.cfg llvm/branches/release_70/utils/lit/tests/lit.cfg Propchange: llvm/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 01:13:43 2018 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339190,339225,339316,339319 +/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339190,339225,339316,339319 Modified: llvm/branches/release_70/test/BugPoint/compile-custom.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/BugPoint/compile-custom.ll?rev=339541&r1=339540&r2=339541&view=diff == --- llvm/branches/release_70/test/BugPoint/compile-custom.ll (original) +++ llvm/branches/release_70/test/BugPoint/compile-custom.ll Mon Aug 13 01:13:43 2018 @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --opt-command opt --output-prefix %t %s | FileCheck %s +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%/s.py arg1 arg2" --opt-command opt --output-prefix %t %s | FileCheck %s ; REQUIRES: loadable_module ; Test that arguments are correctly passed in --compile-command. The output Modified: llvm/branches/release_70/test/BugPoint/unsymbolized.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/BugPoint/unsymbolized.ll?rev=339541&r1=339540&r2=339541&view=diff == --- llvm/branches/release_70/test/BugPoint/unsymbolized.ll (original) +++ llvm/branches/release_70/test/BugPoint/unsymbolized.ll Mon Aug 13 01:13:43 2018 @@ -2,7 +2,7 @@ ; RUN: echo "import sys" > %t.py ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py ; RUN: echo "exit(1)" >> %t.py -; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command="%python" -opt-args %t.py | FileCheck %s +; RUN: not bugpoin
[llvm-branch-commits] [llvm-branch] r339542 - Merging r339179 and r339184:
Author: hans Date: Mon Aug 13 01:15:58 2018 New Revision: 339542 URL: http://llvm.org/viewvc/llvm-project?rev=339542&view=rev Log: Merging r339179 and r339184: r339179 | stella.stamenova | 2018-08-07 22:54:38 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, python3] Update lit error logging to work correctly in python3 and other test fixes Summary: In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and instead all 'str' objects are Unicode string. This change updates the logic in the test logging for lit to correctly process each of the types, and more importantly, to not just fail in Python3. This change also reverses the use of quotes in several of the cfg files. By using '""' we are guaranteeing that the resulting path will work correctly on Windows while "''" only works correctly sometimes. This also fixes one of the failing tests. Reviewers: asmith, zturner Subscribers: stella.stamenova, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D50397 r339184 | stella.stamenova | 2018-08-07 23:21:30 +0200 (Tue, 07 Aug 2018) | 3 lines [lit] Disable shtest-timeout on Windows This test passes on Windows when using Python 3 but fails when using Python 2, so it needs more investigation before it can be enabled as the bots use Python 2. Modified: llvm/branches/release_70/ (props changed) llvm/branches/release_70/utils/lit/lit/Test.py llvm/branches/release_70/utils/lit/lit/llvm/config.py llvm/branches/release_70/utils/lit/tests/Inputs/shtest-env/lit.cfg llvm/branches/release_70/utils/lit/tests/Inputs/shtest-shell/lit.cfg llvm/branches/release_70/utils/lit/tests/Inputs/shtest-timeout/lit.cfg llvm/branches/release_70/utils/lit/tests/lit.cfg Propchange: llvm/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 01:15:58 2018 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339190,339225,339316,339319 +/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339179,339184,339190,339225,339316,339319 Modified: llvm/branches/release_70/utils/lit/lit/Test.py URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/utils/lit/lit/Test.py?rev=339542&r1=339541&r2=339542&view=diff == --- llvm/branches/release_70/utils/lit/lit/Test.py (original) +++ llvm/branches/release_70/utils/lit/lit/Test.py Mon Aug 13 01:15:58 2018 @@ -378,10 +378,15 @@ class Test: fil.write(testcase_xml) if self.result.code.isFailure: fil.write(">\n\t", ">
[llvm-branch-commits] [llvm-branch] r339544 - Merging r339492:
Author: hans Date: Mon Aug 13 01:25:39 2018 New Revision: 339544 URL: http://llvm.org/viewvc/llvm-project?rev=339544&view=rev Log: Merging r339492: r339492 | tstellar | 2018-08-11 03:08:34 +0200 (Sat, 11 Aug 2018) | 9 lines [gold] Fix Tests cases on i686 Reviewers: tejohnson Reviewed By: tejohnson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50583 Modified: llvm/branches/release_70/ (props changed) llvm/branches/release_70/test/tools/gold/X86/common.ll llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-1.ll llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-2.ll Propchange: llvm/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 01:25:39 2018 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339179,339184,339190,339225,339316,339319 +/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339179,339184,339190,339225,339316,339319,339492 Modified: llvm/branches/release_70/test/tools/gold/X86/common.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/tools/gold/X86/common.ll?rev=339544&r1=339543&r2=339544&view=diff == --- llvm/branches/release_70/test/tools/gold/X86/common.ll (original) +++ llvm/branches/release_70/test/tools/gold/X86/common.ll Mon Aug 13 01:25:39 2018 @@ -8,7 +8,7 @@ target triple = "x86_64-unknown-linux-gn @a = common global i16 0, align 8 -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ ; RUN:--plugin-opt=emit-llvm \ ; RUN:-shared %t1.o %t2.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=A @@ -16,7 +16,7 @@ target triple = "x86_64-unknown-linux-gn ; Shared library case, we merge @a as common and keep it for the symbol table. ; A: @a = common global [4 x i8] zeroinitializer, align 8 -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ ; RUN:--plugin-opt=emit-llvm \ ; RUN:-shared %t1.o %t2b.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=B @@ -24,7 +24,7 @@ target triple = "x86_64-unknown-linux-gn ; (i16 align 8) + (i8 align 16) = i16 align 16 ; B: @a = common global i16 0, align 16 -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ ; RUN:--plugin-opt=emit-llvm \ ; RUN:-shared %t1.o %t2c.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=C @@ -32,7 +32,7 @@ target triple = "x86_64-unknown-linux-gn ; (i16 align 8) + (i8 align 1) = i16 align 8. ; C: @a = common global i16 0, align 8 -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ ; RUN:--plugin-opt=emit-llvm \ ; RUN:%t1.o %t2.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=EXEC %s @@ -41,7 +41,7 @@ target triple = "x86_64-unknown-linux-gn ; EXEC: @a = internal global [4 x i8] zeroinitializer, align 8 ; RUN: llc %p/Inputs/common.ll -o %t2native.o -filetype=obj -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ ; RUN:--plugin-opt=emit-llvm \ ; RUN:%t1.o %t2native.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=MIXED %s Modified: llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-1.ll?rev=339544&r1=339543&r2=339544&view=diff == --- llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-1.ll (original) +++ llvm/branches/release_70/test/tools/gold/X86/v1.16/wrap-1.ll Mon Aug 13 01:25:39 2018 @@ -1,12 +1,12 @@ ; LTO ; RUN: llvm-as %s -o %t.o -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps +; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps ; RUN: llvm-readobj -t %t.out | FileCheck %s ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s ; ThinLTO ; RUN: opt -module-summary %s -o %t.o -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps +; R
[llvm-branch-commits] [llvm-branch] r339545 - Merging r339411:
Author: hans Date: Mon Aug 13 01:28:30 2018 New Revision: 339545 URL: http://llvm.org/viewvc/llvm-project?rev=339545&view=rev Log: Merging r339411: 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. Modified: llvm/branches/release_70/ (props changed) llvm/branches/release_70/lib/Analysis/MemorySSA.cpp llvm/branches/release_70/test/Transforms/EarlyCSE/memoryssa.ll llvm/branches/release_70/unittests/Analysis/MemorySSA.cpp Propchange: llvm/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 01:28:30 2018 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339179,339184,339190,339225,339316,339319,339492 +/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338902,338915,338968,339073,339179,339184,339190,339225,339316,339319,339411,339492 Modified: llvm/branches/release_70/lib/Analysis/MemorySSA.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/lib/Analysis/MemorySSA.cpp?rev=339545&r1=339544&r2=339545&view=diff == --- llvm/branches/release_70/lib/Analysis/MemorySSA.cpp (original) +++ llvm/branches/release_70/lib/Analysis/MemorySSA.cpp Mon Aug 13 01:28:30 2018 @@ -258,13 +258,18 @@ static ClobberAlias instructionClobbersQ if (const IntrinsicInst *II = dyn_cast(DefInst)) { // These intrinsics will show up as affecting memory, but they are just -// markers. +// markers, mostly. +// +// FIXME: We probably don't actually want MemorySSA to model these at all +// (including creating MemoryAccesses for them): we just end up inventing +// clobbers where they don't really exist at all. Please see D43269 for +// context. switch (II->getIntrinsicID()) { case Intrinsic::lifetime_start: if (UseCS) return {false, NoAlias}; AR = AA.alias(MemoryLocation(II->getArgOperand(1)), UseLoc); - return {AR == MustAlias, AR}; + return {AR != NoAlias, AR}; case Intrinsic::lifetime_end: case Intrinsic::invariant_start: case Intrinsic::invariant_end: Modified: llvm/branches/release_70/test/Transforms/EarlyCSE/memoryssa.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/Transforms/EarlyCSE/memoryssa.ll?rev=339545&r1=339544&r2=339545&view=diff == --- llvm/branches/release_70/test/Transforms/EarlyCSE/memoryssa.ll (original) +++ llvm/branches/release_70/test/Transforms/EarlyCSE/memoryssa.ll Mon Aug 13 01:28:30 2018 @@ -106,3 +106,45 @@ end: store i32 %v2, i32* @G3 ret void } + +;; Check that we respect lifetime.start/lifetime.end intrinsics when deleting +;; stores that, without the lifetime calls, would be writebacks. +; CHECK-LABEL: @test_writeback_lifetimes( +; CHECK-NOMEMSSA-LABEL: @test_writeback_lifetimes( +define void @test_writeback_lifetimes(i32* %p) { +entry: + %q = getelementptr i32, i32* %p, i64 1 + %pv = load i32, i32* %p + %qv = load i32, i32* %q + call void @llvm.lifetime.end.p0i8(i64 8, i32* %p) + call void @llvm.lifetime.start.p0i8(i64 8, i32* %p) + ; CHECK: store i32 %pv + ; CHECK-NOMEMSSA-LABEL: store i32 %pv + store i32 %pv, i32* %p + ; CHECK: store i32 %qv, i32* %q + ; CHECK-NOMEMSSA-LABEL: store i32 %qv, i32* %q + store i32 %qv, i32* %q + ret void +} + +;; Check that we respect lifetime.start/lifetime.end intrinsics when deleting +;; stores that, without the lifetime calls, would be writebacks. +; CHECK-LABEL: @test_writeback_lifetimes_multi_arg( +; CHECK-NOMEMSSA-LABEL: @test_writeback_lifetimes_multi_arg( +define void @test_writeback_lifetimes_multi_arg(i32* %p, i32* %q) { +entry: +
[llvm-branch-commits] [cfe-branch] r339554 - Merging r339074:
Author: hans Date: Mon Aug 13 04:51:39 2018 New Revision: 339554 URL: http://llvm.org/viewvc/llvm-project?rev=339554&view=rev Log: Merging r339074: r339074 | stella.stamenova | 2018-08-07 00:37:45 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, python] Always add quotes around the python path in lit Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This is a companion change to: https://reviews.llvm.org/D50206 Reviewers: asmith, zturner Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50281 Modified: cfe/branches/release_70/ (props changed) cfe/branches/release_70/test/Tooling/clang-diff-json.cpp Propchange: cfe/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 04:51:39 2018 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:338552-338553,338602,338627,338749,338942,339128,339170,339210,339281,339317,339428,339494 +/cfe/trunk:338552-338553,338602,338627,338749,338942,339074,339128,339170,339210,339281,339317,339428,339494 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_70/test/Tooling/clang-diff-json.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/test/Tooling/clang-diff-json.cpp?rev=339554&r1=339553&r2=339554&view=diff == --- cfe/branches/release_70/test/Tooling/clang-diff-json.cpp (original) +++ cfe/branches/release_70/test/Tooling/clang-diff-json.cpp Mon Aug 13 04:51:39 2018 @@ -1,10 +1,10 @@ // RUN: clang-diff -ast-dump-json %s -- \ -// RUN: | '%python' -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \ +// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \ // RUN: | FileCheck %s -// CHECK: "begin": 301, +// CHECK: "begin": 311, // CHECK: "type": "FieldDecl", -// CHECK: "end": 321, +// CHECK: "end": 319, // CHECK: "type": "CXXRecordDecl", class A { int x; ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [cfe-branch] r339555 - Merging r339264:
Author: hans Date: Mon Aug 13 04:53:27 2018 New Revision: 339555 URL: http://llvm.org/viewvc/llvm-project?rev=339555&view=rev Log: Merging r339264: r339264 | rksimon | 2018-08-08 17:53:14 +0200 (Wed, 08 Aug 2018) | 5 lines [CGObjCGNU] Rename GetSelector helper method to fix -Woverloaded-virtual warning (PR38210) As suggested by @theraven on PR38210, this patch fixes the gcc -Woverloaded-virtual warnings by renaming the extra CGObjCGNU::GetSelector method to CGObjCGNU::GetTypedSelector Differential Revision: https://reviews.llvm.org/D50448 Modified: cfe/branches/release_70/ (props changed) cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp Propchange: cfe/branches/release_70/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 13 04:53:27 2018 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:338552-338553,338602,338627,338749,338942,339074,339128,339170,339210,339281,339317,339428,339494 +/cfe/trunk:338552-338553,338602,338627,338749,338942,339074,339128,339170,339210,339264,339281,339317,339428,339494 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp?rev=339555&r1=339554&r2=339555&view=diff == --- cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp (original) +++ cfe/branches/release_70/lib/CodeGen/CGObjCGNU.cpp Mon Aug 13 04:53:27 2018 @@ -515,8 +515,8 @@ protected: /// Returns a selector with the specified type encoding. An empty string is /// used to return an untyped selector (with the types field set to NULL). - virtual llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel, - const std::string &TypeEncoding); + virtual llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel, +const std::string &TypeEncoding); /// Returns the name of ivar offset variables. In the GNUstep v1 ABI, this /// contains the class and ivar names, in the v2 ABI this contains the type @@ -1366,8 +1366,8 @@ class CGObjCGNUstep2 : public CGObjCGNUs return Val; return llvm::ConstantExpr::getBitCast(Val, Ty); } - llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel, -const std::string &TypeEncoding) override { + llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel, +const std::string &TypeEncoding) override { return GetConstantSelector(Sel, TypeEncoding); } llvm::Constant *GetTypeString(llvm::StringRef TypeEncoding) { @@ -2199,8 +2199,8 @@ llvm::Value *CGObjCGNU::EmitNSAutoreleas return Value; } -llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel, -const std::string &TypeEncoding) { +llvm::Value *CGObjCGNU::GetTypedSelector(CodeGenFunction &CGF, Selector Sel, + const std::string &TypeEncoding) { SmallVectorImpl &Types = SelectorTable[Sel]; llvm::GlobalAlias *SelValue = nullptr; @@ -2233,13 +2233,13 @@ Address CGObjCGNU::GetAddrOfSelector(Cod } llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel) { - return GetSelector(CGF, Sel, std::string()); + return GetTypedSelector(CGF, Sel, std::string()); } llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, const ObjCMethodDecl *Method) { std::string SelTypes = CGM.getContext().getObjCEncodingForMethodDecl(Method); - return GetSelector(CGF, Method->getSelector(), SelTypes); + return GetTypedSelector(CGF, Method->getSelector(), SelTypes); } llvm::Constant *CGObjCGNU::GetEHType(QualType T) { ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits