[llvm-branch-commits] [llvm-branch] r261106 - Merging r261033:
Author: hans Date: Wed Feb 17 10:40:51 2016 New Revision: 261106 URL: http://llvm.org/viewvc/llvm-project?rev=261106&view=rev Log: Merging r261033: r261033 | akaylor | 2016-02-16 15:52:18 -0800 (Tue, 16 Feb 2016) | 5 lines Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows Differential Revision: http://reviews.llvm.org/D16940 Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 10:40:51 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260390,260427,260587,260641,260703 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260390,260427,260587,260641,260703,261033 Modified: llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt?rev=261106&r1=261105&r2=261106&view=diff == --- llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt (original) +++ llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt Wed Feb 17 10:40:51 2016 @@ -1,8 +1,17 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +if( HAVE_LIBDL ) +set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS}) +endif() +if( HAVE_LIBPTHREAD ) +set(LLVM_INTEL_JIT_LIBS pthread ${LLVM_INTEL_JIT_LIBS}) +endif() + add_llvm_library(LLVMIntelJITEvents IntelJITEventListener.cpp jitprofiling.c - LINK_LIBS pthread ${CMAKE_DL_LIBS} + LINK_LIBS ${LLVM_INTEL_JIT_LIBS} ) + +add_dependencies(LLVMIntelJITEvents LLVMCodeGen) Modified: llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt?rev=261106&r1=261105&r2=261106&view=diff == --- llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt (original) +++ llvm/branches/release_38/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt Wed Feb 17 10:40:51 2016 @@ -21,4 +21,4 @@ type = OptionalLibrary name = IntelJITEvents parent = ExecutionEngine -required_libraries = Core DebugInfoDWARF Support Object ExecutionEngine +required_libraries = CodeGen Core DebugInfoDWARF Support Object ExecutionEngine ___ 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] [llvm-branch] r261116 - ReleaseNotes: new Win EH instructions; by David Majnemer
Author: hans Date: Wed Feb 17 11:57:26 2016 New Revision: 261116 URL: http://llvm.org/viewvc/llvm-project?rev=261116&view=rev Log: ReleaseNotes: new Win EH instructions; by David Majnemer Modified: llvm/branches/release_38/docs/ReleaseNotes.rst Modified: llvm/branches/release_38/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/docs/ReleaseNotes.rst?rev=261116&r1=261115&r2=261116&view=diff == --- llvm/branches/release_38/docs/ReleaseNotes.rst (original) +++ llvm/branches/release_38/docs/ReleaseNotes.rst Wed Feb 17 11:57:26 2016 @@ -106,6 +106,13 @@ Non-comprehensive list of changes in thi variables are converted to calls to ``__emutls_get_address`` in the runtime library. +* MSVC compatible exception handling has been completely overhauled. New + instructions have been introduced to facilitate this: + `New exception handling instructions `_. + While we have done our best to test this feature thoroughly, it would + not be completely surprising if there were a few lingering issues that + early adopters might bump into. + .. NOTE For small 1-3 sentence descriptions, just add an entry at the end of this list. If your description won't fit comfortably in one bullet ___ 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] [compiler-rt-branch] r261123 - Merging r260839:
Author: dim Date: Wed Feb 17 12:38:59 2016 New Revision: 261123 URL: http://llvm.org/viewvc/llvm-project?rev=261123&view=rev Log: Merging r260839: r260839 | dim | 2016-02-14 01:26:32 +0100 (Sun, 14 Feb 2016) | 8 lines Fix lib/tsan/go/buildgo.sh for FreeBSD after r243051. FreeBSD also needs to have sanitizer_linux_libcdep.cc included, otherwise linking will fail with "undefined reference to `__sanitizer::GetRSS()'". While here, tabify the FreeBSD part, similar to the other parts. Modified: compiler-rt/branches/release_38/ (props changed) compiler-rt/branches/release_38/lib/tsan/go/buildgo.sh Propchange: compiler-rt/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:38:59 2016 @@ -1 +1 @@ -/compiler-rt/trunk:258916,259755 +/compiler-rt/trunk:258916,259755,260839 Modified: compiler-rt/branches/release_38/lib/tsan/go/buildgo.sh URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_38/lib/tsan/go/buildgo.sh?rev=261123&r1=261122&r2=261123&view=diff == --- compiler-rt/branches/release_38/lib/tsan/go/buildgo.sh (original) +++ compiler-rt/branches/release_38/lib/tsan/go/buildgo.sh Wed Feb 17 12:38:59 2016 @@ -50,19 +50,20 @@ if [ "`uname -a | grep Linux`" != "" ]; ../../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc " elif [ "`uname -a | grep FreeBSD`" != "" ]; then -SUFFIX="freebsd_amd64" -OSCFLAGS="-fno-strict-aliasing -fPIC -Werror" -OSLDFLAGS="-lpthread -fPIC -fpie" -SRCS=" -$SRCS -../rtl/tsan_platform_linux.cc -../../sanitizer_common/sanitizer_posix.cc -../../sanitizer_common/sanitizer_posix_libcdep.cc -../../sanitizer_common/sanitizer_procmaps_common.cc -../../sanitizer_common/sanitizer_procmaps_freebsd.cc -../../sanitizer_common/sanitizer_linux.cc -../../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -" + SUFFIX="freebsd_amd64" + OSCFLAGS="-fno-strict-aliasing -fPIC -Werror" + OSLDFLAGS="-lpthread -fPIC -fpie" + SRCS=" + $SRCS + ../rtl/tsan_platform_linux.cc + ../../sanitizer_common/sanitizer_posix.cc + ../../sanitizer_common/sanitizer_posix_libcdep.cc + ../../sanitizer_common/sanitizer_procmaps_common.cc + ../../sanitizer_common/sanitizer_procmaps_freebsd.cc + ../../sanitizer_common/sanitizer_linux.cc + ../../sanitizer_common/sanitizer_linux_libcdep.cc + ../../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc + " elif [ "`uname -a | grep Darwin`" != "" ]; then SUFFIX="darwin_amd64" OSCFLAGS="-fPIC -Wno-unused-const-variable -Wno-unknown-warning-option" ___ 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] [llvm-branch] r261124 - Merging r260733:
Author: majnemer Date: Wed Feb 17 12:41:08 2016 New Revision: 261124 URL: http://llvm.org/viewvc/llvm-project?rev=261124&view=rev Log: Merging r260733: r260733 | akaylor | 2016-02-12 13:10:16 -0800 (Fri, 12 Feb 2016) | 5 lines [WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return Differential Revision: http://reviews.llvm.org/D17208 Added: llvm/branches/release_38/test/CodeGen/WinEH/wineh-noret-cleanup.ll - copied unchanged from r260733, llvm/trunk/test/CodeGen/WinEH/wineh-noret-cleanup.ll Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/CodeGen/WinEHPrepare.cpp Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:41:08 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260390,260427,260587,260641,260703,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/lib/CodeGen/WinEHPrepare.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/WinEHPrepare.cpp?rev=261124&r1=261123&r2=261124&view=diff == --- llvm/branches/release_38/lib/CodeGen/WinEHPrepare.cpp (original) +++ llvm/branches/release_38/lib/CodeGen/WinEHPrepare.cpp Wed Feb 17 12:41:08 2016 @@ -257,10 +257,14 @@ static void calculateCXXStateNumbers(Win if (auto *InnerCatchSwitch = dyn_cast(UserI)) if (InnerCatchSwitch->getUnwindDest() == CatchSwitch->getUnwindDest()) calculateCXXStateNumbers(FuncInfo, UserI, CatchLow); -if (auto *InnerCleanupPad = dyn_cast(UserI)) - if (getCleanupRetUnwindDest(InnerCleanupPad) == - CatchSwitch->getUnwindDest()) +if (auto *InnerCleanupPad = dyn_cast(UserI)) { + BasicBlock *UnwindDest = getCleanupRetUnwindDest(InnerCleanupPad); + // If a nested cleanup pad reports a null unwind destination and the + // enclosing catch pad doesn't it must be post-dominated by an + // unreachable instruction. + if (!UnwindDest || UnwindDest == CatchSwitch->getUnwindDest()) calculateCXXStateNumbers(FuncInfo, UserI, CatchLow); +} } } int CatchHigh = FuncInfo.getLastStateNumber(); @@ -360,10 +364,14 @@ static void calculateSEHStateNumbers(Win if (auto *InnerCatchSwitch = dyn_cast(UserI)) if (InnerCatchSwitch->getUnwindDest() == CatchSwitch->getUnwindDest()) calculateSEHStateNumbers(FuncInfo, UserI, ParentState); - if (auto *InnerCleanupPad = dyn_cast(UserI)) -if (getCleanupRetUnwindDest(InnerCleanupPad) == -CatchSwitch->getUnwindDest()) + if (auto *InnerCleanupPad = dyn_cast(UserI)) { +BasicBlock *UnwindDest = getCleanupRetUnwindDest(InnerCleanupPad); +// If a nested cleanup pad reports a null unwind destination and the +// enclosing catch pad doesn't it must be post-dominated by an +// unreachable instruction. +if (!UnwindDest || UnwindDest == CatchSwitch->getUnwindDest()) calculateSEHStateNumbers(FuncInfo, UserI, ParentState); + } } } else { auto *CleanupPad = cast(FirstNonPHI); ___ 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] [llvm-branch] r261125 - Merging r260164:
Author: majnemer Date: Wed Feb 17 12:41:44 2016 New Revision: 261125 URL: http://llvm.org/viewvc/llvm-project?rev=261125&view=rev Log: Merging r260164: r260164 | akaylor | 2016-02-08 14:52:51 -0800 (Mon, 08 Feb 2016) | 5 lines [regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask Differential Revision: http://reviews.llvm.org/D16831 Added: llvm/branches/release_38/test/CodeGen/X86/regalloc-spill-at-ehpad.ll - copied unchanged from r260164, llvm/trunk/test/CodeGen/X86/regalloc-spill-at-ehpad.ll Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/include/llvm/CodeGen/LiveInterval.h llvm/branches/release_38/lib/CodeGen/CalcSpillWeights.cpp llvm/branches/release_38/lib/CodeGen/LiveInterval.cpp Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:41:44 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/include/llvm/CodeGen/LiveInterval.h URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/include/llvm/CodeGen/LiveInterval.h?rev=261125&r1=261124&r2=261125&view=diff == --- llvm/branches/release_38/include/llvm/CodeGen/LiveInterval.h (original) +++ llvm/branches/release_38/include/llvm/CodeGen/LiveInterval.h Wed Feb 17 12:41:44 2016 @@ -544,6 +544,11 @@ namespace llvm { return true; } +// Returns true if any segment in the live range contains any of the +// provided slot indexes. Slots which occur in holes between +// segments will not cause the function to return true. +bool isLiveAtIndexes(ArrayRef Slots) const; + bool operator<(const LiveRange& other) const { const SlotIndex &thisIndex = beginIndex(); const SlotIndex &otherIndex = other.beginIndex(); Modified: llvm/branches/release_38/lib/CodeGen/CalcSpillWeights.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/CalcSpillWeights.cpp?rev=261125&r1=261124&r2=261125&view=diff == --- llvm/branches/release_38/lib/CodeGen/CalcSpillWeights.cpp (original) +++ llvm/branches/release_38/lib/CodeGen/CalcSpillWeights.cpp Wed Feb 17 12:41:44 2016 @@ -213,8 +213,11 @@ VirtRegAuxInfo::calculateSpillWeightAndH if (!Spillable) return; - // Mark li as unspillable if all live ranges are tiny. - if (li.isZeroLength(LIS.getSlotIndexes())) { + // Mark li as unspillable if all live ranges are tiny and the interval + // is not live at any reg mask. If the interval is live at a reg mask + // spilling may be required. + if (li.isZeroLength(LIS.getSlotIndexes()) && + !li.isLiveAtIndexes(LIS.getRegMaskSlots())) { li.markNotSpillable(); return; } Modified: llvm/branches/release_38/lib/CodeGen/LiveInterval.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/LiveInterval.cpp?rev=261125&r1=261124&r2=261125&view=diff == --- llvm/branches/release_38/lib/CodeGen/LiveInterval.cpp (original) +++ llvm/branches/release_38/lib/CodeGen/LiveInterval.cpp Wed Feb 17 12:41:44 2016 @@ -748,6 +748,40 @@ void LiveRange::flushSegmentSet() { verify(); } +bool LiveRange::isLiveAtIndexes(ArrayRef Slots) const { + ArrayRef::iterator SlotI = Slots.begin(); + ArrayRef::iterator SlotE = Slots.end(); + + // If there are no regmask slots, we have nothing to search. + if (SlotI == SlotE) +return false; + + // Start our search at the first segment that ends after the first slot. + const_iterator SegmentI = find(*SlotI); + const_iterator SegmentE = end(); + + // If there are no
[llvm-branch-commits] [llvm-branch] r261126 - Merging r259702:
Author: majnemer Date: Wed Feb 17 12:42:17 2016 New Revision: 261126 URL: http://llvm.org/viewvc/llvm-project?rev=261126&view=rev Log: Merging r259702: r259702 | majnemer | 2016-02-03 13:30:34 -0800 (Wed, 03 Feb 2016) | 7 lines [LoopStrengthReduce] Don't rewrite PHIs with incoming values from CatchSwitches Bail out if we have a PHI on an EHPad that gets a value from a CatchSwitchInst. Because the CatchSwitchInst cannot be split, there is no good place to stick any instructions. This fixes PR26373. Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/include/llvm/IR/Instructions.h llvm/branches/release_38/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/branches/release_38/test/Transforms/LoopStrengthReduce/funclet.ll Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:42:17 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/include/llvm/IR/Instructions.h URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/include/llvm/IR/Instructions.h?rev=261126&r1=261125&r2=261126&view=diff == --- llvm/branches/release_38/include/llvm/IR/Instructions.h (original) +++ llvm/branches/release_38/include/llvm/IR/Instructions.h Wed Feb 17 12:42:17 2016 @@ -2512,6 +2512,14 @@ public: return block_begin() + getNumOperands(); } + iterator_range blocks() { +return make_range(block_begin(), block_end()); + } + + iterator_range blocks() const { +return make_range(block_begin(), block_end()); + } + op_range incoming_values() { return operands(); } const_op_range incoming_values() const { return operands(); } Modified: llvm/branches/release_38/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=261126&r1=261125&r2=261126&view=diff == --- llvm/branches/release_38/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/branches/release_38/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Feb 17 12:42:17 2016 @@ -4799,6 +4799,17 @@ LSRInstance::LSRInstance(Loop *L, IVUser DEBUG(dbgs() << "LSR skipping loop, too many IV Users in " << U << "\n"); return; } +// Bail out if we have a PHI on an EHPad that gets a value from a +// CatchSwitchInst. Because the CatchSwitchInst cannot be split, there is +// no good place to stick any instructions. +if (auto *PN = dyn_cast(U.getUser())) { + auto *FirstNonPHI = PN->getParent()->getFirstNonPHI(); + if (isa(FirstNonPHI) || + isa(FirstNonPHI)) + for (BasicBlock *PredBB : PN->blocks()) + if (isa(PredBB->getFirstNonPHI())) + return; +} } #ifndef NDEBUG Modified: llvm/branches/release_38/test/Transforms/LoopStrengthReduce/funclet.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/test/Transforms/LoopStrengthReduce/funclet.ll?rev=261126&r1=261125&r2=261126&view=diff == --- llvm/branches/release_38/test/Transforms/LoopStrengthReduce/funclet.ll (original) +++ llvm/branches/release_38/test/Transforms/LoopStrengthReduce/funclet.ll Wed Feb 17 12:42:17 2016 @@ -214,3 +214,32 @@ try.cont.7: ; CHECK: catch.dispatch.2: ; CHECK: %e.0 = phi i32* [ %c, %try.cont ], [ %b, %catch.dispatch ] + +define i32 @test2() personality i32 (...)* @_except_handler3 { +entry: + br label %for.body + +for.body: ; preds = %for.inc, %entry + %phi = phi i32 [ %inc, %for.inc ],
[llvm-branch-commits] [llvm-branch] r261130 - Merging r258610:
Author: majnemer Date: Wed Feb 17 12:48:45 2016 New Revision: 261130 URL: http://llvm.org/viewvc/llvm-project?rev=261130&view=rev Log: Merging r258610: r258610 | majnemer | 2016-01-22 21:41:27 -0800 (Fri, 22 Jan 2016) | 3 lines [PruneEH] Unify invoke and call handling in DeleteBasicBlock No functionality change is intended. Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:48:45 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258610,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp?rev=261130&r1=261129&r2=261130&view=diff == --- llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp (original) +++ llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Wed Feb 17 12:48:45 2016 @@ -231,11 +231,15 @@ void PruneEH::DeleteBasicBlock(BasicBloc CallGraphNode *CGN = CG[BB->getParent()]; for (BasicBlock::iterator I = BB->end(), E = BB->begin(); I != E; ) { --I; -if (CallInst *CI = dyn_cast(I)) { - if (!isa(I)) -CGN->removeCallEdgeFor(CI); -} else if (InvokeInst *II = dyn_cast(I)) - CGN->removeCallEdgeFor(II); + +if (auto CS = CallSite (&*I)) { + const Function *Callee = CS.getCalledFunction(); + if (!Callee || !Intrinsic::isLeaf(Callee->getIntrinsicID())) +CGN->removeCallEdgeFor(CS); + else if (!Callee->isIntrinsic()) +CGN->removeCallEdgeFor(CS); +} + if (!I->use_empty()) I->replaceAllUsesWith(UndefValue::get(I->getType())); } ___ 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] [llvm-branch] r261129 - Merging r258609:
Author: majnemer Date: Wed Feb 17 12:48:28 2016 New Revision: 261129 URL: http://llvm.org/viewvc/llvm-project?rev=261129&view=rev Log: Merging r258609: r258609 | majnemer | 2016-01-22 21:41:22 -0800 (Fri, 22 Jan 2016) | 5 lines [PruneEH] Reuse code from removeUnwindEdge PruneEH had functionality idential to removeUnwindEdge. Consolidate around removeUnwindEdge. No functionality change is intended. Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:48:28 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp?rev=261129&r1=261128&r2=261129&view=diff == --- llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp (original) +++ llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Wed Feb 17 12:48:28 2016 @@ -29,6 +29,7 @@ #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/Transforms/Utils/Local.h" #include using namespace llvm; @@ -186,32 +187,8 @@ bool PruneEH::SimplifyFunction(Function for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { if (InvokeInst *II = dyn_cast(BB->getTerminator())) if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(F)) { -SmallVector Args(II->arg_begin(), II->arg_end()); -SmallVector OpBundles; -II->getOperandBundlesAsDefs(OpBundles); - -// Insert a call instruction before the invoke. -CallInst *Call = CallInst::Create(II->getCalledValue(), Args, OpBundles, - "", II); -Call->takeName(II); -Call->setCallingConv(II->getCallingConv()); -Call->setAttributes(II->getAttributes()); -Call->setDebugLoc(II->getDebugLoc()); - -// Anything that used the value produced by the invoke instruction -// now uses the value produced by the call instruction. Note that we -// do this even for void functions and calls with no uses so that the -// callgraph edge is updated. -II->replaceAllUsesWith(Call); BasicBlock *UnwindBlock = II->getUnwindDest(); -UnwindBlock->removePredecessor(II->getParent()); - -// Insert a branch to the normal destination right before the -// invoke. -BranchInst::Create(II->getNormalDest(), II); - -// Finally, delete the invoke instruction! -BB->getInstList().pop_back(); +removeUnwindEdge(&*BB); // If the unwind block is now dead, nuke it. if (pred_empty(UnwindBlock)) ___ 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] [llvm-branch] r261131 - Merging r258611:
Author: majnemer Date: Wed Feb 17 12:49:09 2016 New Revision: 261131 URL: http://llvm.org/viewvc/llvm-project?rev=261131&view=rev Log: Merging r258611: r258611 | majnemer | 2016-01-22 21:41:29 -0800 (Fri, 22 Jan 2016) | 6 lines [PruneEH] FuncletPads must not have undef operands Instead of RAUW with undef, replace the first non-token instruction with unreachable. This fixes PR26263. Added: llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll - copied unchanged from r258611, llvm/trunk/test/Transforms/PruneEH/pr26263.ll Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:49:09 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258610,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258611,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp?rev=261131&r1=261130&r2=261131&view=diff == --- llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp (original) +++ llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Wed Feb 17 12:49:09 2016 @@ -228,10 +228,17 @@ void PruneEH::DeleteBasicBlock(BasicBloc assert(pred_empty(BB) && "BB is not dead!"); CallGraph &CG = getAnalysis().getCallGraph(); + Instruction *TokenInst = nullptr; + CallGraphNode *CGN = CG[BB->getParent()]; for (BasicBlock::iterator I = BB->end(), E = BB->begin(); I != E; ) { --I; +if (I->getType()->isTokenTy()) { + TokenInst = &*I; + break; +} + if (auto CS = CallSite (&*I)) { const Function *Callee = CS.getCalledFunction(); if (!Callee || !Intrinsic::isLeaf(Callee->getIntrinsicID())) @@ -244,11 +251,15 @@ void PruneEH::DeleteBasicBlock(BasicBloc I->replaceAllUsesWith(UndefValue::get(I->getType())); } - // Get the list of successors of this block. - std::vector Succs(succ_begin(BB), succ_end(BB)); + if (TokenInst) { +changeToUnreachable(TokenInst->getNextNode(), /*UseLLVMTrap=*/false); + } else { +// Get the list of successors of this block. +std::vector Succs(succ_begin(BB), succ_end(BB)); - for (unsigned i = 0, e = Succs.size(); i != e; ++i) -Succs[i]->removePredecessor(BB); +for (unsigned i = 0, e = Succs.size(); i != e; ++i) + Succs[i]->removePredecessor(BB); - BB->eraseFromParent(); +BB->eraseFromParent(); + } } ___ 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] [llvm-branch] r261132 - Merging r258616:
Author: majnemer Date: Wed Feb 17 12:49:28 2016 New Revision: 261132 URL: http://llvm.org/viewvc/llvm-project?rev=261132&view=rev Log: Merging r258616: r258616 | majnemer | 2016-01-22 22:00:44 -0800 (Fri, 22 Jan 2016) | 3 lines [PruneEH] Don't try to insert a terminator after another terminator LLVM's BasicBlock has a single terminator, it is not valid to have two. Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 12:49:28 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258611,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258611,258616,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 Modified: llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp?rev=261132&r1=261131&r2=261132&view=diff == --- llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp (original) +++ llvm/branches/release_38/lib/Transforms/IPO/PruneEH.cpp Wed Feb 17 12:49:28 2016 @@ -252,7 +252,8 @@ void PruneEH::DeleteBasicBlock(BasicBloc } if (TokenInst) { -changeToUnreachable(TokenInst->getNextNode(), /*UseLLVMTrap=*/false); +if (!isa(TokenInst)) + changeToUnreachable(TokenInst->getNextNode(), /*UseLLVMTrap=*/false); } else { // Get the list of successors of this block. std::vector Succs(succ_begin(BB), succ_end(BB)); Modified: llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll?rev=261132&r1=261131&r2=261132&view=diff == --- llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll (original) +++ llvm/branches/release_38/test/Transforms/PruneEH/pr26263.ll Wed Feb 17 12:49:28 2016 @@ -27,4 +27,30 @@ cleanupret: ; CHECK: cleanupret from %[[cp]] unwind to caller +define void @test2() personality i32 (...)* @__CxxFrameHandler3 { + invoke void @neverthrows() + to label %try.cont unwind label %catchswitch + +try.cont: + ret void + +catchswitch: + %cs = catchswitch within none [label %catchpad] unwind to caller + +catchpad: + %cp = catchpad within %cs [] + unreachable + +ret: + ret void +} + +; CHECK-LABEL: define void @test2( +; CHECK: call void @neverthrows() + +; CHECK: %[[cs:.*]] = catchswitch within none [label + +; CHECK: catchpad within %[[cs]] [] +; CHECK-NEXT: unreachable + declare i32 @__CxxFrameHandler3(...) ___ 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] [llvm-branch] r261136 - Merging r261039:
Author: hans Date: Wed Feb 17 13:00:40 2016 New Revision: 261136 URL: http://llvm.org/viewvc/llvm-project?rev=261136&view=rev Log: Merging r261039: r261039 | rnk | 2016-02-16 16:17:33 -0800 (Tue, 16 Feb 2016) | 6 lines [X86] Fix a shrink-wrapping miscompile around __chkstk __chkstk clobbers EAX. If EAX is live across the prologue, then we have to take extra steps to save it. We already had code to do this if EAX was a register parameter. This change adapts it to work when shrink wrapping is used. Modified: llvm/branches/release_38/ (props changed) llvm/branches/release_38/lib/Target/X86/X86FrameLowering.cpp llvm/branches/release_38/test/CodeGen/X86/shrink-wrap-chkstk.ll Propchange: llvm/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 13:00:40 2016 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258611,258616,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033 +/llvm/trunk:155241,257645,257648,257730,257775,257791,257864,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258103,258112,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258609-258611,258616,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259381,259645,259649,259695-259696,259702,259740,259798,259835,259840,259886,259888,259958,260164,260390,260427,260587,260641,260703,260733,261033,261039 Modified: llvm/branches/release_38/lib/Target/X86/X86FrameLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Target/X86/X86FrameLowering.cpp?rev=261136&r1=261135&r2=261136&view=diff == --- llvm/branches/release_38/lib/Target/X86/X86FrameLowering.cpp (original) +++ llvm/branches/release_38/lib/Target/X86/X86FrameLowering.cpp Wed Feb 17 13:00:40 2016 @@ -192,10 +192,9 @@ static unsigned findDeadCallerSavedReg(M return 0; } -static bool isEAXLiveIn(MachineFunction &MF) { - for (MachineRegisterInfo::livein_iterator II = MF.getRegInfo().livein_begin(), - EE = MF.getRegInfo().livein_end(); II != EE; ++II) { -unsigned Reg = II->first; +static bool isEAXLiveIn(MachineBasicBlock &MBB) { + for (MachineBasicBlock::RegisterMaskPair RegMask : MBB.liveins()) { +unsigned Reg = RegMask.PhysReg; if (Reg == X86::RAX || Reg == X86::EAX || Reg == X86::AX || Reg == X86::AH || Reg == X86::AL) @@ -261,7 +260,7 @@ void X86FrameLowering::emitSPUpdate(Mach // load the offset into a register and do one sub/add unsigned Reg = 0; - if (isSub && !isEAXLiveIn(*MBB.getParent())) + if (isSub && !isEAXLiveIn(MBB)) Reg = (unsigned)(Is64Bit ? X86::RAX : X86::EAX); else Reg = findDeadCallerSavedReg(MBB, MBBI, TRI, Is64Bit); @@ -1133,8 +1132,8 @@ void X86FrameLowering::emitPrologue(Mach if (IsWin64Prologue && !IsFunclet && TRI->needsStackRealignment(MF)) AlignedNumBytes = RoundUpToAlignment(AlignedNumBytes, MaxAlign); if (AlignedNumBytes >= StackProbeSize && UseStackProbe) { -// Check whether EAX is livein for this function. -bool isEAXAlive = isEAXLiveIn(MF); +// Check whether EAX is livein for this block. +bool isEAXAlive = isEAXLiveIn(MBB); if (isEAXAlive) { // Sanity check that EAX is not livein for this function. Modified: llvm/branches/release_38/test/CodeGen/X86/shrink-wrap-chkstk.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/test/CodeGen/X86/shrink-wrap-chkstk.ll?rev=261136&r1=261135&r2=261136&view=diff == --- llvm/branches/release_38/test/CodeGen/X86/shrink-wrap-chkstk.ll (original) +++ llvm/branches/release_38/test/CodeGen/X86/shrink-wrap-chkstk.ll Wed Feb 17 13:00:40 2016 @@ -1,6 +1,8 @@ ; RUN: llc < %s -enable-shrink-wrap=true | FileCheck %s ; chkstk cannot come before the usual prologue, since it adjusts ESP. +; If chkstk is used in the prologue, we also have to be careful about preserving +; EAX if it is used. target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-windows-msvc18.0.0" @@ -35,3 +37,36 @@ bb2: ; CHECK: retl declare void @inalloca_params(<{ %struct.S }>*
[llvm-branch-commits] [compiler-rt-branch] r261138 - Merging r261073:
Author: hans Date: Wed Feb 17 13:05:23 2016 New Revision: 261138 URL: http://llvm.org/viewvc/llvm-project?rev=261138&view=rev Log: Merging r261073: r261073 | hahnfeld | 2016-02-16 23:12:18 -0800 (Tue, 16 Feb 2016) | 6 lines [compiler-rt][msan] Ensure initialisation before calling __msan_unpoison __msan_unpoison uses intercepted memset which currently leads to a SEGV when linking with libc++ under CentOS 7. Differential Revision: http://reviews.llvm.org/D17263 Modified: compiler-rt/branches/release_38/ (props changed) compiler-rt/branches/release_38/lib/msan/msan_interceptors.cc Propchange: compiler-rt/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 13:05:23 2016 @@ -1 +1 @@ -/compiler-rt/trunk:258916,259755,260839 +/compiler-rt/trunk:258916,259755,260839,261073 Modified: compiler-rt/branches/release_38/lib/msan/msan_interceptors.cc URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_38/lib/msan/msan_interceptors.cc?rev=261138&r1=261137&r2=261138&view=diff == --- compiler-rt/branches/release_38/lib/msan/msan_interceptors.cc (original) +++ compiler-rt/branches/release_38/lib/msan/msan_interceptors.cc Wed Feb 17 13:05:23 2016 @@ -1408,12 +1408,12 @@ int OnExit() { __msan_unpoison(ptr, size) #define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ if (msan_init_is_running) return REAL(func)(__VA_ARGS__); \ + ENSURE_MSAN_INITED(); \ MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \ ctx = (void *)&msan_ctx;\ (void)ctx; \ InterceptorScope interceptor_scope; \ - __msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */ \ - ENSURE_MSAN_INITED(); + __msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */ #define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \ do {\ } while (false) ___ 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] r261158 - Merging r259874:
Author: hans Date: Wed Feb 17 15:28:41 2016 New Revision: 261158 URL: http://llvm.org/viewvc/llvm-project?rev=261158&view=rev Log: Merging r259874: r259874 | compnerd | 2016-02-04 20:12:40 -0800 (Thu, 04 Feb 2016) | 8 lines CodeGen: correct Windows ARM C++ assertion Because the Decl is explicitly passed as nullptr further up the call chain, it is possible to invoke isa on a nullptr, which will assert. Guard against the nullptr. Take the opportunity to reuse the helper method rather than re-implementing this logic. Added: cfe/branches/release_38/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp - copied unchanged from r259874, cfe/trunk/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp Modified: cfe/branches/release_38/ (props changed) cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp Propchange: cfe/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 15:28:41 2016 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259183,259260,259598,259931,260370,260616,260637,260851 +/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259183,259260,259598,259874,259931,260370,260616,260637,260851 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp?rev=261158&r1=261157&r2=261158&view=diff == --- cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp (original) +++ cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp Wed Feb 17 15:28:41 2016 @@ -4868,9 +4868,6 @@ public: }; class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo { - void addStackProbeSizeTargetAttribute(const Decl *D, llvm::GlobalValue *GV, -CodeGen::CodeGenModule &CGM) const; - public: WindowsARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K) : ARMTargetCodeGenInfo(CGT, K) {} @@ -4879,18 +4876,6 @@ public: CodeGen::CodeGenModule &CGM) const override; }; -void WindowsARMTargetCodeGenInfo::addStackProbeSizeTargetAttribute( -const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { - if (!isa(D)) -return; - if (CGM.getCodeGenOpts().StackProbeSize == 4096) -return; - - llvm::Function *F = cast(GV); - F->addFnAttr("stack-probe-size", - llvm::utostr(CGM.getCodeGenOpts().StackProbeSize)); -} - void WindowsARMTargetCodeGenInfo::setTargetAttributes( const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM); ___ 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] [compiler-rt-branch] r261162 - Merging the tsan parts of r260669 and r261142:
Author: hans Date: Wed Feb 17 16:02:12 2016 New Revision: 261162 URL: http://llvm.org/viewvc/llvm-project?rev=261162&view=rev Log: Merging the tsan parts of r260669 and r261142: r260669 | dsanders | 2016-02-12 02:35:53 -0800 (Fri, 12 Feb 2016) | 9 lines [msan+tsan] Bring back the tests that disappeared after r260230 and r259512. The lit test-suite containing the unit tests needs to be explicitly specified as an argument to lit.py since it is no longer discovered when the other tests are run (because they are one directory deeper). dfsan, lsan, and sanitizer_common don't show the same problem. r261142 | samsonov | 2016-02-17 11:35:51 -0800 (Wed, 17 Feb 2016) | 1 line [tests] Slightly improve a fix in r260669. Modified: compiler-rt/branches/release_38/ (props changed) compiler-rt/branches/release_38/test/tsan/CMakeLists.txt Propchange: compiler-rt/branches/release_38/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 17 16:02:12 2016 @@ -1 +1 @@ -/compiler-rt/trunk:258916,259755,260839,261073 +/compiler-rt/trunk:258916,259755,260669,260839,261073,261142 Modified: compiler-rt/branches/release_38/test/tsan/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_38/test/tsan/CMakeLists.txt?rev=261162&r1=261161&r2=261162&view=diff == --- compiler-rt/branches/release_38/test/tsan/CMakeLists.txt (original) +++ compiler-rt/branches/release_38/test/tsan/CMakeLists.txt Wed Feb 17 16:02:12 2016 @@ -47,6 +47,7 @@ if(COMPILER_RT_INCLUDE_TESTS) ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg) list(APPEND TSAN_TEST_DEPS TsanUnitTests) + list(APPEND TSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit) endif() add_lit_testsuite(check-tsan "Running ThreadSanitizer tests" ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits