From bob.wilson at apple.com Mon Nov 28 01:59:53 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 28 Nov 2011 07:59:53 -0000 Subject: [llvm-commits] [llvm] r145234 - in /llvm/trunk: Makefile.config.in Makefile.rules autoconf/configure.ac configure Message-ID: <20111128075953.257E12A6C12D@llvm.org> Author: bwilson Date: Mon Nov 28 01:59:52 2011 New Revision: 145234 URL: http://llvm.org/viewvc/llvm-project?rev=145234&view=rev Log: Add an optional separate install prefix for internal components. rdar://10217046 Some files installed by clang are not relevant for general users and we'd like to be able to install them to a different location. This adds a new --with-internal-prefix configure option and a corresponding PROJ_internal_prefix makefile variable, which defaults to the standard prefix. A tool makefile can specify that it should be installed to this internal prefix by defining INTERNAL_TOOL. Modified: llvm/trunk/Makefile.config.in llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=145234&r1=145233&r2=145234&view=diff ============================================================================== --- llvm/trunk/Makefile.config.in (original) +++ llvm/trunk/Makefile.config.in Mon Nov 28 01:59:52 2011 @@ -86,6 +86,13 @@ endif endif +INTERNAL_PREFIX := @INTERNAL_PREFIX@ +ifneq ($(INTERNAL_PREFIX),) +PROJ_internal_prefix := $(INTERNAL_PREFIX) +else +PROJ_internal_prefix := $(prefix) +endif + PROJ_bindir := $(PROJ_prefix)/bin PROJ_libdir := $(PROJ_prefix)/lib PROJ_datadir := $(PROJ_prefix)/share Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=145234&r1=145233&r2=145234&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Mon Nov 28 01:59:52 2011 @@ -1503,12 +1503,19 @@ uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME) + +ifdef INTERNAL_TOOL +ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin +else +ToolBinDir = $(DESTDIR)$(PROJ_bindir) +endif +DestTool = $(ToolBinDir)/$(TOOLEXENAME) install-local:: $(DestTool) -$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir) +$(DestTool): $(ToolBuildPath) $(Echo) Installing $(BuildMode) $(DestTool) + $(Verb) $(MKDIR) $(ToolBinDir) $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool) uninstall-local:: @@ -1517,7 +1524,7 @@ # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) @@ -2276,6 +2283,7 @@ $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)' $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)' $(Echo) "PROJ_prefix : " '$(PROJ_prefix)' + $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)' $(Echo) "PROJ_bindir : " '$(PROJ_bindir)' $(Echo) "PROJ_libdir : " '$(PROJ_libdir)' $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)' Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=145234&r1=145233&r2=145234&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Mon Nov 28 01:59:52 2011 @@ -885,6 +885,12 @@ esac], llvm_cv_enable_libffi=no) +AC_ARG_WITH(internal-prefix, + AS_HELP_STRING([--with-internal-prefix], + [Installation directory for internal files]),, + withval="") +AC_SUBST(INTERNAL_PREFIX,[$withval]) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=145234&r1=145233&r2=145234&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon Nov 28 01:59:52 2011 @@ -711,6 +711,7 @@ EXTRA_LD_OPTIONS CLANG_SRC_ROOT BINUTILS_INCDIR +INTERNAL_PREFIX NM ifGNUmake LN_S @@ -1451,6 +1452,7 @@ plugin-api.h file for gold plugin. --with-bug-report-url Specify the URL where bug reports should be submitted (default=http://llvm.org/bugs/) + --with-internal-prefix Installation directory for internal files --with-tclinclude directory where tcl headers are --with-udis86= Use udis86 external x86 disassembler library --with-oprofile= @@ -5671,6 +5673,17 @@ +# Check whether --with-internal-prefix was given. +if test "${with_internal_prefix+set}" = set; then + withval=$with_internal_prefix; +else + withval="" +fi + +INTERNAL_PREFIX=$withval + + + { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then @@ -10476,7 +10489,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 From baldrick at free.fr Mon Nov 28 02:28:26 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 28 Nov 2011 09:28:26 +0100 Subject: [llvm-commits] [llvm] r145201 - /llvm/trunk/docs/CodeGenerator.html In-Reply-To: <20111127220546.C2E732A6C12D@llvm.org> References: <20111127220546.C2E732A6C12D@llvm.org> Message-ID: <4ED3462A.60506@free.fr> Hi Rafael, > +

Basic support exits on the X86 backend. Currently exits -> exists ? > +vararg don't work and the object files are not marked the way the gold don't -> doesn't > +linker expects, but simple Go program can be built by dragonegg.

And what's more, they actually work! Ciao, Duncan. From craig.topper at gmail.com Mon Nov 28 04:14:51 2011 From: craig.topper at gmail.com (Craig Topper) Date: Mon, 28 Nov 2011 10:14:51 -0000 Subject: [llvm-commits] [llvm] r145238 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrFragmentsSIMD.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-vperm2i128.ll Message-ID: <20111128101451.87B4F2A6C12D@llvm.org> Author: ctopper Date: Mon Nov 28 04:14:51 2011 New Revision: 145238 URL: http://llvm.org/viewvc/llvm-project?rev=145238&view=rev Log: Add X86 instruction selection for VPERM2I128 when AVX2 is enabled. Merge VPERMILPS/VPERMILPD detection since they are pretty similar. Added: llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=145238&r1=145237&r2=145238&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Nov 28 04:14:51 2011 @@ -2850,6 +2850,7 @@ case X86ISD::VPERMILPS: case X86ISD::VPERMILPD: case X86ISD::VPERM2F128: + case X86ISD::VPERM2I128: return true; } return false; @@ -2891,6 +2892,7 @@ case X86ISD::SHUFPD: case X86ISD::SHUFPS: case X86ISD::VPERM2F128: + case X86ISD::VPERM2I128: return DAG.getNode(Opc, dl, VT, V1, V2, DAG.getConstant(TargetMask, MVT::i8)); } @@ -3283,8 +3285,8 @@ return false; // For VSHUFPSY, the mask of the second half must be the same as the first - // but with // the appropriate offsets. This works in the same way as - // VPERMILPS // works with masks. + // but with the appropriate offsets. This works in the same way as + // VPERMILPS works with masks. for (int i = QuarterSize*2; i < QuarterSize*3; ++i) { if (!isUndefOrInRange(Mask[i], HalfSize, NumElems)) return false; @@ -3358,8 +3360,8 @@ return false; // For VSHUFPSY, the mask of the second half must be the same as the first - // but with // the appropriate offsets. This works in the same way as - // VPERMILPS // works with masks. + // but with the appropriate offsets. This works in the same way as + // VPERMILPS works with masks. for (int i = QuarterSize*2; i < QuarterSize*3; ++i) { if (!isUndefOrInRange(Mask[i], NumElems+HalfSize, NumElems*2)) return false; @@ -3753,15 +3755,15 @@ return ::isMOVLMask(M, N->getValueType(0)); } -/// isVPERM2F128Mask - Match 256-bit shuffles where the elements are considered +/// isVPERM2X128Mask - Match 256-bit shuffles where the elements are considered /// as permutations between 128-bit chunks or halves. As an example: this /// shuffle bellow: /// vector_shuffle <4, 5, 6, 7, 12, 13, 14, 15> /// The first half comes from the second half of V1 and the second half from the /// the second half of V2. -static bool isVPERM2F128Mask(const SmallVectorImpl &Mask, EVT VT, - const X86Subtarget *Subtarget) { - if (!Subtarget->hasAVX() || VT.getSizeInBits() != 256) +static bool isVPERM2X128Mask(const SmallVectorImpl &Mask, EVT VT, + bool HasAVX) { + if (!HasAVX || VT.getSizeInBits() != 256) return false; // The shuffle result is divided into half A and half B. In total the two @@ -3789,9 +3791,9 @@ return MatchA && MatchB; } -/// getShuffleVPERM2F128Immediate - Return the appropriate immediate to shuffle -/// the specified VECTOR_MASK mask with VPERM2F128 instructions. -static unsigned getShuffleVPERM2F128Immediate(SDNode *N) { +/// getShuffleVPERM2X128Immediate - Return the appropriate immediate to shuffle +/// the specified VECTOR_MASK mask with VPERM2F128/VPERM2I128 instructions. +static unsigned getShuffleVPERM2X128Immediate(SDNode *N) { ShuffleVectorSDNode *SVOp = cast(N); EVT VT = SVOp->getValueType(0); @@ -3814,80 +3816,47 @@ return (FstHalf | (SndHalf << 4)); } -/// isVPERMILPDMask - Return true if the specified VECTOR_SHUFFLE operand +/// isVPERMILPMask - Return true if the specified VECTOR_SHUFFLE operand /// specifies a shuffle of elements that is suitable for input to VPERMILPD*. /// Note that VPERMIL mask matching is different depending whether theunderlying /// type is 32 or 64. In the VPERMILPS the high half of the mask should point /// to the same elements of the low, but to the higher half of the source. /// In VPERMILPD the two lanes could be shuffled independently of each other /// with the same restriction that lanes can't be crossed. -static bool isVPERMILPDMask(const SmallVectorImpl &Mask, EVT VT, - const X86Subtarget *Subtarget) { +static bool isVPERMILPMask(const SmallVectorImpl &Mask, EVT VT, + bool HasAVX) { int NumElts = VT.getVectorNumElements(); int NumLanes = VT.getSizeInBits()/128; - if (!Subtarget->hasAVX()) + if (!HasAVX) return false; - // Only match 256-bit with 64-bit types - if (VT.getSizeInBits() != 256 || NumElts != 4) + // Only match 256-bit with 32/64-bit types + if (VT.getSizeInBits() != 256 || (NumElts != 4 && NumElts != 8)) return false; - // The mask on the high lane is independent of the low. Both can match - // any element in inside its own lane, but can't cross. int LaneSize = NumElts/NumLanes; - for (int l = 0; l < NumLanes; ++l) - for (int i = l*LaneSize; i < LaneSize*(l+1); ++i) { - int LaneStart = l*LaneSize; - if (!isUndefOrInRange(Mask[i], LaneStart, LaneStart+LaneSize)) + for (int l = 0; l != NumLanes; ++l) { + int LaneStart = l*LaneSize; + for (int i = 0; i != LaneSize; ++i) { + if (!isUndefOrInRange(Mask[i+LaneStart], LaneStart, LaneStart+LaneSize)) + return false; + if (NumElts == 4 || l == 0) + continue; + // VPERMILPS handling + if (Mask[i] < 0) + continue; + if (!isUndefOrEqual(Mask[i+LaneStart], Mask[i]+LaneSize)) return false; } - - return true; -} - -/// isVPERMILPSMask - Return true if the specified VECTOR_SHUFFLE operand -/// specifies a shuffle of elements that is suitable for input to VPERMILPS*. -/// Note that VPERMIL mask matching is different depending whether theunderlying -/// type is 32 or 64. In the VPERMILPS the high half of the mask should point -/// to the same elements of the low, but to the higher half of the source. -/// In VPERMILPD the two lanes could be shuffled independently of each other -/// with the same restriction that lanes can't be crossed. -static bool isVPERMILPSMask(const SmallVectorImpl &Mask, EVT VT, - const X86Subtarget *Subtarget) { - unsigned NumElts = VT.getVectorNumElements(); - unsigned NumLanes = VT.getSizeInBits()/128; - - if (!Subtarget->hasAVX()) - return false; - - // Only match 256-bit with 32-bit types - if (VT.getSizeInBits() != 256 || NumElts != 8) - return false; - - // The mask on the high lane should be the same as the low. Actually, - // they can differ if any of the corresponding index in a lane is undef - // and the other stays in range. - int LaneSize = NumElts/NumLanes; - for (int i = 0; i < LaneSize; ++i) { - int HighElt = i+LaneSize; - bool HighValid = isUndefOrInRange(Mask[HighElt], LaneSize, NumElts); - bool LowValid = isUndefOrInRange(Mask[i], 0, LaneSize); - - if (!HighValid || !LowValid) - return false; - if (Mask[i] < 0 || Mask[HighElt] < 0) - continue; - if (Mask[HighElt]-Mask[i] != LaneSize) - return false; } return true; } -/// getShuffleVPERMILPSImmediate - Return the appropriate immediate to shuffle -/// the specified VECTOR_MASK mask with VPERMILPS* instructions. -static unsigned getShuffleVPERMILPSImmediate(SDNode *N) { +/// getShuffleVPERMILPImmediate - Return the appropriate immediate to shuffle +/// the specified VECTOR_MASK mask with VPERMILPS/D* instructions. +static unsigned getShuffleVPERMILPImmediate(SDNode *N) { ShuffleVectorSDNode *SVOp = cast(N); EVT VT = SVOp->getValueType(0); @@ -3899,43 +3868,22 @@ // where a mask will match because the same mask element is undef on the // first half but valid on the second. This would get pathological cases // such as: shuffle , which is completely valid. + unsigned Shift = (LaneSize == 4) ? 2 : 1; unsigned Mask = 0; - for (int l = 0; l < NumLanes; ++l) { - for (int i = 0; i < LaneSize; ++i) { - int MaskElt = SVOp->getMaskElt(i+(l*LaneSize)); - if (MaskElt < 0) - continue; - if (MaskElt >= LaneSize) - MaskElt -= LaneSize; - Mask |= MaskElt << (i*2); - } + for (int i = 0; i != NumElts; ++i) { + int MaskElt = SVOp->getMaskElt(i); + if (MaskElt < 0) + continue; + MaskElt %= LaneSize; + unsigned Shamt = i; + // VPERMILPSY, the mask of the first half must be equal to the second one + if (NumElts == 8) Shamt %= LaneSize; + Mask |= MaskElt << (Shamt*Shift); } return Mask; } -/// getShuffleVPERMILPDImmediate - Return the appropriate immediate to shuffle -/// the specified VECTOR_MASK mask with VPERMILPD* instructions. -static unsigned getShuffleVPERMILPDImmediate(SDNode *N) { - ShuffleVectorSDNode *SVOp = cast(N); - EVT VT = SVOp->getValueType(0); - - int NumElts = VT.getVectorNumElements(); - int NumLanes = VT.getSizeInBits()/128; - - unsigned Mask = 0; - int LaneSize = NumElts/NumLanes; - for (int l = 0; l < NumLanes; ++l) - for (int i = l*LaneSize; i < LaneSize*(l+1); ++i) { - int MaskElt = SVOp->getMaskElt(i); - if (MaskElt < 0) - continue; - Mask |= (MaskElt-l*LaneSize) << i; - } - - return Mask; -} - /// isCommutedMOVL - Returns true if the shuffle mask is except the reverse /// of what x86 movss want. X86 movs requires the lowest element to be lowest /// element of vector 2 and the other elements to come from vector 1 in order. @@ -4677,6 +4625,7 @@ ShuffleMask); break; case X86ISD::VPERM2F128: + case X86ISD::VPERM2I128: ImmN = N->getOperand(N->getNumOperands()-1); DecodeVPERM2F128Mask(VT, cast(ImmN)->getZExtValue(), ShuffleMask); @@ -6596,6 +6545,22 @@ return 0; } +static inline unsigned getVPERM2X128Opcode(EVT VT, bool HasAVX2) { + switch(VT.getSimpleVT().SimpleTy) { + case MVT::v32i8: + case MVT::v16i16: + case MVT::v8i32: + case MVT::v4i64: + if (HasAVX2) return X86ISD::VPERM2I128; + // else use fp unit for int vperm + case MVT::v8f32: + case MVT::v4f64: return X86ISD::VPERM2F128; + default: + llvm_unreachable("Unknown type for vpermil"); + } + return 0; +} + static SDValue NormalizeVectorShuffle(SDValue Op, SelectionDAG &DAG, const TargetLowering &TLI, @@ -6910,22 +6875,17 @@ if (isMOVDDUPYMask(SVOp, Subtarget)) return getTargetShuffleNode(X86ISD::MOVDDUP, dl, VT, V1, DAG); - // Handle VPERMILPS* permutations - if (isVPERMILPSMask(M, VT, Subtarget)) - return getTargetShuffleNode(getVPERMILOpcode(VT), dl, VT, V1, - getShuffleVPERMILPSImmediate(SVOp), DAG); - - // Handle VPERMILPD* permutations - if (isVPERMILPDMask(M, VT, Subtarget)) + // Handle VPERMILPS/D* permutations + if (isVPERMILPMask(M, VT, Subtarget->hasAVX())) return getTargetShuffleNode(getVPERMILOpcode(VT), dl, VT, V1, - getShuffleVPERMILPDImmediate(SVOp), DAG); + getShuffleVPERMILPImmediate(SVOp), DAG); - // Handle VPERM2F128 permutations - if (isVPERM2F128Mask(M, VT, Subtarget)) - return getTargetShuffleNode(X86ISD::VPERM2F128, dl, VT, V1, V2, - getShuffleVPERM2F128Immediate(SVOp), DAG); + // Handle VPERM2F128/VPERM2I128 permutations + if (isVPERM2X128Mask(M, VT, Subtarget->hasAVX())) + return getTargetShuffleNode(getVPERM2X128Opcode(VT, HasAVX2), dl, VT, V1, + V2, getShuffleVPERM2X128Immediate(SVOp), DAG); - // Handle VSHUFPSY permutations + // Handle VSHUFPS/DY permutations if (isVSHUFPYMask(M, VT, Subtarget->hasAVX())) return getTargetShuffleNode(getSHUFPOpcode(VT), dl, VT, V1, V2, getShuffleVSHUFPYImmediate(SVOp), DAG); @@ -11223,6 +11183,7 @@ case X86ISD::VPERMILPS: return "X86ISD::VPERMILPS"; case X86ISD::VPERMILPD: return "X86ISD::VPERMILPD"; case X86ISD::VPERM2F128: return "X86ISD::VPERM2F128"; + case X86ISD::VPERM2I128: return "X86ISD::VPERM2I128"; case X86ISD::VASTART_SAVE_XMM_REGS: return "X86ISD::VASTART_SAVE_XMM_REGS"; case X86ISD::VAARG_64: return "X86ISD::VAARG_64"; case X86ISD::WIN_ALLOCA: return "X86ISD::WIN_ALLOCA"; @@ -14810,6 +14771,7 @@ case X86ISD::VPERMILPS: case X86ISD::VPERMILPD: case X86ISD::VPERM2F128: + case X86ISD::VPERM2I128: case ISD::VECTOR_SHUFFLE: return PerformShuffleCombine(N, DAG, DCI,Subtarget); } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=145238&r1=145237&r2=145238&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Mon Nov 28 04:14:51 2011 @@ -280,6 +280,7 @@ VPERMILPS, VPERMILPD, VPERM2F128, + VPERM2I128, VBROADCAST, // VASTART_SAVE_XMM_REGS - Save xmm argument registers to the stack, Modified: llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td?rev=145238&r1=145237&r2=145238&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td Mon Nov 28 04:14:51 2011 @@ -140,6 +140,7 @@ def X86VPermilpd : SDNode<"X86ISD::VPERMILPD", SDTShuff2OpI>; def X86VPerm2f128 : SDNode<"X86ISD::VPERM2F128", SDTShuff3OpI>; +def X86VPerm2i128 : SDNode<"X86ISD::VPERM2I128", SDTShuff3OpI>; def X86VBroadcast : SDNode<"X86ISD::VBROADCAST", SDTVBroadcast>; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145238&r1=145237&r2=145238&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Nov 28 04:14:51 2011 @@ -7359,7 +7359,7 @@ VR256:$src1, (memopv4f64 addr:$src2), imm:$src3), (VPERM2F128rm VR256:$src1, addr:$src2, imm:$src3)>; def : Pat<(int_x86_avx_vperm2f128_si_256 - VR256:$src1, (memopv8i32 addr:$src2), imm:$src3), + VR256:$src1, (bc_v8i32 (memopv4i64 addr:$src2)), imm:$src3), (VPERM2F128rm VR256:$src1, addr:$src2, imm:$src3)>; def : Pat<(v8f32 (X86VPerm2f128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), @@ -7375,6 +7375,25 @@ def : Pat<(v16i16 (X86VPerm2f128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), (VPERM2F128rr VR256:$src1, VR256:$src2, imm:$imm)>; +def : Pat<(v8f32 (X86VPerm2f128 VR256:$src1, + (memopv8f32 addr:$src2), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v8i32 (X86VPerm2f128 VR256:$src1, + (bc_v8i32 (memopv4i64 addr:$src2)), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v4i64 (X86VPerm2f128 VR256:$src1, + (memopv4i64 addr:$src2), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v4f64 (X86VPerm2f128 VR256:$src1, + (memopv4f64 addr:$src2), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v32i8 (X86VPerm2f128 VR256:$src1, + (bc_v32i8 (memopv4i64 addr:$src2)), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v16i16 (X86VPerm2f128 VR256:$src1, + (bc_v16i16 (memopv4i64 addr:$src2)), (i8 imm:$imm))), + (VPERM2F128rm VR256:$src1, addr:$src2, imm:$imm)>; + //===----------------------------------------------------------------------===// // VZERO - Zero YMM registers // @@ -7571,7 +7590,7 @@ VEX_W; //===----------------------------------------------------------------------===// -// VPERM2F128 - Permute Floating-Point Values in 128-bit chunks +// VPERM2I128 - Permute Floating-Point Values in 128-bit chunks // def VPERM2I128rr : AVX2AIi8<0x46, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR256:$src2, i8imm:$src3), @@ -7587,6 +7606,30 @@ imm:$src3))]>, VEX_4V; +let Predicates = [HasAVX2] in { +def : Pat<(v8i32 (X86VPerm2i128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), + (VPERM2I128rr VR256:$src1, VR256:$src2, imm:$imm)>; +def : Pat<(v4i64 (X86VPerm2i128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), + (VPERM2I128rr VR256:$src1, VR256:$src2, imm:$imm)>; +def : Pat<(v32i8 (X86VPerm2i128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), + (VPERM2I128rr VR256:$src1, VR256:$src2, imm:$imm)>; +def : Pat<(v16i16 (X86VPerm2i128 VR256:$src1, VR256:$src2, (i8 imm:$imm))), + (VPERM2I128rr VR256:$src1, VR256:$src2, imm:$imm)>; + +def : Pat<(v32i8 (X86VPerm2i128 VR256:$src1, (bc_v32i8 (memopv4i64 addr:$src2)), + (i8 imm:$imm))), + (VPERM2I128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v16i16 (X86VPerm2i128 VR256:$src1, + (bc_v16i16 (memopv4i64 addr:$src2)), (i8 imm:$imm))), + (VPERM2I128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v8i32 (X86VPerm2i128 VR256:$src1, (bc_v8i32 (memopv4i64 addr:$src2)), + (i8 imm:$imm))), + (VPERM2I128rm VR256:$src1, addr:$src2, imm:$imm)>; +def : Pat<(v4i64 (X86VPerm2i128 VR256:$src1, (memopv4i64 addr:$src2), + (i8 imm:$imm))), + (VPERM2I128rm VR256:$src1, addr:$src2, imm:$imm)>; +} + //===----------------------------------------------------------------------===// // VINSERTI128 - Insert packed integer values // Added: llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll?rev=145238&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll (added) +++ llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll Mon Nov 28 04:14:51 2011 @@ -0,0 +1,38 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s + +; CHECK: vperm2i128 $17 +define <32 x i8> @E(<32 x i8> %a, <32 x i8> %b) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> + ret <32 x i8> %shuffle +} + +; CHECK: vperm2i128 $33 +define <4 x i64> @E2(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> + ret <4 x i64> %shuffle +} + +; CHECK: vperm2i128 $49 +define <8 x i32> @E3(<8 x i32> %a, <8 x i32> %b) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> + ret <8 x i32> %shuffle +} + +; CHECK: vperm2i128 $2 +define <16 x i16> @E4(<16 x i16> %a, <16 x i16> %b) nounwind uwtable readnone ssp { +entry: + %shuffle = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> + ret <16 x i16> %shuffle +} + +; CHECK: vperm2i128 $2, (% +define <16 x i16> @E5(<16 x i16>* %a, <16 x i16>* %b) nounwind uwtable readnone ssp { +entry: + %c = load <16 x i16>* %a + %d = load <16 x i16>* %b + %shuffle = shufflevector <16 x i16> %c, <16 x i16> %d, <16 x i32> + ret <16 x i16> %shuffle +} From elena.demikhovsky at intel.com Mon Nov 28 04:31:56 2011 From: elena.demikhovsky at intel.com (Demikhovsky, Elena) Date: Mon, 28 Nov 2011 12:31:56 +0200 Subject: [llvm-commits] Fix in VSQRTSSm_Int pattern in X86 AVX CodeGen - Please review Message-ID: <7CB6AC5AED596245A99BF3213DE8F4AA030021A9FF@hasmsx504.ger.corp.intel.com> Fixed an order of operands in VSQRTSSm_Int form: def SSm_Int : SSI; Provided a test case. - Elena --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- A non-text attachment was scrubbed... Name: smm_int.diff Type: application/octet-stream Size: 2552 bytes Desc: smm_int.diff Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/70863435/attachment.obj From baldrick at free.fr Mon Nov 28 04:31:27 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 28 Nov 2011 10:31:27 -0000 Subject: [llvm-commits] [llvm] r145239 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Message-ID: <20111128103127.505442A6C12D@llvm.org> Author: baldrick Date: Mon Nov 28 04:31:27 2011 New Revision: 145239 URL: http://llvm.org/viewvc/llvm-project?rev=145239&view=rev Log: Silence wrong warnings from GCC about variables possibly being used uninitialized: GCC doesn't understand that the variables are only used if !UseImm, in which case they have been initialized. Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=145239&r1=145238&r2=145239&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Nov 28 04:31:27 2011 @@ -1360,7 +1360,7 @@ unsigned SrcReg1 = getRegForValue(Src1Value); if (SrcReg1 == 0) return false; - unsigned SrcReg2; + unsigned SrcReg2 = 0; if (!UseImm) { SrcReg2 = getRegForValue(Src2Value); if (SrcReg2 == 0) return false; @@ -1577,7 +1577,7 @@ (ARM_AM::getSOImmVal(Imm) != -1); } - unsigned Op2Reg; + unsigned Op2Reg = 0; if (!UseImm) { Op2Reg = getRegForValue(I->getOperand(2)); if (Op2Reg == 0) return false; From baldrick at free.fr Mon Nov 28 04:38:35 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 28 Nov 2011 10:38:35 -0000 Subject: [llvm-commits] [dragonegg] r145240 - /dragonegg/trunk/src/Backend.cpp Message-ID: <20111128103835.82D362A6C12D@llvm.org> Author: baldrick Date: Mon Nov 28 04:38:35 2011 New Revision: 145240 URL: http://llvm.org/viewvc/llvm-project?rev=145240&view=rev Log: Revert commits 145131 and 145132 now that this has been fixed better in LLVM. Modified: dragonegg/trunk/src/Backend.cpp Modified: dragonegg/trunk/src/Backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=145240&r1=145239&r2=145240&view=diff ============================================================================== --- dragonegg/trunk/src/Backend.cpp (original) +++ dragonegg/trunk/src/Backend.cpp Mon Nov 28 04:38:35 2011 @@ -40,6 +40,7 @@ #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/CodeGen/RegAllocRegistry.h" #include "llvm/MC/SubtargetFeature.h" +#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLibraryInfo.h" @@ -81,11 +82,6 @@ #error Unsupported GCC major version #endif -// llvm_shutdown - Declared in llvm/Support/ManagedStatic.h. -namespace llvm { - extern void llvm_shutdown(); -} - // Non-zero if libcalls should not be simplified. int flag_no_simplify_libcalls; From stpworld at narod.ru Mon Nov 28 05:16:41 2011 From: stpworld at narod.ru (Stepan Dyatkovskiy) Date: Mon, 28 Nov 2011 15:16:41 +0400 Subject: [llvm-commits] [LLVM, loop-unswitch, bugfix for #11429] Wrong behaviour for switches. In-Reply-To: <4ECF4A5A.9030607@narod.ru> References: <4ECF4A5A.9030607@narod.ru> Message-ID: <4ED36D99.1080306@narod.ru> ping. -Stepan Stepan Dyatkovskiy wrote: > Hi all. Please find the patch in attachment for review. Regression tests > are attached in separated patch. > > Short tests description: > > 2011-11-18-SimpleSwitch.ll > Check simple that simple switch will totally unswitched: > > for (...) > switch(c) { > case 0: inc(); break; > case 1: dec(); break; > default: goto loop_exit; > } > > loop_exit: > ... > > Result of processing should be 2 additional loops for c == 0 and for c > == 1. > > > 2011-11-18-TwoSwitches.ll > Check that second switch will unswitched too. Check that switches will > not unswitched again in new loop: > > Initially we have the next: > > for (...) { > switch(c) { > case 0: inc(); break; > } > switch(d) { > case 0: inc(); break; > } > } > > After optimization we should got 3 additional loops: when (c == 0 && d > == 0), when (c == 0 && d != 0) and when (c != 0 && d == 0). Original > loop will activated for (c != 0 && d != 0): > > if (c == 0 && d == 0) { > for (...) ... // All is clear here. Two "switch(0)" instructions. > } else if (c == 0 && d != 0) { > for (...) { > switch (0) { // c == 0 > case 0: inc(); break; > } > switch (d) { > case 0: goto unreachable; // CHECK: That it will not unswitched > // again, since it looks "trivial", > // see LoopUnswitch::IsTrivialUnswitchCondition > } > } > } else if (c != 0 && d == 0) { > // the same... > ... > } else { // if (c != 0 && d != 0) > // Original totally unswitched loop: > switch (c) { > case 0: goto unreachable; > } > switch (d) { > case 0: goto unreachable; > } > } > > Stepan. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From isanbard at gmail.com Mon Nov 28 05:45:10 2011 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 28 Nov 2011 11:45:10 -0000 Subject: [llvm-commits] [llvm] r145243 - in /llvm/trunk/utils/release: tag.sh test-release.sh Message-ID: <20111128114510.7775D2A6C12D@llvm.org> Author: void Date: Mon Nov 28 05:45:10 2011 New Revision: 145243 URL: http://llvm.org/viewvc/llvm-project?rev=145243&view=rev Log: Support a 'final' release candidate tag. Modified: llvm/trunk/utils/release/tag.sh llvm/trunk/utils/release/test-release.sh Modified: llvm/trunk/utils/release/tag.sh URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/tag.sh?rev=145243&r1=145242&r2=145243&view=diff ============================================================================== --- llvm/trunk/utils/release/tag.sh (original) +++ llvm/trunk/utils/release/tag.sh Mon Nov 28 05:45:10 2011 @@ -25,6 +25,7 @@ echo " " echo " -release The version number of the release" echo " -rc The release candidate number" + echo " -final Tag final release candidate" } function tag_version() { @@ -45,10 +46,10 @@ if ! svn ls $base_url/$proj/tags/RELEASE_$release > /dev/null 2>&1 ; then svn mkdir -m "Creating release directory for release_$release." $base_url/$proj/tags/RELEASE_$release fi - if ! svn ls $base_url/$proj/tags/RELEASE_$release/rc$rc > /dev/null 2>&1 ; then + if ! svn ls $base_url/$proj/tags/RELEASE_$release/$rc > /dev/null 2>&1 ; then svn copy -m "Creating release candidate $rc from release_$release branch" \ $base_url/$proj/branches/release_$release \ - $base_url/$proj/tags/RELEASE_$release/rc$rc + $base_url/$proj/tags/RELEASE_$release/$rc fi done set +x @@ -62,7 +63,10 @@ ;; -rc | --rc ) shift - rc=$1 + rc="rc$1" + ;; + -final | --final ) + rc="final" ;; -h | --help | -help ) usage Modified: llvm/trunk/utils/release/test-release.sh URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/test-release.sh?rev=145243&r1=145242&r2=145243&view=diff ============================================================================== --- llvm/trunk/utils/release/test-release.sh (original) +++ llvm/trunk/utils/release/test-release.sh Mon Nov 28 05:45:10 2011 @@ -42,6 +42,7 @@ echo "" echo " -release X.Y The release number to test." echo " -rc NUM The pre-release candidate number." + echo " -final The final release candidate." echo " -j NUM Number of compile jobs to run. [default: 3]" echo " -build-dir DIR Directory to perform testing in. [default: pwd]" echo " -no-checkout Don't checkout the sources from SVN." @@ -64,7 +65,10 @@ ;; -rc | --rc | -RC | --RC ) shift - RC=$1 + RC="rc$1" + ;; + -final | --final ) + RC=final ;; -j* ) NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`" @@ -142,7 +146,7 @@ fi # Go to the build directory (may be different from CWD) -BuildDir=$BuildDir/rc$RC +BuildDir=$BuildDir/$RC mkdir -p $BuildDir cd $BuildDir @@ -177,7 +181,7 @@ for proj in $projects ; do echo "# Validating $proj SVN URL" - if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/rc$RC > /dev/null 2>&1 ; then + if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC > /dev/null 2>&1 ; then echo "llvm $Release release candidate $RC doesn't exist!" exit 1 fi @@ -190,7 +194,7 @@ for proj in $projects ; do echo "# Exporting $proj $Release-RC$RC sources" - if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/rc$RC $proj.src ; then + if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then echo "error: failed to export $proj project" exit 1 fi @@ -238,7 +242,7 @@ echo "# Using C++ compiler: $cxx_compiler" cd $ObjDir - echo "# Configuring llvm $Release-rc$RC $Flavor" + echo "# Configuring llvm $Release-$RC $Flavor" echo "# $BuildDir/llvm.src/configure --prefix=$InstallDir \ --enable-optimized=$Optimized \ --enable-assertions=$Assertions" @@ -262,12 +266,12 @@ fi cd $ObjDir - echo "# Compiling llvm $Release-rc$RC $Flavor" + echo "# Compiling llvm $Release-$RC $Flavor" echo "# ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts" ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts \ 2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log - echo "# Installing llvm $Release-rc$RC $Flavor" + echo "# Installing llvm $Release-$RC $Flavor" echo "# ${MAKE} install" ${MAKE} install \ 2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log @@ -285,7 +289,7 @@ echo "# Targeted compiler: $gcc_compiler" cd $DragonEggObjDir - echo "# Compiling phase $Phase dragonegg $Release-rc$RC $Flavor" + echo "# Compiling phase $Phase dragonegg $Release-$RC $Flavor" echo -n "# CXX=$cxx_compiler TOP_DIR=$TOP_DIR GCC=$gcc_compiler " echo -n "LLVM_CONFIG=$LLVM_CONFIG ${MAKE} -f $TOP_DIR/Makefile " echo "-j $NumJobs VERBOSE=1" @@ -331,7 +335,7 @@ echo "" echo "" echo "********************************************************************************" - echo " Release: $Release-rc$RC" + echo " Release: $Release-$RC" echo " Build: $Flavor" echo " System Info: " echo " `uname -a`" @@ -341,21 +345,21 @@ c_compiler="$CC" cxx_compiler="$CXX" - llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-rc$RC.obj - llvmCore_phase1_installdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-rc$RC.install - dragonegg_phase1_objdir=$BuildDir/Phase1/$Flavor/DragonEgg-$Release-rc$RC.obj - - llvmCore_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-rc$RC.obj - llvmCore_phase2_installdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-rc$RC.install - llvmCore_de_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-DragonEgg-$Release-rc$RC.obj - llvmCore_de_phase2_installdir=$BuildDir/Phase2/$Flavor/llvmCore-DragonEgg-$Release-rc$RC.install - dragonegg_phase2_objdir=$BuildDir/Phase2/$Flavor/DragonEgg-$Release-rc$RC.obj - - llvmCore_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-rc$RC.obj - llvmCore_phase3_installdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-rc$RC.install - llvmCore_de_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-DragonEgg-$Release-rc$RC.obj - llvmCore_de_phase3_installdir=$BuildDir/Phase3/$Flavor/llvmCore-DragonEgg-$Release-rc$RC.install - dragonegg_phase3_objdir=$BuildDir/Phase3/$Flavor/DragonEgg-$Release-rc$RC.obj + llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.obj + llvmCore_phase1_installdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.install + dragonegg_phase1_objdir=$BuildDir/Phase1/$Flavor/DragonEgg-$Release-$RC.obj + + llvmCore_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-$RC.obj + llvmCore_phase2_installdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-$RC.install + llvmCore_de_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-DragonEgg-$Release-$RC.obj + llvmCore_de_phase2_installdir=$BuildDir/Phase2/$Flavor/llvmCore-DragonEgg-$Release-$RC.install + dragonegg_phase2_objdir=$BuildDir/Phase2/$Flavor/DragonEgg-$Release-$RC.obj + + llvmCore_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.obj + llvmCore_phase3_installdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.install + llvmCore_de_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-DragonEgg-$Release-$RC.obj + llvmCore_de_phase3_installdir=$BuildDir/Phase3/$Flavor/llvmCore-DragonEgg-$Release-$RC.install + dragonegg_phase3_objdir=$BuildDir/Phase3/$Flavor/DragonEgg-$Release-$RC.obj rm -rf $llvmCore_phase1_objdir rm -rf $llvmCore_phase1_installdir @@ -494,7 +498,7 @@ test_llvmCore 1 $Flavor $llvmCore_phase1_objdir fi done -) 2>&1 | tee $LogDir/testing.$Release-rc$RC.log +) 2>&1 | tee $LogDir/testing.$Release-$RC.log set +e From adasgupt at codeaurora.org Mon Nov 28 09:13:47 2011 From: adasgupt at codeaurora.org (Anshuman Dasgupta) Date: Mon, 28 Nov 2011 09:13:47 -0600 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: <4EC735D2.4040801@codeaurora.org> References: <4EC735D2.4040801@codeaurora.org> Message-ID: <4ED3A52B.6020207@codeaurora.org> Folks, Did anyone get a chance to take a look at the patch? Is it okay to commit? Thanks -Anshu -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum On 11/18/2011 10:51 PM, Anshuman Dasgupta wrote: > Hi, > > I'm attaching a patch that adds support for a deterministic finite > automaton (DFA) based packetizer for VLIW architectures. Specifically, > it automatically generates a DFA from a VLIW target's Schedule.td > file. In a VLIW machine, an instruction can typically be dispatched to > one or many function units. The DFA determines whether there exists a > legal mapping of instructions to functional unit assignments in a > packet. This DFA can then be queried by a backend packetization pass > to determine which instructions can be grouped into a VLIW packet. > > This patch contains the machine-independent code that adds a component > to TableGen. The component autogenerates the DFA and implements the > API that can be used to query the DFA during packetization. This can > be used by any VLIW target to packetize its instructions. After the > Hexagon backend is committed, I will post another Hexagon-specific > patch that uses this mechanism to construct packets in the Hexagon > backend. I ran the llvm test suite and this patch did not cause any > regressions. > > I would appreciate reviews and comments. > > Thanks > -Anshu > > -- > Qualcomm Innovation Center, Inc is a member of Code Aurora Forum > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/9feb80b7/attachment.html From bruno.cardoso at gmail.com Mon Nov 28 09:35:18 2011 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 28 Nov 2011 13:35:18 -0200 Subject: [llvm-commits] Fix in VSQRTSSm_Int pattern in X86 AVX CodeGen - Please review In-Reply-To: <7CB6AC5AED596245A99BF3213DE8F4AA030021A9FF@hasmsx504.ger.corp.intel.com> References: <7CB6AC5AED596245A99BF3213DE8F4AA030021A9FF@hasmsx504.ger.corp.intel.com> Message-ID: Hi Elena, On Mon, Nov 28, 2011 at 8:31 AM, Demikhovsky, Elena wrote: > Fixed an order of operands in VSQRTSSm_Int form: > > ? def SSm_Int : SSI - ? ? ? ? ? ? ? ?(ins ssmem:$src1, VR128:$src2), > + ? ? ? ? ? ? ? ?(ins VR128:$src1, ssmem:$src2), > ? ? ? ? ? ? ? ? !strconcat(OpcodeStr, > ? ? ? ? ? ? ? ? ? ? ? ? ? ?"ss\t{$src2, $src1, $dst|$dst, $src1, $src2}"), []>; > > Provided a test case. Looks great! But please provide a more reduced testcase, and place it inside avx-arith.ll -- Bruno Cardoso Lopes http://www.brunocardoso.cc From benny.kra at googlemail.com Mon Nov 28 10:56:39 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Mon, 28 Nov 2011 16:56:39 -0000 Subject: [llvm-commits] [llvm] r145249 - /llvm/trunk/include/llvm/ADT/APInt.h Message-ID: <20111128165639.295652A6C12D@llvm.org> Author: d0k Date: Mon Nov 28 10:56:38 2011 New Revision: 145249 URL: http://llvm.org/viewvc/llvm-project?rev=145249&view=rev Log: Handle more cases in APInt::getLowBitsSet's fast path. Modified: llvm/trunk/include/llvm/ADT/APInt.h Modified: llvm/trunk/include/llvm/ADT/APInt.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=145249&r1=145248&r2=145249&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/APInt.h (original) +++ llvm/trunk/include/llvm/ADT/APInt.h Mon Nov 28 10:56:38 2011 @@ -497,8 +497,8 @@ if (loBitsSet == APINT_BITS_PER_WORD) return APInt(numBits, -1ULL); // For small values, return quickly. - if (numBits < APINT_BITS_PER_WORD) - return APInt(numBits, (1ULL << loBitsSet) - 1); + if (loBitsSet <= APINT_BITS_PER_WORD) + return APInt(numBits, -1ULL >> (APINT_BITS_PER_WORD - loBitsSet)); return getAllOnesValue(numBits).lshr(numBits - loBitsSet); } From eli.friedman at gmail.com Mon Nov 28 11:06:13 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 09:06:13 -0800 Subject: [llvm-commits] [llvm] r145249 - /llvm/trunk/include/llvm/ADT/APInt.h In-Reply-To: <20111128165639.295652A6C12D@llvm.org> References: <20111128165639.295652A6C12D@llvm.org> Message-ID: On Mon, Nov 28, 2011 at 8:56 AM, Benjamin Kramer wrote: > Author: d0k > Date: Mon Nov 28 10:56:38 2011 > New Revision: 145249 > > URL: http://llvm.org/viewvc/llvm-project?rev=145249&view=rev > Log: > Handle more cases in APInt::getLowBitsSet's fast path. > > Modified: > ? ?llvm/trunk/include/llvm/ADT/APInt.h > > Modified: llvm/trunk/include/llvm/ADT/APInt.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=145249&r1=145248&r2=145249&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/ADT/APInt.h (original) > +++ llvm/trunk/include/llvm/ADT/APInt.h Mon Nov 28 10:56:38 2011 > @@ -497,8 +497,8 @@ > ? ? if (loBitsSet == APINT_BITS_PER_WORD) > ? ? ? return APInt(numBits, -1ULL); Did you mean to delete these two lines? -Eli > ? ? // For small values, return quickly. > - ? ?if (numBits < APINT_BITS_PER_WORD) > - ? ? ?return APInt(numBits, (1ULL << loBitsSet) - 1); > + ? ?if (loBitsSet <= APINT_BITS_PER_WORD) > + ? ? ?return APInt(numBits, -1ULL >> (APINT_BITS_PER_WORD - loBitsSet)); > ? ? return getAllOnesValue(numBits).lshr(numBits - loBitsSet); > ? } From rafael.espindola at gmail.com Mon Nov 28 11:06:58 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 28 Nov 2011 17:06:58 -0000 Subject: [llvm-commits] [llvm] r145250 - /llvm/trunk/docs/CodeGenerator.html Message-ID: <20111128170658.4DD332A6C12D@llvm.org> Author: rafael Date: Mon Nov 28 11:06:58 2011 New Revision: 145250 URL: http://llvm.org/viewvc/llvm-project?rev=145250&view=rev Log: Fix spelling/grammar errors found by Duncan. Modified: llvm/trunk/docs/CodeGenerator.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=145250&r1=145249&r2=145250&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Mon Nov 28 11:06:58 2011 @@ -2428,8 +2428,8 @@ is compatible with the gcc implementation used by the Go front end.

-

Basic support exits on the X86 backend. Currently -vararg don't work and the object files are not marked the way the gold +

Basic support exists on the X86 backend. Currently +vararg doesn't work and the object files are not marked the way the gold linker expects, but simple Go program can be built by dragonegg.

From benny.kra at googlemail.com Mon Nov 28 11:10:26 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Mon, 28 Nov 2011 18:10:26 +0100 Subject: [llvm-commits] [llvm] r145249 - /llvm/trunk/include/llvm/ADT/APInt.h In-Reply-To: References: <20111128165639.295652A6C12D@llvm.org> Message-ID: On 28.11.2011, at 18:06, Eli Friedman wrote: > On Mon, Nov 28, 2011 at 8:56 AM, Benjamin Kramer > wrote: >> Author: d0k >> Date: Mon Nov 28 10:56:38 2011 >> New Revision: 145249 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=145249&view=rev >> Log: >> Handle more cases in APInt::getLowBitsSet's fast path. >> >> Modified: >> llvm/trunk/include/llvm/ADT/APInt.h >> >> Modified: llvm/trunk/include/llvm/ADT/APInt.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=145249&r1=145248&r2=145249&view=diff >> ============================================================================== >> --- llvm/trunk/include/llvm/ADT/APInt.h (original) >> +++ llvm/trunk/include/llvm/ADT/APInt.h Mon Nov 28 10:56:38 2011 >> @@ -497,8 +497,8 @@ >> if (loBitsSet == APINT_BITS_PER_WORD) >> return APInt(numBits, -1ULL); > > Did you mean to delete these two lines? Yes, I should've made clear that this change supersedes the old path, loBitsSet is always less or equal numBits. -Ben > > -Eli > >> // For small values, return quickly. >> - if (numBits < APINT_BITS_PER_WORD) >> - return APInt(numBits, (1ULL << loBitsSet) - 1); >> + if (loBitsSet <= APINT_BITS_PER_WORD) >> + return APInt(numBits, -1ULL >> (APINT_BITS_PER_WORD - loBitsSet)); >> return getAllOnesValue(numBits).lshr(numBits - loBitsSet); >> } From joe.abbey at gmail.com Mon Nov 28 11:17:13 2011 From: joe.abbey at gmail.com (Joe Abbey) Date: Mon, 28 Nov 2011 12:17:13 -0500 Subject: [llvm-commits] [llvm] r145250 - /llvm/trunk/docs/CodeGenerator.html In-Reply-To: <20111128170658.4DD332A6C12D@llvm.org> References: <20111128170658.4DD332A6C12D@llvm.org> Message-ID: <65C4C7B0-4776-49A3-95C1-3E818D1C4574@gmail.com> So close! "but a simple Go program" English is hard, Joe Sent from my iPhone On Nov 28, 2011, at 12:06 PM, Rafael Espindola wrote: > Author: rafael > Date: Mon Nov 28 11:06:58 2011 > New Revision: 145250 > > URL: http://llvm.org/viewvc/llvm-project?rev=145250&view=rev > Log: > Fix spelling/grammar errors found by Duncan. > > Modified: > llvm/trunk/docs/CodeGenerator.html > > Modified: llvm/trunk/docs/CodeGenerator.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=145250&r1=145249&r2=145250&view=diff > ============================================================================== > --- llvm/trunk/docs/CodeGenerator.html (original) > +++ llvm/trunk/docs/CodeGenerator.html Mon Nov 28 11:06:58 2011 > @@ -2428,8 +2428,8 @@ > is compatible with the gcc > implementation used by the Go front end.

> > -

Basic support exits on the X86 backend. Currently > -vararg don't work and the object files are not marked the way the gold > +

Basic support exists on the X86 backend. Currently > +vararg doesn't work and the object files are not marked the way the gold > linker expects, but simple Go program can be built by dragonegg.

> > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From stoklund at 2pi.dk Mon Nov 28 12:03:11 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 18:03:11 -0000 Subject: [llvm-commits] [llvm] r145253 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128180311.F0E012A6C12D@llvm.org> Author: stoklund Date: Mon Nov 28 12:03:11 2011 New Revision: 145253 URL: http://llvm.org/viewvc/llvm-project?rev=145253&view=rev Log: Explain what ExeDepsFix does. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145253&r1=145252&r2=145253&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 12:03:11 2011 @@ -942,9 +942,12 @@ comparisons, turning them into various optimized code sequences (e.g. using the SSE4/AVX "blend" instructions).
  • The SSE execution domain fix pass and the ARM NEON move fix pass have been - merged to a target independent execution dependency fix pass. Targets can - override the getExecutionDomain and - setExecutionDomain hooks to use it.
  • + merged to a target independent execution dependency fix pass. This pass is + used to select alternative equivalent opcodes in a way that minimizes + execution domain crossings. Closely connected instructions are moved to + the same execution domain when possible. Targets can override the + getExecutionDomain and setExecutionDomain hooks + to use the pass. From bigcheesegs at gmail.com Mon Nov 28 12:20:09 2011 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Mon, 28 Nov 2011 18:20:09 -0000 Subject: [llvm-commits] [llvm] r145254 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128182009.C278C2A6C12D@llvm.org> Author: mspencer Date: Mon Nov 28 12:20:09 2011 New Revision: 145254 URL: http://llvm.org/viewvc/llvm-project?rev=145254&view=rev Log: Add object file related release notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145254&r1=145253&r2=145254&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 12:20:09 2011 @@ -62,8 +62,8 @@ releases page.

    - - + +

    Sub-project Status Update @@ -99,7 +99,7 @@
    • Greatly improved support for building C++ applications, with greater stability and better diagnostics.
    • - +
    • Improved support for the C++ 2011 standard (aka "C++'0x"), including implementations of non-static data member @@ -109,7 +109,7 @@
    • Implemented support for some features of the upcoming C1x standard, including static assertions and generic selections.
    • - +
    • Better detection of include and linking paths for system headers and libraries, especially for Linux distributions.
    • @@ -138,7 +138,7 @@ from source locations to abstract syntax tree nodes.
    - +

    If Clang rejects your code but another compiler accepts it, please take a look at the language compatibility guide to make sure this is not intentional or a known @@ -209,7 +209,7 @@

    - +

    LLDB is a ground-up implementation of a command line debugger, as well as a debugger API that can be used from other applications. LLDB makes use of the Clang parser to provide high-fidelity expression parsing (particularly for @@ -273,7 +273,7 @@

    - +

    @@ -326,7 +326,7 @@

    AddressSanitizer

    - +

    AddressSanitizer @@ -339,7 +339,7 @@

    ClamAV

    - +

    Clam AntiVirus is an open source (GPL) @@ -407,10 +407,10 @@ typing.

    - +

    Eero

    - +

    Eero is a fully @@ -426,7 +426,7 @@

    FAUST Real-Time Audio Signal Processing Language

    - +

    FAUST is a compiled language for @@ -441,7 +441,7 @@

    Glasgow Haskell Compiler (GHC)

    - +

    GHC is an open source, state-of-the-art programming suite for Haskell, a @@ -507,7 +507,7 @@ example program. ispc is licensed under the BSD license.

    - +

    The Julia Programming Language

    @@ -597,7 +597,7 @@

    Pure

    - +

    Pure is an algebraic/functional programming language based on term rewriting. Programs @@ -610,7 +610,7 @@ languages (including the ability to load LLVM bitcode modules, and inline C, C++, Fortran and Faust code in Pure programs if the corresponding LLVM-enabled compilers are installed).

    - +

    Pure version 0.48 has been tested and is known to work with LLVM 3.0 (and continues to work with older LLVM releases >= 2.5).

    @@ -671,7 +671,7 @@ co-design flow from C/C++ programs down to synthesizable VHDL and parallel program binaries. Processor customization points include the register files, function units, supported operations, and the interconnection network.

    - +

    TCE uses Clang and LLVM for C/C++ language support, target independent optimizations and also for parts of code generation. It generates new LLVM-based code generators "on the fly" for the designed TTA processors and @@ -679,7 +679,7 @@ per-target recompilation of larger parts of the compiler chain.

    - +

    Tart Programming Language

    @@ -756,15 +756,15 @@

    LLVM 3.0 includes several major changes and big features:

      -
    • llvm-gcc is no longer supported, and not included in the release. We +
    • llvm-gcc is no longer supported, and not included in the release. We recommend switching to Clang or Clang or DragonEgg.
    • The linear scan register allocator has been replaced with a new "greedy" register allocator, enabling live range splitting and many other optimizations that lead to better code quality. Please see its blog post or its talk at the blog post or its talk at the Developer Meeting for more information.
    • LLVM IR now includes full support for atomics @@ -782,15 +782,15 @@ documentation for more information.
    • The LLVM IR Type system has been redesigned and reimplemented, making it faster and solving some long-standing problems. - Please see its blog post for more information.
    • - +
    • The MIPS backend has made major leaps in this release, going from an experimental target to being virtually production quality and supporting a wide variety of MIPS subtargets. See the MIPS section below for more information.
    • - +
    • The optimizer and code generator now supports gprof and gcov-style coverage and profiling information, and includes a new llvm-cov tool (but also works with gcov). Clang exposes coverage and profiling through GCC-compatible @@ -799,7 +799,7 @@
    - +

    LLVM IR and Core Improvements @@ -857,12 +857,12 @@ register spill placement and if-conversion, with additional optimizations planned for future releases. The same framework is intended for eventual use with profile-guided optimization. - +
  • The "-indvars" induction variable simplification pass only modifies induction variables when profitable. Sign and zero extension elimination, linear function test replacement, loop unrolling, and other simplifications that require induction variable analysis have - been generalized so they no longer require loops to be rewritten into + been generalized so they no longer require loops to be rewritten into canonical form prior to optimization. This new design preserves more IR level information, avoids undoing earlier loop optimizations (particularly hand-optimized loops), and no longer @@ -910,10 +910,14 @@
  • TableGen can now autogenerate MC expansion logic for pseudo instructions that expand to multiple MC instructions (through the PseudoInstExpansion class).
  • -
  • A new llvm-objdump and llvm-dwarfdump tools provide a start of a drop-in - replacement for the corresponding tools that use LLVM libraries. As part of +
  • A new llvm-dwarfdump tool provides a start of a drop-in + replacement for the corresponding tool that use LLVM libraries. As part of this, LLVM has the beginnings of a dwarf parsing library.
  • -
  • XXX: object file parsing stuff and llvm-size (mspencer). Status?
  • +
  • llvm-objdump has more output including, symbol by symbol disassembly, + inline relocations, section headers, symbol tables, and section contents. + Support for archive files has also been added.
  • +
  • llvm-nm has gained support for archives of binary files.
  • +
  • llvm-size has been added. This tool prints out section sizes.
  • @@ -1011,7 +1015,7 @@
    - +

    MIPS Target Improvements @@ -1027,7 +1031,7 @@
  • LE/BE MIPS32r1/r2 has been tested extensively.
  • O32 ABI has been fully tested.
  • MIPS backend has migrated to using the MC infrastructure for assembly printing. Initial support for direct object code emission has been implemented too.
  • -
  • Delay slot filler has been updated. Now it tries to fill delay slots with useful instructions instead of always filling them with NOPs.
  • +
  • Delay slot filler has been updated. Now it tries to fill delay slots with useful instructions instead of always filling them with NOPs.
  • Support for old-style JIT is complete.
  • Support for old architectures (MIPS1 and MIPS2) has been removed.
  • Initial support for MIPS64 has been added.
  • @@ -1040,13 +1044,13 @@

    - +

    The PTX back-end is still experimental, but is fairly usable for compute kernels in LLVM 3.0. Most scalar arithmetic is implemented, as well as intrinsics to access the special PTX registers and sync instructions. The major missing pieces are texture/sampler support and some vector operations.

    - +

    That said, the backend is already being used for domain-specific languages and works well with the libclc library to supply OpenCL built-ins. With it, you can use Clang to compile @@ -1054,7 +1058,7 @@ blob using the nVidia OpenCL library. It has been tested with several OpenCL programs, including some from the nVidia GPU Computing SDK, and the performance is on par with the nVidia compiler.

    - +
    @@ -1067,11 +1071,11 @@
    • Many PowerPC improvements have been implemented for ELF targets, including support for varargs and initial support for direct .o file emission.
    • - +
    • MicroBlaze scheduling itineraries were added that model the 3-stage and the 5-stage pipeline architectures. The 3-stage - pipeline model can be selected with -mcpu=mblaze3 - and the 5-stage pipeline model can be selected with + pipeline model can be selected with -mcpu=mblaze3 + and the 5-stage pipeline model can be selected with -mcpu=mblaze5.
    @@ -1092,7 +1096,7 @@
    • LLVM 3.0 removes support for reading LLVM 2.8 and earlier files, and LLVM 3.1 will eliminate support for reading LLVM 2.9 files. Going forward, we - aim for all future versions of LLVM to read bitcode files and .ll files + aim for all future versions of LLVM to read bitcode files and .ll files produced by LLVM 3.0.
    • Tablegen has been split into a library, allowing the clang tblgen pieces now live in the clang tree. The llvm version has been renamed to @@ -1143,7 +1147,7 @@
    • The biggest and most pervasive change is that llvm::Types are no longer returned or accepted as 'const' values. Instead, just pass around non-const Types.
    • - +
    • PHINode::reserveOperandSpace has been removed. Instead, you must specify how many operands to reserve space for when you create the PHINode, by passing an extra argument @@ -1260,9 +1264,9 @@ there isn't already one or ask on the LLVMdev list.

      - +

      Known problem areas include:

      - +
      • The Alpha, Blackfin, CellSPU, MSP430, PTX, SystemZ and XCore backends are experimental, and the Alpha, Blackfin and SystemZ @@ -1273,7 +1277,7 @@ system assembler is required. For more details, see the Target Features Matrix.
      • - +
      • The C backend has numerous problems and is not being actively maintained. Depending on it for anything serious is not advised.
      @@ -1306,10 +1310,10 @@ - +
      From jan_sjodin at yahoo.com Mon Nov 28 12:41:00 2011 From: jan_sjodin at yahoo.com (Jan Sjodin) Date: Mon, 28 Nov 2011 10:41:00 -0800 (PST) Subject: [llvm-commits] [FMA4] Add support for 128 and 256 bit packed packed instructions Message-ID: <1322505660.18072.YahooMailNeo@web161510.mail.bf1.yahoo.com> This patch adds support for packed FMA4 instructions. - Jan -------------- next part -------------- A non-text attachment was scrubbed... Name: 0054_fma4_packedinstrs.patch Type: application/octet-stream Size: 7218 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/f2c7799d/attachment.obj From eli.friedman at gmail.com Mon Nov 28 12:50:37 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 18:50:37 -0000 Subject: [llvm-commits] [llvm] r145256 - /llvm/trunk/lib/Support/APFloat.cpp Message-ID: <20111128185037.B735D2A6C12D@llvm.org> Author: efriedma Date: Mon Nov 28 12:50:37 2011 New Revision: 145256 URL: http://llvm.org/viewvc/llvm-project?rev=145256&view=rev Log: Add back a line I deleted by accident in r145141. Fixes uninitialized variable warnings and runtime failures. Modified: llvm/trunk/lib/Support/APFloat.cpp Modified: llvm/trunk/lib/Support/APFloat.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=145256&r1=145255&r2=145256&view=diff ============================================================================== --- llvm/trunk/lib/Support/APFloat.cpp (original) +++ llvm/trunk/lib/Support/APFloat.cpp Mon Nov 28 12:50:37 2011 @@ -1917,6 +1917,7 @@ fs = opOK; } else { *losesInfo = false; + fs = opOK; } return fs; From stpworld at narod.ru Mon Nov 28 13:08:48 2011 From: stpworld at narod.ru (Stepan Dyatkovskiy) Date: Mon, 28 Nov 2011 23:08:48 +0400 Subject: [llvm-commits] [LLVM, loop-unswitch] Potential bug in RewriteLoopBodyWithConditionConstant In-Reply-To: <4ECFE963.6030107@narod.ru> References: <4ECB80FC.3070307@narod.ru> <4ECB8437.9010708@free.fr> <4ECB9786.9070104@narod.ru> <4ECD34CA.50501@narod.ru> <4ECD35C7.4000905@free.fr> <4ECFE963.6030107@narod.ru> Message-ID: <4ED3DC40.9020604@narod.ru> Hi all. > About WorkList. I missed it. Of course we can process this one. Please find the patch where WorkList collection is reused. It seems that all possible versions of patch are enumerated :-) -Stepan. -------------- next part -------------- A non-text attachment was scrubbed... Name: loop-unswitch-uselist.patch Type: text/x-patch Size: 671 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/a9cf9e40/attachment.bin From gohman at apple.com Mon Nov 28 13:13:00 2011 From: gohman at apple.com (Dan Gohman) Date: Mon, 28 Nov 2011 11:13:00 -0800 Subject: [llvm-commits] [llvm] r139450 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp In-Reply-To: <20110910010950.A09B82A6C12C@llvm.org> References: <20110910010950.A09B82A6C12C@llvm.org> Message-ID: <455EA2B8-13CA-4ECD-AC94-4A3CF2138CE2@apple.com> Hi Andy, The reason this wasn't done is because of potential trouble with code like this: if (some condition which is true when a+b doesn't overflow) { t0 = add nsw a, b use(t0); } else { t1 = add a, b) use(t1); } Because ScalarEvolution doesn't currently include the nsw flag when hashing expressions for uniqueness, the nsw flag could get set for a+b when examining the first add instruction, and remain when that expression is reused for the second add instruction. There actually was a comment about this way back in r83649, but it appears to have gotten lost somewhere along the way. Dan On Sep 9, 2011, at 6:09 PM, Andrew Trick wrote: > Author: atrick > Date: Fri Sep 9 20:09:50 2011 > New Revision: 139450 > > URL: http://llvm.org/viewvc/llvm-project?rev=139450&view=rev > Log: > Set NSW/NUW flags on SCEVAddExpr when the operation is flagged as > such. > > I'm doing this now for completeness because I can't think of/remember > any reason that it was left out. I'm not sure it will help anything, > but if we don't do it we need to explain why in comments. > > Modified: > llvm/trunk/lib/Analysis/ScalarEvolution.cpp > > Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=139450&r1=139449&r2=139450&view=diff > ============================================================================== > --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) > +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri Sep 9 20:09:50 2011 > @@ -3546,7 +3546,13 @@ > AddOps.push_back(Op1); > } > AddOps.push_back(getSCEV(U->getOperand(0))); > - return getAddExpr(AddOps); > + SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap; > + OverflowingBinaryOperator *OBO = cast(V); > + if (OBO->hasNoSignedWrap()) > + setFlags(Flags, SCEV::FlagNSW); > + if (OBO->hasNoUnsignedWrap()) > + setFlags(Flags, SCEV::FlagNUW); > + return getAddExpr(AddOps, Flags); > } > case Instruction::Mul: { > // See the Add code above. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From atrick at apple.com Mon Nov 28 13:22:09 2011 From: atrick at apple.com (Andrew Trick) Date: Mon, 28 Nov 2011 19:22:09 -0000 Subject: [llvm-commits] [llvm] r145262 - in /llvm/trunk: include/llvm/Analysis/LoopInfo.h lib/Analysis/LoopInfo.cpp lib/Transforms/Scalar/LoopUnrollPass.cpp Message-ID: <20111128192210.02B0D2A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 13:22:09 2011 New Revision: 145262 URL: http://llvm.org/viewvc/llvm-project?rev=145262&view=rev Log: Remove the temporary flag -disable-unroll-scev and dead code. SCEV should now be used for trip count analysis, not LoopInfo. Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h llvm/trunk/lib/Analysis/LoopInfo.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=145262&r1=145261&r2=145262&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Mon Nov 28 13:22:09 2011 @@ -23,7 +23,6 @@ // * whether or not a particular block branches out of the loop // * the successor blocks of the loop // * the loop depth -// * the trip count // * etc... // //===----------------------------------------------------------------------===// @@ -587,37 +586,6 @@ /// PHINode *getCanonicalInductionVariable() const; - /// getTripCount - Return a loop-invariant LLVM value indicating the number of - /// times the loop will be executed. Note that this means that the backedge - /// of the loop executes N-1 times. If the trip-count cannot be determined, - /// this returns null. - /// - /// The IndVarSimplify pass transforms loops to have a form that this - /// function easily understands. - /// - Value *getTripCount() const; - - /// getSmallConstantTripCount - Returns the trip count of this loop as a - /// normal unsigned value, if possible. Returns 0 if the trip count is unknown - /// of not constant. Will also return 0 if the trip count is very large - /// (>= 2^32) - /// - /// The IndVarSimplify pass transforms loops to have a form that this - /// function easily understands. - /// - unsigned getSmallConstantTripCount() const; - - /// getSmallConstantTripMultiple - Returns the largest constant divisor of the - /// trip count of this loop as a normal unsigned value, if possible. This - /// means that the actual trip count is always a multiple of the returned - /// value (don't forget the trip count could very well be zero as well!). - /// - /// Returns 1 if the trip count is unknown or not guaranteed to be the - /// multiple of a constant (which is also the case if the trip count is simply - /// constant, use getSmallConstantTripCount for that case), Will also return 1 - /// if the trip count is very large (>= 2^32). - unsigned getSmallConstantTripMultiple() const; - /// isLCSSAForm - Return true if the Loop is in LCSSA form bool isLCSSAForm(DominatorTree &DT) const; Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=145262&r1=145261&r2=145262&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LoopInfo.cpp (original) +++ llvm/trunk/lib/Analysis/LoopInfo.cpp Mon Nov 28 13:22:09 2011 @@ -165,99 +165,6 @@ return 0; } -/// getTripCount - Return a loop-invariant LLVM value indicating the number of -/// times the loop will be executed. Note that this means that the backedge -/// of the loop executes N-1 times. If the trip-count cannot be determined, -/// this returns null. -/// -/// The IndVarSimplify pass transforms loops to have a form that this -/// function easily understands. -/// -Value *Loop::getTripCount() const { - // Canonical loops will end with a 'cmp ne I, V', where I is the incremented - // canonical induction variable and V is the trip count of the loop. - PHINode *IV = getCanonicalInductionVariable(); - if (IV == 0 || IV->getNumIncomingValues() != 2) return 0; - - bool P0InLoop = contains(IV->getIncomingBlock(0)); - Value *Inc = IV->getIncomingValue(!P0InLoop); - BasicBlock *BackedgeBlock = IV->getIncomingBlock(!P0InLoop); - - if (BranchInst *BI = dyn_cast(BackedgeBlock->getTerminator())) - if (BI->isConditional()) { - if (ICmpInst *ICI = dyn_cast(BI->getCondition())) { - if (ICI->getOperand(0) == Inc) { - if (BI->getSuccessor(0) == getHeader()) { - if (ICI->getPredicate() == ICmpInst::ICMP_NE) - return ICI->getOperand(1); - } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { - return ICI->getOperand(1); - } - } - } - } - - return 0; -} - -/// getSmallConstantTripCount - Returns the trip count of this loop as a -/// normal unsigned value, if possible. Returns 0 if the trip count is unknown -/// or not constant. Will also return 0 if the trip count is very large -/// (>= 2^32) -unsigned Loop::getSmallConstantTripCount() const { - Value* TripCount = this->getTripCount(); - if (TripCount) { - if (ConstantInt *TripCountC = dyn_cast(TripCount)) { - // Guard against huge trip counts. - if (TripCountC->getValue().getActiveBits() <= 32) { - return (unsigned)TripCountC->getZExtValue(); - } - } - } - return 0; -} - -/// getSmallConstantTripMultiple - Returns the largest constant divisor of the -/// trip count of this loop as a normal unsigned value, if possible. This -/// means that the actual trip count is always a multiple of the returned -/// value (don't forget the trip count could very well be zero as well!). -/// -/// Returns 1 if the trip count is unknown or not guaranteed to be the -/// multiple of a constant (which is also the case if the trip count is simply -/// constant, use getSmallConstantTripCount for that case), Will also return 1 -/// if the trip count is very large (>= 2^32). -unsigned Loop::getSmallConstantTripMultiple() const { - Value* TripCount = this->getTripCount(); - // This will hold the ConstantInt result, if any - ConstantInt *Result = NULL; - if (TripCount) { - // See if the trip count is constant itself - Result = dyn_cast(TripCount); - // if not, see if it is a multiplication - if (!Result) - if (BinaryOperator *BO = dyn_cast(TripCount)) { - switch (BO->getOpcode()) { - case BinaryOperator::Mul: - Result = dyn_cast(BO->getOperand(1)); - break; - case BinaryOperator::Shl: - if (ConstantInt *CI = dyn_cast(BO->getOperand(1))) - if (CI->getValue().getActiveBits() <= 5) - return 1u << CI->getZExtValue(); - break; - default: - break; - } - } - } - // Guard against huge trip counts. - if (Result && Result->getValue().getActiveBits() <= 32) { - return (unsigned)Result->getZExtValue(); - } else { - return 1; - } -} - /// isLCSSAForm - Return true if the Loop is in LCSSA form bool Loop::isLCSSAForm(DominatorTree &DT) const { // Sort the blocks vector so that we can use binary search to do quick Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=145262&r1=145261&r2=145262&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Mon Nov 28 13:22:09 2011 @@ -40,11 +40,6 @@ cl::desc("Allows loops to be partially unrolled until " "-unroll-threshold loop size is reached.")); -// Temporary flag to be removed in 3.0 -static cl::opt -NoSCEVUnroll("disable-unroll-scev", cl::init(false), cl::Hidden, - cl::desc("Use ScalarEvolution to analyze loop trip counts for unrolling")); - namespace { class LoopUnroll : public LoopPass { public: @@ -148,20 +143,13 @@ // Find trip count and trip multiple if count is not available unsigned TripCount = 0; unsigned TripMultiple = 1; - if (!NoSCEVUnroll) { - // Find "latch trip count". UnrollLoop assumes that control cannot exit - // via the loop latch on any iteration prior to TripCount. The loop may exit - // early via an earlier branch. - BasicBlock *LatchBlock = L->getLoopLatch(); - if (LatchBlock) { - TripCount = SE->getSmallConstantTripCount(L, LatchBlock); - TripMultiple = SE->getSmallConstantTripMultiple(L, LatchBlock); - } - } - else { - TripCount = L->getSmallConstantTripCount(); - if (TripCount == 0) - TripMultiple = L->getSmallConstantTripMultiple(); + // Find "latch trip count". UnrollLoop assumes that control cannot exit + // via the loop latch on any iteration prior to TripCount. The loop may exit + // early via an earlier branch. + BasicBlock *LatchBlock = L->getLoopLatch(); + if (LatchBlock) { + TripCount = SE->getSmallConstantTripCount(L, LatchBlock); + TripMultiple = SE->getSmallConstantTripMultiple(L, LatchBlock); } // Automatically select an unroll count. unsigned Count = CurrentCount; From isanbard at gmail.com Mon Nov 28 13:23:14 2011 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 28 Nov 2011 19:23:14 -0000 Subject: [llvm-commits] [llvm] r145263 - in /llvm/trunk: docs/ExceptionHandling.html include/llvm/CodeGen/ISDOpcodes.h include/llvm/Intrinsics.td lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Message-ID: <20111128192314.A1F032A6C12C@llvm.org> Author: void Date: Mon Nov 28 13:23:13 2011 New Revision: 145263 URL: http://llvm.org/viewvc/llvm-project?rev=145263&view=rev Log: Remove dead llvm.eh.sjlj.dispatchsetup intrinsic. Modified: llvm/trunk/docs/ExceptionHandling.html llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h llvm/trunk/include/llvm/Intrinsics.td llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Modified: llvm/trunk/docs/ExceptionHandling.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ExceptionHandling.html?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/docs/ExceptionHandling.html (original) +++ llvm/trunk/docs/ExceptionHandling.html Mon Nov 28 13:23:13 2011 @@ -38,7 +38,6 @@
    • llvm.eh.sjlj.longjmp
    • llvm.eh.sjlj.lsda
    • llvm.eh.sjlj.callsite
    • -
    • llvm.eh.sjlj.dispatchsetup
    • Asm Table Formats
        @@ -499,25 +498,6 @@ -

        - llvm.eh.sjlj.dispatchsetup -

        - -
        - -
        -  void @llvm.eh.sjlj.dispatchsetup(i32 %dispatch_value)
        -
        - -

        For SJLJ based exception handling, the llvm.eh.sjlj.dispatchsetup - intrinsic is used by targets to do any unwind edge setup they need. By - default, no action is taken.

        - -
        - - - -

        Asm Table Formats

        Modified: llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h Mon Nov 28 13:23:13 2011 @@ -107,13 +107,6 @@ // and returns an outchain. EH_SJLJ_LONGJMP, - // OUTCHAIN = EH_SJLJ_DISPATCHSETUP(INCHAIN, setjmpval) - // This corresponds to the eh.sjlj.dispatchsetup intrinsic. It takes an - // input chain and the value returning from setjmp as inputs and returns an - // outchain. By default, this does nothing. Targets can lower this to unwind - // setup code if needed. - EH_SJLJ_DISPATCHSETUP, - // TargetConstant* - Like Constant*, but the DAG does not do any folding, // simplification, or lowering of the constant. They are used for constants // which are known to fit in the immediate fields of their users, or for Modified: llvm/trunk/include/llvm/Intrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/include/llvm/Intrinsics.td (original) +++ llvm/trunk/include/llvm/Intrinsics.td Mon Nov 28 13:23:13 2011 @@ -326,7 +326,6 @@ def int_eh_sjlj_callsite : Intrinsic<[], [llvm_i32_ty]>; } def int_eh_sjlj_functioncontext : Intrinsic<[], [llvm_ptr_ty]>; -def int_eh_sjlj_dispatch_setup : Intrinsic<[], [llvm_i32_ty]>; def int_eh_sjlj_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; def int_eh_sjlj_longjmp : Intrinsic<[], [llvm_ptr_ty]>; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Nov 28 13:23:13 2011 @@ -785,7 +785,6 @@ case ISD::FRAME_TO_ARGS_OFFSET: case ISD::EH_SJLJ_SETJMP: case ISD::EH_SJLJ_LONGJMP: - case ISD::EH_SJLJ_DISPATCHSETUP: // These operations lie about being legal: when they claim to be legal, // they should actually be expanded. Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); @@ -2538,7 +2537,6 @@ case ISD::PREFETCH: case ISD::VAEND: case ISD::EH_SJLJ_LONGJMP: - case ISD::EH_SJLJ_DISPATCHSETUP: // If the target didn't expand these, there's nothing to do, so just // preserve the chain and be done. Results.push_back(Node->getOperand(0)); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Nov 28 13:23:13 2011 @@ -5943,7 +5943,6 @@ case ISD::EH_RETURN: return "EH_RETURN"; case ISD::EH_SJLJ_SETJMP: return "EH_SJLJ_SETJMP"; case ISD::EH_SJLJ_LONGJMP: return "EH_SJLJ_LONGJMP"; - case ISD::EH_SJLJ_DISPATCHSETUP: return "EH_SJLJ_DISPATCHSETUP"; case ISD::ConstantPool: return "ConstantPool"; case ISD::ExternalSymbol: return "ExternalSymbol"; case ISD::BlockAddress: return "BlockAddress"; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=145263&r1=145262&r2=145263&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Nov 28 13:23:13 2011 @@ -4775,11 +4775,6 @@ getRoot(), getValue(I.getArgOperand(0)))); return 0; } - case Intrinsic::eh_sjlj_dispatch_setup: { - DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_DISPATCHSETUP, dl, MVT::Other, - getRoot(), getValue(I.getArgOperand(0)))); - return 0; - } case Intrinsic::x86_mmx_pslli_w: case Intrinsic::x86_mmx_pslli_d: From stoklund at 2pi.dk Mon Nov 28 13:32:46 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 11:32:46 -0800 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: <4EC735D2.4040801@codeaurora.org> References: <4EC735D2.4040801@codeaurora.org> Message-ID: On Nov 18, 2011, at 8:51 PM, Anshuman Dasgupta wrote: > I'm attaching a patch that adds support for a deterministic finite automaton (DFA) based packetizer for VLIW architectures. Specifically, it automatically generates a DFA from a VLIW target's Schedule.td file. In a VLIW machine, an instruction can typically be dispatched to one or many function units. The DFA determines whether there exists a legal mapping of instructions to functional unit assignments in a packet. This DFA can then be queried by a backend packetization pass to determine which instructions can be grouped into a VLIW packet. > > This patch contains the machine-independent code that adds a component to TableGen. The component autogenerates the DFA and implements the API that can be used to query the DFA during packetization. This can be used by any VLIW target to packetize its instructions. After the Hexagon backend is committed, I will post another Hexagon-specific patch that uses this mechanism to construct packets in the Hexagon backend. I ran the llvm test suite and this patch did not cause any regressions. > > I would appreciate reviews and comments. Hi Anshu, Thanks for making this target-independent. It looks interesting. I was missing documentation in your patch. What does the DFA do? How is it generated? How can I use it? I think this deserves a full section in docs/CodeGenerator.html +struct ltState +{ +class DFA { + public: Please make sure your braces and indentation matches the rest of LLVM. You also have a couple of 80-col violations. You are using std::set and std::map a lot. These containers are quite expensive, and should only be used if you actually need features that the llvm/ADT classes don't offer. They do get used more in TableGen where performance is less critical, but still. +#include Please read http://llvm.org/docs/CodingStandards.html + // Set of transitions + std::set transitions; Is this set used anywhere but here?: + // Add the new transition + transitions.insert(T); If not, you can optimize that ;-) +namespace llvm { + typedef std::pair UnsignPair; Please don't put trivial typedefs like that in the llvm namespace. Either move the type into your class, or just spell it out in the header. +++ b/utils/TableGen/DFAPacketizerEmitter.h +typedef unsigned Input; Don't put this in the global namespace, or even in the llvm namespace. +class State { +struct Transition { +class DFA { Even for TableGen, these names are too generic to go in the llvm namespace. I would like to review the functionality as well, but that will be a lot easier if you submit a new patch with documentation first. Thanks, /jakob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/a5ca2e73/attachment.html From joerg at britannica.bec.de Mon Nov 28 13:39:32 2011 From: joerg at britannica.bec.de (Joerg Sonnenberger) Date: Mon, 28 Nov 2011 20:39:32 +0100 Subject: [llvm-commits] [llvm] r144239 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll In-Reply-To: <20111109230735.54DFF1BE001@llvm.org> References: <20111109230735.54DFF1BE001@llvm.org> Message-ID: <20111128193932.GA17592@britannica.bec.de> On Wed, Nov 09, 2011 at 11:07:35PM -0000, Pete Cooper wrote: > Author: pete > Date: Wed Nov 9 17:07:35 2011 > New Revision: 144239 > > URL: http://llvm.org/viewvc/llvm-project?rev=144239&view=rev > Log: > DeadStoreElimination can now trim the size of a store if the end of the store is dead. This doesn't work correctly. Attached is a minimised test case. With this change, the memcpy is effectively dropped, even if it is not a dead store. Joerg -------------- next part -------------- typedef unsigned long int __uint64_t; struct trapframe { __uint64_t tf_rdi; __uint64_t tf_trapno; }; void cpu_lwp_fork(struct trapframe *md_regs, __uint64_t pcb_rsp0) { struct trapframe *tf; tf = (struct trapframe *)pcb_rsp0 -1; __builtin_memcpy(tf, md_regs, sizeof(struct trapframe)); tf->tf_trapno = 3; } From eli.friedman at gmail.com Mon Nov 28 13:57:05 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 11:57:05 -0800 Subject: [llvm-commits] Patch: new backend for Hexagon processor In-Reply-To: <4EC5E66D.8080303@codeaurora.org> References: <4EC17287.3090708@codeaurora.org> <4EC2F380.7010509@codeaurora.org> <4EC5E66D.8080303@codeaurora.org> Message-ID: On Thu, Nov 17, 2011 at 9:00 PM, Tony Linthicum wrote: > On 11/16/2011 6:48 PM, Eli Friedman wrote: >> >> On Tue, Nov 15, 2011 at 3:19 PM, Tony Linthicum >> ?wrote: >>> >>> On 11/14/2011 2:54 PM, Eli Friedman wrote: >>> >>>> >>>> --- a/include/llvm/InitializePasses.h >>>> +++ b/include/llvm/InitializePasses.h >>>> @@ -233,6 +233,7 @@ void initializeVerifierPass(PassRegistry&); >>>> ?void initializeVirtRegMapPass(PassRegistry&); >>>> ?void initializeInstSimplifierPass(PassRegistry&); >>>> >>>> +void initializeHexagonHardwareLoopsPass(PassRegistry&); >>>> ?} >>>> >>>> ?#endif >>>> >>>> This change shouldn't be necessary; only target-independent passes >>>> need to be listed here, IIRC. >>>> >>> >>> We are in the process of fixing this and will update with a new patch in >>> a >>> day or two. >>> > > Done. > > >> >> It would be nice to see some more documentation in >> docs/CodeGenerator.html for Hexagon-specific target information; it >> looks like there are some interesting target-specific passes, and >> other information might be useful. >> > > Not a problem. ?We will add some documentation. > >> I don't see any issues with the rest of the patch; I haven't looked at >> the lib/Target/Hexagon/* bits in much detail, though. >> > > Thanks. I just took another look; comments below. void MCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit) { - // Emit with a text fill value. - EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), - 1, MaxBytesToEmit); + if (MAI.getCodeAlignDirective()) { + OS << MAI.getCodeAlignDirective(); + EmitEOL(); + } + else { + // Emit with a text fill value. + EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), + 1, MaxBytesToEmit); + } } This doesn't actually appear to take into account the specified alignment. +// This file contains a printer that converts from our internal representation +// of machine-dependent LLVM code to PowerPC assembly language. This printer is Copy-pasto? References for PowerPC are scattered around HexagonAsmPrinter.cpp +/// getFunctionAlignment - Return the Log2 alignment of this function. +unsigned HexagonTargetLowering::getFunctionAlignment(const Function *) const { + return 2; +} This isn't overriding anything. See setMinFunctionAlignment/setPrefFunctionAlignment. +def MUX_ri : ALU32_ri<(outs IntRegs:$dst), (ins PredRegs:$src1, IntRegs:$src2, s8Imm:$src3), 80 columns? -Eli From mcrosier at apple.com Mon Nov 28 13:59:09 2011 From: mcrosier at apple.com (Chad Rosier) Date: Mon, 28 Nov 2011 19:59:09 -0000 Subject: [llvm-commits] [llvm] r145267 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Message-ID: <20111128195909.A870E2A6C12C@llvm.org> Author: mcrosier Date: Mon Nov 28 13:59:09 2011 New Revision: 145267 URL: http://llvm.org/viewvc/llvm-project?rev=145267&view=rev Log: 80-column. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=145267&r1=145266&r2=145267&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Nov 28 13:59:09 2011 @@ -62,8 +62,10 @@ #include "llvm/ADT/Statistic.h" using namespace llvm; -STATISTIC(NumFastIselSuccessIndependent, "Number of insts selected by target-independent selector"); -STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by target-specific selector"); +STATISTIC(NumFastIselSuccessIndependent, "Number of insts selected by " + "target-independent selector"); +STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by " + "target-specific selector"); /// startNewBlock - Set the current block to which generated machine /// instructions will be appended, and clear the local CSE map. From peter at pcc.me.uk Mon Nov 28 14:04:12 2011 From: peter at pcc.me.uk (Peter Collingbourne) Date: Mon, 28 Nov 2011 20:04:12 -0000 Subject: [llvm-commits] [llvm] r145270 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128200412.6799B2A6C12C@llvm.org> Author: pcc Date: Mon Nov 28 14:04:12 2011 New Revision: 145270 URL: http://llvm.org/viewvc/llvm-project?rev=145270&view=rev Log: Add OpenCL blurb to release notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145270&r1=145269&r2=145270&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 14:04:12 2011 @@ -133,6 +133,10 @@ Objective-C runtime, or version 1.6 or later of the GNUstep Objective-C runtime version. +
      1. Improved support for OpenCL C, including the vec_step operator, + address space qualifiers, improved vector literal support and code + generation support for the PTX target.
      2. +
      3. Implemented a number of optimizations in libclang, the Clang C interface, to improve the performance of code completion and the mapping from source locations to abstract syntax tree nodes.
      4. From evan.cheng at apple.com Mon Nov 28 14:27:23 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 20:27:23 -0000 Subject: [llvm-commits] [llvm] r145272 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <20111128202723.8464D2A6C12C@llvm.org> Author: evancheng Date: Mon Nov 28 14:27:23 2011 New Revision: 145272 URL: http://llvm.org/viewvc/llvm-project?rev=145272&view=rev Log: Add missing avx pattern. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145272&r1=145271&r2=145272&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Nov 28 14:27:23 2011 @@ -657,6 +657,9 @@ def : Pat<(v2f64 (X86Movlpd VR128:$src1, VR128:$src2)), (VMOVSDrr VR128:$src1, (EXTRACT_SUBREG (v2f64 VR128:$src2), sub_sd))>; + def : Pat<(v2i64 (X86Movlpd VR128:$src1, VR128:$src2)), + (VMOVSDrr VR128:$src1, (EXTRACT_SUBREG (v2i64 VR128:$src2), + sub_sd))>; def : Pat<(v4f32 (X86Movlps VR128:$src1, VR128:$src2)), (VMOVSDrr VR128:$src1, (EXTRACT_SUBREG (v4f32 VR128:$src2), sub_sd))>; From nadav.rotem at intel.com Mon Nov 28 14:33:28 2011 From: nadav.rotem at intel.com (Rotem, Nadav) Date: Mon, 28 Nov 2011 22:33:28 +0200 Subject: [llvm-commits] Updated pointer-vector patch Message-ID: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com> I attached the updated pointer-vector patch, following comments from Nick?Lewycky. Thanks, Nadav --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- A non-text attachment was scrubbed... Name: vector_gep.patch Type: application/octet-stream Size: 21572 bytes Desc: vector_gep.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/38e96e8a/attachment-0001.obj From dschuff at google.com Mon Nov 28 14:42:08 2011 From: dschuff at google.com (Derek Schuff) Date: Mon, 28 Nov 2011 12:42:08 -0800 Subject: [llvm-commits] Proposal/patch: Enable bitcode streaming In-Reply-To: References: Message-ID: thanks for the feedback, I'm fixing all the suggestions, but I do have one question: On Mon, Nov 21, 2011 at 3:38 PM, Nick Lewycky wrote: > This is in a header file. Please move the implementation of the virtual > destructor to BitcodeReader.cpp, or else copies will end up in every .o > file that includes this header. > > Same with MemoryBitstreamBytes and LazyBitstreamBytes. More general > question, any reason to put MemoryBitstreamBytes and LazyBitstreamBytes > implementations inside the header? You could create > lib/Bitcode/Reader/BitstreamReader.cpp. > > The BitstreamBytes implementations are in the header file because BitstreamReader/BitstreamCursor is implemented entirely in the header file. Presumably BitstreamReader is in the header file so it can be inlined. Presumably this improves performance (especially in llc where there the usage is only in one file), although there seem to be several uses of BitstreamCursor in clang, so it may contribute to more code size bloat there. If you want I can move everything to BitstreamReader.cpp (perhaps LTO could still buy us back any performance loss from inlining?) It would also be possible to move just the BitstreamBytes implementations into a cpp file using the common idiom of having static factory functions with an anonymous namespace rather than just calling "new" directly like we do right now. >One other thing. The behaviour when LazyBitcode is true could be really different from when it off on the same .bc file on >disk. It'd be good to add comments pointing out why (module-level assembly comes to mind, anything else?). Sure. where would be a good place to put it? thanks, -Derek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/82035ef2/attachment.html From evan.cheng at apple.com Mon Nov 28 14:42:57 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 20:42:57 -0000 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll Message-ID: <20111128204257.51FC52A6C12C@llvm.org> Author: evancheng Date: Mon Nov 28 14:42:56 2011 New Revision: 145273 URL: http://llvm.org/viewvc/llvm-project?rev=145273&view=rev Log: DAG combine should not increase alignment of loads / stores with alignment less than ABI alignment. These are loads / stores from / to "packed" data structures. Their alignments are intentionally under-specified. rdar://10301431 Added: llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/test/CodeGen/X86/widen_load-1.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=145273&r1=145272&r2=145273&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Nov 28 14:42:56 2011 @@ -6206,13 +6206,20 @@ // Try to infer better alignment information than the load already has. if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) { - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { - if (Align > LD->getAlignment()) - return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), - LD->getValueType(0), - Chain, Ptr, LD->getPointerInfo(), - LD->getMemoryVT(), - LD->isVolatile(), LD->isNonTemporal(), Align); + unsigned ABIAlign = TLI.getTargetData()-> + getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext())); + unsigned LDAlign = LD->getAlignment(); + // Do not touch loads with explicit alignments that are smaller than ABI + // alignment to avoid breaking loads from "packed" types. + if (!LDAlign || LDAlign >= ABIAlign) { + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { + if (Align > LDAlign) + return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), + LD->getValueType(0), + Chain, Ptr, LD->getPointerInfo(), + LD->getMemoryVT(), + LD->isVolatile(), LD->isNonTemporal(), Align); + } } } @@ -6669,11 +6676,18 @@ // Try to infer better alignment information than the store already has. if (OptLevel != CodeGenOpt::None && ST->isUnindexed()) { - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { - if (Align > ST->getAlignment()) - return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, - Ptr, ST->getPointerInfo(), ST->getMemoryVT(), - ST->isVolatile(), ST->isNonTemporal(), Align); + unsigned ABIAlign = TLI.getTargetData()-> + getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext())); + unsigned STAlign = ST->getAlignment(); + // Do not touch stores with explicit alignments that are smaller than ABI + // alignment to avoid breaking stores from "packed" types. + if (!STAlign || STAlign >= ABIAlign) { + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { + if (Align > STAlign) + return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, + Ptr, ST->getPointerInfo(), ST->getMemoryVT(), + ST->isVolatile(), ST->isNonTemporal(),Align); + } } } Added: llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll?rev=145273&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll Mon Nov 28 14:42:56 2011 @@ -0,0 +1,38 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-ios5.0.0 | FileCheck %s +; rdar://10464621 + +; DAG combine increases loads from packed types. ARM load / store optimizer then +; combined them into a ldm which causes runtime exception. + +%struct.InformationBlock = type <{ i32, %struct.FlagBits, %struct.FlagBits }> +%struct.FlagBits = type <{ [4 x i32] }> + + at infoBlock = external global %struct.InformationBlock + +define hidden void @foo() { +; CHECK: foo: +; CHECK: ldr.w +; CHECK: ldr.w +; CHECK-NOT: ldm +entry: + %tmp13 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 0), align 1 + %tmp15 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 1), align 1 + %tmp17 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 2), align 1 + %tmp19 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 3), align 1 + %tmp = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 0), align 1 + %tmp3 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 1), align 1 + %tmp4 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 2), align 1 + %tmp5 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 3), align 1 + %insert21 = insertvalue [4 x i32] undef, i32 %tmp13, 0 + %insert23 = insertvalue [4 x i32] %insert21, i32 %tmp15, 1 + %insert25 = insertvalue [4 x i32] %insert23, i32 %tmp17, 2 + %insert27 = insertvalue [4 x i32] %insert25, i32 %tmp19, 3 + %insert = insertvalue [4 x i32] undef, i32 %tmp, 0 + %insert7 = insertvalue [4 x i32] %insert, i32 %tmp3, 1 + %insert9 = insertvalue [4 x i32] %insert7, i32 %tmp4, 2 + %insert11 = insertvalue [4 x i32] %insert9, i32 %tmp5, 3 + tail call void @bar([4 x i32] %insert27, [4 x i32] %insert11) + ret void +} + +declare void @bar([4 x i32], [4 x i32]) Modified: llvm/trunk/test/CodeGen/X86/widen_load-1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/widen_load-1.ll?rev=145273&r1=145272&r2=145273&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/widen_load-1.ll (original) +++ llvm/trunk/test/CodeGen/X86/widen_load-1.ll Mon Nov 28 14:42:56 2011 @@ -1,5 +1,6 @@ ; RUN: llc %s -o - -march=x86-64 -mtriple=x86_64-unknown-linux-gnu | FileCheck %s ; PR4891 +; PR5626 ; This load should be before the call, not after. @@ -20,7 +21,7 @@ store i32 0, i32* %changed, align 4 %r2 = getelementptr float* bitcast ([20 x i64]* @compl to float*), i64 32 ; [#uses=1] %r3 = bitcast float* %r2 to <2 x float>* ; <<2 x float>*> [#uses=1] - %r4 = load <2 x float>* %r3, align 4 ; <<2 x float>> [#uses=1] + %r4 = load <2 x float>* %r3, align 8 ; <<2 x float>> [#uses=1] call void @killcommon(i32* %changed) br label %"file complex.c, line 34, bb4" From baldrick at free.fr Mon Nov 28 14:54:33 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 28 Nov 2011 21:54:33 +0100 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll In-Reply-To: <20111128204257.51FC52A6C12C@llvm.org> References: <20111128204257.51FC52A6C12C@llvm.org> Message-ID: <4ED3F509.4090907@free.fr> Hi Evan, > DAG combine should not increase alignment of loads / stores with alignment less > than ABI alignment. These are loads / stores from / to "packed" data structures. > Their alignments are intentionally under-specified. this doesn't make any sense to me. Load/store alignment should only be increased, say from 2 to 4, if it can be proved that the memory being pointed to is 4 byte aligned. If InferPtrAlignment is working correctly, it should only be returning 4 if the memory really is 4 byte aligned. If you have to sometimes ignore what InferPtrAlignment returns because (presumably) the memory isn't actually 4 byte aligned, doesn't that just mean that InferPtrAlignment is buggy and should be fixed? Ciao, Duncan. > > rdar://10301431 > > Added: > llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp > llvm/trunk/test/CodeGen/X86/widen_load-1.ll > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=145273&r1=145272&r2=145273&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Nov 28 14:42:56 2011 > @@ -6206,13 +6206,20 @@ > > // Try to infer better alignment information than the load already has. > if (OptLevel != CodeGenOpt::None&& LD->isUnindexed()) { > - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > - if (Align> LD->getAlignment()) > - return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), > - LD->getValueType(0), > - Chain, Ptr, LD->getPointerInfo(), > - LD->getMemoryVT(), > - LD->isVolatile(), LD->isNonTemporal(), Align); > + unsigned ABIAlign = TLI.getTargetData()-> > + getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext())); > + unsigned LDAlign = LD->getAlignment(); > + // Do not touch loads with explicit alignments that are smaller than ABI > + // alignment to avoid breaking loads from "packed" types. > + if (!LDAlign || LDAlign>= ABIAlign) { > + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > + if (Align> LDAlign) > + return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), > + LD->getValueType(0), > + Chain, Ptr, LD->getPointerInfo(), > + LD->getMemoryVT(), > + LD->isVolatile(), LD->isNonTemporal(), Align); > + } > } > } > > @@ -6669,11 +6676,18 @@ > > // Try to infer better alignment information than the store already has. > if (OptLevel != CodeGenOpt::None&& ST->isUnindexed()) { > - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > - if (Align> ST->getAlignment()) > - return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, > - Ptr, ST->getPointerInfo(), ST->getMemoryVT(), > - ST->isVolatile(), ST->isNonTemporal(), Align); > + unsigned ABIAlign = TLI.getTargetData()-> > + getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext())); > + unsigned STAlign = ST->getAlignment(); > + // Do not touch stores with explicit alignments that are smaller than ABI > + // alignment to avoid breaking stores from "packed" types. > + if (!STAlign || STAlign>= ABIAlign) { > + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > + if (Align> STAlign) > + return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, > + Ptr, ST->getPointerInfo(), ST->getMemoryVT(), > + ST->isVolatile(), ST->isNonTemporal(),Align); > + } > } > } > > > Added: llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll?rev=145273&view=auto > ============================================================================== > --- llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll (added) > +++ llvm/trunk/test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll Mon Nov 28 14:42:56 2011 > @@ -0,0 +1,38 @@ > +; RUN: llc< %s -mtriple=thumbv7-apple-ios5.0.0 | FileCheck %s > +; rdar://10464621 > + > +; DAG combine increases loads from packed types. ARM load / store optimizer then > +; combined them into a ldm which causes runtime exception. > + > +%struct.InformationBlock = type<{ i32, %struct.FlagBits, %struct.FlagBits }> > +%struct.FlagBits = type<{ [4 x i32] }> > + > + at infoBlock = external global %struct.InformationBlock > + > +define hidden void @foo() { > +; CHECK: foo: > +; CHECK: ldr.w > +; CHECK: ldr.w > +; CHECK-NOT: ldm > +entry: > + %tmp13 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 0), align 1 > + %tmp15 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 1), align 1 > + %tmp17 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 2), align 1 > + %tmp19 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 3), align 1 > + %tmp = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 0), align 1 > + %tmp3 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 1), align 1 > + %tmp4 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 2), align 1 > + %tmp5 = load i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 3), align 1 > + %insert21 = insertvalue [4 x i32] undef, i32 %tmp13, 0 > + %insert23 = insertvalue [4 x i32] %insert21, i32 %tmp15, 1 > + %insert25 = insertvalue [4 x i32] %insert23, i32 %tmp17, 2 > + %insert27 = insertvalue [4 x i32] %insert25, i32 %tmp19, 3 > + %insert = insertvalue [4 x i32] undef, i32 %tmp, 0 > + %insert7 = insertvalue [4 x i32] %insert, i32 %tmp3, 1 > + %insert9 = insertvalue [4 x i32] %insert7, i32 %tmp4, 2 > + %insert11 = insertvalue [4 x i32] %insert9, i32 %tmp5, 3 > + tail call void @bar([4 x i32] %insert27, [4 x i32] %insert11) > + ret void > +} > + > +declare void @bar([4 x i32], [4 x i32]) > > Modified: llvm/trunk/test/CodeGen/X86/widen_load-1.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/widen_load-1.ll?rev=145273&r1=145272&r2=145273&view=diff > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/widen_load-1.ll (original) > +++ llvm/trunk/test/CodeGen/X86/widen_load-1.ll Mon Nov 28 14:42:56 2011 > @@ -1,5 +1,6 @@ > ; RUN: llc %s -o - -march=x86-64 -mtriple=x86_64-unknown-linux-gnu | FileCheck %s > ; PR4891 > +; PR5626 > > ; This load should be before the call, not after. > > @@ -20,7 +21,7 @@ > store i32 0, i32* %changed, align 4 > %r2 = getelementptr float* bitcast ([20 x i64]* @compl to float*), i64 32 ; [#uses=1] > %r3 = bitcast float* %r2 to<2 x float>* ;<<2 x float>*> [#uses=1] > - %r4 = load<2 x float>* %r3, align 4 ;<<2 x float>> [#uses=1] > + %r4 = load<2 x float>* %r3, align 8 ;<<2 x float>> [#uses=1] > call void @killcommon(i32* %changed) > br label %"file complex.c, line 34, bb4" > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From adasgupt at codeaurora.org Mon Nov 28 15:38:01 2011 From: adasgupt at codeaurora.org (Anshuman Dasgupta) Date: Mon, 28 Nov 2011 15:38:01 -0600 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: References: <4EC735D2.4040801@codeaurora.org> Message-ID: <4ED3FF39.8050102@codeaurora.org> Hi Jakob, Thanks for your feedback. > I was missing documentation in your patch. What does the DFA do? How is it generated? > How can I use it? I think this deserves a full section in docs/CodeGenerator.html > > I would like to review the functionality as well, but that will be a lot easier if you > submit a new patch with documentation first. Sure, I've attached documentation on the functionality of the DFA. The document presents an overview of how the DFA is constructed and what it does. I will work on a patch to CodeGenerator.html that will describe the DFA generator but this document should let you review the code's functionality. > Please make sure your braces and indentation matches the rest of LLVM. You also have a couple of 80-col violations. Will do. > +#include > Please read http://llvm.org/docs/CodingStandards.html Yes, sorry about that. I'll fix that. > You are using std::set and std::map a lot. These containers are quite expensive, and should > only be used if you actually need features that the llvm/ADT classes don't offer. They do get > used more in TableGen where performance is less critical, but still. Okay, I'll work on changing these containers over to the llvm equivalents. > Is this set used anywhere but here?: > + // Add the new transition > + transitions.insert(T); > If not, you can optimize that ;-) hah! Yeah, I had added that for sanity checking. I'll remove it :) > +namespace llvm { > + typedef std::pair UnsignPair; > Please don't put trivial typedefs like that in the llvm namespace. Either move the type > into your class, or just spell it out in the header. > > +++ b/utils/TableGen/DFAPacketizerEmitter.h > +typedef unsigned Input; > Don't put this in the global namespace, or even in the llvm namespace. Okay, will change the code. > +class State { > +struct Transition { > +class DFA { > > Even for TableGen, these names are too generic to go in the llvm namespace. Okay, I'll think of more specific names probably along the lines of prepending VLIWPacketizer to these names. Thanks -Anshu On 11/28/2011 1:32 PM, Jakob Stoklund Olesen wrote: > > On Nov 18, 2011, at 8:51 PM, Anshuman Dasgupta wrote: > >> I'm attaching a patch that adds support for a deterministic finite >> automaton (DFA) based packetizer for VLIW architectures. >> Specifically, it automatically generates a DFA from a VLIW target's >> Schedule.td file. In a VLIW machine, an instruction can typically be >> dispatched to one or many function units. The DFA determines whether >> there exists a legal mapping of instructions to functional unit >> assignments in a packet. This DFA can then be queried by a backend >> packetization pass to determine which instructions can be grouped >> into a VLIW packet. >> >> This patch contains the machine-independent code that adds a >> component to TableGen. The component autogenerates the DFA and >> implements the API that can be used to query the DFA during >> packetization. This can be used by any VLIW target to packetize its >> instructions. After the Hexagon backend is committed, I will post >> another Hexagon-specific patch that uses this mechanism to construct >> packets in the Hexagon backend. I ran the llvm test suite and this >> patch did not cause any regressions. >> >> I would appreciate reviews and comments. > > Hi Anshu, > > Thanks for making this target-independent. It looks interesting. > > I was missing documentation in your patch. What does the DFA do? How > is it generated? How can I use it? I think this deserves a full > section in docs/CodeGenerator.html > > +struct ltState > +{ > > +class DFA { > + public: > > Please make sure your braces and indentation matches the rest of LLVM. > You also have a couple of 80-col violations. > > You are using std::set and std::map a lot. These containers are quite > expensive, and should only be used if you actually need features that > the llvm/ADT classes don't offer. They do get used more in TableGen > where performance is less critical, but still. > > > +#include > > Please read http://llvm.org/docs/CodingStandards.html > > > + // Set of transitions > + std::set transitions; > > Is this set used anywhere but here?: > > + // Add the new transition > + transitions.insert(T); > > If not, you can optimize that ;-) > > > +namespace llvm { > + typedef std::pair UnsignPair; > > Please don't put trivial typedefs like that in the llvm namespace. > Either move the type into your class, or just spell it out in the header. > > > +++ b/utils/TableGen/DFAPacketizerEmitter.h > +typedef unsigned Input; > > Don't put this in the global namespace, or even in the llvm namespace. > > > +class State { > +struct Transition { > +class DFA { > > Even for TableGen, these names are too generic to go in the llvm > namespace. > > I would like to review the functionality as well, but that will be a > lot easier if you submit a new patch with documentation first. > > Thanks, > /jakob > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/f2dcb957/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: DFA Packetizer Design.pdf Type: application/pdf Size: 349908 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/f2dcb957/attachment-0001.pdf From stoklund at 2pi.dk Mon Nov 28 15:45:14 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 13:45:14 -0800 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: <4ED3FF39.8050102@codeaurora.org> References: <4EC735D2.4040801@codeaurora.org> <4ED3FF39.8050102@codeaurora.org> Message-ID: <88ED7B6A-28EB-4E09-90BD-AFD54785B39F@2pi.dk> On Nov 28, 2011, at 1:38 PM, Anshuman Dasgupta wrote: > > I would like to review the functionality as well, but that will be a lot easier if you > > submit a new patch with documentation first. > > Sure, I've attached documentation on the functionality of the DFA. The document presents an overview of how the DFA is constructed and what it does. I will work on a patch to CodeGenerator.html that will describe the DFA generator but this document should let you review the code's functionality. Thanks! > > +class State { > > +struct Transition { > > +class DFA { > > > > Even for TableGen, these names are too generic to go in the llvm namespace. > > Okay, I'll think of more specific names probably along the lines of prepending VLIWPacketizer to these names. Even better, stick them in an anonymous namespace in DFAPacketizerEmitter.cpp, if possible. /jakob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/b0f7c5c1/attachment.html From clattner at apple.com Mon Nov 28 15:47:20 2011 From: clattner at apple.com (Chris Lattner) Date: Mon, 28 Nov 2011 13:47:20 -0800 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll In-Reply-To: <4ED3F509.4090907@free.fr> References: <20111128204257.51FC52A6C12C@llvm.org> <4ED3F509.4090907@free.fr> Message-ID: <3C8A2252-BDA5-486F-A25F-248D213682FB@apple.com> On Nov 28, 2011, at 12:54 PM, Duncan Sands wrote: > Hi Evan, > >> DAG combine should not increase alignment of loads / stores with alignment less >> than ABI alignment. These are loads / stores from / to "packed" data structures. >> Their alignments are intentionally under-specified. > > this doesn't make any sense to me. Load/store alignment should only be > increased, say from 2 to 4, if it can be proved that the memory being > pointed to is 4 byte aligned. If InferPtrAlignment is working correctly, > it should only be returning 4 if the memory really is 4 byte aligned. > If you have to sometimes ignore what InferPtrAlignment returns because > (presumably) the memory isn't actually 4 byte aligned, doesn't that just > mean that InferPtrAlignment is buggy and should be fixed? I agree, this doesn't make any sense to me either. Underaligned loads are exactly the kind that we want to infer improved alignments for! -Chris From evan.cheng at apple.com Mon Nov 28 15:57:20 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 13:57:20 -0800 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll In-Reply-To: <3C8A2252-BDA5-486F-A25F-248D213682FB@apple.com> References: <20111128204257.51FC52A6C12C@llvm.org> <4ED3F509.4090907@free.fr> <3C8A2252-BDA5-486F-A25F-248D213682FB@apple.com> Message-ID: <4BA54E8A-E39C-476E-95C1-53A8E592A9F4@apple.com> On Nov 28, 2011, at 1:47 PM, Chris Lattner wrote: > > On Nov 28, 2011, at 12:54 PM, Duncan Sands wrote: > >> Hi Evan, >> >>> DAG combine should not increase alignment of loads / stores with alignment less >>> than ABI alignment. These are loads / stores from / to "packed" data structures. >>> Their alignments are intentionally under-specified. >> >> this doesn't make any sense to me. Load/store alignment should only be >> increased, say from 2 to 4, if it can be proved that the memory being >> pointed to is 4 byte aligned. If InferPtrAlignment is working correctly, >> it should only be returning 4 if the memory really is 4 byte aligned. >> If you have to sometimes ignore what InferPtrAlignment returns because >> (presumably) the memory isn't actually 4 byte aligned, doesn't that just >> mean that InferPtrAlignment is buggy and should be fixed? > > I agree, this doesn't make any sense to me either. Underaligned loads are exactly the kind that we want to infer improved alignments for! The problem is alignment information is only attached to load / store instructions, not on types. If the global variable is not given an alignment, InferPtrAlignment is inferring alignment from the type. After r140902, it's using ABI alignment for GV's which are not specified alignments. Should it return zero instead? Evan > > -Chris From jabbey at arxan.com Mon Nov 28 16:07:12 2011 From: jabbey at arxan.com (Joe Abbey) Date: Mon, 28 Nov 2011 22:07:12 -0000 Subject: [llvm-commits] [llvm] r145287 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128220712.567D92A6C12C@llvm.org> Author: jabbey Date: Mon Nov 28 16:07:12 2011 New Revision: 145287 URL: http://llvm.org/viewvc/llvm-project?rev=145287&view=rev Log: Merging two bullet points into one Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145287&r1=145286&r2=145287&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 16:07:12 2011 @@ -1148,9 +1148,14 @@ LLVM API changes are:

          -
        • The biggest and most pervasive change is that llvm::Types are no longer - returned or accepted as 'const' values. Instead, just pass around - non-const Types.
        • +
        • The biggest and most pervasive change is that the type system has been + rewritten: PATypeHolder and OpaqueType are gone, + and all APIs deal with Type* instead of const + Type*. If you need to create recursive structures, then create a + named structure, and use setBody() when all its elements are + built. Type merging and refining is gone too: named structures are not + merged with other structures, even if their layout is identical. (of + course anonymous structures are still uniqued by layout).
        • PHINode::reserveOperandSpace has been removed. Instead, you must specify how many operands to reserve space for when you create the @@ -1225,15 +1230,6 @@ use DIBuilder::finalize() at the end of translation unit to complete debugging information encoding.
        • -
        • The way the type system works has been - rewritten: PATypeHolder and OpaqueType are gone, - and all APIs deal with Type* instead of const - Type*. If you need to create recursive structures, then create a - named structure, and use setBody() when all its elements are - built. Type merging and refining is gone too: named structures are not - merged with other structures, even if their layout is identical. (of - course anonymous structures are still uniqued by layout).
        • -
        • TargetSelect.h moved to Support/ from Target/
        • UpgradeIntrinsicCall no longer upgrades pre-2.9 intrinsic calls (for From nicholas at mxc.ca Mon Nov 28 16:14:02 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 28 Nov 2011 22:14:02 -0000 Subject: [llvm-commits] [llvm] r145289 - /llvm/trunk/lib/Support/Valgrind.cpp Message-ID: <20111128221402.CEA4B2A6C12C@llvm.org> Author: nicholas Date: Mon Nov 28 16:14:02 2011 New Revision: 145289 URL: http://llvm.org/viewvc/llvm-project?rev=145289&view=rev Log: Don't define these unless we plan to use them. Modified: llvm/trunk/lib/Support/Valgrind.cpp Modified: llvm/trunk/lib/Support/Valgrind.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Valgrind.cpp?rev=145289&r1=145288&r2=145289&view=diff ============================================================================== --- llvm/trunk/lib/Support/Valgrind.cpp (original) +++ llvm/trunk/lib/Support/Valgrind.cpp Mon Nov 28 16:14:02 2011 @@ -53,6 +53,7 @@ #endif // !HAVE_VALGRIND_VALGRIND_H +#if LLVM_ENABLE_THREADS != 0 && !defined(NDEBUG) // These functions require no implementation, tsan just looks at the arguments // they're called with. extern "C" { @@ -63,3 +64,4 @@ void AnnotateIgnoreWritesBegin(const char *file, int line) {} void AnnotateIgnoreWritesEnd(const char *file, int line) {} } +#endif From daniel at zuster.org Mon Nov 28 16:19:32 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 28 Nov 2011 22:19:32 -0000 Subject: [llvm-commits] [llvm] r145292 - /llvm/trunk/lib/Object/COFFObjectFile.cpp Message-ID: <20111128221932.4A3182A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 16:19:32 2011 New Revision: 145292 URL: http://llvm.org/viewvc/llvm-project?rev=145292&view=rev Log: Fix some possible gcc-4.2 may be used uninitialized warnings. Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=145292&r1=145291&r2=145292&view=diff ============================================================================== --- llvm/trunk/lib/Object/COFFObjectFile.cpp (original) +++ llvm/trunk/lib/Object/COFFObjectFile.cpp Mon Nov 28 16:19:32 2011 @@ -283,7 +283,7 @@ if (symb->SectionNumber <= COFF::IMAGE_SYM_UNDEFINED) Result = end_sections(); else { - const coff_section *sec; + const coff_section *sec = 0; if (error_code ec = getSection(symb->SectionNumber, sec)) return ec; DataRefImpl Sec; std::memset(&Sec, 0, sizeof(Sec)); @@ -389,7 +389,7 @@ bool &Result) const { const coff_section *sec = toSec(Sec); const coff_symbol *symb = toSymb(Symb); - const coff_section *symb_sec; + const coff_section *symb_sec = 0; if (error_code ec = getSection(symb->SectionNumber, symb_sec)) return ec; if (symb_sec == sec) Result = true; From evan.cheng at apple.com Mon Nov 28 16:37:35 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 22:37:35 -0000 Subject: [llvm-commits] [llvm] r145300 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/widen_load-1.ll Message-ID: <20111128223735.2B00D2A6C12C@llvm.org> Author: evancheng Date: Mon Nov 28 16:37:34 2011 New Revision: 145300 URL: http://llvm.org/viewvc/llvm-project?rev=145300&view=rev Log: Revert r145273 and fix in SelectionDAG::InferPtrAlignment() instead. Conservatively returns zero when the GV does not specify an alignment nor is it initialized. Previously it returns ABI alignment for type of the GV. However, if the type is a "packed" type, then the under-specified alignments is attached to the load / store instructions. In that case, the alignment of the type cannot be trusted. rdar://10464621 Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/test/CodeGen/X86/widen_load-1.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=145300&r1=145299&r2=145300&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Nov 28 16:37:34 2011 @@ -6206,20 +6206,13 @@ // Try to infer better alignment information than the load already has. if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) { - unsigned ABIAlign = TLI.getTargetData()-> - getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext())); - unsigned LDAlign = LD->getAlignment(); - // Do not touch loads with explicit alignments that are smaller than ABI - // alignment to avoid breaking loads from "packed" types. - if (!LDAlign || LDAlign >= ABIAlign) { - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { - if (Align > LDAlign) - return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), - LD->getValueType(0), - Chain, Ptr, LD->getPointerInfo(), - LD->getMemoryVT(), - LD->isVolatile(), LD->isNonTemporal(), Align); - } + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { + if (Align > LD->getAlignment()) + return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), + LD->getValueType(0), + Chain, Ptr, LD->getPointerInfo(), + LD->getMemoryVT(), + LD->isVolatile(), LD->isNonTemporal(), Align); } } @@ -6676,18 +6669,11 @@ // Try to infer better alignment information than the store already has. if (OptLevel != CodeGenOpt::None && ST->isUnindexed()) { - unsigned ABIAlign = TLI.getTargetData()-> - getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext())); - unsigned STAlign = ST->getAlignment(); - // Do not touch stores with explicit alignments that are smaller than ABI - // alignment to avoid breaking stores from "packed" types. - if (!STAlign || STAlign >= ABIAlign) { - if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { - if (Align > STAlign) - return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, - Ptr, ST->getPointerInfo(), ST->getMemoryVT(), - ST->isVolatile(), ST->isNonTemporal(),Align); - } + if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { + if (Align > ST->getAlignment()) + return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, + Ptr, ST->getPointerInfo(), ST->getMemoryVT(), + ST->isVolatile(), ST->isNonTemporal(), Align); } } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=145300&r1=145299&r2=145300&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Nov 28 16:37:34 2011 @@ -6564,7 +6564,11 @@ } } if (!Align) - Align = TLI.getTargetData()->getABITypeAlignment(GV->getType()); + // Conservatively returns zero here instead of using ABI alignment for + // type of the GV. If the type is a "packed" type, then the under- + // specified alignments is attached to the load / store instructions. + // In that case, the alignment of the type cannot be trusted. + return 0; } return MinAlign(Align, GVOffset); } Modified: llvm/trunk/test/CodeGen/X86/widen_load-1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/widen_load-1.ll?rev=145300&r1=145299&r2=145300&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/widen_load-1.ll (original) +++ llvm/trunk/test/CodeGen/X86/widen_load-1.ll Mon Nov 28 16:37:34 2011 @@ -21,7 +21,7 @@ store i32 0, i32* %changed, align 4 %r2 = getelementptr float* bitcast ([20 x i64]* @compl to float*), i64 32 ; [#uses=1] %r3 = bitcast float* %r2 to <2 x float>* ; <<2 x float>*> [#uses=1] - %r4 = load <2 x float>* %r3, align 8 ; <<2 x float>> [#uses=1] + %r4 = load <2 x float>* %r3, align 4 ; <<2 x float>> [#uses=1] call void @killcommon(i32* %changed) br label %"file complex.c, line 34, bb4" From evan.cheng at apple.com Mon Nov 28 16:46:38 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 14:46:38 -0800 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll In-Reply-To: <4BA54E8A-E39C-476E-95C1-53A8E592A9F4@apple.com> References: <20111128204257.51FC52A6C12C@llvm.org> <4ED3F509.4090907@free.fr> <3C8A2252-BDA5-486F-A25F-248D213682FB@apple.com> <4BA54E8A-E39C-476E-95C1-53A8E592A9F4@apple.com> Message-ID: <528EAAE8-8E66-4FEE-8A5A-7570645C440F@apple.com> I've committed r145300 which revert the DAG combine change. It makes InferPtrAlignment() more conservative by returning zero when GV isn't given an alignment nor is it initialized. Note I am not particularly happy about this fix either. I think the fundamental problem is LLVM ir doesn't have a good way to model "packed" attributes / pragma's. Evan On Nov 28, 2011, at 1:57 PM, Evan Cheng wrote: > > On Nov 28, 2011, at 1:47 PM, Chris Lattner wrote: > >> >> On Nov 28, 2011, at 12:54 PM, Duncan Sands wrote: >> >>> Hi Evan, >>> >>>> DAG combine should not increase alignment of loads / stores with alignment less >>>> than ABI alignment. These are loads / stores from / to "packed" data structures. >>>> Their alignments are intentionally under-specified. >>> >>> this doesn't make any sense to me. Load/store alignment should only be >>> increased, say from 2 to 4, if it can be proved that the memory being >>> pointed to is 4 byte aligned. If InferPtrAlignment is working correctly, >>> it should only be returning 4 if the memory really is 4 byte aligned. >>> If you have to sometimes ignore what InferPtrAlignment returns because >>> (presumably) the memory isn't actually 4 byte aligned, doesn't that just >>> mean that InferPtrAlignment is buggy and should be fixed? >> >> I agree, this doesn't make any sense to me either. Underaligned loads are exactly the kind that we want to infer improved alignments for! > > The problem is alignment information is only attached to load / store instructions, not on types. If the global variable is not given an alignment, InferPtrAlignment is inferring alignment from the type. After r140902, it's using ABI alignment for GV's which are not specified alignments. Should it return zero instead? > > Evan > >> >> -Chris > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From eli.friedman at gmail.com Mon Nov 28 16:48:22 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 22:48:22 -0000 Subject: [llvm-commits] [llvm] r145304 - in /llvm/trunk: lib/Analysis/ValueTracking.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/Transforms/InstCombine/constant-fold-gep.ll Message-ID: <20111128224822.C87282A6C12C@llvm.org> Author: efriedma Date: Mon Nov 28 16:48:22 2011 New Revision: 145304 URL: http://llvm.org/viewvc/llvm-project?rev=145304&view=rev Log: Make SelectionDAG::InferPtrAlignment use llvm::ComputeMaskedBits instead of duplicating the logic for globals. Make llvm::ComputeMaskedBits handle GlobalVariables slightly more aggressively, to match what InferPtrAlignment knew how to do. Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/test/Transforms/InstCombine/constant-fold-gep.ll Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=145304&r1=145303&r2=145304&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ValueTracking.cpp (original) +++ llvm/trunk/lib/Analysis/ValueTracking.cpp Mon Nov 28 16:48:22 2011 @@ -103,14 +103,16 @@ if (GlobalValue *GV = dyn_cast(V)) { unsigned Align = GV->getAlignment(); if (Align == 0 && TD && GV->getType()->getElementType()->isSized()) { - Type *ObjectType = GV->getType()->getElementType(); - // If the object is defined in the current Module, we'll be giving - // it the preferred alignment. Otherwise, we have to assume that it - // may only have the minimum ABI alignment. - if (!GV->isDeclaration() && !GV->mayBeOverridden()) - Align = TD->getPrefTypeAlignment(ObjectType); - else - Align = TD->getABITypeAlignment(ObjectType); + if (GlobalVariable *GVar = dyn_cast(GV)) { + Type *ObjectType = GVar->getType()->getElementType(); + // If the object is defined in the current Module, we'll be giving + // it the preferred alignment. Otherwise, we have to assume that it + // may only have the minimum ABI alignment. + if (!GVar->isDeclaration() && !GVar->mayBeOverridden()) + Align = TD->getPreferredAlignment(GVar); + else + Align = TD->getABITypeAlignment(ObjectType); + } } if (Align > 0) KnownZero = Mask & APInt::getLowBitsSet(BitWidth, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=145304&r1=145303&r2=145304&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Nov 28 16:48:22 2011 @@ -6553,24 +6553,15 @@ const GlobalValue *GV; int64_t GVOffset = 0; if (TLI.isGAPlusOffset(Ptr.getNode(), GV, GVOffset)) { - // If GV has specified alignment, then use it. Otherwise, use the preferred - // alignment. - unsigned Align = GV->getAlignment(); - if (!Align) { - if (const GlobalVariable *GVar = dyn_cast(GV)) { - if (GVar->hasInitializer()) { - const TargetData *TD = TLI.getTargetData(); - Align = TD->getPreferredAlignment(GVar); - } - } - if (!Align) - // Conservatively returns zero here instead of using ABI alignment for - // type of the GV. If the type is a "packed" type, then the under- - // specified alignments is attached to the load / store instructions. - // In that case, the alignment of the type cannot be trusted. - return 0; - } - return MinAlign(Align, GVOffset); + unsigned PtrWidth = TLI.getPointerTy().getSizeInBits(); + APInt AllOnes = APInt::getAllOnesValue(PtrWidth); + APInt KnownZero(PtrWidth, 0), KnownOne(PtrWidth, 0); + llvm::ComputeMaskedBits(const_cast(GV), AllOnes, + KnownZero, KnownOne, TLI.getTargetData()); + unsigned AlignBits = KnownZero.countTrailingOnes(); + unsigned Align = AlignBits ? 1 << std::min(31U, AlignBits) : 0; + if (Align) + return MinAlign(Align, GVOffset); } // If this is a direct reference to a stack slot, use information about the Modified: llvm/trunk/test/Transforms/InstCombine/constant-fold-gep.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/constant-fold-gep.ll?rev=145304&r1=145303&r2=145304&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/constant-fold-gep.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/constant-fold-gep.ll Mon Nov 28 16:48:22 2011 @@ -9,7 +9,7 @@ @Y = internal global [3 x %struct.X] zeroinitializer define void @frob() { -; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 0), align 8 +; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 0), align 16 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 0), align 4 ; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 1), align 4 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 1), align 4 @@ -33,7 +33,7 @@ store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 10), align 4 ; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 1, i32 1, i64 2), align 4 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 11), align 4 -; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 2, i32 0, i64 0), align 8 +; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 2, i32 0, i64 0), align 16 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 12), align 4 ; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 0, i64 2, i32 0, i64 1), align 4 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 13), align 4 @@ -47,7 +47,7 @@ store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 17), align 8 ; CHECK: store i32 1, i32* getelementptr inbounds ([3 x %struct.X]* @Y, i64 1, i64 0, i32 0, i64 0), align 8 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 18), align 8 -; CHECK: store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 2, i64 0, i32 0, i64 0), align 8 +; CHECK: store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 2, i64 0, i32 0, i64 0), align 16 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 36), align 8 ; CHECK: store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 1, i64 0, i32 0, i64 1), align 8 store i32 1, i32* getelementptr ([3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 19), align 8 From eli.friedman at gmail.com Mon Nov 28 16:52:25 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 14:52:25 -0800 Subject: [llvm-commits] [llvm] r145300 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/widen_load-1.ll In-Reply-To: <20111128223735.2B00D2A6C12C@llvm.org> References: <20111128223735.2B00D2A6C12C@llvm.org> Message-ID: On Mon, Nov 28, 2011 at 2:37 PM, Evan Cheng wrote: > Author: evancheng > Date: Mon Nov 28 16:37:34 2011 > New Revision: 145300 > > URL: http://llvm.org/viewvc/llvm-project?rev=145300&view=rev > Log: > Revert r145273 and fix in SelectionDAG::InferPtrAlignment() instead. > Conservatively returns zero when the GV does not specify an alignment nor is it > initialized. Previously it returns ABI alignment for type of the GV. However, if > the type is a "packed" type, then the under-specified alignments is attached to > the load / store instructions. In that case, the alignment of the type cannot be > trusted. > rdar://10464621 > > Modified: > ? ?llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp > ? ?llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > ? ?llvm/trunk/test/CodeGen/X86/widen_load-1.ll > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=145300&r1=145299&r2=145300&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Nov 28 16:37:34 2011 > @@ -6206,20 +6206,13 @@ > > ? // Try to infer better alignment information than the load already has. > ? if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) { > - ? ?unsigned ABIAlign = TLI.getTargetData()-> > - ? ? ?getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext())); > - ? ?unsigned LDAlign = LD->getAlignment(); > - ? ?// Do not touch loads with explicit alignments that are smaller than ABI > - ? ?// alignment to avoid breaking loads from "packed" types. > - ? ?if (!LDAlign || LDAlign >= ABIAlign) { > - ? ? ?if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > - ? ? ? ?if (Align > LDAlign) > - ? ? ? ? ?return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->getValueType(0), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Chain, Ptr, LD->getPointerInfo(), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->getMemoryVT(), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->isVolatile(), LD->isNonTemporal(), Align); > - ? ? ?} > + ? ?if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > + ? ? ?if (Align > LD->getAlignment()) > + ? ? ? ?return DAG.getExtLoad(LD->getExtensionType(), N->getDebugLoc(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->getValueType(0), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Chain, Ptr, LD->getPointerInfo(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->getMemoryVT(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?LD->isVolatile(), LD->isNonTemporal(), Align); > ? ? } > ? } > > @@ -6676,18 +6669,11 @@ > > ? // Try to infer better alignment information than the store already has. > ? if (OptLevel != CodeGenOpt::None && ST->isUnindexed()) { > - ? ?unsigned ABIAlign = TLI.getTargetData()-> > - ? ? ?getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext())); > - ? ?unsigned STAlign = ST->getAlignment(); > - ? ?// Do not touch stores with explicit alignments that are smaller than ABI > - ? ?// alignment to avoid breaking stores from "packed" types. > - ? ?if (!STAlign || STAlign >= ABIAlign) { > - ? ? ?if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > - ? ? ? ?if (Align > STAlign) > - ? ? ? ? ?return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Ptr, ST->getPointerInfo(), ST->getMemoryVT(), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ST->isVolatile(), ST->isNonTemporal(),Align); > - ? ? ?} > + ? ?if (unsigned Align = DAG.InferPtrAlignment(Ptr)) { > + ? ? ?if (Align > ST->getAlignment()) > + ? ? ? ?return DAG.getTruncStore(Chain, N->getDebugLoc(), Value, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Ptr, ST->getPointerInfo(), ST->getMemoryVT(), > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ST->isVolatile(), ST->isNonTemporal(), Align); > ? ? } > ? } > > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=145300&r1=145299&r2=145300&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Nov 28 16:37:34 2011 > @@ -6564,7 +6564,11 @@ > ? ? ? ? } > ? ? ? } > ? ? ? if (!Align) > - ? ? ? ?Align = TLI.getTargetData()->getABITypeAlignment(GV->getType()); > + ? ? ? ?// Conservatively returns zero here instead of using ABI alignment for > + ? ? ? ?// type of the GV. If the type is a "packed" type, then the under- > + ? ? ? ?// specified alignments is attached to the load / store instructions. > + ? ? ? ?// In that case, the alignment of the type cannot be trusted. > + ? ? ? ?return 0; Note that the old code here wasn't actually using the ABI alignment of the type of the GV; it was using the ABI alignment of a pointer. -Eli From evan.cheng at apple.com Mon Nov 28 17:06:03 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 15:06:03 -0800 Subject: [llvm-commits] [llvm] r145300 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/widen_load-1.ll In-Reply-To: References: <20111128223735.2B00D2A6C12C@llvm.org> Message-ID: Thanks. I didn't know llvm::ComputeMaskedBits() can handle GV's. This is a much better solution. Evan On Nov 28, 2011, at 2:52 PM, Eli Friedman wrote: > > Note that the old code here wasn't actually using the ABI alignment of > the type of the GV; it was using the ABI alignment of a pointer. > > -Eli From evan.cheng at apple.com Mon Nov 28 17:07:07 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 28 Nov 2011 15:07:07 -0800 Subject: [llvm-commits] [llvm] r145273 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll test/CodeGen/X86/widen_load-1.ll In-Reply-To: <528EAAE8-8E66-4FEE-8A5A-7570645C440F@apple.com> References: <20111128204257.51FC52A6C12C@llvm.org> <4ED3F509.4090907@free.fr> <3C8A2252-BDA5-486F-A25F-248D213682FB@apple.com> <4BA54E8A-E39C-476E-95C1-53A8E592A9F4@apple.com> <528EAAE8-8E66-4FEE-8A5A-7570645C440F@apple.com> Message-ID: Nevermind. Eli's fix is much better. I missed <{ ... }> indicates a "packed" struct. Evan On Nov 28, 2011, at 2:46 PM, Evan Cheng wrote: > I've committed r145300 which revert the DAG combine change. It makes InferPtrAlignment() more conservative by returning zero when GV isn't given an alignment nor is it initialized. > > Note I am not particularly happy about this fix either. I think the fundamental problem is LLVM ir doesn't have a good way to model "packed" attributes / pragma's. > > Evan > > On Nov 28, 2011, at 1:57 PM, Evan Cheng wrote: > >> >> On Nov 28, 2011, at 1:47 PM, Chris Lattner wrote: >> >>> >>> On Nov 28, 2011, at 12:54 PM, Duncan Sands wrote: >>> >>>> Hi Evan, >>>> >>>>> DAG combine should not increase alignment of loads / stores with alignment less >>>>> than ABI alignment. These are loads / stores from / to "packed" data structures. >>>>> Their alignments are intentionally under-specified. >>>> >>>> this doesn't make any sense to me. Load/store alignment should only be >>>> increased, say from 2 to 4, if it can be proved that the memory being >>>> pointed to is 4 byte aligned. If InferPtrAlignment is working correctly, >>>> it should only be returning 4 if the memory really is 4 byte aligned. >>>> If you have to sometimes ignore what InferPtrAlignment returns because >>>> (presumably) the memory isn't actually 4 byte aligned, doesn't that just >>>> mean that InferPtrAlignment is buggy and should be fixed? >>> >>> I agree, this doesn't make any sense to me either. Underaligned loads are exactly the kind that we want to infer improved alignments for! >> >> The problem is alignment information is only attached to load / store instructions, not on types. If the global variable is not given an alignment, InferPtrAlignment is inferring alignment from the type. After r140902, it's using ABI alignment for GV's which are not specified alignments. Should it return zero instead? >> >> Evan >> >>> >>> -Chris >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From tlinth at codeaurora.org Mon Nov 28 17:14:56 2011 From: tlinth at codeaurora.org (Tony Linthicum) Date: Mon, 28 Nov 2011 17:14:56 -0600 Subject: [llvm-commits] Patch: new backend for Hexagon processor In-Reply-To: References: <4EC17287.3090708@codeaurora.org> <4EC2F380.7010509@codeaurora.org> <4EC5E66D.8080303@codeaurora.org> Message-ID: <4ED415F0.4060009@codeaurora.org> On 11/28/2011 1:57 PM, Eli Friedman wrote: > I just took another look; comments below. > > void MCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment, > unsigned MaxBytesToEmit) { > - // Emit with a text fill value. > - EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), > - 1, MaxBytesToEmit); > + if (MAI.getCodeAlignDirective()) { > + OS<< MAI.getCodeAlignDirective(); > + EmitEOL(); > + } > + else { > + // Emit with a text fill value. > + EmitValueToAlignment(ByteAlignment, MAI.getTextAlignFillValue(), > + 1, MaxBytesToEmit); > + } > } > > This doesn't actually appear to take into account the specified alignment. > This was an attempt to handle our ".falign" directive, which doesn't take an argument. I discussed it with the guy that implemented it, and he feels that it needs a better implementation. I've pulled the changes from the patch. As a result, there are no more MC patches. > +// This file contains a printer that converts from our internal representation > +// of machine-dependent LLVM code to PowerPC assembly language. This printer is > > Copy-pasto? References for PowerPC are scattered around HexagonAsmPrinter.cpp Yep, cut and paste brain damage. Fixed. > > +/// getFunctionAlignment - Return the Log2 alignment of this function. > +unsigned HexagonTargetLowering::getFunctionAlignment(const Function *) const { > + return 2; > +} > > This isn't overriding anything. See > setMinFunctionAlignment/setPrefFunctionAlignment. Good catch. Thanks. Fixed. > > +def MUX_ri : ALU32_ri<(outs IntRegs:$dst), (ins PredRegs:$src1, > IntRegs:$src2, > s8Imm:$src3), > > 80 columns? > Ugh. I spent a *lot* of time fixing 80 column overruns in the td files. I guess I missed a few. I think I got them all in that file now. Tony -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum. -------------- next part -------------- A non-text attachment was scrubbed... Name: hexagon.patch.bz2 Type: application/octet-stream Size: 85328 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/0601aa20/attachment-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch.bz2 Type: application/octet-stream Size: 12032 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/0601aa20/attachment-0003.obj From grosbach at apple.com Mon Nov 28 17:23:58 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 28 Nov 2011 23:23:58 -0000 Subject: [llvm-commits] [llvm] r145313 - /llvm/trunk/lib/MC/MCMachOStreamer.cpp Message-ID: <20111128232358.BDD8B2A6C12C@llvm.org> Author: grosbach Date: Mon Nov 28 17:23:58 2011 New Revision: 145313 URL: http://llvm.org/viewvc/llvm-project?rev=145313&view=rev Log: Remove obsolete FIXME. Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=145313&r1=145312&r2=145313&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Mon Nov 28 17:23:58 2011 @@ -156,8 +156,6 @@ } void MCMachOStreamer::EmitThumbFunc(MCSymbol *Symbol) { - // FIXME: Flag the function ISA as thumb with DW_AT_APPLE_isa. - // Remember that the function is a thumb function. Fixup and relocation // values will need adjusted. getAssembler().setIsThumbFunc(Symbol); From eli.friedman at gmail.com Mon Nov 28 17:32:19 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 23:32:19 -0000 Subject: [llvm-commits] [llvm] r145316 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCompares.cpp test/Transforms/InstCombine/overflow.ll Message-ID: <20111128233219.79D3D2A6C12C@llvm.org> Author: efriedma Date: Mon Nov 28 17:32:19 2011 New Revision: 145316 URL: http://llvm.org/viewvc/llvm-project?rev=145316&view=rev Log: Add a missing safety check to ProcessUGT_ADDCST_ADD. Fixes PR11438. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp llvm/trunk/test/Transforms/InstCombine/overflow.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=145316&r1=145315&r2=145316&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Nov 28 17:32:19 2011 @@ -1657,6 +1657,14 @@ CI1->getValue() != APInt::getLowBitsSet(CI1->getBitWidth(), NewWidth)) return 0; + // This is only really a signed overflow check if the inputs have been + // sign-extended; check for that condition. For example, if CI2 is 2^31 and + // the operands of the add are 64 bits wide, we need at least 33 sign bits. + unsigned NeededSignBits = CI1->getBitWidth() - NewWidth + 1; + if (IC.ComputeNumSignBits(A) < NeededSignBits || + IC.ComputeNumSignBits(B) < NeededSignBits) + return 0; + // In order to replace the original add with a narrower // llvm.sadd.with.overflow, the only uses allowed are the add-with-constant // and truncates that discard the high bits of the add. Verify that this is Modified: llvm/trunk/test/Transforms/InstCombine/overflow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/overflow.ll?rev=145316&r1=145315&r2=145316&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/overflow.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/overflow.ll Mon Nov 28 17:32:19 2011 @@ -130,4 +130,26 @@ ret i64 %Q } +; CHECK: @test8 +; PR11438 +; This is @test1, but the operands are not sign-extended. Make sure +; we don't transform this case. +define i32 @test8(i64 %a, i64 %b) nounwind ssp { +entry: +; CHECK-NOT: llvm.sadd +; CHECK: add i64 %a, %b +; CHECK-NOT: llvm.sadd +; CHECK: ret + %add = add i64 %a, %b + %add.off = add i64 %add, 2147483648 + %0 = icmp ugt i64 %add.off, 4294967295 + br i1 %0, label %if.then, label %if.end +if.then: + tail call void @throwAnExceptionOrWhatever() nounwind + br label %if.end + +if.end: + %conv9 = trunc i64 %add to i32 + ret i32 %conv9 +} From grosbach at apple.com Mon Nov 28 17:39:01 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 28 Nov 2011 23:39:01 -0000 Subject: [llvm-commits] [llvm] r145318 - /llvm/trunk/lib/MC/MCAssembler.cpp Message-ID: <20111128233901.18B052A6C12C@llvm.org> Author: grosbach Date: Mon Nov 28 17:39:00 2011 New Revision: 145318 URL: http://llvm.org/viewvc/llvm-project?rev=145318&view=rev Log: Thumb2 only force the fixup thumb bit for data relocations. rdar://10493453 Modified: llvm/trunk/lib/MC/MCAssembler.cpp Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=145318&r1=145317&r2=145318&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Mon Nov 28 17:39:00 2011 @@ -273,13 +273,17 @@ Value = Target.getConstant(); - bool IsThumb = false; + bool SetThumbBit = false; if (const MCSymbolRefExpr *A = Target.getSymA()) { const MCSymbol &Sym = A->getSymbol().AliasedSymbol(); if (Sym.isDefined()) Value += Layout.getSymbolOffset(&getSymbolData(Sym)); - if (isThumbFunc(&Sym)) - IsThumb = true; + // ARM data fixups based from a thumb function address need to have the low + // bit set. The actual value is always at least 16-bit aligned, so the + // low bit is normally clear and available for use as an ISA flag for + // interworking. + if (Fixup.getKind() == FK_Data_4 && isThumbFunc(&Sym)) + SetThumbBit = true; } if (const MCSymbolRefExpr *B = Target.getSymB()) { const MCSymbol &Sym = B->getSymbol().AliasedSymbol(); @@ -302,11 +306,7 @@ Value -= Offset; } - // ARM fixups based from a thumb function address need to have the low - // bit set. The actual value is always at least 16-bit aligned, so the - // low bit is normally clear and available for use as an ISA flag for - // interworking. - if (IsThumb) + if (SetThumbBit) Value |= 1; return IsResolved; From dpatel at apple.com Mon Nov 28 17:39:26 2011 From: dpatel at apple.com (Devang Patel) Date: Mon, 28 Nov 2011 23:39:26 -0000 Subject: [llvm-commits] [llvm] r145319 - in /llvm/trunk/docs/CommandGuide: index.html llvm-cov.pod Message-ID: <20111128233926.537382A6C12C@llvm.org> Author: dpatel Date: Mon Nov 28 17:39:25 2011 New Revision: 145319 URL: http://llvm.org/viewvc/llvm-project?rev=145319&view=rev Log: Add documentation for llvm-cov. Added: llvm/trunk/docs/CommandGuide/llvm-cov.pod Modified: llvm/trunk/docs/CommandGuide/index.html Modified: llvm/trunk/docs/CommandGuide/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/index.html?rev=145319&r1=145318&r2=145319&view=diff ============================================================================== --- llvm/trunk/docs/CommandGuide/index.html (original) +++ llvm/trunk/docs/CommandGuide/index.html Mon Nov 28 17:39:25 2011 @@ -72,6 +72,9 @@
        • llvm-diff - structurally compare two modules
        • +
        • llvm-cov - + emit coverage information
        • +
        Added: llvm/trunk/docs/CommandGuide/llvm-cov.pod URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-cov.pod?rev=145319&view=auto ============================================================================== --- llvm/trunk/docs/CommandGuide/llvm-cov.pod (added) +++ llvm/trunk/docs/CommandGuide/llvm-cov.pod Mon Nov 28 17:39:25 2011 @@ -0,0 +1,45 @@ +=pod + +=head1 NAME + +llvm-cov - emit coverage information + +=head1 SYNOPSIS + +B [-gcno=filename] [-gcda=filename] [dump] + +=head1 DESCRIPTION + +The experimental B tool reads in description file generated by compiler +and coverage data file generated by instrumented program. This program assumes +that the description and data file uses same format as gcov files. + +=head1 OPTIONS + +=over + +=item B<-gcno=filename] + +This option selects input description file generated by compiler while instrumenting +program. + +=item B<-gcda=filename] + +This option selects coverage data file generated by instrumented compiler. + +=item B<-dump> + +This options enables output dump that is suitable for a developer to help debug +B itself. + +=back + +=head1 EXIT STATUS + +B returns 1 if it cannot read input files. Otherwise, it exits with zero. + +=head1 AUTHOR + +B is maintained by the LLVM Team (L). + +=cut From stoklund at 2pi.dk Mon Nov 28 17:42:46 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 15:42:46 -0800 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: <4ED3FF39.8050102@codeaurora.org> References: <4EC735D2.4040801@codeaurora.org> <4ED3FF39.8050102@codeaurora.org> Message-ID: <1CE58619-652B-46BB-BC95-08076C62A933@2pi.dk> On Nov 28, 2011, at 1:38 PM, Anshuman Dasgupta wrote: > Sure, I've attached documentation on the functionality of the DFA. The document presents an overview of how the DFA is constructed and what it does. I will work on a patch to CodeGenerator.html that will describe the DFA generator but this document should let you review the code's functionality. Thanks, that helped. How big do these tables get for Hexagon? How many resources? How many DFA states? +//=- llvm/CodeGen/DFAPacketizer.h - DFA Packetizer for VLIW ---*- C++ -*-=====// This file needs more concrete, less abstract documentation. The DFA concept is quite simple, just explain it. This class definitely needs to use DenseMap instead of std::map. How big is your state space? Would it make sense to use a sparse transition matrix instead? I also think you should move some of the methods to a .cpp file. If you can avoid the #includes, that would be great. You are building CachedTable on demand. Is that really necessary? How much of the table is built in a typical run? Would it be better/faster to just build the whole thing up front? You have 4 table lookups per DFA transition by my count. It seems that 1 is enough. Can the API be improved to allow that? +++ b/utils/TableGen/DFAPacketizerEmitter.cpp +bool State::canAddInsnClass(Input InsnClass, std::set& PossibleStates) { Would a BitVector be better than set? You can still iterate. +// Format: +// DFAStateInputTable[] = pairs of for all valid +// transitions +// DFAStateEntryTable[i] = Index of the first entry in DFAStateInputTable for +// the ith state Could you get rid of the DFAStateEntryTable by renumbering your states? s -> DFAStateEntryTable[s] This would preclude the sparse transition matrix representation, of course. + if (!isValidTransition(*SI, j)) { + continue; + } + else { Don't use else after continue; + OS << "const unsigned int " << TargetName << "DFAStateEntryTable[] = {\n"; + for (unsigned i = 0; i < states.size(); ++i) { + // Multiply i by 2 since each entry in DFAStateInputTable is a set of + // two numbers + OS << StateEntry[i] * 2 << ", "; + } How about using "const unsigned DFAStateInputTable[][2]" then? + std::set NewStateResources; + // + // If we haven't already created a transition for this input + // and the state can accommodate this InsnClass, create a transition + // + if (!D.getTransition(current, InsnClass) && + current->canAddInsnClass(InsnClass, NewStateResources)) { + State* NewState = NULL; + + // + // If we have seen this state before, then do not create a new state + // + // + std::string key = ""; + std::stringstream keyInt; + // We should not generate more than 16^8 states! + const int MaxSize = 8; + for (std::set::iterator KI = NewStateResources.begin(), + KE = NewStateResources.end(); KI != KE; ++KI) { + keyInt << std::setfill('0') << std::setw(MaxSize) + << std::hex << *KI << std::dec; + } + key = keyInt.str(); This string conversion is a bit strange. I think this is actually a case where std::map, ...> makes sense. Other TableGen backends do that. Would it be reasonable to limit the number of resources to 64, and just use a uint64_t bit mask instead? The Visited map can be a local variable like WorkList, right? /jakob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/6779116b/attachment.html From daniel at zuster.org Mon Nov 28 17:50:14 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 28 Nov 2011 23:50:14 -0000 Subject: [llvm-commits] [compiler-rt] r145322 - /compiler-rt/trunk/make/platform/clang_linux.mk Message-ID: <20111128235014.108FA2A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 17:50:13 2011 New Revision: 145322 URL: http://llvm.org/viewvc/llvm-project?rev=145322&view=rev Log: build: Sketch a Clang/Linux platform config. - Currently just tries to build a full library for i386/x86_64. - This is made substantially more complicated by the lack of a generalized way to check for/invoke cross compilers. For now, we just try and make it work for the matched arch, and rely on the host CC being Clang. Added: compiler-rt/trunk/make/platform/clang_linux.mk Added: compiler-rt/trunk/make/platform/clang_linux.mk URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_linux.mk?rev=145322&view=auto ============================================================================== --- compiler-rt/trunk/make/platform/clang_linux.mk (added) +++ compiler-rt/trunk/make/platform/clang_linux.mk Mon Nov 28 17:50:13 2011 @@ -0,0 +1,52 @@ +Description := Static runtime libraries for clang/Linux. + +### + +CC := clang +Arch := unknown +Configs := + +# We don't currently have any general purpose way to target architectures other +# than the compiler defaults (because there is no generalized way to invoke +# cross compilers). For now, we just find the target archicture of the compiler +# and only define configurations we know that compiler can generate. +CompilerTargetTriple := $(shell \ + $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2) +ifneq ($(DEBUGMAKE),) +ifeq ($(CompilerTargetTriple),) +$(error "unable to infer compiler target triple for $(CC)") +endif +endif + +CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple))) + +# Only define configs if we detected a linux target. +ifneq ($(findstring -linux-,$(CompilerTargetTriple)),) + +# Configurations which just include all the runtime functions. +ifeq ($(CompilerTargetArch),i386) +Configs += full-i386 +Arch.full-i386 := i386 +endif +ifeq ($(CompilerTargetArch),x86_64) +Configs += full-x86_64 +Arch.full-x86_64 := x86_64 +endif + +endif + +### + +CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer + +CFLAGS.full-i386 := $(CFLAGS) -m32 +CFLAGS.full-x86_64 := $(CFLAGS) -m64 + +FUNCTIONS.full-i386 := $(CommonFunctions) $(ArchFunctions.i386) +FUNCTIONS.full-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64) + +# Always use optimized variants. +OPTIMIZED := 1 + +# We don't need to use visibility hidden on Linux. +VISIBILITY_HIDDEN := 0 From tonic at nondot.org Mon Nov 28 17:54:04 2011 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 28 Nov 2011 23:54:04 -0000 Subject: [llvm-commits] [www] r145323 - /www/trunk/devmtg/index.html Message-ID: <20111128235404.68BCD2A6C12C@llvm.org> Author: tbrethou Date: Mon Nov 28 17:54:04 2011 New Revision: 145323 URL: http://llvm.org/viewvc/llvm-project?rev=145323&view=rev Log: Move devmtg to the past list. Modified: www/trunk/devmtg/index.html Modified: www/trunk/devmtg/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/index.html?rev=145323&r1=145322&r2=145323&view=diff ============================================================================== --- www/trunk/devmtg/index.html (original) +++ www/trunk/devmtg/index.html Mon Nov 28 17:54:04 2011 @@ -3,11 +3,10 @@
        LLVM Developers' Meeting
        -

        The upcoming developer's meeting is on November 18, 2011.

        -

        We have had these meetings so far:

          +
        • November 18, 2011 - San Jose, CA, USA
        • September 16, 2011 - London, UK
        • November 4, 2010 - San Jose, CA, USA
        • October 2, 2009 - Cupertino, CA, USA
        • From greened at obbligato.org Mon Nov 28 17:57:09 2011 From: greened at obbligato.org (David A. Greene) Date: Mon, 28 Nov 2011 17:57:09 -0600 Subject: [llvm-commits] Vectors of Pointers and Vector-GEP In-Reply-To: <6594DDFF12B03D4E89690887C248699402A6973563@hasmsx504.ger.corp.intel.com> (Nadav Rotem's message of "Wed, 23 Nov 2011 11:18:42 +0200") References: <6594DDFF12B03D4E89690887C248699402A6973563@hasmsx504.ger.corp.intel.com> Message-ID: "Rotem, Nadav" writes: > Hi, > > Following the discussion in last week?s LLVM developers conference I started working on support for vectors-of-pointers. Vectors of pointers are > needed for supporting scatter/gather operations and are the first step in the direction of supporting predicated architectures. In the attached > patch, I change the LLVM-IR in order to support vectors-of-pointers and added basic support for vector-gep. In following patches I plan to extend > the vector-gep support to more indices and add scatter/gather intrinsics. > > I started by implementing vector-gep support for a simple case where there is a single index. The reason for this limitation, as noted by Dan > Gohman, is that pointers may point to structs, and vectors of indices may point to different members in the struct. I am aware of the fact that > supporting multiple indices is an important feature and I do intend to add support for multiple indices in the future. So glad to see this happening! But I'm unclear about your description. A vector GEP produces a vector of pointers, right? And a scatter/gather operation takes a vector of pointers as the list of addresses to fetch? What does the non-unit stride case look like? I have two ways I think about a gather/scatter or non-unit stride access. 1. Vector-of-indices This looks something like: V1 <- Base + V2 where Base is a base address and V2 is a vector of offsets from the base. 2. Vector-of-addresses This looks omsething like: V1 <- Offset + V2 Where Offset is an offset value applied to each address in V2. The first form is somewhat more convenient for striding through an array while the second is somewhat more convenient for doing gather/scatter on a set of "random" address locations (think operating on a field in several randomly-allocated structs). The multiple-index case (if I understand what you mean) is just a special case of the above, where the values in V2 have been adjusted to point to the various different fields. Can you explain with some example what your proposal provides and how it relates to #1 and #2 above? I'm just trying to understand the overall scheme. Thanks! -Dave From rafael.espindola at gmail.com Mon Nov 28 17:55:49 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 28 Nov 2011 23:55:49 -0000 Subject: [llvm-commits] [llvm] r145324 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128235549.492352A6C12C@llvm.org> Author: rafael Date: Mon Nov 28 17:55:49 2011 New Revision: 145324 URL: http://llvm.org/viewvc/llvm-project?rev=145324&view=rev Log: Expand the part about CFI a bit. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145324&r1=145323&r2=145324&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 17:55:49 2011 @@ -942,8 +942,11 @@
        • LLVM generates substantially better code for indirect gotos due to a new tail duplication pass, which can be a substantial performance win for interpreter loops that use them.
        • -
        • Exception handling and debug information is now emitted with CFI directives, - yielding much smaller executables for some C++ applications. +
        • Exception handling and debug frame information is now emitted with CFI + directives. This lets the assembler produce more compact info as it knows + the final offsets, yielding much smaller executables for some C++ applications. + If the system assembler doesn't support it, MC exands the directives when + the integrated assembler is not used.
        • The code generator now supports vector "select" operations on vector From greened at obbligato.org Mon Nov 28 18:01:05 2011 From: greened at obbligato.org (David A. Greene) Date: Mon, 28 Nov 2011 18:01:05 -0600 Subject: [llvm-commits] Vectors of Pointers and Vector-GEP In-Reply-To: <6594DDFF12B03D4E89690887C248699402A697390F@hasmsx504.ger.corp.intel.com> (Nadav Rotem's message of "Wed, 23 Nov 2011 22:09:42 +0200") References: <6594DDFF12B03D4E89690887C248699402A6973563@hasmsx504.ger.corp.intel.com> <4ECCBE6C.2080503@free.fr> <6594DDFF12B03D4E89690887C248699402A697390F@hasmsx504.ger.corp.intel.com> Message-ID: "Rotem, Nadav" writes: > Duncan, > > Thanks for the quick review! Here is a short description (design) of > where I am going with this patch: Did I miss Duncan's feedback? It didn't come across to me. -Dave From tonic at nondot.org Mon Nov 28 18:06:29 2011 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 29 Nov 2011 00:06:29 -0000 Subject: [llvm-commits] [www] r145327 - /www/trunk/devmtg/index.html Message-ID: <20111129000629.668692A6C12C@llvm.org> Author: tbrethou Date: Mon Nov 28 18:06:29 2011 New Revision: 145327 URL: http://llvm.org/viewvc/llvm-project?rev=145327&view=rev Log: Test commit. Modified: www/trunk/devmtg/index.html Modified: www/trunk/devmtg/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/devmtg/index.html?rev=145327&r1=145326&r2=145327&view=diff ============================================================================== --- www/trunk/devmtg/index.html (original) +++ www/trunk/devmtg/index.html Mon Nov 28 18:06:29 2011 @@ -1,6 +1,5 @@ -
          LLVM Developers' Meeting

          We have had these meetings so far:

          From daniel at zuster.org Mon Nov 28 18:06:50 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:50 -0000 Subject: [llvm-commits] [llvm] r145328 - in /llvm/trunk/utils/llvm-build/llvmbuild: componentinfo.py main.py Message-ID: <20111129000650.B39E62A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:50 2011 New Revision: 145328 URL: http://llvm.org/viewvc/llvm-project?rev=145328&view=rev Log: llvmbuild/CMake: Update CMake output fragment to include explicit library dependency information. Modified: llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py?rev=145328&r1=145327&r2=145328&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py Mon Nov 28 18:06:50 2011 @@ -138,6 +138,23 @@ def get_library_name(self): return self.library_name or self.name + def get_prefixed_library_name(self): + """ + get_prefixed_library_name() -> str + + Return the library name prefixed by the project name. This is generally + what the library name will be on disk. + """ + + basename = self.get_library_name() + + # FIXME: We need to get the prefix information from an explicit project + # object, or something. + if basename in ('gtest', 'gtest_main'): + return basename + + return 'LLVM%s' % basename + def get_llvmconfig_component_name(self): return self.get_library_name().lower() Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=145328&r1=145327&r2=145328&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Mon Nov 28 18:06:50 2011 @@ -354,6 +354,37 @@ print >>f, '};' f.close() + def get_required_libraries_for_component(self, ci, traverse_groups = False): + """ + get_required_libraries_for_component(component_info) -> iter + + Given a Library component info descriptor, return an iterator over all + of the directly required libraries for linking with this component. If + traverse_groups is True, then library and target groups will be + traversed to include their required libraries. + """ + + assert ci.type_name in ('Library', 'LibraryGroup', 'TargetGroup') + + for name in ci.required_libraries: + # Get the dependency info. + dep = self.component_info_map[name] + + # If it is a library, yield it. + if dep.type_name == 'Library': + yield dep + continue + + # Otherwise if it is a group, yield or traverse depending on what + # was requested. + if dep.type_name in ('LibraryGroup', 'TargetGroup'): + if not traverse_groups: + yield dep + continue + + for res in self.get_required_libraries_for_component(dep, True): + yield res + def get_fragment_dependencies(self): """ get_fragment_dependencies() -> iter @@ -447,6 +478,24 @@ ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % ( cmake_quote_path(dep),) + # Write the properties we use to encode the required library dependency + # information in a form CMake can easily use directly. + print >>f, """ +# Explicit library dependency information. +# +# The following property assignments effectively create a map from component +# names to required libraries, in a way that is easily accessed from CMake.""" + for ci in self.ordered_component_infos: + # We only write the information for libraries currently. + if ci.type_name != 'Library': + continue + + print >>f, """\ +set_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_%s %s)""" % ( + ci.get_prefixed_library_name(), " ".join(sorted( + dep.get_prefixed_library_name() + for dep in self.get_required_libraries_for_component(ci)))) + f.close() def write_make_fragment(self, output_path): From daniel at zuster.org Mon Nov 28 18:06:53 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:53 -0000 Subject: [llvm-commits] [llvm] r145329 - /llvm/trunk/tools/edis/Makefile Message-ID: <20111129000653.93E4B2A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:53 2011 New Revision: 145329 URL: http://llvm.org/viewvc/llvm-project?rev=145329&view=rev Log: build/Make: edis isn't built as a shared library anymore, remove related cruft from the Makefile. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=145329&r1=145328&r2=145329&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Mon Nov 28 18:06:53 2011 @@ -9,9 +9,6 @@ LEVEL := ../.. LIBRARYNAME := EnhancedDisassembly -LINK_LIBS_IN_SHARED := 1 - -EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this @@ -31,23 +28,3 @@ endif include $(LEVEL)/Makefile.common - -ifeq ($(HOST_OS),Darwin) - # extra options to override libtool defaults - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-dead_strip - - ifdef EDIS_VERSION - LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \ - -Wl,-compatibility_version -Wl,1 - endif - - # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line - DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') - ifneq ($(DARWIN_VERS),8) - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-install_name \ - -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" - endif -endif - From daniel at zuster.org Mon Nov 28 18:06:56 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:56 -0000 Subject: [llvm-commits] [llvm] r145330 - /llvm/trunk/include/llvm-c/Target.h Message-ID: <20111129000656.148B82A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:55 2011 New Revision: 145330 URL: http://llvm.org/viewvc/llvm-project?rev=145330&view=rev Log: llvm-c: Add a few missing InitializeAll* functions. Modified: llvm/trunk/include/llvm-c/Target.h Modified: llvm/trunk/include/llvm-c/Target.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=145330&r1=145329&r2=145330&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Target.h (original) +++ llvm/trunk/include/llvm-c/Target.h Mon Nov 28 18:06:55 2011 @@ -47,6 +47,21 @@ #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ +/* Declare all of the available assembly printer initialization functions. */ +#define LLVM_ASM_PRINTER(TargetName) \ + void LLVMInitialize##TargetName##AsmPrinter(); +#include "llvm/Config/AsmPrinters.def" + +/* Declare all of the available assembly parser initialization functions. */ +#define LLVM_ASM_PARSER(TargetName) \ + void LLVMInitialize##TargetName##AsmParser(); +#include "llvm/Config/AsmParsers.def" + +/* Declare all of the available disassembler initialization functions. */ +#define LLVM_DISASSEMBLER(TargetName) \ + void LLVMInitialize##TargetName##Disassembler(); +#include "llvm/Config/Disassemblers.def" + /** LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. */ @@ -64,6 +79,43 @@ #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ } + +/** LLVMInitializeAllTargetMCs - The main program should call this function if + it wants access to all available target MC that LLVM is configured to + support. */ +static inline void LLVMInitializeAllTargetMCs(void) { +#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC(); +#include "llvm/Config/Targets.def" +#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllAsmPrinters - The main program should call this function if + it wants all asm printers that LLVM is configured to support, to make them + available via the TargetRegistry. */ +static inline void LLVMInitializeAllAsmPrinters() { +#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); +#include "llvm/Config/AsmPrinters.def" +#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllAsmParsers - The main program should call this function if + it wants all asm parsers that LLVM is configured to support, to make them + available via the TargetRegistry. */ +static inline void LLVMInitializeAllAsmParsers() { +#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); +#include "llvm/Config/AsmParsers.def" +#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllDisassemblers - The main program should call this function + if it wants all disassemblers that LLVM is configured to support, to make + them available via the TargetRegistry. */ +static inline void LLVMInitializeAllDisassemblers() { +#define LLVM_DISASSEMBLER(TargetName) \ + LLVMInitialize##TargetName##Disassembler(); +#include "llvm/Config/Disassemblers.def" +#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ +} /** LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful From daniel at zuster.org Mon Nov 28 18:06:58 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:58 -0000 Subject: [llvm-commits] [llvm] r145331 - /llvm/trunk/tools/edis/EDMain.cpp Message-ID: <20111129000658.B32322A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:58 2011 New Revision: 145331 URL: http://llvm.org/viewvc/llvm-project?rev=145331&view=rev Log: edis: Don't do the target initialization in EDGetDisassembler, this is contrary to the way we currently expect target selection to work -- clients are supposed to have control over what targets are available. Modified: llvm/trunk/tools/edis/EDMain.cpp Modified: llvm/trunk/tools/edis/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=145331&r1=145330&r2=145331&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp Mon Nov 28 18:06:58 2011 @@ -17,23 +17,12 @@ #include "../../lib/MC/MCDisassembler/EDInst.h" #include "../../lib/MC/MCDisassembler/EDOperand.h" #include "../../lib/MC/MCDisassembler/EDToken.h" -#include "llvm/Support/TargetSelect.h" #include "llvm-c/EnhancedDisassembly.h" using namespace llvm; int EDGetDisassembler(EDDisassemblerRef *disassembler, const char *triple, EDAssemblySyntax_t syntax) { - static bool initialized; - if (!initialized) { - // Initialize targets and assembly printers/parsers. - llvm::InitializeAllTargetInfos(); - llvm::InitializeAllTargetMCs(); - llvm::InitializeAllAsmParsers(); - llvm::InitializeAllDisassemblers(); - initialized = true; - } - EDDisassembler::AssemblySyntax Syntax; switch (syntax) { default: assert(0 && "Unknown assembly syntax!"); From daniel at zuster.org Mon Nov 28 18:25:57 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:25:57 -0000 Subject: [llvm-commits] [llvm] r145338 - in /llvm/trunk: lib/MC/MCDisassembler/EDMain.cpp tools/CMakeLists.txt tools/Makefile tools/edis/CMakeLists.txt tools/edis/EDMain.cpp tools/edis/Makefile Message-ID: <20111129002557.A89572A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:25:57 2011 New Revision: 145338 URL: http://llvm.org/viewvc/llvm-project?rev=145338&view=rev Log: edis: Sink EDMain.cpp into lib/MC/MCDisassembler. - This fixes some layering violations and matches how we handle the llvm-c lib, for example. Added: llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp - copied, changed from r145331, llvm/trunk/tools/edis/EDMain.cpp Removed: llvm/trunk/tools/edis/CMakeLists.txt llvm/trunk/tools/edis/EDMain.cpp llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/CMakeLists.txt llvm/trunk/tools/Makefile Copied: llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp (from r145331, llvm/trunk/tools/edis/EDMain.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp&p1=llvm/trunk/tools/edis/EDMain.cpp&r1=145331&r2=145338&rev=145338&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp Mon Nov 28 18:25:57 2011 @@ -11,12 +11,10 @@ // //===----------------------------------------------------------------------===// -// FIXME: This code isn't layered right, the headers should be moved to -// include llvm/MC/MCDisassembler or something. -#include "../../lib/MC/MCDisassembler/EDDisassembler.h" -#include "../../lib/MC/MCDisassembler/EDInst.h" -#include "../../lib/MC/MCDisassembler/EDOperand.h" -#include "../../lib/MC/MCDisassembler/EDToken.h" +#include "EDDisassembler.h" +#include "EDInst.h" +#include "EDOperand.h" +#include "EDToken.h" #include "llvm-c/EnhancedDisassembly.h" using namespace llvm; Modified: llvm/trunk/tools/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=145338&r1=145337&r2=145338&view=diff ============================================================================== --- llvm/trunk/tools/CMakeLists.txt (original) +++ llvm/trunk/tools/CMakeLists.txt Mon Nov 28 18:25:57 2011 @@ -50,7 +50,6 @@ add_subdirectory(bugpoint-passes) add_subdirectory(llvm-bcanalyzer) add_subdirectory(llvm-stub) -add_subdirectory(edis) if( NOT WIN32 ) add_subdirectory(lto) Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=145338&r1=145337&r2=145338&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Mon Nov 28 18:25:57 2011 @@ -56,14 +56,6 @@ endif PARALLEL_DIRS += bugpoint-passes - - # The edis library is only supported if ARM and/or X86 are enabled, and if - # LLVM is being built PIC on platforms that support dylibs. - ifneq ($(DISABLE_EDIS),1) - ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),) - PARALLEL_DIRS += edis - endif - endif endif ifdef LLVM_HAS_POLLY Removed: llvm/trunk/tools/edis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/CMakeLists.txt?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/CMakeLists.txt (original) +++ llvm/trunk/tools/edis/CMakeLists.txt (removed) @@ -1,21 +0,0 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -set(SOURCES - ../../include/llvm-c/EnhancedDisassembly.h - EDMain.cpp - ) - -set(EDIS_DEPENDS LLVMMCDisassembler LLVMMCParser) -if( LLVM_TARGETS_TO_BUILD MATCHES X86 ) - list(APPEND EDIS_DEPENDS LLVMX86AsmPrinter LLVMX86AsmParser LLVMX86Disassembler LLVMX86Desc) -endif() -if( LLVM_TARGETS_TO_BUILD MATCHES ARM ) - list(APPEND EDIS_DEPENDS LLVMARMAsmPrinter LLVMARMAsmParser LLVMARMDisassembler LLVMARMDesc) -endif() - -add_llvm_library(EnhancedDisassembly ${SOURCES}) -set_property(TARGET EnhancedDisassembly PROPERTY - OUTPUT_NAME "EnhancedDisassembly") - -add_llvm_library_dependencies(EnhancedDisassembly - ${EDIS_DEPENDS}) Removed: llvm/trunk/tools/edis/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp (removed) @@ -1,282 +0,0 @@ -//===-- EDMain.cpp - LLVM Enhanced Disassembly C API ----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the enhanced disassembler's public C API. -// -//===----------------------------------------------------------------------===// - -// FIXME: This code isn't layered right, the headers should be moved to -// include llvm/MC/MCDisassembler or something. -#include "../../lib/MC/MCDisassembler/EDDisassembler.h" -#include "../../lib/MC/MCDisassembler/EDInst.h" -#include "../../lib/MC/MCDisassembler/EDOperand.h" -#include "../../lib/MC/MCDisassembler/EDToken.h" -#include "llvm-c/EnhancedDisassembly.h" -using namespace llvm; - -int EDGetDisassembler(EDDisassemblerRef *disassembler, - const char *triple, - EDAssemblySyntax_t syntax) { - EDDisassembler::AssemblySyntax Syntax; - switch (syntax) { - default: assert(0 && "Unknown assembly syntax!"); - case kEDAssemblySyntaxX86Intel: - Syntax = EDDisassembler::kEDAssemblySyntaxX86Intel; - break; - case kEDAssemblySyntaxX86ATT: - Syntax = EDDisassembler::kEDAssemblySyntaxX86ATT; - break; - case kEDAssemblySyntaxARMUAL: - Syntax = EDDisassembler::kEDAssemblySyntaxARMUAL; - break; - } - - EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, Syntax); - - if (!ret) - return -1; - *disassembler = ret; - return 0; -} - -int EDGetRegisterName(const char** regName, - EDDisassemblerRef disassembler, - unsigned regID) { - const char *name = ((EDDisassembler*)disassembler)->nameWithRegisterID(regID); - if (!name) - return -1; - *regName = name; - return 0; -} - -int EDRegisterIsStackPointer(EDDisassemblerRef disassembler, - unsigned regID) { - return ((EDDisassembler*)disassembler)->registerIsStackPointer(regID) ? 1 : 0; -} - -int EDRegisterIsProgramCounter(EDDisassemblerRef disassembler, - unsigned regID) { - return ((EDDisassembler*)disassembler)->registerIsProgramCounter(regID) ? 1:0; -} - -unsigned int EDCreateInsts(EDInstRef *insts, - unsigned int count, - EDDisassemblerRef disassembler, - ::EDByteReaderCallback byteReader, - uint64_t address, - void *arg) { - unsigned int index; - - for (index = 0; index < count; ++index) { - EDInst *inst = ((EDDisassembler*)disassembler)->createInst(byteReader, - address, arg); - - if (!inst) - return index; - - insts[index] = inst; - address += inst->byteSize(); - } - - return count; -} - -void EDReleaseInst(EDInstRef inst) { - delete ((EDInst*)inst); -} - -int EDInstByteSize(EDInstRef inst) { - return ((EDInst*)inst)->byteSize(); -} - -int EDGetInstString(const char **buf, - EDInstRef inst) { - return ((EDInst*)inst)->getString(*buf); -} - -int EDInstID(unsigned *instID, EDInstRef inst) { - *instID = ((EDInst*)inst)->instID(); - return 0; -} - -int EDInstIsBranch(EDInstRef inst) { - return ((EDInst*)inst)->isBranch(); -} - -int EDInstIsMove(EDInstRef inst) { - return ((EDInst*)inst)->isMove(); -} - -int EDBranchTargetID(EDInstRef inst) { - return ((EDInst*)inst)->branchTargetID(); -} - -int EDMoveSourceID(EDInstRef inst) { - return ((EDInst*)inst)->moveSourceID(); -} - -int EDMoveTargetID(EDInstRef inst) { - return ((EDInst*)inst)->moveTargetID(); -} - -int EDNumTokens(EDInstRef inst) { - return ((EDInst*)inst)->numTokens(); -} - -int EDGetToken(EDTokenRef *token, - EDInstRef inst, - int index) { - return ((EDInst*)inst)->getToken(*(EDToken**)token, index); -} - -int EDGetTokenString(const char **buf, - EDTokenRef token) { - return ((EDToken*)token)->getString(*buf); -} - -int EDOperandIndexForToken(EDTokenRef token) { - return ((EDToken*)token)->operandID(); -} - -int EDTokenIsWhitespace(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenWhitespace; -} - -int EDTokenIsPunctuation(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenPunctuation; -} - -int EDTokenIsOpcode(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenOpcode; -} - -int EDTokenIsLiteral(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenLiteral; -} - -int EDTokenIsRegister(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenRegister; -} - -int EDTokenIsNegativeLiteral(EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenLiteral) - return -1; - - return ((EDToken*)token)->literalSign(); -} - -int EDLiteralTokenAbsoluteValue(uint64_t *value, EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenLiteral) - return -1; - - return ((EDToken*)token)->literalAbsoluteValue(*value); -} - -int EDRegisterTokenValue(unsigned *registerID, - EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenRegister) - return -1; - - return ((EDToken*)token)->registerID(*registerID); -} - -int EDNumOperands(EDInstRef inst) { - return ((EDInst*)inst)->numOperands(); -} - -int EDGetOperand(EDOperandRef *operand, - EDInstRef inst, - int index) { - return ((EDInst*)inst)->getOperand(*(EDOperand**)operand, index); -} - -int EDOperandIsRegister(EDOperandRef operand) { - return ((EDOperand*)operand)->isRegister(); -} - -int EDOperandIsImmediate(EDOperandRef operand) { - return ((EDOperand*)operand)->isImmediate(); -} - -int EDOperandIsMemory(EDOperandRef operand) { - return ((EDOperand*)operand)->isMemory(); -} - -int EDRegisterOperandValue(unsigned *value, EDOperandRef operand) { - if (!((EDOperand*)operand)->isRegister()) - return -1; - *value = ((EDOperand*)operand)->regVal(); - return 0; -} - -int EDImmediateOperandValue(uint64_t *value, EDOperandRef operand) { - if (!((EDOperand*)operand)->isImmediate()) - return -1; - *value = ((EDOperand*)operand)->immediateVal(); - return 0; -} - -int EDEvaluateOperand(uint64_t *result, EDOperandRef operand, - ::EDRegisterReaderCallback regReader, void *arg) { - return ((EDOperand*)operand)->evaluate(*result, regReader, arg); -} - -#ifdef __BLOCKS__ - -struct ByteReaderWrapper { - EDByteBlock_t byteBlock; -}; - -static int readerWrapperCallback(uint8_t *byte, - uint64_t address, - void *arg) { - struct ByteReaderWrapper *wrapper = (struct ByteReaderWrapper *)arg; - return wrapper->byteBlock(byte, address); -} - -unsigned int EDBlockCreateInsts(EDInstRef *insts, - int count, - EDDisassemblerRef disassembler, - EDByteBlock_t byteBlock, - uint64_t address) { - struct ByteReaderWrapper wrapper; - wrapper.byteBlock = byteBlock; - - return EDCreateInsts(insts, - count, - disassembler, - readerWrapperCallback, - address, - (void*)&wrapper); -} - -int EDBlockEvaluateOperand(uint64_t *result, EDOperandRef operand, - EDRegisterBlock_t regBlock) { - return ((EDOperand*)operand)->evaluate(*result, regBlock); -} - -int EDBlockVisitTokens(EDInstRef inst, ::EDTokenVisitor_t visitor) { - return ((EDInst*)inst)->visitTokens((llvm::EDTokenVisitor_t)visitor); -} - -#else - -extern "C" unsigned int EDBlockCreateInsts() { - return 0; -} - -extern "C" int EDBlockEvaluateOperand() { - return -1; -} - -extern "C" int EDBlockVisitTokens() { - return -1; -} - -#endif Removed: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile (removed) @@ -1,30 +0,0 @@ -##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LEVEL := ../.. -LIBRARYNAME := EnhancedDisassembly - -# Include this here so we can get the configuration of the targets -# that have been configured for construction. We have to do this -# early so we can set up LINK_COMPONENTS before including Makefile.rules -include $(LEVEL)/Makefile.config - -LINK_COMPONENTS := mcdisassembler - -# If the X86 target is enabled, link in the asmprinter and disassembler. -ifneq ($(filter $(TARGETS_TO_BUILD), X86),) -LINK_COMPONENTS += x86asmprinter x86disassembler -endif - -# If the ARM target is enabled, link in the asmprinter and disassembler. -ifneq ($(filter $(TARGETS_TO_BUILD), ARM),) -LINK_COMPONENTS += armasmprinter armdisassembler -endif - -include $(LEVEL)/Makefile.common From chandlerc at gmail.com Mon Nov 28 18:32:43 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 29 Nov 2011 00:32:43 -0000 Subject: [llvm-commits] [llvm] r145340 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111129003243.879452A6C12C@llvm.org> Author: chandlerc Date: Mon Nov 28 18:32:43 2011 New Revision: 145340 URL: http://llvm.org/viewvc/llvm-project?rev=145340&view=rev Log: Add a link from the LLVM release notes to the Clang release notes. I suspect we could profitably remove/move some of the bullet points under Clang here to the Clang notes in order to keep things clean on both sides. Unless I hear objections I'll start doing that once folks have read over the Clang notes a bit. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145340&r1=145339&r2=145340&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 18:32:43 2011 @@ -94,8 +94,7 @@ production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86 (32- and 64-bit), and for Darwin/ARM targets.

          -

          In the LLVM 3.0 time-frame, the Clang team has made many improvements:

          - +

          In the LLVM 3.0 time-frame, the Clang team has made many improvements:

          • Greatly improved support for building C++ applications, with greater stability and better diagnostics.
          • @@ -141,6 +140,9 @@ interface, to improve the performance of code completion and the mapping from source locations to abstract syntax tree nodes.
          +For more details about the changes to Clang since the 2.9 release, see the +Clang release notes +

          If Clang rejects your code but another compiler accepts it, please take a From daniel at zuster.org Mon Nov 28 18:33:14 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:33:14 -0000 Subject: [llvm-commits] [llvm] r145341 - /llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Message-ID: <20111129003314.B601F2A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:33:14 2011 New Revision: 145341 URL: http://llvm.org/viewvc/llvm-project?rev=145341&view=rev Log: build: Update CMakeLists.txt. Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=145341&r1=145340&r2=145341&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Mon Nov 28 18:33:14 2011 @@ -2,6 +2,7 @@ Disassembler.cpp EDDisassembler.cpp EDInst.cpp + EDMain.cpp EDOperand.cpp EDToken.cpp ) From atrick at apple.com Mon Nov 28 18:52:05 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 00:52:05 -0000 Subject: [llvm-commits] [llvm] r145343 - /llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Message-ID: <20111129005205.15E0D2A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 18:52:04 2011 New Revision: 145343 URL: http://llvm.org/viewvc/llvm-project?rev=145343&view=rev Log: Reenable this IndVars unit test. SCEV can't optimize undef in all cases, which is a separate issue from this test case. Modified: llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Modified: llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll?rev=145343&r1=145342&r2=145343&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Mon Nov 28 18:52:04 2011 @@ -3,9 +3,6 @@ ; add219 should be extended to i64 because it is nsw, even though its ; sext cannot be hoisted outside the loop. -; FIXME: GetExtendedOperandRecurrence has problems with the nsw bit on add exprs -; XFAIL: * - target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" define void @test() nounwind { @@ -22,7 +19,7 @@ ; CHECK: add nsw i64 %indvars.iv, 1 for.body170: ; preds = %for.body170, %for.body153 - %i2.19 = phi i32 [ %add249, %for.body170 ], [ undef, %for.body153 ] + %i2.19 = phi i32 [ %add249, %for.body170 ], [ 0, %for.body153 ] %add219 = add nsw i32 %i2.19, 1 %idxprom220 = sext i32 %add219 to i64 %add249 = add nsw i32 %i2.19, %shl132 From sabre at nondot.org Mon Nov 28 19:04:41 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 29 Nov 2011 01:04:41 -0000 Subject: [llvm-commits] [www] r145344 - /www/trunk/header.incl Message-ID: <20111129010441.7C9762A6C12C@llvm.org> Author: lattner Date: Mon Nov 28 19:04:41 2011 New Revision: 145344 URL: http://llvm.org/viewvc/llvm-project?rev=145344&view=rev Log: add the new devmtg to the sidebar Modified: www/trunk/header.incl Modified: www/trunk/header.incl URL: http://llvm.org/viewvc/llvm-project/www/trunk/header.incl?rev=145344&r1=145343&r2=145344&view=diff ============================================================================== --- www/trunk/header.incl (original) +++ www/trunk/header.incl Mon Nov 28 19:04:41 2011 @@ -120,6 +120,7 @@ Developer Mtgs

          + Nov 18, 2011
          Nov 4, 2010
          Oct 2, 2009
          Aug 23, 2008
          From clattner at apple.com Mon Nov 28 19:13:39 2011 From: clattner at apple.com (Chris Lattner) Date: Mon, 28 Nov 2011 17:13:39 -0800 Subject: [llvm-commits] [llvm] r145340 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <20111129003243.879452A6C12C@llvm.org> References: <20111129003243.879452A6C12C@llvm.org> Message-ID: <35278456-7866-4975-AECC-9E24E454E135@apple.com> On Nov 28, 2011, at 4:32 PM, Chandler Carruth wrote: > Author: chandlerc > Date: Mon Nov 28 18:32:43 2011 > New Revision: 145340 > > URL: http://llvm.org/viewvc/llvm-project?rev=145340&view=rev > Log: > Add a link from the LLVM release notes to the Clang release notes. > I suspect we could profitably remove/move some of the bullet points > under Clang here to the Clang notes in order to keep things clean on > both sides. Unless I hear objections I'll start doing that once folks > have read over the Clang notes a bit. Hi Chandler, Thanks for working on the Clang release notes, they're looking great. I still think it makes sense to have a high level summary of what is new in Clang in the llvm release notes, but maybe some of the bullets can be [re]moved. Do we have a plan for how to get the release notes links finalized? For example, we don't want http://llvm.org/releases/3.0/docs/ReleaseNotes.html (which will happen when Bill finalizes the release) to point to mainline Clang's ReleaseNotes. -Chris From grosbach at apple.com Mon Nov 28 19:15:25 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 29 Nov 2011 01:15:25 -0000 Subject: [llvm-commits] [llvm] r145346 - in /llvm/trunk/lib: MC/MCAssembler.cpp Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp Message-ID: <20111129011525.B670D2A6C12C@llvm.org> Author: grosbach Date: Mon Nov 28 19:15:25 2011 New Revision: 145346 URL: http://llvm.org/viewvc/llvm-project?rev=145346&view=rev Log: Better fix for ARM MOVT relocation encoding of thumb bit. Replaces r145318 with a more targetted fix for the relocation handling. Modified: llvm/trunk/lib/MC/MCAssembler.cpp llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=145346&r1=145345&r2=145346&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Mon Nov 28 19:15:25 2011 @@ -273,17 +273,13 @@ Value = Target.getConstant(); - bool SetThumbBit = false; + bool IsThumb = false; if (const MCSymbolRefExpr *A = Target.getSymA()) { const MCSymbol &Sym = A->getSymbol().AliasedSymbol(); if (Sym.isDefined()) Value += Layout.getSymbolOffset(&getSymbolData(Sym)); - // ARM data fixups based from a thumb function address need to have the low - // bit set. The actual value is always at least 16-bit aligned, so the - // low bit is normally clear and available for use as an ISA flag for - // interworking. - if (Fixup.getKind() == FK_Data_4 && isThumbFunc(&Sym)) - SetThumbBit = true; + if (isThumbFunc(&Sym)) + IsThumb = true; } if (const MCSymbolRefExpr *B = Target.getSymB()) { const MCSymbol &Sym = B->getSymbol().AliasedSymbol(); @@ -306,7 +302,11 @@ Value -= Offset; } - if (SetThumbBit) + // ARM fixups based from a thumb function address need to have the low + // bit set. The actual value is always at least 16-bit aligned, so the + // low bit is normally clear and available for use as an ISA flag for + // interworking. + if (IsThumb) Value |= 1; return IsResolved; Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp?rev=145346&r1=145345&r2=145346&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp (original) +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp Mon Nov 28 19:15:25 2011 @@ -16,6 +16,7 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCFixup.h" #include "llvm/MC/MCFixupKindInfo.h" +#include "llvm/MC/MCMachOSymbolFlags.h" #include "llvm/MC/MCValue.h" #include "llvm/Object/MachOFormat.h" #include "llvm/Support/ErrorHandling.h" @@ -178,9 +179,16 @@ case ARM::fixup_arm_movt_hi16: case ARM::fixup_arm_movt_hi16_pcrel: MovtBit = 1; + // The thumb bit shouldn't be set in the 'other-half' bit of the + // relocation, but it will be set in FixedValue if the base symbol + // is a thumb function. Clear it out here. + if (A_SD->getFlags() & SF_ThumbFunc) + FixedValue &= 0xfffffffe; break; case ARM::fixup_t2_movt_hi16: case ARM::fixup_t2_movt_hi16_pcrel: + if (A_SD->getFlags() & SF_ThumbFunc) + FixedValue &= 0xfffffffe; MovtBit = 1; // Fallthrough case ARM::fixup_t2_movw_lo16: @@ -189,7 +197,6 @@ break; } - if (Type == macho::RIT_ARM_HalfDifference) { uint32_t OtherHalf = MovtBit ? (FixedValue & 0xffff) : ((FixedValue & 0xffff0000) >> 16); From eli.friedman at gmail.com Mon Nov 28 19:18:23 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 29 Nov 2011 01:18:23 -0000 Subject: [llvm-commits] [llvm] r145347 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Message-ID: <20111129011823.B72F62A6C12C@llvm.org> Author: efriedma Date: Mon Nov 28 19:18:23 2011 New Revision: 145347 URL: http://llvm.org/viewvc/llvm-project?rev=145347&view=rev Log: Zap some completely ridiculous code. There's probably a miscompile here, but I don't really want to try to write a testcase involving an invoke returning a pointer to a varargs function... Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=145347&r1=145346&r2=145347&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Mon Nov 28 19:18:23 2011 @@ -960,7 +960,7 @@ PointerType *PTy = cast(Callee->getType()); FunctionType *FTy = cast(PTy->getElementType()); if (FTy->isVarArg()) { - int ix = FTy->getNumParams() + (isa(Callee) ? 2 : 0); + int ix = FTy->getNumParams(); // See if we can optimize any arguments passed through the varargs area of // the call. for (CallSite::arg_iterator I = CS.arg_begin()+FTy->getNumParams(), From isanbard at gmail.com Mon Nov 28 19:20:52 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 29 Nov 2011 01:20:52 -0000 Subject: [llvm-commits] [dragonegg] r145350 - /dragonegg/tags/RELEASE_30/final/ Message-ID: <20111129012052.DC7BE2A6C12C@llvm.org> Author: void Date: Mon Nov 28 19:20:52 2011 New Revision: 145350 URL: http://llvm.org/viewvc/llvm-project?rev=145350&view=rev Log: Creating release candidate final from release_30 branch Added: dragonegg/tags/RELEASE_30/final/ (props changed) - copied from r145349, dragonegg/branches/release_30/ Propchange: dragonegg/tags/RELEASE_30/final/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Nov 28 19:20:52 2011 @@ -0,0 +1,2 @@ +*.d +target Propchange: dragonegg/tags/RELEASE_30/final/ ------------------------------------------------------------------------------ svn:mergeinfo = /dragonegg/trunk:142351,142575,142651,143357 From isanbard at gmail.com Mon Nov 28 19:21:00 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 29 Nov 2011 01:21:00 -0000 Subject: [llvm-commits] [test-suite] r145351 - /test-suite/tags/RELEASE_30/final/ Message-ID: <20111129012100.202282A6C12C@llvm.org> Author: void Date: Mon Nov 28 19:20:59 2011 New Revision: 145351 URL: http://llvm.org/viewvc/llvm-project?rev=145351&view=rev Log: Creating release candidate final from release_30 branch Added: test-suite/tags/RELEASE_30/final/ (props changed) - copied from r145350, test-suite/branches/release_30/ Propchange: test-suite/tags/RELEASE_30/final/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Nov 28 19:20:59 2011 @@ -0,0 +1,4 @@ +Makefile.config +config.log +config.status +mklib Propchange: test-suite/tags/RELEASE_30/final/ ------------------------------------------------------------------------------ svn:mergeinfo = /test-suite/trunk:142659,143460 From isanbard at gmail.com Mon Nov 28 19:21:07 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 29 Nov 2011 01:21:07 -0000 Subject: [llvm-commits] [compiler-rt] r145352 - /compiler-rt/tags/RELEASE_30/final/ Message-ID: <20111129012107.4EB882A6C12C@llvm.org> Author: void Date: Mon Nov 28 19:21:07 2011 New Revision: 145352 URL: http://llvm.org/viewvc/llvm-project?rev=145352&view=rev Log: Creating release candidate final from release_30 branch Added: compiler-rt/tags/RELEASE_30/final/ - copied from r145351, compiler-rt/branches/release_30/ From daniel at zuster.org Mon Nov 28 19:31:52 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 01:31:52 -0000 Subject: [llvm-commits] [llvm] r145355 - in /llvm/trunk/cmake/modules: AddLLVM.cmake CMakeLists.txt LLVM-Config.cmake Message-ID: <20111129013152.648F82A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 19:31:52 2011 New Revision: 145355 URL: http://llvm.org/viewvc/llvm-project?rev=145355&view=rev Log: build/cmake: Switch to using llvm-build computed dependencies. - I verified locally that the current dependency lists are identical. - This makes add_llvm_library_dependencies() a no-op. I'll remove it once this change passes the bots. Modified: llvm/trunk/cmake/modules/AddLLVM.cmake llvm/trunk/cmake/modules/CMakeLists.txt llvm/trunk/cmake/modules/LLVM-Config.cmake Modified: llvm/trunk/cmake/modules/AddLLVM.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=145355&r1=145354&r2=145355&view=diff ============================================================================== --- llvm/trunk/cmake/modules/AddLLVM.cmake (original) +++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Nov 28 19:31:52 2011 @@ -25,15 +25,17 @@ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endif() set_target_properties(${name} PROPERTIES FOLDER "Libraries") + + # Add the explicit dependency information for this library. + # + # It would be nice to verify that we have the dependencies for this library + # name, but using get_property(... SET) doesn't suffice to determine if a + # property has been set to an empty value. + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) + target_link_libraries(${name} ${lib_deps}) endmacro(add_llvm_library name) macro(add_llvm_library_dependencies name) - # Save the dependencies of the LLVM library in a variable so that we can - # query it when resolve llvm-config-style component -> library mappings. - set_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${name} ${ARGN}) - - # Then add the actual dependencies to the library target. - target_link_libraries(${name} ${ARGN}) endmacro(add_llvm_library_dependencies name) macro(add_llvm_loadable_module name) Modified: llvm/trunk/cmake/modules/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=145355&r1=145354&r2=145355&view=diff ============================================================================== --- llvm/trunk/cmake/modules/CMakeLists.txt (original) +++ llvm/trunk/cmake/modules/CMakeLists.txt Mon Nov 28 19:31:52 2011 @@ -4,9 +4,9 @@ get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) foreach(lib ${llvm_libs}) - get_property(llvm_lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib}) + get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) set(all_llvm_lib_deps - "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${lib} ${llvm_lib_deps})") + "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})") endforeach(lib) configure_file( Modified: llvm/trunk/cmake/modules/LLVM-Config.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVM-Config.cmake?rev=145355&r1=145354&r2=145355&view=diff ============================================================================== --- llvm/trunk/cmake/modules/LLVM-Config.cmake (original) +++ llvm/trunk/cmake/modules/LLVM-Config.cmake Mon Nov 28 19:31:52 2011 @@ -152,7 +152,7 @@ set(processed) while( cursor LESS lst_size ) list(GET expanded_components ${cursor} lib) - get_property(lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib}) + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) list(APPEND expanded_components ${lib_deps}) # Remove duplicates at the front: list(REVERSE expanded_components) From chandlerc at gmail.com Mon Nov 28 19:35:40 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Mon, 28 Nov 2011 17:35:40 -0800 Subject: [llvm-commits] [llvm] r145340 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <35278456-7866-4975-AECC-9E24E454E135@apple.com> References: <20111129003243.879452A6C12C@llvm.org> <35278456-7866-4975-AECC-9E24E454E135@apple.com> Message-ID: On Mon, Nov 28, 2011 at 5:13 PM, Chris Lattner wrote: > > On Nov 28, 2011, at 4:32 PM, Chandler Carruth wrote: > > > Author: chandlerc > > Date: Mon Nov 28 18:32:43 2011 > > New Revision: 145340 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=145340&view=rev > > Log: > > Add a link from the LLVM release notes to the Clang release notes. > > I suspect we could profitably remove/move some of the bullet points > > under Clang here to the Clang notes in order to keep things clean on > > both sides. Unless I hear objections I'll start doing that once folks > > have read over the Clang notes a bit. > > Hi Chandler, > > Thanks for working on the Clang release notes, they're looking great. I > still think it makes sense to have a high level summary of what is new in > Clang in the llvm release notes, but maybe some of the bullets can be > [re]moved. Yea, that was all I was thinking. I definitely agree that a summary is important. > Do we have a plan for how to get the release notes links finalized? Not really... My only idea off the cuff would be to modify them (both) on the branch. There are links in both directions. Other ideas? I'll think about cleaner solutions... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/4904b12e/attachment.html From isanbard at gmail.com Mon Nov 28 19:43:20 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 29 Nov 2011 01:43:20 -0000 Subject: [llvm-commits] [llvm] r145356 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Message-ID: <20111129014320.9093B2A6C12C@llvm.org> Author: void Date: Mon Nov 28 19:43:20 2011 New Revision: 145356 URL: http://llvm.org/viewvc/llvm-project?rev=145356&view=rev Log: On MachO, the pointer to the personality function should always be in the non_lazy_symbol_pointers section (__IMPORT,__pointers). Ignore the 'hidden' part since that will place it in the wrong section. Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=145356&r1=145355&r2=145356&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original) +++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Mon Nov 28 19:43:20 2011 @@ -536,9 +536,7 @@ // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = - GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) : - MachOMMI.getGVStubEntry(SSym); + MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym); if (StubSym.getPointer() == 0) { MCSymbol *Sym = Mang->getSymbol(GV); StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); From clattner at apple.com Mon Nov 28 19:58:56 2011 From: clattner at apple.com (Chris Lattner) Date: Mon, 28 Nov 2011 17:58:56 -0800 Subject: [llvm-commits] [llvm] r145340 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: References: <20111129003243.879452A6C12C@llvm.org> <35278456-7866-4975-AECC-9E24E454E135@apple.com> Message-ID: <3160DFE5-636B-4FA9-8DDC-423D8778D4F6@apple.com> On Nov 28, 2011, at 5:35 PM, Chandler Carruth wrote: > Thanks for working on the Clang release notes, they're looking great. I still think it makes sense to have a high level summary of what is new in Clang in the llvm release notes, but maybe some of the bullets can be [re]moved. > > Yea, that was all I was thinking. I definitely agree that a summary is important. > > Do we have a plan for how to get the release notes links finalized? > > Not really... My only idea off the cuff would be to modify them (both) on the branch. There are links in both directions. Other ideas? I'll think about cleaner solutions... I don't really know of a cleaner solution here: we don't currently unpack the Clang doc's in the release directory. Maybe we should start doing this in 3.1, but a simple hack is probably fine for LLVM 3.0. Please synch up with Bill about this specifically. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/f7d62100/attachment.html From peter at pcc.me.uk Mon Nov 28 20:04:45 2011 From: peter at pcc.me.uk (Peter Collingbourne) Date: Tue, 29 Nov 2011 02:04:45 -0000 Subject: [llvm-commits] [llvm] r145361 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111129020445.32C432A6C12C@llvm.org> Author: pcc Date: Mon Nov 28 20:04:44 2011 New Revision: 145361 URL: http://llvm.org/viewvc/llvm-project?rev=145361&view=rev Log: Fix grammar. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145361&r1=145360&r2=145361&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 20:04:44 2011 @@ -1108,7 +1108,7 @@ aim for all future versions of LLVM to read bitcode files and .ll files produced by LLVM 3.0.
        • Tablegen has been split into a library, allowing the clang tblgen pieces - now live in the clang tree. The llvm version has been renamed to + to now live in the clang tree. The llvm version has been renamed to llvm-tblgen instead of tblgen.
        • The LLVMC meta compiler driver was removed.
        • The unused PostOrder Dominator Frontiers and LowerSetJmp passes were removed.
        • From peter at pcc.me.uk Mon Nov 28 20:04:48 2011 From: peter at pcc.me.uk (Peter Collingbourne) Date: Tue, 29 Nov 2011 02:04:48 -0000 Subject: [llvm-commits] [llvm] r145362 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111129020448.EB9E02A6C12C@llvm.org> Author: pcc Date: Mon Nov 28 20:04:48 2011 New Revision: 145362 URL: http://llvm.org/viewvc/llvm-project?rev=145362&view=rev Log: Remove content that has been moved to Clang release notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145362&r1=145361&r2=145362&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 20:04:48 2011 @@ -132,10 +132,6 @@ Objective-C runtime, or version 1.6 or later of the GNUstep Objective-C runtime version. -
        • Improved support for OpenCL C, including the vec_step operator, - address space qualifiers, improved vector literal support and code - generation support for the PTX target.
        • -
        • Implemented a number of optimizations in libclang, the Clang C interface, to improve the performance of code completion and the mapping from source locations to abstract syntax tree nodes.
        • @@ -1061,12 +1057,9 @@ pieces are texture/sampler support and some vector operations.

          That said, the backend is already being used for domain-specific languages - and works well with the libclc - library to supply OpenCL built-ins. With it, you can use Clang to compile - OpenCL code into PTX and execute it by loading the resulting PTX as a binary - blob using the nVidia OpenCL library. It has been tested with several OpenCL - programs, including some from the nVidia GPU Computing SDK, and the performance - is on par with the nVidia compiler.

          + and can be used by Clang to + compile OpenCL + C code into PTX.

          From atrick at apple.com Mon Nov 28 20:05:23 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 02:05:23 -0000 Subject: [llvm-commits] [llvm] r145363 - /llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Message-ID: <20111129020523.BDA182A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 20:05:23 2011 New Revision: 145363 URL: http://llvm.org/viewvc/llvm-project?rev=145363&view=rev Log: Filecheckize. Modified: llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Modified: llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll?rev=145363&r1=145362&r2=145363&view=diff ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll (original) +++ llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Mon Nov 28 20:05:23 2011 @@ -1,6 +1,7 @@ -; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %loop: backedge-taken count is (100 + (-100 smax %n))} +; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s ; PR2002 +; CHECK: Loop %loop: backedge-taken count is (100 + (-100 smax %n)) define void @foo(i8 %n) { entry: br label %loop From atrick at apple.com Mon Nov 28 20:06:35 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 02:06:35 -0000 Subject: [llvm-commits] [llvm] r145364 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <20111129020635.E230A2A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 20:06:35 2011 New Revision: 145364 URL: http://llvm.org/viewvc/llvm-project?rev=145364&view=rev Log: Make SCEV print for Add/MulExpr. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=145364&r1=145363&r2=145364&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Nov 28 20:06:35 2011 @@ -188,6 +188,14 @@ OS << OpStr; } OS << ")"; + switch (NAry->getSCEVType()) { + case scAddExpr: + case scMulExpr: + if (NAry->getNoWrapFlags(FlagNUW)) + OS << ""; + if (NAry->getNoWrapFlags(FlagNSW)) + OS << ""; + } return; } case scUDivExpr: { From atrick at apple.com Mon Nov 28 20:16:38 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 02:16:38 -0000 Subject: [llvm-commits] [llvm] r145367 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp lib/Transforms/Scalar/IndVarSimplify.cpp test/Analysis/ScalarEvolution/nsw.ll Message-ID: <20111129021638.73F862A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 20:16:38 2011 New Revision: 145367 URL: http://llvm.org/viewvc/llvm-project?rev=145367&view=rev Log: SCEV fix. In general, Add/Mul expressions should not inherit NSW/NUW. This reverts r139450, fixes r139453, and adds much needed comments and a unit test. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=145367&r1=145366&r2=145367&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Nov 28 20:16:38 2011 @@ -3592,6 +3592,12 @@ // because it leads to N-1 getAddExpr calls for N ultimate operands. // Instead, gather up all the operands and make a single getAddExpr call. // LLVM IR canonical form means we need only traverse the left operands. + // + // Don't apply this instruction's NSW or NUW flags to the new + // expression. The instruction may be guarded by control flow that the + // no-wrap behavior depends on. Non-control-equivalent instructions can be + // mapped to the same SCEV expression, and it would be incorrect to transfer + // NSW/NUW semantics to those operations. SmallVector AddOps; AddOps.push_back(getSCEV(U->getOperand(1))); for (Value *Op = U->getOperand(0); ; Op = U->getOperand(0)) { @@ -3606,16 +3612,10 @@ AddOps.push_back(Op1); } AddOps.push_back(getSCEV(U->getOperand(0))); - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap; - OverflowingBinaryOperator *OBO = cast(V); - if (OBO->hasNoSignedWrap()) - Flags = setFlags(Flags, SCEV::FlagNSW); - if (OBO->hasNoUnsignedWrap()) - Flags = setFlags(Flags, SCEV::FlagNUW); - return getAddExpr(AddOps, Flags); + return getAddExpr(AddOps); } case Instruction::Mul: { - // See the Add code above. + // Don't transfer NSW/NUW for the same reason as AddExpr. SmallVector MulOps; MulOps.push_back(getSCEV(U->getOperand(1))); for (Value *Op = U->getOperand(0); Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=145367&r1=145366&r2=145367&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Nov 28 20:16:38 2011 @@ -944,9 +944,13 @@ else return 0; + // When creating this AddExpr, don't apply the current operations NSW or NUW + // flags. This instruction may be guarded by control flow that the no-wrap + // behavior depends on. Non-control-equivalent instructions can be mapped to + // the same SCEV expression, and it would be incorrect to transfer NSW/NUW + // semantics to those operations. const SCEVAddRecExpr *AddRec = dyn_cast( - SE->getAddExpr(SE->getSCEV(DU.WideDef), ExtendOperExpr, - IsSigned ? SCEV::FlagNSW : SCEV::FlagNUW)); + SE->getAddExpr(SE->getSCEV(DU.WideDef), ExtendOperExpr)); if (!AddRec || AddRec->getLoop() != L) return 0; Modified: llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll?rev=145367&r1=145366&r2=145367&view=diff ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll (original) +++ llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll Mon Nov 28 20:16:38 2011 @@ -103,4 +103,22 @@ ; CHECK: Loop %for.body.i.i: max backedge-taken count is ((-4 + (-1 * %begin) + %end) /u 4) _ZSt4fillIPiiEvT_S1_RKT0_.exit: ; preds = %for.body.i.i, %entry ret void -} \ No newline at end of file +} + +; A single AddExpr exists for (%a + %b), which is not always . +; CHECK: @addnsw +; CHECK-NOT: --> (%a + %b) +define i32 @addnsw(i32 %a, i32 %b) nounwind ssp { +entry: + %tmp = add i32 %a, %b + %cmp = icmp sgt i32 %tmp, 0 + br i1 %cmp, label %greater, label %exit + +greater: + %tmp2 = add nsw i32 %a, %b + br label %exit + +exit: + %result = phi i32 [ %a, %entry ], [ %tmp2, %greater ] + ret i32 %result +} From stoklund at 2pi.dk Mon Nov 28 20:25:45 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 18:25:45 -0800 Subject: [llvm-commits] Patch: new backend for Hexagon processor In-Reply-To: <4ED415F0.4060009@codeaurora.org> References: <4EC17287.3090708@codeaurora.org> <4EC2F380.7010509@codeaurora.org> <4EC5E66D.8080303@codeaurora.org> <4ED415F0.4060009@codeaurora.org> Message-ID: <780F39CE-C12B-44DF-A7AA-CCF486E38A10@2pi.dk> On Nov 28, 2011, at 3:14 PM, Tony Linthicum wrote: > Hi Tony, I would have told you that you don't need to compress patches, but hexagon.patch compresses 10x. That's odd. I think you need to make a pass over the whole patch and clean up missing punctuation and capitalization in comments. Some files have no comments at all. Commented-out code should be deleted. All target-specific command line options should have help text and be named so it is obvious which target they belong to. Some specifics: Spurious hunk: diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index ceb1771..9edb875 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -232,7 +232,6 @@ void initializeUnreachableMachineBlockElimPass(PassRegistry&); void initializeVerifierPass(PassRegistry&); void initializeVirtRegMapPass(PassRegistry&); void initializeInstSimplifierPass(PassRegistry&); - } There is a lot of commented out code (using #if 0) in HexagonAsmPrinter. Please just remove that. +bool HexagonInstrInfo:: +isU6_3Immediate(const int value) const { + return (0 <= value && value <= 511); +} Please use the isUInt<9> templates from MathExtras.h for these functions. Same thing here: +def s32ImmPred : PatLeaf<(i32 imm), [{ + // immS16 predicate - True if the immediate fits in a 16-bit sign extended + // field. + int64_t v = (int64_t)N->getSExtValue(); + return (v <= 2147483647 && v >= -2147483648); +}]>; +++ b/lib/Target/Hexagon/HexagonCFGOptimizer.cpp There is not a lot of documentation in this file. Is it doing something that the target-independent code placement optimizers can't do? +cl::opt CFGFn("cfgfn", cl::Hidden, cl::desc(""), cl::init(""), + cl::ZeroOrMore); +cl::opt CFGBlock("cfgblock", cl::Hidden, cl::desc(""), cl::init(-1), + cl::ZeroOrMore); Are these options leftovers from debugging? If so, just delete them. If not, please use longer option names, and add help text. +static bool IsConditionalBranch(int Opc) { + return (Opc == Hexagon::JMP_Pred) || (Opc == Hexagon::JMP_PredNot) + || (Opc == Hexagon::JMP_PredPt) || (Opc == Hexagon::JMP_PredNotPt); +} + + +static bool IsUnconditionalJump(int Opc) { + return (Opc == Hexagon::JMP); +} This information should already be available from MCInstrDesc. See the isBranch() and isBarrier() methods. +++ b/lib/Target/Hexagon/HexagonCallingConvLower.cpp @@ -0,0 +1,207 @@ +//===-- llvm/CallingConvLower.cpp - Calling Conventions -------------------===// The comment is wrong. It is unfortunate that you had to duplicate this code. How much needs to be changed in the target-independent code for it to be useful? --- /dev/null +++ b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp @@ -0,0 +1,175 @@ +//===--- HexagonExpandPredSpillCode.cpp - Expand Predicate Spill Code ----===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + I think that is the only comment in this file. Please explain what this pass does. It looks like you could just use a TII::expandPostRAPseudo() hook instead? +++ b/lib/Target/Hexagon/HexagonFrameLowering.cpp +static cl::opt DisableDeallocRet("disable-dealloc-ret", cl::Hidden, + cl::desc("Disable Dealloc Retrun")); Please use some kind of indication that this is a target-specific command line option. + maxCallFrameSize = (maxCallFrameSize + AlignMask) & ~AlignMask; Please use RoundUpToAlignment(). +#define ALLOCFRAME_MAX 16384 Use 'const unsigned' for constants instead of preprocessor macros. + if (RetOpcode == Hexagon::TCRETURNtg || RetOpcode == Hexagon::TCRETURNtext) + return true; + else + return false; a.k.a. "return RetOpcode == Hexagon::TCRETURNtg || RetOpcode == Hexagon::TCRETURNtext" + // We can only schedule double loads if we spill contiguous callee-saved regs + // For instance, we cannot scheduled double-word loads if we spill r24, + // r26, and r27. + // Hexagon_TODO: We can try to double-word align odd registers for -O2 and + // above + bool ContiguousRegs = true; + + for (unsigned i = 0; i < CSI.size(); ++i) { + unsigned Reg = CSI[i].getReg(); + + // + // Check if we can use a double-word store + // + const unsigned* SuperReg = TRI->getSuperRegisters(Reg); If double-word loads and stores are always better, you can change your getCalleeSavedRegs() hook to return D-registers instead. The register allocator understands the aliasing. +void HexagonFrameLowering:: +processFunctionBeforeFrameFinalized(MachineFunction &MF) const { + // do nothing +} + +void HexagonFrameLowering:: +processFunctionBeforeCalleeSavedScan(MachineFunction &MF, + RegScavenger* RS) const { + // do nothing +} Just delete these empty overrides. +++ b/lib/Target/Hexagon/HexagonFrameLowering.h +#include "HexagonSubtarget.h" You have both and include and a forward decl of HexagonSubtarget. +++ b/lib/Target/Hexagon/HexagonHardwareLoops.cpp + void print(raw_ostream &OS, const TargetMachine *TM = 0) const { + if (isReg()) { OS << "%reg" << getReg(); } Better pretty-printing of registers: OS << PrintReg(getReg()); + BuildMI(*Preheader, InsertPos, InsertPos->getDebugLoc(), + TII->get(TargetOpcode::COPY), CountReg).addReg(TripCount->getReg()); + if (TripCount->isNeg()) { + unsigned CountReg1 = CountReg; + CountReg = MF->getRegInfo().createVirtualRegister(RC); + BuildMI(*Preheader, InsertPos, InsertPos->getDebugLoc(), + TII->get(Hexagon::NEG), CountReg).addReg(CountReg1); + } This doesn't look right. You never define CountReg1 anywhere. The machine code verifier should tell you. +++ b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +static bool FitsS11_0(int64_t v) { + return (v <= 1023 && v >= -1024); +} Again, please use the MathExtras.h functions for this. + } + else if (LD->getValueType(0) == MVT::i64 && + LD->getExtensionType() == ISD::SEXTLOAD) { + return SelectIndexedLoadSignExtend64(LD, Opcode, dl); + } + else { // Handle normal loads Two things: Please put else on the same line as the closing brace, and don't use else after return/continue. This is happening in many places. +++ b/lib/Target/Hexagon/HexagonISelLowering.cpp +#define Hexagon_MAX_RET_SIZE 64 Please use C++ constants instead of macros. +cl::opt +ExpandBuiltinMemcpy("expand-memcpy", cl::init(true), cl::Hidden, + cl::desc("Enable memcpy/memset builtin expansion")); + +cl::opt +EmitJumpTables("jump-tables", cl::init(true), cl::Hidden, + cl::desc("Emit jump tables")); Please rename these options, and make them static. + if (Flag.getNode()) + return DAG.getNode(HexagonISD::RET_FLAG, dl, MVT::Other, Chain, Flag); Indentation. + //setOperationAction(ISD::DBG_STOPPOINT, MVT::Other, Expand); + //setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); + //setOperationAction(ISD::DBG_LABEL, MVT::Other, Expand); + //setOperationAction(ISD::DECLARE, MVT::Other, Expand); Please delete commented-out code. There is a lot of it. +++ b/lib/Target/Hexagon/HexagonInstrInfo.cpp +bool HexagonInstrInfo::isMoveInstr(const MachineInstr &MI, This hook is obsolete and not called from anywhere. Make sure you always generate target-independent COPY instructions before register allocation instead. +void HexagonInstrInfo::copyPhysReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, DebugLoc DL, + unsigned DestReg, unsigned SrcReg, + bool KillSrc) const { + // Hexagon_TODO: add code It seems you already did... + if (Hexagon::IntRegsRegClass.contains(SrcReg) && + Hexagon::IntRegsRegClass.contains(DestReg)) { You can simply say contains(SrcReg, DestReg) here. + BuildMI(MBB, I, DL, get(Hexagon::TFR), DestReg).addReg(SrcReg); + return; + } + else if (Hexagon::DoubleRegsRegClass.contains(SrcReg) && ... and don't else after return + else if (Hexagon::DoubleRegsRegClass.contains(DestReg) && + Hexagon::IntRegsRegClass.contains(SrcReg)) { + // We can have an overlap between single and double reg: r1:0 = r0 This looks odd. How can you copy between registers of different sizes? + if (RC == Hexagon::IntRegsRegisterClass) { + BuildMI(MBB, I, DL, get(Hexagon::STriw)) + .addFrameIndex(FI).addImm(0) + .addReg(SrcReg, getKillRegState(isKill)).addMemOperand(MMO); + } Here, I recommend you use Hexagon::IntRegsRegisterClass->hasSubClassEq(RC). It has been a common bug in other targets when new sub-classes are added. +MachineInstr *HexagonInstrInfo::foldMemoryOperandImpl(MachineFunction &MF, + MachineInstr* MI, + const SmallVectorImpl &Ops, + int FI) const { + // Hexagon_TODO: Implement + return(0); +} You probably don't need to implement this hook on a load/store architecture. +unsigned HexagonInstrInfo::createVR(MachineFunction* MF, MVT VT) const { This function is unused? +bool HexagonInstrInfo:: +isS12_Immediate(const int value) const { + // predicate - True if the immediate fits is a 12-bit signed value + return (value <= 2047 && value >= -2048); +} These functions come in many copies... ;) I think one is enough. +bool HexagonInstrInfo::isPredicable(MachineInstr *MI) const { + switch(Opc) { + case Hexagon::TFRI: + return isS12_Immediate(MI->getOperand(1).getImm()); Can you make use of TargetFlags to avoid these many opcode switches? +bool HexagonInstrInfo::isPredicated(const MachineInstr *MI) const { + switch (MI->getOpcode()) { Again, use MCInstrDesc or TargetFlags to avoid these large switches. +bool HexagonInstrInfo:: +isValidOffset(const int Opcode, const int Offset) const { + + // Hexagon_TODO: Ugh! hardcoding. Is there a target specific API that can be + // used? +#define Hexagon_MEMW_OFFSET_MAX 4095 +#define Hexagon_MEMW_OFFSET_MIN -4096 I agree. You really need to clean up your literal predicates. They are literally all over the place. + if (VT == MVT::i64) { + return (Offset >= Hexagon_MEMD_AUTOINC_MIN && + Offset <= Hexagon_MEMD_AUTOINC_MAX && + (Offset & 0x7) == 0); You have many checks like this. I think it would be fine to add isShiftedUInt templates to MathExtras.h. +bool HexagonInstrInfo:: +isMemOp(const MachineInstr *MI) const { + switch (MI->getOpcode()) + { Can you use MCInstrDesc::mayLoad / mayStore? +++ b/lib/Target/Hexagon/HexagonInstrInfo.h +/// SPII - This namespace holds all of the target specific flags that +/// instruction info tracks. +/// +namespace HexagonII { + enum { + Pseudo = (1<<0), + Load = (1<<1), + Store = (1<<2), + DelaySlot = (1<<3) + }; There is already target-independent flags for all of these in MCInstrDesc. +++ b/lib/Target/Hexagon/HexagonInstrInfo.td I like the straightforward instruction definitions in this file. Could you place all the call-related instructions together. I think one escaped. +++ b/lib/Target/Hexagon/HexagonIntrinsicsDerived.td One file for a single pattern?? +++ b/lib/Target/Hexagon/HexagonOptimizeSZExtends.cpp @@ -0,0 +1,129 @@ +//===-- HexagonOptimizeSZExtends.cpp - Identify and remove sign and -------===// +//===-- zero extends. -------===// Can this pass do something that lib/CodeGen/PeepholeOptimizer.cpp can't? +++ b/lib/Target/Hexagon/HexagonRegisterInfo.cpp +cl::opt AllocFn("alloc-fn", cl::Hidden, + cl::desc("")); ! +const unsigned* HexagonRegisterInfo::getCalleeSavedRegs(const MachineFunction + *MF) + const { Weird whitespace. Use: const unsigned* HexagonRegisterInfo:: getCalleeSavedRegs(const MachineFunction *MF) const { +++ b/lib/Target/Hexagon/HexagonRegisterInfo.h +#define HEXAGON_RESERVED_REG_1 Hexagon::R10 +#define HEXAGON_RESERVED_REG_2 Hexagon::R11 Hmm. Does that have to go in a header file? Have you looked into using the register scavenger instead of reserving registers? +++ b/lib/Target/Hexagon/HexagonRegisterInfo.td +// FIXME: the register order should be defined in terms of the preferred +// allocation order... +// +def IntRegs : RegisterClass<"Hexagon", [i32], 32, (add (sequence "R%u", 0, 9), + (sequence "R%u", 12, 28), + R10, R11, R29, R30, + R31)> You don't need to shuffle registers here just to put the callee-saved registers last in the allocation order. The register allocator does that automatically. +// Hexagon_TODO: Do we really need to specify different classes for +// FP and Int registers? No, you don't. Just specify an [i32, f32] type vector. +// Will this confuse register allocation? No, it will work, but you aren't gaining anything. You can use multiple identical register classes if the types have different spill sizes, see the FR32, FR64, and VR128 register classes in the x86 target. +// Subregister definitions. Adapted from X86RegisterInfo.td +// +//def Hexagon_subreg_loreg : PatLeaf<(i32 1)>; +//def Hexagon_subreg_hireg : PatLeaf<(i32 2)>; +// +//def : SubRegSet<1, [D0, D1, D2, D3, D4, D5, D6, D7, +// D8, D9, D10, D11, D12, D13, D14, D15], +// [R0, R2, R4, R6, R8, R10,R12, R14, +// R16, R18, R20, R22, R24, R26, R28, R30]>; +// +// +//def : SubRegSet<2, [D0, D1, D2, D3, D4, D5, D6, D7, +// D8, D9, D10, D11, D12, D13, D14, D15], +// [R1, R3, R5, R7, R9, R11, R13, R15, +// R17, R19, R21, R23, R25, R27, R29, R31]>; This is obsolete. Just delete it. +++ b/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp @@ -0,0 +1,86 @@ +//===-- HexagonRemoveExtendArgs.cpp - Remove unecessary sign extends ------===// This comment is wrong. There is already a HexagonOptimizeSZExtends pass. Are both needed? +++ b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp @@ -0,0 +1,119 @@ +//===---- HexagonSplitTFRCondSets.cpp - split TFR condsets into xfers -----===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// Missing non-trivial comments. /jakob From nlewycky at google.com Mon Nov 28 20:39:00 2011 From: nlewycky at google.com (Nick Lewycky) Date: Mon, 28 Nov 2011 18:39:00 -0800 Subject: [llvm-commits] Updated pointer-vector patch In-Reply-To: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com> References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com> Message-ID: On 28 November 2011 12:33, Rotem, Nadav wrote: > > I attached the updated pointer-vector patch, following comments from Nick?Lewycky. To elaborate, the comment was that the only pointer types we should allow are those which would let us load the vector and produce a legal vector type. +

          In cases where the pointer argument is a vector of pointers, only a + ? single index may be used. For example:

          +
          + %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets,
          +
          Also mention that the number of elements must be the same. - ?%X = ptrtoint i32* %X to i8 ? ? ? ? ? ; yields truncation on 32-bit architecture - ?%Y = ptrtoint i32* %x to i64 ? ? ? ? ?; yields zero extension on 32-bit architecture + ?%X = ptrtoint i32* %X to i8 ? ? ? ? ? ? ? ? ? ? ? ? ; yields truncation on 32-bit architecture While you're here, please make this use "%x" (lowercase) as the operand consistently. The existing code "%X = op %X" is bad form (using its own result). Also update the overview and summary for the instruction, replace "pointer" with "pointer or vector of pointers" and "integer" with "integer or vector of integers". See the documentation of "add" for example. The semantics can simply mention that for a vector it does the operation elementwise. Same with inttoptr and bitcast. ?template ?static Type *getIndexedTypeInternal(Type *Ptr, ArrayRef IdxList) { + ?if (Ptr->isVectorTy()) { + ? ?IndexTy Index = IdxList[0]; "Index" is a dead variable right here. Did you mean to use it? +unsigned GetElementPtrInst::getAddressSpace(Value *Ptr) { + ?Type* Ty = Ptr->getType(); "Type* Ty" --> "Type *Ty". + ?if (Ty->isVectorTy()) + ? ?Ty = cast(Ty)->getElementType(); + + ?if (Ty->isPointerTy()) + ? ?return cast(Ty)->getAddressSpace(); Please use "if (VectorType *VTy = dyn_cast(Ty)) Ty = VTy->getElementTy();". The difference is that when compiled in debug mode, the code you wrote will do two tests. + ?Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), + ? ? ? ? ?"PtrToInt type mismatch", &I); Please also verify the number of elements. Again in IntToPtr. ? ?Type *ElTy = ? ? ?GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(), Idxs); ? ?Assert1(ElTy, "Invalid indices for GEP pointer type!", &GEP); - ?Assert2(GEP.getType()->isPointerTy() && + ?if (GEP.getOperand(0)->getType()->isPointerTy()) { + ? ?Assert2(GEP.getType()->isPointerTy() && ? ? ? ? ? ?cast(GEP.getType())->getElementType() == ElTy, ? ? ? ? ? ?"GEP is not of right type for indices!", &GEP, ElTy); + ?} else { + ? ?Assert1(Idxs.size() == 1, "Invalid number of indices!", &GEP); I'm confused. Can this assert ever fire when "Invalid indices for GEP pointer type!" doesn't? ?bool VectorType::isValidElementType(Type *ElemTy) { + ?if (ElemTy->isPointerTy()) + ? ?ElemTy = cast(ElemTy)->getElementType(); ? ?return ElemTy->isIntegerTy() || ElemTy->isFloatingPointTy(); ?} Again, please use dyn_cast. The changes in this patch fail to address vectors of pointers in an icmp operation. It's fine if you want to leave that illegal and add support for it later. The verifier will reject vectors of pointers as icmp arguments, while continuing to accept integer vectors and scalar pointers. The change to the LangRef doesn't address the meaning of inbounds on a vector-gep. It seems reasonable to say that it applies to each of the computations element-wise. You need to update the comment on VectorType::getBitWidth to indicate that it will return zero on vectors of pointers. You need to update TargetData::getIndexedOffset to handle a vector index, or update all of its callers. I don't know how to do this because it returns a single integer, but you really want something element-wise. Currently SROA will bail on "alloca <4 x i8*>". It (and mem2reg) need to be taught to handle them. This is important for performance, but can hold off until later. This code in ConstantFold.cpp: // If the right hand side is a bitcast, try using its inverse to simplify // it by moving it to the left hand side. We can't do this if it would turn // a vector compare into a scalar compare or visa versa. if (ConstantExpr *CE2 = dyn_cast(C2)) { ? Constant *CE2Op0 = CE2->getOperand(0); ? if (CE2->getOpcode() == Instruction::BitCast && ? ? ? CE2->getType()->isVectorTy() == CE2Op0->getType()->isVectorTy()) { ? ? Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType()); ? ? return ConstantExpr::getICmp(pred, Inverse, CE2Op0); ? } } assumes that it can produce a bitcast/icmp of any vector you can bitcast. Now that we permit bitcasting on vectors of pointers, that is no longer true. Please write a testcase, or let me know if you can't. The ASM parser doesn't parse constant vectors of pointers. Testcase: ? // llvm-as < %s -disable-output ? @G1 = global i32 zeroinitializer ? @G2 = global i32 zeroinitializer ? @g = constant <2 x i32*> FoldBitCast in ConstantFolding.cpp should be taught that it can create vectors of pointers too: // If this is a scalar -> vector cast, convert the input into a <1 x scalar> // vector so the code below can handle it uniformly. if (isa(C) || isa(C)) { || C->getType() is pointer to a vector argument. Constant *Ops = C; // don't take the address of C! return FoldBitCast(ConstantVector::get(Ops), DestTy, TD); } You should add tests for the basic correctness to tests under unittests/. Show that creating a vector of null pointers becomes a constant aggregate zero, show that you can create a GEP with a non-pointer argument (the vector). This code inside IndVarSimplify.cpp needs to change // Retrieve the pointer operand of the GEP. Don't use GetUnderlyingObject // because it understands lcssa phis while SCEV does not. Value *FromPtr = FromVal; Value *ToPtr = ToVal; if (GEPOperator *GEP = dyn_cast(FromVal)) { FromPtr = GEP->getPointerOperand(); } if (GEPOperator *GEP = dyn_cast(ToVal)) { ToPtr = GEP->getPointerOperand(); } because it sends the FromPtr and ToPtr to SCEV: const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); which does not support vectors of pointers, only normal pointers. Nick > > Thanks, > Nadav > > --------------------------------------------------------------------- > Intel Israel (74) Limited > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. From isanbard at gmail.com Mon Nov 28 20:39:59 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 29 Nov 2011 02:39:59 -0000 Subject: [llvm-commits] [llvm] r145368 - /llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Message-ID: <20111129023959.1F4822A6C12C@llvm.org> Author: void Date: Mon Nov 28 20:39:58 2011 New Revision: 145368 URL: http://llvm.org/viewvc/llvm-project?rev=145368&view=rev Log: MachO doesn't support the protected visibility. Don't default to 'global' here. Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=145368&r1=145367&r2=145368&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original) +++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Mon Nov 28 20:39:58 2011 @@ -57,8 +57,9 @@ HiddenVisibilityAttr = MCSA_PrivateExtern; HiddenDeclarationVisibilityAttr = MCSA_Invalid; + // Doesn't support protected visibility. - ProtectedVisibilityAttr = MCSA_Global; + ProtectedVisibilityAttr = MCSA_Invalid; HasDotTypeDotSizeDirective = false; HasNoDeadStrip = true; From eli.friedman at gmail.com Mon Nov 28 21:46:41 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Mon, 28 Nov 2011 19:46:41 -0800 Subject: [llvm-commits] [llvm] r144580 - in /llvm/trunk: include/llvm/Analysis/CaptureTracking.h include/llvm/Analysis/MemoryDependenceAnalysis.h lib/Analysis/CaptureTracking.cpp lib/Analysis/MemoryDependenceAnalysis.cpp test/Transforms/GVN/rle.ll In-Reply-To: <20111114224942.B52192A6C131@llvm.org> References: <20111114224942.B52192A6C131@llvm.org> Message-ID: On Mon, Nov 14, 2011 at 2:49 PM, Nick Lewycky wrote: > Author: nicholas > Date: Mon Nov 14 16:49:42 2011 > New Revision: 144580 > > URL: http://llvm.org/viewvc/llvm-project?rev=144580&view=rev > Log: > Refactor capture tracking (which already had a couple flags for whether returns > and stores capture) to permit the caller to see each capture point and decide > whether to continue looking. > > Use this inside memdep to do an analysis that basicaa won't do. This lets us > solve another devirtualization case, fixing PR8908! This commit appears to be causing a minor compile-time regression at -O3 for SingleSource/Benchmarks/Shootout/objinst (on the order of 5%). Please look if you have a moment. -Eli From craig.topper at gmail.com Mon Nov 28 21:57:35 2011 From: craig.topper at gmail.com (Craig Topper) Date: Tue, 29 Nov 2011 03:57:35 -0000 Subject: [llvm-commits] [llvm] r145370 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-vperm2i128.ll Message-ID: <20111129035735.2E5B12A6C12C@llvm.org> Author: ctopper Date: Mon Nov 28 21:57:34 2011 New Revision: 145370 URL: http://llvm.org/viewvc/llvm-project?rev=145370&view=rev Log: Correctly mark VPERM2F128 as being an FP instruction and add execution domain fixing support to convert it to VPERM2I128 for AVX2. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=145370&r1=145369&r2=145370&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Mon Nov 28 21:57:34 2011 @@ -3568,6 +3568,8 @@ { X86::VANDPSYrr, X86::VANDPDYrr, X86::VPANDYrr }, { X86::VORPSYrm, X86::VORPDYrm, X86::VPORYrm }, { X86::VORPSYrr, X86::VORPDYrr, X86::VPORYrr }, + { X86::VPERM2F128rm, X86::VPERM2F128rm, X86::VPERM2I128rm }, + { X86::VPERM2F128rr, X86::VPERM2F128rr, X86::VPERM2I128rr }, { X86::VXORPSYrm, X86::VXORPDYrm, X86::VPXORYrm }, { X86::VXORPSYrr, X86::VXORPDYrr, X86::VPXORYrr } }; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145370&r1=145369&r2=145370&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Nov 28 21:57:34 2011 @@ -7336,7 +7336,7 @@ //===----------------------------------------------------------------------===// // VPERM2F128 - Permute Floating-Point Values in 128-bit chunks // -let neverHasSideEffects = 1 in { +let neverHasSideEffects = 1, ExeDomain = SSEPackedSingle in { def VPERM2F128rr : AVXAIi8<0x06, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR256:$src2, i8imm:$src3), "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", Modified: llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll?rev=145370&r1=145369&r2=145370&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-vperm2i128.ll Mon Nov 28 21:57:34 2011 @@ -3,28 +3,36 @@ ; CHECK: vperm2i128 $17 define <32 x i8> @E(<32 x i8> %a, <32 x i8> %b) nounwind uwtable readnone ssp { entry: - %shuffle = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> + ; add forces execution domain + %a2 = add <32 x i8> %a, + %shuffle = shufflevector <32 x i8> %a2, <32 x i8> %b, <32 x i32> ret <32 x i8> %shuffle } ; CHECK: vperm2i128 $33 define <4 x i64> @E2(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp { entry: - %shuffle = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> + ; add forces execution domain + %a2 = add <4 x i64> %a, + %shuffle = shufflevector <4 x i64> %a2, <4 x i64> %b, <4 x i32> ret <4 x i64> %shuffle } ; CHECK: vperm2i128 $49 define <8 x i32> @E3(<8 x i32> %a, <8 x i32> %b) nounwind uwtable readnone ssp { entry: - %shuffle = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> + ; add forces execution domain + %a2 = add <8 x i32> %a, + %shuffle = shufflevector <8 x i32> %a2, <8 x i32> %b, <8 x i32> ret <8 x i32> %shuffle } ; CHECK: vperm2i128 $2 define <16 x i16> @E4(<16 x i16> %a, <16 x i16> %b) nounwind uwtable readnone ssp { entry: - %shuffle = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> + ; add forces execution domain + %a2 = add <16 x i16> %a, + %shuffle = shufflevector <16 x i16> %a2, <16 x i16> %b, <16 x i32> ret <16 x i16> %shuffle } @@ -33,6 +41,7 @@ entry: %c = load <16 x i16>* %a %d = load <16 x i16>* %b - %shuffle = shufflevector <16 x i16> %c, <16 x i16> %d, <16 x i32> + %c2 = add <16 x i16> %c, + %shuffle = shufflevector <16 x i16> %c2, <16 x i16> %d, <16 x i32> ret <16 x i16> %shuffle } From stoklund at 2pi.dk Mon Nov 28 22:09:02 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 20:09:02 -0800 Subject: [llvm-commits] Patch: new backend for Hexagon processor In-Reply-To: <4ED415F0.4060009@codeaurora.org> References: <4EC17287.3090708@codeaurora.org> <4EC2F380.7010509@codeaurora.org> <4EC5E66D.8080303@codeaurora.org> <4ED415F0.4060009@codeaurora.org> Message-ID: On Nov 28, 2011, at 3:14 PM, Tony Linthicum wrote: > Ugh. I spent a *lot* of time fixing 80 column overruns in the td files. I guess I missed a few. I think I got them all in that file now. egrep -n '.{81}' We used to have "make check-line-length", but seems to be broken now. /jakob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/7c4e14f9/attachment-0001.html From craig.topper at gmail.com Mon Nov 28 23:37:58 2011 From: craig.topper at gmail.com (Craig Topper) Date: Tue, 29 Nov 2011 05:37:58 -0000 Subject: [llvm-commits] [llvm] r145376 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx-cast.ll test/CodeGen/X86/avx-intrinsics-x86.ll test/CodeGen/X86/avx-splat.ll test/CodeGen/X86/avx2-intrinsics-x86.ll Message-ID: <20111129053758.AC0C52A6C12C@llvm.org> Author: ctopper Date: Mon Nov 28 23:37:58 2011 New Revision: 145376 URL: http://llvm.org/viewvc/llvm-project?rev=145376&view=rev Log: Fix VINSERTF128/VEXTRACTF128 to be marked as FP instructions. Allow execution dependency fix pass to convert them to their integer equivalents when AVX2 is enabled. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx-cast.ll llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll llvm/trunk/test/CodeGen/X86/avx-splat.ll llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Mon Nov 28 23:37:58 2011 @@ -3568,10 +3568,14 @@ { X86::VANDPSYrr, X86::VANDPDYrr, X86::VPANDYrr }, { X86::VORPSYrm, X86::VORPDYrm, X86::VPORYrm }, { X86::VORPSYrr, X86::VORPDYrr, X86::VPORYrr }, - { X86::VPERM2F128rm, X86::VPERM2F128rm, X86::VPERM2I128rm }, - { X86::VPERM2F128rr, X86::VPERM2F128rr, X86::VPERM2I128rr }, { X86::VXORPSYrm, X86::VXORPDYrm, X86::VPXORYrm }, - { X86::VXORPSYrr, X86::VXORPDYrr, X86::VPXORYrr } + { X86::VXORPSYrr, X86::VXORPDYrr, X86::VPXORYrr }, + { X86::VEXTRACTF128mr, X86::VEXTRACTF128mr, X86::VEXTRACTI128mr }, + { X86::VEXTRACTF128rr, X86::VEXTRACTF128rr, X86::VEXTRACTI128rr }, + { X86::VINSERTF128rm, X86::VINSERTF128rm, X86::VINSERTI128rm }, + { X86::VINSERTF128rr, X86::VINSERTF128rr, X86::VINSERTI128rr }, + { X86::VPERM2F128rm, X86::VPERM2F128rm, X86::VPERM2I128rm }, + { X86::VPERM2F128rr, X86::VPERM2F128rr, X86::VPERM2I128rr } }; // FIXME: Some shuffle and unpack instructions have equivalents in different Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Nov 28 23:37:58 2011 @@ -7147,7 +7147,7 @@ //===----------------------------------------------------------------------===// // VINSERTF128 - Insert packed floating-point values // -let neverHasSideEffects = 1 in { +let neverHasSideEffects = 1, ExeDomain = SSEPackedSingle in { def VINSERTF128rr : AVXAIi8<0x18, MRMSrcReg, (outs VR256:$dst), (ins VR256:$src1, VR128:$src2, i8imm:$src3), "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", @@ -7194,7 +7194,7 @@ //===----------------------------------------------------------------------===// // VEXTRACTF128 - Extract packed floating-point values // -let neverHasSideEffects = 1 in { +let neverHasSideEffects = 1, ExeDomain = SSEPackedSingle in { def VEXTRACTF128rr : AVXAIi8<0x19, MRMDestReg, (outs VR128:$dst), (ins VR256:$src1, i8imm:$src2), "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", Modified: llvm/trunk/test/CodeGen/X86/avx-cast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-cast.ll?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-cast.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-cast.ll Mon Nov 28 23:37:58 2011 @@ -16,7 +16,7 @@ ret <4 x double> %shuffle.i } -; CHECK: vpxor +; CHECK: vxorps ; CHECK-NEXT: vinsertf128 $0 define <4 x i64> @castC(<2 x i64> %m) nounwind uwtable readnone ssp { entry: Modified: llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-intrinsics-x86.ll Mon Nov 28 23:37:58 2011 @@ -2140,7 +2140,8 @@ define void @test_x86_avx_storeu_dq_256(i8* %a0, <32 x i8> %a1) { - ; CHECK: vmovdqu + ; FIXME: unfortunately the execution domain fix pass changes this to vmovups and its hard to force with no 256-bit integer instructions + ; CHECK: vmovups ; add operation forces the execution domain. %a2 = add <32 x i8> %a1, call void @llvm.x86.avx.storeu.dq.256(i8* %a0, <32 x i8> %a2) Modified: llvm/trunk/test/CodeGen/X86/avx-splat.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-splat.ll?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-splat.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-splat.ll Mon Nov 28 23:37:58 2011 @@ -47,7 +47,7 @@ ; shuffle (scalar_to_vector (load (ptr + 4))), undef, <0, 0, 0, 0> ; To: ; shuffle (vload ptr)), undef, <1, 1, 1, 1> -; CHECK: vmovdqa +; CHECK: vmovaps ; CHECK-NEXT: vinsertf128 $1 ; CHECK-NEXT: vpermilps $-1 define <8 x float> @funcE() nounwind { Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=145376&r1=145375&r2=145376&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Mon Nov 28 23:37:58 2011 @@ -1046,3 +1046,13 @@ ret <8 x i32> %res } declare <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32>, <8 x i32>) nounwind readnone + +; This is checked here because the execution dependency fix pass makes it hard to test in AVX mode since we don't have 256-bit integer instructions +define void @test_x86_avx_storeu_dq_256(i8* %a0, <32 x i8> %a1) { + ; CHECK: vmovdqu + ; add operation forces the execution domain. + %a2 = add <32 x i8> %a1, + call void @llvm.x86.avx.storeu.dq.256(i8* %a0, <32 x i8> %a2) + ret void +} +declare void @llvm.x86.avx.storeu.dq.256(i8*, <32 x i8>) nounwind From bob.wilson at apple.com Tue Nov 29 00:11:56 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 29 Nov 2011 06:11:56 -0000 Subject: [llvm-commits] [llvm] r145378 - /llvm/trunk/utils/buildit/GNUmakefile Message-ID: <20111129061156.9B1332A6C12C@llvm.org> Author: bwilson Date: Tue Nov 29 00:11:56 2011 New Revision: 145378 URL: http://llvm.org/viewvc/llvm-project?rev=145378&view=rev Log: Install llvmCore to /usr/local. Modified: llvm/trunk/utils/buildit/GNUmakefile Modified: llvm/trunk/utils/buildit/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=145378&r1=145377&r2=145378&view=diff ============================================================================== --- llvm/trunk/utils/buildit/GNUmakefile (original) +++ llvm/trunk/utils/buildit/GNUmakefile Tue Nov 29 00:11:56 2011 @@ -32,7 +32,7 @@ ####################################################################### -PREFIX = /Developer/usr/local +PREFIX = /usr/local # Unless assertions are forced on in the GMAKE command line, disable them. ifndef ENABLE_ASSERTIONS From geek4civic at gmail.com Tue Nov 29 00:40:51 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Tue, 29 Nov 2011 06:40:51 -0000 Subject: [llvm-commits] [llvm] r145381 - /llvm/trunk/utils/lit/lit/TestRunner.py Message-ID: <20111129064051.2F06F2A6C12C@llvm.org> Author: chapuni Date: Tue Nov 29 00:40:50 2011 New Revision: 145381 URL: http://llvm.org/viewvc/llvm-project?rev=145381&view=rev Log: lit/TestRunner.py: Try to catch ERROR_FILE_NOT_FOUND, too. Thanks to Francois, to let me know. Modified: llvm/trunk/utils/lit/lit/TestRunner.py Modified: llvm/trunk/utils/lit/lit/TestRunner.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=145381&r1=145380&r2=145381&view=diff ============================================================================== --- llvm/trunk/utils/lit/lit/TestRunner.py (original) +++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Nov 29 00:40:50 2011 @@ -53,7 +53,9 @@ WinRename(f, t) # rename WinRename(t, f) # restore except WindowsError, (winerror, strerror): - if winerror == 3: # ERROR_PATH_NOT_FOUND + if winerror in (2, 3): + # 2: ERROR_FILE_NOT_FOUND + # 3: ERROR_PATH_NOT_FOUND pass else: raise From bigcheesegs at gmail.com Tue Nov 29 01:42:46 2011 From: bigcheesegs at gmail.com (Michael Spencer) Date: Mon, 28 Nov 2011 23:42:46 -0800 Subject: [llvm-commits] [PATCH] MC: Allow quotes in names when targeting MS/Windows. Message-ID: The attached patch allows quotes in names when targeting MS/Windows. This cannot be enabled for all Windows targets as GNU/Windows's assembler doesn't support it. This fixes clang's Microsoft C++ mangling output when targeting win32. Previously it would mangle the '?' to _3F_. In the future MCCoffAsmInfo will really need to be split for Microsoft and GNU, as quite a few options differ. - Michael Spencer -------------- next part -------------- A non-text attachment was scrubbed... Name: allow-quotes.patch Type: application/octet-stream Size: 1292 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111128/e336634a/attachment.obj From geek4civic at gmail.com Tue Nov 29 01:47:04 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Tue, 29 Nov 2011 07:47:04 -0000 Subject: [llvm-commits] [llvm] r145389 - in /llvm/trunk/lib/Support/Windows: Program.inc Signals.inc Message-ID: <20111129074704.E1FB22A6C124@llvm.org> Author: chapuni Date: Tue Nov 29 01:47:04 2011 New Revision: 145389 URL: http://llvm.org/viewvc/llvm-project?rev=145389&view=rev Log: [Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver. clang/lib/Driver/Driver.cpp: Don't pass through negative exit status, or parent would be confused. llvm::sys::Program::Wait(): Suppose 0x8000XXXX and 0xC000XXXX as abnormal exit code and pass it as negative value. Win32 Exception Handler: Exit with ExceptionCode on an unhandle exception. Modified: llvm/trunk/lib/Support/Windows/Program.inc llvm/trunk/lib/Support/Windows/Signals.inc Modified: llvm/trunk/lib/Support/Windows/Program.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Program.inc?rev=145389&r1=145388&r2=145389&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Program.inc (original) +++ llvm/trunk/lib/Support/Windows/Program.inc Tue Nov 29 01:47:04 2011 @@ -367,7 +367,17 @@ return -2; } - return status & 0377; + if (!status) + return 0; + + // Pass 10(Warning) and 11(Error) to the callee as negative value. + if ((status & 0xBFFF0000U) == 0x80000000U) + return (int)status; + + if (status & 0xFF) + return status & 0x7FFFFFFF; + + return 1; } bool Modified: llvm/trunk/lib/Support/Windows/Signals.inc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.inc?rev=145389&r1=145388&r2=145389&view=diff ============================================================================== --- llvm/trunk/lib/Support/Windows/Signals.inc (original) +++ llvm/trunk/lib/Support/Windows/Signals.inc Tue Nov 29 01:47:04 2011 @@ -446,7 +446,7 @@ } if (ExitOnUnhandledExceptions) - _exit(-3); + _exit(ep->ExceptionRecord->ExceptionCode); // Allow dialog box to pop up allowing choice to start debugger. if (OldFilter) From craig.topper at gmail.com Tue Nov 29 01:49:05 2011 From: craig.topper at gmail.com (Craig Topper) Date: Tue, 29 Nov 2011 07:49:05 -0000 Subject: [llvm-commits] [llvm] r145390 - in /llvm/trunk: lib/Target/X86/InstPrinter/X86InstComments.cpp lib/Target/X86/Utils/X86ShuffleDecode.cpp lib/Target/X86/Utils/X86ShuffleDecode.h lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx-vpermil.ll Message-ID: <20111129074905.804102A6C12C@llvm.org> Author: ctopper Date: Tue Nov 29 01:49:05 2011 New Revision: 145390 URL: http://llvm.org/viewvc/llvm-project?rev=145390&view=rev Log: Fix issues in shuffle decoding around VPERM* instructions. Fix shuffle decoding for VSHUFPS/D for 256-bit types. Add pattern matching for memory forms of VPERMILPS/VPERMILPD. Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.cpp llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.h llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/avx-vpermil.ll Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp (original) +++ llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp Tue Nov 29 01:49:05 2011 @@ -163,14 +163,22 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::SHUFPDrmi: - DecodeSHUFPSMask(2, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask); Src1Name = getRegName(MI->getOperand(0).getReg()); break; case X86::VSHUFPDrri: Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPDrmi: - DecodeSHUFPSMask(2, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask); + Src1Name = getRegName(MI->getOperand(1).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); + break; + case X86::VSHUFPDYrri: + Src2Name = getRegName(MI->getOperand(2).getReg()); + // FALL THROUGH. + case X86::VSHUFPDYrmi: + DecodeSHUFPMask(MVT::v4f64, MI->getOperand(3).getImm(), ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; @@ -179,14 +187,22 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::SHUFPSrmi: - DecodeSHUFPSMask(4, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask); Src1Name = getRegName(MI->getOperand(0).getReg()); break; case X86::VSHUFPSrri: Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPSrmi: - DecodeSHUFPSMask(4, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask); + Src1Name = getRegName(MI->getOperand(1).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); + break; + case X86::VSHUFPSYrri: + Src2Name = getRegName(MI->getOperand(2).getReg()); + // FALL THROUGH. + case X86::VSHUFPSYrmi: + DecodeSHUFPMask(MVT::v8f32, MI->getOperand(3).getImm(), ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; @@ -284,29 +300,47 @@ DestName = getRegName(MI->getOperand(0).getReg()); break; case X86::VPERMILPSri: - DecodeVPERMILPSMask(4, MI->getOperand(2).getImm(), + Src1Name = getRegName(MI->getOperand(1).getReg()); + // FALL THROUGH. + case X86::VPERMILPSmi: + DecodeVPERMILPSMask(4, MI->getOperand(MI->getNumOperands()-1).getImm(), ShuffleMask); - Src1Name = getRegName(MI->getOperand(0).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); break; case X86::VPERMILPSYri: - DecodeVPERMILPSMask(8, MI->getOperand(2).getImm(), + Src1Name = getRegName(MI->getOperand(1).getReg()); + // FALL THROUGH. + case X86::VPERMILPSYmi: + DecodeVPERMILPSMask(8, MI->getOperand(MI->getNumOperands()-1).getImm(), ShuffleMask); - Src1Name = getRegName(MI->getOperand(0).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); break; case X86::VPERMILPDri: - DecodeVPERMILPDMask(2, MI->getOperand(2).getImm(), + Src1Name = getRegName(MI->getOperand(1).getReg()); + // FALL THROUGH. + case X86::VPERMILPDmi: + DecodeVPERMILPDMask(2, MI->getOperand(MI->getNumOperands()-1).getImm(), ShuffleMask); - Src1Name = getRegName(MI->getOperand(0).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); break; case X86::VPERMILPDYri: - DecodeVPERMILPDMask(4, MI->getOperand(2).getImm(), + Src1Name = getRegName(MI->getOperand(1).getReg()); + // FALL THROUGH. + case X86::VPERMILPDYmi: + DecodeVPERMILPDMask(4, MI->getOperand(MI->getNumOperands()-1).getImm(), ShuffleMask); - Src1Name = getRegName(MI->getOperand(0).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); break; case X86::VPERM2F128rr: - DecodeVPERM2F128Mask(MI->getOperand(3).getImm(), ShuffleMask); - Src1Name = getRegName(MI->getOperand(1).getReg()); + case X86::VPERM2I128rr: Src2Name = getRegName(MI->getOperand(2).getReg()); + // FALL THROUGH. + case X86::VPERM2F128rm: + case X86::VPERM2I128rm: + DecodeVPERM2F128Mask(MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); + Src1Name = getRegName(MI->getOperand(1).getReg()); + DestName = getRegName(MI->getOperand(0).getReg()); break; } Modified: llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.cpp?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.cpp (original) +++ llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.cpp Tue Nov 29 01:49:05 2011 @@ -128,17 +128,27 @@ } } -void DecodeSHUFPSMask(unsigned NElts, unsigned Imm, - SmallVectorImpl &ShuffleMask) { - // Part that reads from dest. - for (unsigned i = 0; i != NElts/2; ++i) { - ShuffleMask.push_back(Imm % NElts); - Imm /= NElts; - } - // Part that reads from src. - for (unsigned i = 0; i != NElts/2; ++i) { - ShuffleMask.push_back(Imm % NElts + NElts); - Imm /= NElts; +void DecodeSHUFPMask(EVT VT, unsigned Imm, + SmallVectorImpl &ShuffleMask) { + unsigned NumElts = VT.getVectorNumElements(); + + unsigned NumLanes = VT.getSizeInBits() / 128; + unsigned NumLaneElts = NumElts / NumLanes; + + int NewImm = Imm; + for (unsigned l = 0; l < NumLanes; ++l) { + unsigned LaneStart = l * NumLaneElts; + // Part that reads from dest. + for (unsigned i = 0; i != NumLaneElts/2; ++i) { + ShuffleMask.push_back(NewImm % NumLaneElts + LaneStart); + NewImm /= NumLaneElts; + } + // Part that reads from src. + for (unsigned i = 0; i != NumLaneElts/2; ++i) { + ShuffleMask.push_back(NewImm % NumLaneElts + NumElts + LaneStart); + NewImm /= NumLaneElts; + } + if (NumLaneElts == 4) NewImm = Imm; // reload imm } } Modified: llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.h?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.h (original) +++ llvm/trunk/lib/Target/X86/Utils/X86ShuffleDecode.h Tue Nov 29 01:49:05 2011 @@ -64,8 +64,8 @@ void DecodePUNPCKHMask(unsigned NElts, SmallVectorImpl &ShuffleMask); -void DecodeSHUFPSMask(unsigned NElts, unsigned Imm, - SmallVectorImpl &ShuffleMask); +void DecodeSHUFPMask(EVT VT, unsigned Imm, + SmallVectorImpl &ShuffleMask); /// DecodeUNPCKHPMask - This decodes the shuffle masks for unpckhps/unpckhpd /// etc. VT indicates the type of the vector allowing it to handle different Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Nov 29 01:49:05 2011 @@ -4567,9 +4567,8 @@ case X86ISD::SHUFPS: case X86ISD::SHUFPD: ImmN = N->getOperand(N->getNumOperands()-1); - DecodeSHUFPSMask(NumElems, - cast(ImmN)->getZExtValue(), - ShuffleMask); + DecodeSHUFPMask(VT, cast(ImmN)->getZExtValue(), + ShuffleMask); break; case X86ISD::PUNPCKH: DecodePUNPCKHMask(NumElems, ShuffleMask); Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Nov 29 01:49:05 2011 @@ -7332,6 +7332,15 @@ (VPERMILPSYri VR256:$src1, imm:$imm)>; def : Pat<(v4i64 (X86VPermilpd VR256:$src1, (i8 imm:$imm))), (VPERMILPDYri VR256:$src1, imm:$imm)>; +def : Pat<(v8f32 (X86VPermilps (memopv8f32 addr:$src1), (i8 imm:$imm))), + (VPERMILPSYmi addr:$src1, imm:$imm)>; +def : Pat<(v4f64 (X86VPermilpd (memopv4f64 addr:$src1), (i8 imm:$imm))), + (VPERMILPDYmi addr:$src1, imm:$imm)>; +def : Pat<(v8i32 (X86VPermilps (bc_v8i32 (memopv4i64 addr:$src1)), + (i8 imm:$imm))), + (VPERMILPSYmi addr:$src1, imm:$imm)>; +def : Pat<(v4i64 (X86VPermilpd (memopv4i64 addr:$src1), (i8 imm:$imm))), + (VPERMILPDYmi addr:$src1, imm:$imm)>; //===----------------------------------------------------------------------===// // VPERM2F128 - Permute Floating-Point Values in 128-bit chunks Modified: llvm/trunk/test/CodeGen/X86/avx-vpermil.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-vpermil.ll?rev=145390&r1=145389&r2=145390&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-vpermil.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-vpermil.ll Tue Nov 29 01:49:05 2011 @@ -28,6 +28,14 @@ ret <4 x i64> %shuffle } +; CHECK: vpermilpd +define <4 x i64> @funcQ(<4 x i64>* %a) nounwind uwtable readnone ssp { +entry: + %a2 = load <4 x i64>* %a + %shuffle = shufflevector <4 x i64> %a2, <4 x i64> undef, <4 x i32> + ret <4 x i64> %shuffle +} + ; vpermil should match masks like this: . Check that the ; target specific mask was correctly generated. ; CHECK: vpermilps $-100 From craig.topper at gmail.com Tue Nov 29 01:58:09 2011 From: craig.topper at gmail.com (Craig Topper) Date: Tue, 29 Nov 2011 07:58:09 -0000 Subject: [llvm-commits] [llvm] r145392 - in /llvm/trunk: lib/Target/X86/InstPrinter/X86InstComments.cpp test/CodeGen/X86/avx-vshufp.ll Message-ID: <20111129075810.17C2D2A6C12C@llvm.org> Author: ctopper Date: Tue Nov 29 01:58:09 2011 New Revision: 145392 URL: http://llvm.org/viewvc/llvm-project?rev=145392&view=rev Log: Fix shuffle decoding for memory forms for (V)SHUFPS/D. Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp llvm/trunk/test/CodeGen/X86/avx-vshufp.ll Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp?rev=145392&r1=145391&r2=145392&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp (original) +++ llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.cpp Tue Nov 29 01:58:09 2011 @@ -163,14 +163,16 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::SHUFPDrmi: - DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v2f64, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(0).getReg()); break; case X86::VSHUFPDrri: Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPDrmi: - DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v2f64, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; @@ -178,7 +180,8 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPDYrmi: - DecodeSHUFPMask(MVT::v4f64, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v4f64, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; @@ -187,14 +190,16 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::SHUFPSrmi: - DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v4f32, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(0).getReg()); break; case X86::VSHUFPSrri: Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPSrmi: - DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v4f32, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; @@ -202,7 +207,8 @@ Src2Name = getRegName(MI->getOperand(2).getReg()); // FALL THROUGH. case X86::VSHUFPSYrmi: - DecodeSHUFPMask(MVT::v8f32, MI->getOperand(3).getImm(), ShuffleMask); + DecodeSHUFPMask(MVT::v8f32, MI->getOperand(MI->getNumOperands()-1).getImm(), + ShuffleMask); Src1Name = getRegName(MI->getOperand(1).getReg()); DestName = getRegName(MI->getOperand(0).getReg()); break; Modified: llvm/trunk/test/CodeGen/X86/avx-vshufp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-vshufp.ll?rev=145392&r1=145391&r2=145392&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/avx-vshufp.ll (original) +++ llvm/trunk/test/CodeGen/X86/avx-vshufp.ll Tue Nov 29 01:58:09 2011 @@ -7,6 +7,15 @@ ret <8 x float> %shuffle } +; CHECK: vshufps $-53, (% +define <8 x float> @A2(<8 x float>* %a, <8 x float>* %b) nounwind uwtable readnone ssp { +entry: + %a2 = load <8 x float>* %a + %b2 = load <8 x float>* %b + %shuffle = shufflevector <8 x float> %a2, <8 x float> %b2, <8 x i32> + ret <8 x float> %shuffle +} + ; CHECK: vshufpd $10, %ymm define <4 x double> @B(<4 x double> %a, <4 x double> %b) nounwind uwtable readnone ssp { entry: @@ -14,6 +23,15 @@ ret <4 x double> %shuffle } +; CHECK: vshufpd $10, (% +define <4 x double> @B2(<4 x double>* %a, <4 x double>* %b) nounwind uwtable readnone ssp { +entry: + %a2 = load <4 x double>* %a + %b2 = load <4 x double>* %b + %shuffle = shufflevector <4 x double> %a2, <4 x double> %b2, <4 x i32> + ret <4 x double> %shuffle +} + ; CHECK: vshufps $-53, %ymm define <8 x float> @C(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: From baldrick at free.fr Tue Nov 29 03:09:36 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 29 Nov 2011 10:09:36 +0100 Subject: [llvm-commits] [llvm] r145304 - in /llvm/trunk: lib/Analysis/ValueTracking.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/Transforms/InstCombine/constant-fold-gep.ll In-Reply-To: <20111128224822.C87282A6C12C@llvm.org> References: <20111128224822.C87282A6C12C@llvm.org> Message-ID: <4ED4A150.5020606@free.fr> Hi Eli, > --- llvm/trunk/lib/Analysis/ValueTracking.cpp (original) > +++ llvm/trunk/lib/Analysis/ValueTracking.cpp Mon Nov 28 16:48:22 2011 > @@ -103,14 +103,16 @@ > if (GlobalValue *GV = dyn_cast(V)) { > unsigned Align = GV->getAlignment(); > if (Align == 0&& TD&& GV->getType()->getElementType()->isSized()) { > - Type *ObjectType = GV->getType()->getElementType(); > - // If the object is defined in the current Module, we'll be giving > - // it the preferred alignment. Otherwise, we have to assume that it > - // may only have the minimum ABI alignment. > - if (!GV->isDeclaration()&& !GV->mayBeOverridden()) > - Align = TD->getPrefTypeAlignment(ObjectType); > - else > - Align = TD->getABITypeAlignment(ObjectType); > + if (GlobalVariable *GVar = dyn_cast(GV)) { > + Type *ObjectType = GVar->getType()->getElementType(); > + // If the object is defined in the current Module, we'll be giving > + // it the preferred alignment. Otherwise, we have to assume that it > + // may only have the minimum ABI alignment. > + if (!GVar->isDeclaration()&& !GVar->mayBeOverridden()) I think this should use isWeakForLinker rather than mayBeOverridden. That's because if a copy in another translation is compiled using a different compiler then there's no reason to think it will use anything more than the ABI alignment. Doing so wouldn't (for example) violate the ODR. If anything, it would be LLVM that is violating the ODR by bumping up the alignment of globals. Ciao, Duncan. > + Align = TD->getPreferredAlignment(GVar); > + else > + Align = TD->getABITypeAlignment(ObjectType); > + } > } > if (Align> 0) > KnownZero = Mask& APInt::getLowBitsSet(BitWidth, From baldrick at free.fr Tue Nov 29 03:37:13 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 29 Nov 2011 10:37:13 +0100 Subject: [llvm-commits] Updated pointer-vector patch In-Reply-To: References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com> Message-ID: <4ED4A7C9.7000506@free.fr> Hi Nick, > To elaborate, the comment was that the only pointer types we should > allow are those which would let us load the vector and produce a legal > vector type. presumably i8** would be a valid vector element type. This means that vector GEP may need more than one index. Ciao, Duncan. From nadav.rotem at intel.com Tue Nov 29 03:46:10 2011 From: nadav.rotem at intel.com (Rotem, Nadav) Date: Tue, 29 Nov 2011 11:46:10 +0200 Subject: [llvm-commits] Updated pointer-vector patch In-Reply-To: <4ED4A7C9.7000506@free.fr> References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com> <4ED4A7C9.7000506@free.fr> Message-ID: <6594DDFF12B03D4E89690887C248699402A69EA755@hasmsx504.ger.corp.intel.com> Hi Duncan, Nick, At this point I am happy with the restriction of having one GEP index, simply because implementing multiple indices would take longer. In the next future I intend to add support for multiple indices. Thanks, Nadav -----Original Message----- From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Duncan Sands Sent: Tuesday, November 29, 2011 11:37 To: llvm-commits at cs.uiuc.edu Subject: Re: [llvm-commits] Updated pointer-vector patch Hi Nick, > To elaborate, the comment was that the only pointer types we should > allow are those which would let us load the vector and produce a legal > vector type. presumably i8** would be a valid vector element type. This means that vector GEP may need more than one index. Ciao, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From eugeni.stepanov at gmail.com Tue Nov 29 05:41:31 2011 From: eugeni.stepanov at gmail.com (Evgeniy Stepanov) Date: Tue, 29 Nov 2011 15:41:31 +0400 Subject: [llvm-commits] Fix constructor order on ARM/ELF In-Reply-To: References: Message-ID: Ping. Wrong ML? On Thu, Nov 24, 2011 at 4:46 PM, Evgeniy Stepanov wrote: > This patch fixes PR11322. Current LLVM executes module constructors in > reverse priority order because of a mix-up between .ctors and > .init_array semantics. > It also does a little bit of refactoring by moving StructorOutputOrder > field from MCAsmInfo to MCObjectFileInfo so that it can depend on the > ABI. > > Please review. > From grosser at fim.uni-passau.de Tue Nov 29 08:50:47 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Tue, 29 Nov 2011 14:50:47 -0000 Subject: [llvm-commits] [polly] r145400 - /polly/trunk/test/CMakeLists.txt Message-ID: <20111129145047.C34D11BE001@llvm.org> Author: grosser Date: Tue Nov 29 08:50:47 2011 New Revision: 145400 URL: http://llvm.org/viewvc/llvm-project?rev=145400&view=rev Log: test: Add more dependences to cmake build Modified: polly/trunk/test/CMakeLists.txt Modified: polly/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CMakeLists.txt?rev=145400&r1=145399&r2=145400&view=diff ============================================================================== --- polly/trunk/test/CMakeLists.txt (original) +++ polly/trunk/test/CMakeLists.txt Tue Nov 29 08:50:47 2011 @@ -23,7 +23,7 @@ set(LLVM_LIBS_DIR "${LLVM_INSTALL_ROOT}/lib") else (NOT DEFINED LLVM_MAIN_SRC_DIR) set(LLVM_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit) - set(POLLY_TEST_DEPS opt lli LLVMPolly) + set(POLLY_TEST_DEPS opt lli LLVMPolly FileCheck not) set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}") set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/") From grosser at fim.uni-passau.de Tue Nov 29 08:50:53 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Tue, 29 Nov 2011 14:50:53 -0000 Subject: [llvm-commits] [polly] r145401 - /polly/trunk/utils/jscop2cloog.py Message-ID: <20111129145053.0F8A41BE002@llvm.org> Author: grosser Date: Tue Nov 29 08:50:52 2011 New Revision: 145401 URL: http://llvm.org/viewvc/llvm-project?rev=145401&view=rev Log: Add utils/jscop2cloog.py This tool takes a jscop file and translates it into a cloog input file. Added: polly/trunk/utils/jscop2cloog.py (with props) Added: polly/trunk/utils/jscop2cloog.py URL: http://llvm.org/viewvc/llvm-project/polly/trunk/utils/jscop2cloog.py?rev=145401&view=auto ============================================================================== --- polly/trunk/utils/jscop2cloog.py (added) +++ polly/trunk/utils/jscop2cloog.py Tue Nov 29 08:50:52 2011 @@ -0,0 +1,68 @@ +#!/usr/bin/python +import argparse, os +import json + +def getDomains(scop): + statements = scop['statements']; + numStatements = len(statements) + + output = "%s\n\n" % str(numStatements) + + for statement in scop['statements']: + output += "%s\n\n" % statement['domain'] + output += "0 0 0 # for future options\n\n" + + + return output + +def getSchedules(scop): + statements = scop['statements']; + numStatements = len(statements) + + output = "%s\n\n" % str(numStatements) + + for statement in scop['statements']: + output += "%s\n\n" % statement['schedule'] + + return output + +def writeCloog(scop): + template = """ +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context (no constraints on two parameters) +%s + +0 # We do not want to set manually the parameter names + +# --------------------- STATEMENTS -------------------- +%s + +0 # We do not want to set manually the iterator names + +# --------------------- SCATTERING -------------------- +%s + +0 # We do not want to set manually the scattering dimension names +""" + + context = scop['context'] + domains = getDomains(scop) + schedules = getSchedules(scop) + print template % (context, domains, schedules) + +def __main__(): + description = 'Translate JSCoP into iscc input' + parser = argparse.ArgumentParser(description) + parser.add_argument('inputFile', metavar='N', type=file, + help='The JSCoP file') + + args = parser.parse_args() + inputFile = args.inputFile + scop = json.load(inputFile) + + writeCloog(scop) + +__main__() + Propchange: polly/trunk/utils/jscop2cloog.py ------------------------------------------------------------------------------ svn:executable = * From grosser at fim.uni-passau.de Tue Nov 29 08:51:05 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Tue, 29 Nov 2011 14:51:05 -0000 Subject: [llvm-commits] [polly] r145402 - /polly/trunk/test/CodeGen/ Message-ID: <20111129145106.7A1261BE001@llvm.org> Author: grosser Date: Tue Nov 29 08:51:05 2011 New Revision: 145402 URL: http://llvm.org/viewvc/llvm-project?rev=145402&view=rev Log: test: Switch to new atomic instructions This fixes the test with recent versions of LLVM that do not support the old atomic instructions any more. Modified: polly/trunk/test/CodeGen/20100720-MultipleConditions.ll polly/trunk/test/CodeGen/constant_condition.ll polly/trunk/test/CodeGen/do_pluto_matmult.ll polly/trunk/test/CodeGen/loop_with_condition.ll polly/trunk/test/CodeGen/loop_with_condition_2.ll polly/trunk/test/CodeGen/loop_with_condition_ineq.ll polly/trunk/test/CodeGen/loop_with_condition_nested.ll polly/trunk/test/CodeGen/pluto_matmult.ll polly/trunk/test/CodeGen/reduction.ll polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.c polly/trunk/test/CodeGen/single_do_loop_int_max_iterations.ll polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.c polly/trunk/test/CodeGen/single_do_loop_int_param_iterations.ll polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.c polly/trunk/test/CodeGen/single_do_loop_ll_max_iterations.ll polly/trunk/test/CodeGen/single_do_loop_one_iteration.ll polly/trunk/test/CodeGen/single_do_loop_scev_replace.c polly/trunk/test/CodeGen/single_do_loop_scev_replace.ll polly/trunk/test/CodeGen/single_loop_int_max_iterations.ll polly/trunk/test/CodeGen/single_loop_ll_max_iterations.ll polly/trunk/test/CodeGen/single_loop_one_iteration.ll polly/trunk/test/CodeGen/single_loop_param.ll polly/trunk/test/CodeGen/single_loop_uint_max_iterations.ll polly/trunk/test/CodeGen/single_loop_ull_max_iterations.ll polly/trunk/test/CodeGen/single_loop_zero_iterations.ll polly/trunk/test/CodeGen/split_edges.ll polly/trunk/test/CodeGen/split_edges_2.ll Modified: polly/trunk/test/CodeGen/20100720-MultipleConditions.ll URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CodeGen/20100720-MultipleConditions.ll?rev=145402&r1=145401&r2=145402&view=diff ============================================================================== --- polly/trunk/test/CodeGen/20100720-MultipleConditions.ll (original) +++ polly/trunk/test/CodeGen/20100720-MultipleConditions.ll Tue Nov 29 08:51:05 2011 @@ -8,7 +8,7 @@ define i32 @main() nounwind { ;
    • -
    • Results -
        -
      1. Go on LLVM
      2. -
      3. Runtime ABI
      4. -
      -
    • Introduction

      - Segmented stack allows stack space to be allocated incrementally than as a monolithic chunk (of some worst case size) at thread initialization. This is done by allocating stack blocks (henceforth called stacklets) and linking them into a doubly linked list. The function prologue is responsible for checking if the current stacklet has enough space for the function to execute; and if not, call into the libgcc runtime to allocate more stack space. Support for segmented stacks on x86 / Linux is currently being worked on. + Segmented stack allows stack space to be allocated incrementally than as a monolithic chunk (of some worst case size) at thread initialization. This is done by allocating stack blocks (henceforth called stacklets) and linking them into a doubly linked list. The function prologue is responsible for checking if the current stacklet has enough space for the function to execute; and if not, call into the libgcc runtime to allocate more stack space. When using llc, segmented stacks can be enabled by adding -segmented-stacks to the command line.

      The runtime functionality is already there in libgcc. From benny.kra at googlemail.com Tue Nov 29 13:24:11 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Tue, 29 Nov 2011 19:24:11 -0000 Subject: [llvm-commits] [llvm] r145419 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111129192411.AF4321BE001@llvm.org> Author: d0k Date: Tue Nov 29 13:24:11 2011 New Revision: 145419 URL: http://llvm.org/viewvc/llvm-project?rev=145419&view=rev Log: Add a link to Bill's blog post. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145419&r1=145418&r2=145419&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Nov 29 13:24:11 2011 @@ -779,8 +779,9 @@

    • The LLVM IR exception handling representation has been redesigned and reimplemented, making it more elegant, fixing a huge number of bugs, and - enabling inlining and other optimizations. Please see its blog post (XXX - not yet) and the Exception Handling + enabling inlining and other optimizations. Please see its blog + post and the Exception Handling documentation for more information.
    • The LLVM IR Type system has been redesigned and reimplemented, making it faster and solving some long-standing problems. From daniel at zuster.org Tue Nov 29 13:25:31 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 19:25:31 -0000 Subject: [llvm-commits] [llvm] r145420 - in /llvm/trunk: cmake/modules/ lib/Analysis/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/DebugInfo/ lib/ExecutionEngine/ lib/ExecutionEngine/Interpreter/ lib/ExecutionEngine/JIT/ lib/ExecutionEngine/MCJIT/ lib/ExecutionEngine/RuntimeDyld/ lib/Linker/ lib/MC/ lib/MC/MCDisassembler/ lib/MC/MCParser/ lib/Object/ lib/TableGen/ lib/Target/ lib/Target/ARM/ lib/Target/ARM/AsmParser/ lib/... Message-ID: <20111129192532.3F9871BE001@llvm.org> Author: ddunbar Date: Tue Nov 29 13:25:30 2011 New Revision: 145420 URL: http://llvm.org/viewvc/llvm-project?rev=145420&view=rev Log: build/CMake: Finish removal of add_llvm_library_dependencies. Modified: llvm/trunk/cmake/modules/AddLLVM.cmake llvm/trunk/lib/Analysis/CMakeLists.txt llvm/trunk/lib/Analysis/IPA/CMakeLists.txt llvm/trunk/lib/Archive/CMakeLists.txt llvm/trunk/lib/AsmParser/CMakeLists.txt llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt llvm/trunk/lib/Bitcode/Writer/CMakeLists.txt llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt llvm/trunk/lib/CodeGen/CMakeLists.txt llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt llvm/trunk/lib/DebugInfo/CMakeLists.txt llvm/trunk/lib/ExecutionEngine/CMakeLists.txt llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt llvm/trunk/lib/ExecutionEngine/MCJIT/CMakeLists.txt llvm/trunk/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt llvm/trunk/lib/Linker/CMakeLists.txt llvm/trunk/lib/MC/CMakeLists.txt llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt llvm/trunk/lib/MC/MCParser/CMakeLists.txt llvm/trunk/lib/Object/CMakeLists.txt llvm/trunk/lib/TableGen/CMakeLists.txt llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt llvm/trunk/lib/Target/ARM/CMakeLists.txt llvm/trunk/lib/Target/ARM/Disassembler/CMakeLists.txt llvm/trunk/lib/Target/ARM/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/ARM/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/ARM/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/CBackend/CMakeLists.txt llvm/trunk/lib/Target/CBackend/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/CMakeLists.txt llvm/trunk/lib/Target/CellSPU/CMakeLists.txt llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/CellSPU/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/CppBackend/CMakeLists.txt llvm/trunk/lib/Target/CppBackend/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/AsmParser/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/Disassembler/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/MSP430/CMakeLists.txt llvm/trunk/lib/Target/MSP430/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/MSP430/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/Mips/CMakeLists.txt llvm/trunk/lib/Target/Mips/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/Mips/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/PTX/CMakeLists.txt llvm/trunk/lib/Target/PTX/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/PTX/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/Sparc/CMakeLists.txt llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/Sparc/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt llvm/trunk/lib/Target/X86/CMakeLists.txt llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt llvm/trunk/lib/Target/X86/InstPrinter/CMakeLists.txt llvm/trunk/lib/Target/X86/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/X86/TargetInfo/CMakeLists.txt llvm/trunk/lib/Target/X86/Utils/CMakeLists.txt llvm/trunk/lib/Target/XCore/CMakeLists.txt llvm/trunk/lib/Target/XCore/MCTargetDesc/CMakeLists.txt llvm/trunk/lib/Target/XCore/TargetInfo/CMakeLists.txt llvm/trunk/lib/Transforms/IPO/CMakeLists.txt llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt llvm/trunk/lib/Transforms/Utils/CMakeLists.txt llvm/trunk/lib/VMCore/CMakeLists.txt llvm/trunk/utils/unittest/CMakeLists.txt Modified: llvm/trunk/cmake/modules/AddLLVM.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/cmake/modules/AddLLVM.cmake (original) +++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Nov 29 13:25:30 2011 @@ -35,9 +35,6 @@ target_link_libraries(${name} ${lib_deps}) endmacro(add_llvm_library name) -macro(add_llvm_library_dependencies name) -endmacro(add_llvm_library_dependencies name) - macro(add_llvm_loadable_module name) if( NOT LLVM_ON_UNIX OR CYGWIN ) message(STATUS "Loadable modules not supported on this platform. Modified: llvm/trunk/lib/Analysis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/CMakeLists.txt (original) +++ llvm/trunk/lib/Analysis/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -58,10 +58,4 @@ ValueTracking.cpp ) -add_llvm_library_dependencies(LLVMAnalysis - LLVMCore - LLVMSupport - LLVMTarget - ) - add_subdirectory(IPA) Modified: llvm/trunk/lib/Analysis/IPA/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CMakeLists.txt (original) +++ llvm/trunk/lib/Analysis/IPA/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,9 +5,3 @@ GlobalsModRef.cpp IPA.cpp ) - -add_llvm_library_dependencies(LLVMipa - LLVMAnalysis - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/Archive/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Archive/CMakeLists.txt (original) +++ llvm/trunk/lib/Archive/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,9 +3,3 @@ ArchiveReader.cpp ArchiveWriter.cpp ) - -add_llvm_library_dependencies(LLVMArchive - LLVMBitReader - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/AsmParser/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/CMakeLists.txt (original) +++ llvm/trunk/lib/AsmParser/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,8 +4,3 @@ LLParser.cpp Parser.cpp ) - -add_llvm_library_dependencies(LLVMAsmParser - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt (original) +++ llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -2,8 +2,3 @@ BitReader.cpp BitcodeReader.cpp ) - -add_llvm_library_dependencies(LLVMBitReader - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/Bitcode/Writer/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/CMakeLists.txt (original) +++ llvm/trunk/lib/Bitcode/Writer/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,8 +4,3 @@ BitcodeWriterPass.cpp ValueEnumerator.cpp ) - -add_llvm_library_dependencies(LLVMBitWriter - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -12,13 +12,3 @@ OcamlGCPrinter.cpp Win64Exception.cpp ) - -add_llvm_library_dependencies(LLVMAsmPrinter - LLVMAnalysis - LLVMCodeGen - LLVMCore - LLVMMC - LLVMMCParser - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -99,15 +99,5 @@ VirtRegMap.cpp ) -add_llvm_library_dependencies(LLVMCodeGen - LLVMAnalysis - LLVMCore - LLVMMC - LLVMScalarOpts - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) - add_subdirectory(SelectionDAG) add_subdirectory(AsmPrinter) Modified: llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -20,13 +20,3 @@ TargetLowering.cpp TargetSelectionDAGInfo.cpp ) - -add_llvm_library_dependencies(LLVMSelectionDAG - LLVMAnalysis - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) Modified: llvm/trunk/lib/DebugInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/DebugInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/DebugInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -10,7 +10,3 @@ DWARFDebugLine.cpp DWARFFormValue.cpp ) - -add_llvm_library_dependencies(LLVMDebugInfo - LLVMSupport - ) Modified: llvm/trunk/lib/ExecutionEngine/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/CMakeLists.txt (original) +++ llvm/trunk/lib/ExecutionEngine/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,13 +4,6 @@ TargetSelect.cpp ) -add_llvm_library_dependencies(LLVMExecutionEngine - LLVMCore - LLVMMC - LLVMSupport - LLVMTarget - ) - add_subdirectory(Interpreter) add_subdirectory(JIT) add_subdirectory(MCJIT) Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt (original) +++ llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -12,14 +12,6 @@ Interpreter.cpp ) -add_llvm_library_dependencies(LLVMInterpreter - LLVMCodeGen - LLVMCore - LLVMExecutionEngine - LLVMSupport - LLVMTarget - ) - if( LLVM_ENABLE_FFI ) target_link_libraries( LLVMInterpreter ${FFI_LIBRARY_PATH} ) endif() Modified: llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -10,13 +10,3 @@ JITMemoryManager.cpp OProfileJITEventListener.cpp ) - -add_llvm_library_dependencies(LLVMJIT - LLVMCodeGen - LLVMCore - LLVMExecutionEngine - LLVMMC - LLVMRuntimeDyld - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/CMakeLists.txt (original) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -2,11 +2,3 @@ MCJIT.cpp Intercept.cpp ) - -add_llvm_library_dependencies(LLVMMCJIT - LLVMCore - LLVMExecutionEngine - LLVMRuntimeDyld - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -2,8 +2,3 @@ RuntimeDyld.cpp RuntimeDyldMachO.cpp ) - -add_llvm_library_dependencies(LLVMRuntimeDyld - LLVMObject - LLVMSupport - ) Modified: llvm/trunk/lib/Linker/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Linker/CMakeLists.txt (original) +++ llvm/trunk/lib/Linker/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,11 +4,3 @@ LinkModules.cpp Linker.cpp ) - -add_llvm_library_dependencies(LLVMLinker - LLVMArchive - LLVMBitReader - LLVMCore - LLVMSupport - LLVMTransformUtils - ) Modified: llvm/trunk/lib/MC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/MC/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -45,10 +45,5 @@ WinCOFFStreamer.cpp ) -add_llvm_library_dependencies(LLVMMC - LLVMObject - LLVMSupport - ) - add_subdirectory(MCParser) add_subdirectory(MCDisassembler) Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,9 +6,3 @@ EDOperand.cpp EDToken.cpp ) - -add_llvm_library_dependencies(LLVMMCDisassembler - LLVMMC - LLVMMCParser - LLVMSupport - ) Modified: llvm/trunk/lib/MC/MCParser/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCParser/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -9,8 +9,3 @@ MCAsmParserExtension.cpp MCTargetAsmParser.cpp ) - -add_llvm_library_dependencies(LLVMMCParser - LLVMMC - LLVMSupport - ) Modified: llvm/trunk/lib/Object/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Object/CMakeLists.txt (original) +++ llvm/trunk/lib/Object/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -9,8 +9,3 @@ Object.cpp ObjectFile.cpp ) - -add_llvm_library_dependencies(LLVMObject - LLVMCore - LLVMSupport - ) Modified: llvm/trunk/lib/TableGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/TableGen/CMakeLists.txt (original) +++ llvm/trunk/lib/TableGen/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -10,7 +10,3 @@ TGLexer.cpp TGParser.cpp ) - -add_llvm_library_dependencies(LLVMTableGen - LLVMSupport - ) Modified: llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,11 +6,3 @@ ) add_dependencies(LLVMARMAsmParser ARMCommonTableGen) - -add_llvm_library_dependencies(LLVMARMAsmParser - LLVMARMDesc - LLVMARMInfo - LLVMMC - LLVMMCParser - LLVMSupport - ) Modified: llvm/trunk/lib/Target/ARM/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -48,20 +48,6 @@ Thumb2SizeReduction.cpp ) -add_llvm_library_dependencies(LLVMARMCodeGen - LLVMARMAsmPrinter - LLVMARMDesc - LLVMARMInfo - LLVMAnalysis - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - # workaround for hanging compilation on MSVC9, 10 if( MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1500 ) set_property( Modified: llvm/trunk/lib/Target/ARM/Disassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -11,11 +11,3 @@ ) endif() add_dependencies(LLVMARMDisassembler ARMCommonTableGen) - -add_llvm_library_dependencies(LLVMARMDisassembler - LLVMARMCodeGen - LLVMARMDesc - LLVMARMInfo - LLVMMC - LLVMSupport - ) Modified: llvm/trunk/lib/Target/ARM/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,8 +5,3 @@ ) add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen) - -add_llvm_library_dependencies(LLVMARMAsmPrinter - LLVMMC - LLVMSupport - ) Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -10,10 +10,3 @@ # Hack: we need to include 'main' target directory to grab private headers include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) - -add_llvm_library_dependencies(LLVMARMDesc - LLVMARMAsmPrinter - LLVMARMInfo - LLVMMC - LLVMSupport - ) Modified: llvm/trunk/lib/Target/ARM/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,9 +5,3 @@ ) add_dependencies(LLVMARMInfo ARMCommonTableGen) - -add_llvm_library_dependencies(LLVMARMInfo - LLVMMC - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/Target/CBackend/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CBackend/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -2,16 +2,4 @@ CBackend.cpp ) -add_llvm_library_dependencies(LLVMCBackendCodeGen - LLVMAnalysis - LLVMCBackendInfo - LLVMCodeGen - LLVMCore - LLVMMC - LLVMScalarOpts - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) - add_subdirectory(TargetInfo) Modified: llvm/trunk/lib/Target/CBackend/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CBackend/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,9 +3,3 @@ add_llvm_library(LLVMCBackendInfo CBackendTargetInfo.cpp ) - -add_llvm_library_dependencies(LLVMCBackendInfo - LLVMMC - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/Target/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -13,12 +13,6 @@ TargetSubtargetInfo.cpp ) -add_llvm_library_dependencies(LLVMTarget - LLVMCore - LLVMMC - LLVMSupport - ) - foreach(t ${LLVM_TARGETS_TO_BUILD}) message(STATUS "Targeting ${t}") add_subdirectory(${t}) Modified: llvm/trunk/lib/Target/CellSPU/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CellSPU/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -23,17 +23,5 @@ SPUNopFiller.cpp ) -add_llvm_library_dependencies(LLVMCellSPUCodeGen - LLVMAsmPrinter - LLVMCellSPUDesc - LLVMCellSPUInfo - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,9 +3,4 @@ SPUMCAsmInfo.cpp ) -add_llvm_library_dependencies(LLVMCellSPUDesc - LLVMCellSPUInfo - LLVMMC - ) - add_dependencies(LLVMCellSPUDesc CellSPUCommonTableGen) Modified: llvm/trunk/lib/Target/CellSPU/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CellSPU/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ CellSPUTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMCellSPUInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMCellSPUInfo CellSPUCommonTableGen) Modified: llvm/trunk/lib/Target/CppBackend/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CppBackend/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -2,11 +2,4 @@ CPPBackend.cpp ) -add_llvm_library_dependencies(LLVMCppBackendCodeGen - LLVMCore - LLVMCppBackendInfo - LLVMSupport - LLVMTarget - ) - add_subdirectory(TargetInfo) Modified: llvm/trunk/lib/Target/CppBackend/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CppBackend/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,9 +3,3 @@ add_llvm_library(LLVMCppBackendInfo CppBackendTargetInfo.cpp ) - -add_llvm_library_dependencies(LLVMCppBackendInfo - LLVMMC - LLVMSupport - LLVMTarget - ) Modified: llvm/trunk/lib/Target/MBlaze/AsmParser/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmParser/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/AsmParser/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/AsmParser/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,11 +6,4 @@ MBlazeAsmParser.cpp ) -add_llvm_library_dependencies(LLVMMBlazeAsmParser - LLVMMBlazeInfo - LLVMMC - LLVMMCParser - LLVMSupport - ) - add_dependencies(LLVMMBlazeAsmParser MBlazeCommonTableGen) Modified: llvm/trunk/lib/Target/MBlaze/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -29,19 +29,6 @@ MBlazeELFWriterInfo.cpp ) -add_llvm_library_dependencies(LLVMMBlazeCodeGen - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMBlazeAsmPrinter - LLVMMBlazeDesc - LLVMMBlazeInfo - LLVMMC - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - add_subdirectory(AsmParser) add_subdirectory(Disassembler) add_subdirectory(InstPrinter) Modified: llvm/trunk/lib/Target/MBlaze/Disassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/Disassembler/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/Disassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/Disassembler/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -13,11 +13,4 @@ ) endif() -add_llvm_library_dependencies(LLVMMBlazeDisassembler - LLVMMBlazeDesc - LLVMMBlazeInfo - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMMBlazeDisassembler MBlazeCommonTableGen) Modified: llvm/trunk/lib/Target/MBlaze/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,9 +5,4 @@ MBlazeInstPrinter.cpp ) -add_llvm_library_dependencies(LLVMMBlazeAsmPrinter - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMMBlazeAsmPrinter MBlazeCommonTableGen) Modified: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,11 +5,4 @@ MBlazeMCTargetDesc.cpp ) -add_llvm_library_dependencies(LLVMMBlazeDesc - LLVMMBlazeAsmPrinter - LLVMMBlazeInfo - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMMBlazeDesc MBlazeCommonTableGen) Modified: llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MBlaze/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,10 +5,4 @@ MBlazeTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMMBlazeInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMMBlazeInfo MBlazeCommonTableGen) Modified: llvm/trunk/lib/Target/MSP430/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MSP430/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -22,19 +22,6 @@ MSP430MCInstLower.cpp ) -add_llvm_library_dependencies(LLVMMSP430CodeGen - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMMSP430AsmPrinter - LLVMMSP430Desc - LLVMMSP430Info - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/MSP430/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MSP430/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,9 +4,4 @@ MSP430InstPrinter.cpp ) -add_llvm_library_dependencies(LLVMMSP430AsmPrinter - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen) Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,12 +3,4 @@ MSP430MCAsmInfo.cpp ) -add_llvm_library_dependencies(LLVMMSP430Desc - LLVMMC - LLVMMSP430AsmPrinter - LLVMMSP430Info - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMMSP430Desc MSP430CommonTableGen) Modified: llvm/trunk/lib/Target/MSP430/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/MSP430/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ MSP430TargetInfo.cpp ) -add_llvm_library_dependencies(LLVMMSP430Info - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMMSP430Info MSP430CommonTableGen) Modified: llvm/trunk/lib/Target/Mips/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Mips/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -29,19 +29,6 @@ MipsSelectionDAGInfo.cpp ) -add_llvm_library_dependencies(LLVMMipsCodeGen - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMMipsAsmPrinter - LLVMMipsDesc - LLVMMipsInfo - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/Mips/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Mips/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,9 +4,4 @@ MipsInstPrinter.cpp ) -add_llvm_library_dependencies(LLVMMipsAsmPrinter - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen) Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,11 +5,4 @@ MipsMCTargetDesc.cpp ) -add_llvm_library_dependencies(LLVMMipsDesc - LLVMMC - LLVMMipsAsmPrinter - LLVMMipsInfo - LLVMSupport - ) - add_dependencies(LLVMMipsDesc MipsCommonTableGen) Modified: llvm/trunk/lib/Target/Mips/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Mips/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ MipsTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMMipsInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMMipsInfo MipsCommonTableGen) Modified: llvm/trunk/lib/Target/PTX/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PTX/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -25,20 +25,6 @@ PTXTargetMachine.cpp ) -add_llvm_library_dependencies(LLVMPTXCodeGen - LLVMAnalysis - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMPTXDesc - LLVMPTXInfo - LLVMSelectionDAG - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) - add_subdirectory(TargetInfo) add_subdirectory(InstPrinter) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/PTX/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PTX/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,8 +6,3 @@ add_dependencies(LLVMPTXAsmPrinter PTXCommonTableGen) -add_llvm_library_dependencies(LLVMPTXAsmPrinter - LLVMMC - LLVMSupport - ) - Modified: llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,11 +3,4 @@ PTXMCAsmInfo.cpp ) -add_llvm_library_dependencies(LLVMPTXDesc - LLVMMC - LLVMPTXAsmPrinter - LLVMPTXInfo - LLVMSupport - ) - add_dependencies(LLVMPTXDesc PTXCommonTableGen) Modified: llvm/trunk/lib/Target/PTX/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PTX/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PTX/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ PTXTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMPTXInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMPTXInfo PTXCommonTableGen) Modified: llvm/trunk/lib/Target/PowerPC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -27,20 +27,6 @@ PPCSelectionDAGInfo.cpp ) -add_llvm_library_dependencies(LLVMPowerPCCodeGen - LLVMAnalysis - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMPowerPCAsmPrinter - LLVMPowerPCDesc - LLVMPowerPCInfo - LLVMSelectionDAG - LLVMSupport - LLVMTarget - ) - add_subdirectory(InstPrinter) add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/PowerPC/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,9 +4,4 @@ PPCInstPrinter.cpp ) -add_llvm_library_dependencies(LLVMPowerPCAsmPrinter - LLVMMC - LLVMSupport - ) - add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen) Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,11 +6,4 @@ PPCPredicates.cpp ) -add_llvm_library_dependencies(LLVMPowerPCDesc - LLVMMC - LLVMPowerPCAsmPrinter - LLVMPowerPCInfo - LLVMSupport - ) - add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen) Modified: llvm/trunk/lib/Target/PowerPC/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ PowerPCTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMPowerPCInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMPowerPCInfo PowerPCCommonTableGen) Modified: llvm/trunk/lib/Target/Sparc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Sparc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -22,17 +22,5 @@ SparcSelectionDAGInfo.cpp ) -add_llvm_library_dependencies(LLVMSparcCodeGen - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSelectionDAG - LLVMSparcDesc - LLVMSparcInfo - LLVMSupport - LLVMTarget - ) - add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,10 +3,4 @@ SparcMCAsmInfo.cpp ) -add_llvm_library_dependencies(LLVMSparcDesc - LLVMMC - LLVMSparcInfo - LLVMSupport - ) - add_dependencies(LLVMSparcDesc SparcCommonTableGen) Modified: llvm/trunk/lib/Target/Sparc/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/Sparc/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ SparcTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMSparcInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMSparcInfo SparcCommonTableGen) Modified: llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,12 +5,4 @@ X86AsmParser.cpp ) -add_llvm_library_dependencies(LLVMX86AsmParser - LLVMMC - LLVMMCParser - LLVMSupport - LLVMX86Desc - LLVMX86Info - ) - add_dependencies(LLVMX86AsmParser X86CommonTableGen) Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -51,21 +51,6 @@ add_llvm_target(X86CodeGen ${sources}) -add_llvm_library_dependencies(LLVMX86CodeGen - LLVMAnalysis - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSelectionDAG - LLVMSupport - LLVMTarget - LLVMX86AsmPrinter - LLVMX86Desc - LLVMX86Info - LLVMX86Utils - ) - add_subdirectory(AsmParser) add_subdirectory(Disassembler) add_subdirectory(InstPrinter) Modified: llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -5,12 +5,6 @@ X86DisassemblerDecoder.c ) -add_llvm_library_dependencies(LLVMX86Disassembler - LLVMMC - LLVMSupport - LLVMX86Info - ) - # workaround for hanging compilation on MSVC9 and 10 if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 ) set_property( Modified: llvm/trunk/lib/Target/X86/InstPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/InstPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/InstPrinter/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,10 +6,4 @@ X86InstComments.cpp ) -add_llvm_library_dependencies(LLVMX86AsmPrinter - LLVMMC - LLVMSupport - LLVMX86Utils - ) - add_dependencies(LLVMX86AsmPrinter X86CommonTableGen) Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -6,13 +6,6 @@ X86MachObjectWriter.cpp ) -add_llvm_library_dependencies(LLVMX86Desc - LLVMMC - LLVMSupport - LLVMX86AsmPrinter - LLVMX86Info - ) - add_dependencies(LLVMX86Desc X86CommonTableGen) # Hack: we need to include 'main' target directory to grab private headers Modified: llvm/trunk/lib/Target/X86/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ X86TargetInfo.cpp ) -add_llvm_library_dependencies(LLVMX86Info - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMX86Info X86CommonTableGen) Modified: llvm/trunk/lib/Target/X86/Utils/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Utils/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Utils/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/Utils/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,9 +4,4 @@ X86ShuffleDecode.cpp ) -add_llvm_library_dependencies(LLVMX86Utils - LLVMCore - LLVMSupport - ) - add_dependencies(LLVMX86Utils X86CommonTableGen) Modified: llvm/trunk/lib/Target/XCore/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/XCore/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -21,17 +21,5 @@ XCoreSelectionDAGInfo.cpp ) -add_llvm_library_dependencies(LLVMXCoreCodeGen - LLVMAsmPrinter - LLVMCodeGen - LLVMCore - LLVMMC - LLVMSelectionDAG - LLVMSupport - LLVMTarget - LLVMXCoreDesc - LLVMXCoreInfo - ) - add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/MCTargetDesc/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/XCore/MCTargetDesc/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -3,11 +3,6 @@ XCoreMCAsmInfo.cpp ) -add_llvm_library_dependencies(LLVMXCoreDesc - LLVMMC - LLVMXCoreInfo - ) - add_dependencies(LLVMXCoreDesc XCoreCommonTableGen) # Hack: we need to include 'main' target directory to grab private headers Modified: llvm/trunk/lib/Target/XCore/TargetInfo/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/TargetInfo/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/TargetInfo/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/XCore/TargetInfo/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -4,10 +4,4 @@ XCoreTargetInfo.cpp ) -add_llvm_library_dependencies(LLVMXCoreInfo - LLVMMC - LLVMSupport - LLVMTarget - ) - add_dependencies(LLVMXCoreInfo XCoreCommonTableGen) Modified: llvm/trunk/lib/Transforms/IPO/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/IPO/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -20,14 +20,3 @@ StripDeadPrototypes.cpp StripSymbols.cpp ) - -add_llvm_library_dependencies(LLVMipo - LLVMAnalysis - LLVMCore - LLVMInstCombine - LLVMScalarOpts - LLVMSupport - LLVMTarget - LLVMTransformUtils - LLVMipa - ) Modified: llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -13,11 +13,3 @@ InstCombineSimplifyDemanded.cpp InstCombineVectorOps.cpp ) - -add_llvm_library_dependencies(LLVMInstCombine - LLVMAnalysis - LLVMCore - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) Modified: llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -7,10 +7,3 @@ PathProfiling.cpp ProfilingUtils.cpp ) - -add_llvm_library_dependencies(LLVMInstrumentation - LLVMAnalysis - LLVMCore - LLVMSupport - LLVMTransformUtils - ) Modified: llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -32,12 +32,3 @@ Sink.cpp TailRecursionElimination.cpp ) - -add_llvm_library_dependencies(LLVMScalarOpts - LLVMAnalysis - LLVMCore - LLVMInstCombine - LLVMSupport - LLVMTarget - LLVMTransformUtils - ) Modified: llvm/trunk/lib/Transforms/Utils/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CMakeLists.txt (original) +++ llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -28,11 +28,3 @@ Utils.cpp ValueMapper.cpp ) - -add_llvm_library_dependencies(LLVMTransformUtils - LLVMAnalysis - LLVMCore - LLVMSupport - LLVMTarget - LLVMipa - ) Modified: llvm/trunk/lib/VMCore/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/CMakeLists.txt (original) +++ llvm/trunk/lib/VMCore/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -37,5 +37,3 @@ ValueTypes.cpp Verifier.cpp ) - -add_llvm_library_dependencies(LLVMCore LLVMSupport) Modified: llvm/trunk/utils/unittest/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/CMakeLists.txt?rev=145420&r1=145419&r2=145420&view=diff ============================================================================== --- llvm/trunk/utils/unittest/CMakeLists.txt (original) +++ llvm/trunk/utils/unittest/CMakeLists.txt Tue Nov 29 13:25:30 2011 @@ -40,11 +40,3 @@ add_llvm_library(gtest_main UnitTestMain/TestMain.cpp ) - -add_llvm_library_dependencies(gtest - LLVMSupport - ) - -add_llvm_library_dependencies(gtest_main - gtest - ) From stpworld at narod.ru Tue Nov 29 13:32:55 2011 From: stpworld at narod.ru (Stepan Dyatkovskiy) Date: Tue, 29 Nov 2011 23:32:55 +0400 Subject: [llvm-commits] [LLVM, loop-unswitch] Potential bug in RewriteLoopBodyWithConditionConstant In-Reply-To: <4ED3DC40.9020604@narod.ru> References: <4ECB80FC.3070307@narod.ru> <4ECB8437.9010708@free.fr> <4ECB9786.9070104@narod.ru> <4ECD34CA.50501@narod.ru> <4ECD35C7.4000905@free.fr> <4ECFE963.6030107@narod.ru> <4ED3DC40.9020604@narod.ru> Message-ID: <4ED53367.5070602@narod.ru> ping. -Stepan. Stepan Dyatkovskiy wrote: > Hi all. >> About WorkList. I missed it. Of course we can process this one. > > Please find the patch where WorkList collection is reused. It seems that > all possible versions of patch are enumerated :-) > > -Stepan. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From satanasyan at mips.com Tue Nov 29 13:35:03 2011 From: satanasyan at mips.com (Simon Atanasyan) Date: Tue, 29 Nov 2011 23:35:03 +0400 Subject: [llvm-commits] [patch] MIPS processors renaming In-Reply-To: <95DD8BA8AA50B14BBFB86A1D541FA3809EAB3BD4@exchdb03.mips.com> References: <82B40AB19663174FB4C217A6E09EB1C320A993@exchdb03.mips.com> <95DD8BA8AA50B14BBFB86A1D541FA3809EAB3BD4@exchdb03.mips.com> Message-ID: On Tue, Nov 29, 2011 at 8:29 PM, Hatanaka, Akira wrote: > We will also need to replace "4ke" with "mips32r2" wherever it is used (Makefiles, python driver, etc.). I grepped over llvm source tree. All modifications related to 4ke, mips32r1 and mips64r1 are included in the patch. -- Simon From atrick at apple.com Tue Nov 29 13:33:49 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 19:33:49 -0000 Subject: [llvm-commits] [llvm] r145422 - /llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h Message-ID: <20111129193349.83E3F1BE001@llvm.org> Author: atrick Date: Tue Nov 29 13:33:49 2011 New Revision: 145422 URL: http://llvm.org/viewvc/llvm-project?rev=145422&view=rev Log: comment. Modified: llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h Modified: llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h?rev=145422&r1=145421&r2=145422&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h (original) +++ llvm/trunk/lib/Target/ARM/ARMHazardRecognizer.h Tue Nov 29 13:33:49 2011 @@ -23,6 +23,10 @@ class ARMSubtarget; class MachineInstr; +/// ARMHazardRecognizer handles special constraints that are not expressed in +/// the scheduling itinerary. This is only used during postRA scheduling. The +/// ARM preRA scheduler uses an unspecialized instance of the +/// ScoreboardHazardRecognizer. class ARMHazardRecognizer : public ScoreboardHazardRecognizer { const ARMBaseInstrInfo &TII; const ARMBaseRegisterInfo &TRI; From rafael.espindola at gmail.com Tue Nov 29 13:38:09 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 29 Nov 2011 19:38:09 -0000 Subject: [llvm-commits] [llvm] r145423 - /llvm/trunk/docs/CodeGenerator.html Message-ID: <20111129193809.808FD1BE001@llvm.org> Author: rafael Date: Tue Nov 29 13:38:09 2011 New Revision: 145423 URL: http://llvm.org/viewvc/llvm-project?rev=145423&view=rev Log: grammar. Modified: llvm/trunk/docs/CodeGenerator.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=145423&r1=145422&r2=145423&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Tue Nov 29 13:38:09 2011 @@ -2430,7 +2430,7 @@

      Basic support exists on the X86 backend. Currently vararg doesn't work and the object files are not marked the way the gold -linker expects, but simple Go program can be built by dragonegg.

      +linker expects, but simple Go programs can be built by dragonegg.

    • From mcrosier at apple.com Tue Nov 29 13:40:47 2011 From: mcrosier at apple.com (Chad Rosier) Date: Tue, 29 Nov 2011 19:40:47 -0000 Subject: [llvm-commits] [llvm] r145425 - in /llvm/trunk: include/llvm/CodeGen/FastISel.h lib/CodeGen/SelectionDAG/FastISel.cpp test/CodeGen/ARM/fast-isel-deadcode.ll Message-ID: <20111129194047.78FB71BE001@llvm.org> Author: mcrosier Date: Tue Nov 29 13:40:47 2011 New Revision: 145425 URL: http://llvm.org/viewvc/llvm-project?rev=145425&view=rev Log: If fast-isel fails, remove dead instructions generated during the failed attempt. Added: llvm/trunk/test/CodeGen/ARM/fast-isel-deadcode.ll Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=145425&r1=145424&r2=145425&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/FastISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/FastISel.h Tue Nov 29 13:40:47 2011 @@ -381,6 +381,10 @@ /// hasTrivialKill - Test whether the given value has exactly one use. bool hasTrivialKill(const Value *V) const; + + /// removeDeadCode - Remove all dead instructions between the I and E. + void removeDeadCode(MachineBasicBlock::iterator I, + MachineBasicBlock::iterator E); }; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=145425&r1=145424&r2=145425&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Nov 29 13:40:47 2011 @@ -66,6 +66,7 @@ "target-independent selector"); STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by " "target-specific selector"); +STATISTIC(NumFastIselDead, "Number of dead insts removed on failure"); /// startNewBlock - Set the current block to which generated machine /// instructions will be appended, and clear the local CSE map. @@ -309,6 +310,18 @@ ++FuncInfo.InsertPt; } +void FastISel::removeDeadCode(MachineBasicBlock::iterator I, + MachineBasicBlock::iterator E) { + assert (I && E && std::distance(I, E) > 0 && "Invalid iterator!"); + while (I != E) { + MachineInstr *Dead = &*I; + ++I; + Dead->eraseFromParent(); + ++NumFastIselDead; + } + recomputeInsertPt(); +} + FastISel::SavePoint FastISel::enterLocalValueArea() { MachineBasicBlock::iterator OldInsertPt = FuncInfo.InsertPt; DebugLoc OldDL = DL; @@ -794,19 +807,33 @@ DL = I->getDebugLoc(); + MachineBasicBlock::iterator SavedInsertPt = FuncInfo.InsertPt; + // First, try doing target-independent selection. if (SelectOperator(I, I->getOpcode())) { ++NumFastIselSuccessIndependent; DL = DebugLoc(); return true; } + // Remove dead code. However, ignore call instructions since we've flushed + // the local value map and recomputed the insert point. + if (!isa(I)) { + recomputeInsertPt(); + if (SavedInsertPt != FuncInfo.InsertPt) + removeDeadCode(FuncInfo.InsertPt, SavedInsertPt); + } // Next, try calling the target to attempt to handle the instruction. + SavedInsertPt = FuncInfo.InsertPt; if (TargetSelectInstruction(I)) { ++NumFastIselSuccessTarget; DL = DebugLoc(); return true; } + // Check for dead code and remove as necessary. + recomputeInsertPt(); + if (SavedInsertPt != FuncInfo.InsertPt) + removeDeadCode(FuncInfo.InsertPt, SavedInsertPt); DL = DebugLoc(); return false; Added: llvm/trunk/test/CodeGen/ARM/fast-isel-deadcode.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-deadcode.ll?rev=145425&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-deadcode.ll (added) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-deadcode.ll Tue Nov 29 13:40:47 2011 @@ -0,0 +1,23 @@ +; RUN: llc < %s -O0 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB + +; Target-specific selector can't properly handle the double because it isn't +; being passed via a register, so the materialized arguments become dead code. + +define i32 @main(i32 %argc, i8** %argv) nounwind { +entry: +; THUMB: main + call void @printArgsNoRet(i32 1, float 0x4000CCCCC0000000, i8 signext 99, double 4.100000e+00) +; THUMB: blx _printArgsNoRet +; THUMB-NOT: ldr +; THUMB-NOT: vldr +; THUMB-NOT: vmov +; THUMB-NOT: ldr +; THUMB-NOT: sxtb +; THUMB: movs r0, #0 +; THUMB: movt r0, #0 +; THUMB: add sp, #32 +; THUMb: pop {r7, pc} + ret i32 0 +} + +declare void @printArgsNoRet(i32 %a1, float %a2, i8 signext %a3, double %a4) From echristo at apple.com Tue Nov 29 13:40:57 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 29 Nov 2011 19:40:57 -0000 Subject: [llvm-commits] [llvm] r145426 - /llvm/trunk/docs/TestingGuide.html Message-ID: <20111129194057.375CB1BE001@llvm.org> Author: echristo Date: Tue Nov 29 13:40:56 2011 New Revision: 145426 URL: http://llvm.org/viewvc/llvm-project?rev=145426&view=rev Log: Update the docs for some of the test-suite configure changes and be more clear about what to do and how to do it. Modified: llvm/trunk/docs/TestingGuide.html Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=145426&r1=145425&r2=145426&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Tue Nov 29 13:40:56 2011 @@ -253,40 +253,35 @@
      -% cd llvm/projects
      +% cd ~/llvm/projects
       % svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
       % cd ..
      -% ./configure --with-llvmgccdir=$LLVM_GCC_DIR
       
      -

      where $LLVM_GCC_DIR is the directory where -you installed llvm-gcc, not its src or obj -dir. The --with-llvmgccdir option assumes that -the llvm-gcc-4.2 module was configured with ---program-prefix=llvm-, and therefore that the C and C++ -compiler drivers are called llvm-gcc and llvm-g++ -respectively. If this is not the case, -use --with-llvmgcc/--with-llvmgxx to specify each -executable's location.

      +

      and then configure and build normally as you would from the +Getting Started +Guide. This will autodetect first the built clang if you are building +clang, then clang in your path and finally look for llvm-gcc +in your path.

      Then, run the entire test suite by running make in the test-suite -directory:

      +subdirectory of your build directory:

      -% cd projects/test-suite
      +% cd where-you-built-llvm/projects/test-suite
       % gmake
       
      -

      Usually, running the "nightly" set of tests is a good idea, and you can also +

      Usually, running the "simple" set of tests is a good idea, and you can also let it generate a report by running:

      -% cd projects/test-suite
      -% gmake TEST=nightly report report.html
      +% cd where-you-built-llvm/projects/test-suite
      +% gmake TEST=simple report report.html
       
      From daniel at zuster.org Tue Nov 29 13:44:14 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 19:44:14 -0000 Subject: [llvm-commits] [compiler-rt] r145427 - in /compiler-rt/trunk/lib: int_util.c int_util.h Message-ID: <20111129194414.53D571BE001@llvm.org> Author: ddunbar Date: Tue Nov 29 13:44:14 2011 New Revision: 145427 URL: http://llvm.org/viewvc/llvm-project?rev=145427&view=rev Log: lib/int_util: My refactoring to allow shared utility code had a fatal flaw when multiple .a files would end up with duplicate strong definitions. This could cause link failures in certain scenarios when both definitions got loaded. - The best solution I see for this (aside from not factoring out the utility code) is to mark the definitions weak. Better solutions appreciated! Modified: compiler-rt/trunk/lib/int_util.c compiler-rt/trunk/lib/int_util.h Modified: compiler-rt/trunk/lib/int_util.c URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_util.c?rev=145427&r1=145426&r2=145427&view=diff ============================================================================== --- compiler-rt/trunk/lib/int_util.c (original) +++ compiler-rt/trunk/lib/int_util.c Tue Nov 29 13:44:14 2011 @@ -11,6 +11,16 @@ #include "int_util.h" #include "int_lib.h" +/* NOTE: The definitions in this file are declared weak because we clients to be + * able to arbitrarily package individual functions into separate .a files. If + * we did not declare these weak, some link situations might end up seeing + * duplicate strong definitions of the same symbol. + * + * We can't use this solution for kernel use (which may not support weak), but + * currently expect that when built for kernel use all the functionality is + * packaged into a single library. + */ + #ifdef KERNEL_USE extern void panic(const char *, ...) __attribute__((noreturn)); @@ -24,6 +34,7 @@ /* Get the system definition of abort() */ #include +__attribute__((weak)) __attribute__((visibility("hidden"))) void compilerrt_abort_impl(const char *file, int line, const char *function) { abort(); Modified: compiler-rt/trunk/lib/int_util.h URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_util.h?rev=145427&r1=145426&r2=145427&view=diff ============================================================================== --- compiler-rt/trunk/lib/int_util.h (original) +++ compiler-rt/trunk/lib/int_util.h Tue Nov 29 13:44:14 2011 @@ -24,6 +24,9 @@ __FUNCTION__) void compilerrt_abort_impl(const char *file, int line, const char *function) +#ifndef KERNEL_USE + __attribute__((weak)) +#endif __attribute__((noreturn)) __attribute__((visibility("hidden"))); #endif /* INT_UTIL_H */ From echristo at apple.com Tue Nov 29 13:47:45 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 29 Nov 2011 11:47:45 -0800 Subject: [llvm-commits] [llvm] r144441 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/concrete_out_of_line.ll In-Reply-To: <20111112015754.96FAE1BE001@llvm.org> References: <20111112015754.96FAE1BE001@llvm.org> Message-ID: <980CC9E3-4603-4B22-BB47-FFDF84530B74@apple.com> On Nov 11, 2011, at 5:57 PM, Rafael Espindola wrote: > FileCheck is not a very good tool for tests like this, maybe we should add > a -verify mode to llvm-dwarfdump. Yes. :) -eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111129/e2570715/attachment.html From adasgupt at codeaurora.org Tue Nov 29 13:57:42 2011 From: adasgupt at codeaurora.org (Anshuman Dasgupta) Date: Tue, 29 Nov 2011 13:57:42 -0600 Subject: [llvm-commits] Deterministic finite automaton based packetizer for VLIW architectures In-Reply-To: <6F0200FC-AFFA-40EE-A66F-A6149E6862F7@2pi.dk> References: <4EC735D2.4040801@codeaurora.org> <4ED3FF39.8050102@codeaurora.org> <1CE58619-652B-46BB-BC95-08076C62A933@2pi.dk> <4ED4FB80.2030406@codeaurora.org> <6F0200FC-AFFA-40EE-A66F-A6149E6862F7@2pi.dk> Message-ID: <4ED53936.6030509@codeaurora.org> > OK, I actually meant CachedTable lookups. Hash table lookups are an order of magnitude slower than array lookups. > I assume the API is meant to be used like this: > if (DFA.canReserveResources(MI)) > DFA.reserveResources(MI); > Ah I see what you mean. On Hexagon, the canReserveResources() and reserveResources() are never used together. We conduct a bunch of dependency pruning/checking in between the two calls. Since the dependency checking is relatively intricate we do not want to do that unless there are enough resources to accommodate the instruction in a packet. > As for renumbering the states, since the state numbers aren't used for anything but indexing DFAStateEntryTable, > you can simply replace all state numbers with DFAStateEntryTable[s], and you don't have to waste memory on the table. That's a good idea; thanks! I'll need to remove CachedTable for this and I can implement it along with the "splitting up the transition table" work. -Anshu -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum On 11/29/2011 12:22 PM, Jakob Stoklund Olesen wrote: > > On Nov 29, 2011, at 7:34 AM, Anshuman Dasgupta wrote: > >> > You are building CachedTable on demand. Is that really necessary? >> How much of the table is built in >> > a typical run? Would it be better/faster to just build the whole >> thing up front? >> >> That was an interesting decision. So the reason why I implemented >> CachedTable is that currently the DFA generator constructs one common >> transition table for all versions (subtargets) of Hexagon. As a >> result, when we compile for a particular Hexagon subtarget, I noticed >> that only part of the transition table is typically used. I have >> plans to augment the DFA generator to create separate tables for each >> Hexagon subtarget and once I do, I will change this to load up the >> entire transition table. But for now CachedTable is useful. > > That makes perfect sense. > >> > You have 4 table lookups per DFA transition by my count. It seems >> that 1 is enough. Can the API be improved to allow that? >> >> > Could you get rid of the DFAStateEntryTable by renumbering your states? >> >> > s -> DFAStateEntryTable[s] >> >> > This would preclude the sparse transition matrix representation, of >> course. >> >> If I understand correctly, these two questions are related. Let me >> answer them together. I can change the code so that there is one >> lookup per transition. That was my original design. However, most of >> the table entries were invalid transitions. So, while running >> TableGen, the I/O required to emit the table became a bottleneck. It >> significantly slowed down the Hexagon backend build time. Therefore I >> moved to a sparse matrix representation. >> > > OK, I actually meant CachedTable lookups. Hash table lookups are an > order of magnitude slower than array lookups. > > I assume the API is meant to be used like this: > > if (DFA.canReserveResources(MI)) > DFA.reserveResources(MI); > > That's 4 hash table lookups for a valid transition. 1 should be > enough. For invalid transitions, you need two lookups because > CachedTable is lazily built. > > > As for renumbering the states, since the state numbers aren't used for > anything but indexing DFAStateEntryTable, you can simply replace all > state numbers with DFAStateEntryTable[s], and you don't have to waste > memory on the table. > > /jakob > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111129/48611486/attachment-0001.html From criswell at illinois.edu Tue Nov 29 14:08:44 2011 From: criswell at illinois.edu (John Criswell) Date: Tue, 29 Nov 2011 14:08:44 -0600 Subject: [llvm-commits] [llvm] r145426 - /llvm/trunk/docs/TestingGuide.html In-Reply-To: <20111129194057.375CB1BE001@llvm.org> References: <20111129194057.375CB1BE001@llvm.org> Message-ID: <4ED53BCC.8020703@illinois.edu> On 11/29/11 1:40 PM, Eric Christopher wrote: > Author: echristo > Date: Tue Nov 29 13:40:56 2011 > New Revision: 145426 > > URL: http://llvm.org/viewvc/llvm-project?rev=145426&view=rev > Log: > Update the docs for some of the test-suite configure changes and > be more clear about what to do and how to do it. > > Modified: > llvm/trunk/docs/TestingGuide.html > > Modified: llvm/trunk/docs/TestingGuide.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=145426&r1=145425&r2=145426&view=diff > ============================================================================== > --- llvm/trunk/docs/TestingGuide.html (original) > +++ llvm/trunk/docs/TestingGuide.html Tue Nov 29 13:40:56 2011 > @@ -253,40 +253,35 @@ > >
      >
      > -% cd llvm/projects
      > +% cd ~/llvm/projects
      
      Why are you assuming that llvm is in the user's home directory?  Do the 
      other documents make that simplifying assumption?
      
      -- John T.
      
      
      
      From baldrick at free.fr  Tue Nov 29 14:19:26 2011
      From: baldrick at free.fr (Duncan Sands)
      Date: Tue, 29 Nov 2011 21:19:26 +0100
      Subject: [llvm-commits] Fix constructor order on ARM/ELF
      In-Reply-To: 
      References: 	
      	
      Message-ID: <4ED53E4E.8060205@free.fr>
      
      Hi Evgeniy, can you please resend the patch because I seem to have mislaid
      that email.
      
      Thanks, Duncan.
      
      > On Nov 29, 2011, at 3:41 AM, Evgeniy Stepanov wrote:
      >
      >> Ping. Wrong ML?
      >>
      >> On Thu, Nov 24, 2011 at 4:46 PM, Evgeniy Stepanov
      >>   wrote:
      >>> This patch fixes PR11322. Current LLVM executes module constructors in
      >>> reverse priority order because of a mix-up between .ctors and
      >>> .init_array semantics.
      >>> It also does a little bit of refactoring by moving StructorOutputOrder
      >>> field from MCAsmInfo to MCObjectFileInfo so that it can depend on the
      >>> ABI.
      >>>
      >>> Please review.
      >>>
      >> _______________________________________________
      >> llvm-commits mailing list
      >> llvm-commits at cs.uiuc.edu
      >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      >
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      From stpworld at narod.ru  Tue Nov 29 14:34:39 2011
      From: stpworld at narod.ru (Stepan Dyatkovskiy)
      Date: Tue, 29 Nov 2011 20:34:39 -0000
      Subject: [llvm-commits] [llvm] r145432 -
      	/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
      Message-ID: <20111129203439.E78351BE001@llvm.org>
      
      Author: dyatkovskiy
      Date: Tue Nov 29 14:34:39 2011
      New Revision: 145432
      
      URL: http://llvm.org/viewvc/llvm-project?rev=145432&view=rev
      Log:
      Potential bug in RewriteLoopBodyWithConditionConstant: use iterator should not be changed inside the uses enumeration loop.
      
      Modified:
          llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
      
      Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=145432&r1=145431&r2=145432&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
      +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Nov 29 14:34:39 2011
      @@ -907,9 +907,13 @@
             Instruction *U = dyn_cast(*UI);
             if (!U || !L->contains(U))
               continue;
      -      U->replaceUsesOfWith(LIC, Replacement);
             Worklist.push_back(U);
           }
      +    
      +    for (std::vector::iterator UI = Worklist.begin();
      +         UI != Worklist.end(); ++UI)
      +      (*UI)->replaceUsesOfWith(LIC, Replacement);        
      +    
           SimplifyCode(Worklist, L);
           return;
         }
      
      
      
      From stpworld at narod.ru  Tue Nov 29 14:39:01 2011
      From: stpworld at narod.ru (Stepan Dyatkovskiy)
      Date: Wed, 30 Nov 2011 00:39:01 +0400
      Subject: [llvm-commits] [LLVM, loop-unswitch] Potential bug
      	in	RewriteLoopBodyWithConditionConstant
      In-Reply-To: <4ED52353.3040508@free.fr>
      References: <4ECB80FC.3070307@narod.ru>
      	<4ECB8437.9010708@free.fr>	<4ECB9786.9070104@narod.ru>
      	<4ECD34CA.50501@narod.ru>	<4ECD35C7.4000905@free.fr>		<4ECFE963.6030107@narod.ru>
      	<4ED3DC40.9020604@narod.ru> <4ED52353.3040508@free.fr>
      Message-ID: <4ED542E5.40901@narod.ru>
      
      r145432.
      
      Duncan Sands wrote:
      > Hi Stepan,
      >
      >>> About WorkList. I missed it. Of course we can process this one.
      >>
      >> Please find the patch where WorkList collection is reused. It seems that all
      >> possible versions of patch are enumerated :-)
      >
      > this patch looks OK to me.
      >
      > Ciao, Duncan.
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      From echristo at apple.com  Tue Nov 29 15:24:28 2011
      From: echristo at apple.com (Eric Christopher)
      Date: Tue, 29 Nov 2011 13:24:28 -0800
      Subject: [llvm-commits] [llvm] r145426 -
      	/llvm/trunk/docs/TestingGuide.html
      In-Reply-To: <4ED53BCC.8020703@illinois.edu>
      References: <20111129194057.375CB1BE001@llvm.org>
      	<4ED53BCC.8020703@illinois.edu>
      Message-ID: <334E8796-EEB2-4850-B01F-1138C0EA418B@apple.com>
      
      
      On Nov 29, 2011, at 12:08 PM, John Criswell wrote:
      
      > On 11/29/11 1:40 PM, Eric Christopher wrote:
      >> Author: echristo
      >> Date: Tue Nov 29 13:40:56 2011
      >> New Revision: 145426
      >> 
      >> URL: http://llvm.org/viewvc/llvm-project?rev=145426&view=rev
      >> Log:
      >> Update the docs for some of the test-suite configure changes and
      >> be more clear about what to do and how to do it.
      >> 
      >> Modified:
      >>     llvm/trunk/docs/TestingGuide.html
      >> 
      >> Modified: llvm/trunk/docs/TestingGuide.html
      >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=145426&r1=145425&r2=145426&view=diff
      >> ==============================================================================
      >> --- llvm/trunk/docs/TestingGuide.html (original)
      >> +++ llvm/trunk/docs/TestingGuide.html Tue Nov 29 13:40:56 2011
      >> @@ -253,40 +253,35 @@
      >> 
      >>  
      >>
      >> -% cd llvm/projects
      >> +% cd ~/llvm/projects
      > 
      > Why are you assuming that llvm is in the user's home directory?  
      
      Because of...
      
      > Do the other documents make that simplifying assumption?
      
      Yes, this. In particular, the document that's linked to.
      
      -eric
      
      From stoklund at 2pi.dk  Tue Nov 29 16:27:26 2011
      From: stoklund at 2pi.dk (Jakob Stoklund Olesen)
      Date: Tue, 29 Nov 2011 22:27:26 -0000
      Subject: [llvm-commits] [llvm] r145440 - in /llvm/trunk:
       lib/Target/X86/X86FastISel.cpp lib/Target/X86/X86InstrInfo.cpp
       lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td
       lib/Target/X86/X86MCInstLower.cpp
       test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll
       test/CodeGen/X86/bc-extract.ll test/CodeGen/X86/fast-isel-x86-64.ll
       test/CodeGen/X86/peep-vector-extract-insert.ll
       test/CodeGen/X86/sse-domains.ll test/CodeGen/X86/sse-minmax.ll
       test/CodeGen/X86/zero-remat.ll
      Message-ID: <20111129222726.45DC51BE001@llvm.org>
      
      Author: stoklund
      Date: Tue Nov 29 16:27:25 2011
      New Revision: 145440
      
      URL: http://llvm.org/viewvc/llvm-project?rev=145440&view=rev
      Log:
      Make X86::FsFLD0SS / FsFLD0SD real pseudo-instructions.
      
      Like V_SET0, these instructions are expanded by ExpandPostRA to xorps /
      vxorps so they can participate in execution domain swizzling.
      
      This also makes the AVX variants redundant.
      
      Modified:
          llvm/trunk/lib/Target/X86/X86FastISel.cpp
          llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
          llvm/trunk/lib/Target/X86/X86InstrInfo.td
          llvm/trunk/lib/Target/X86/X86InstrSSE.td
          llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
          llvm/trunk/test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll
          llvm/trunk/test/CodeGen/X86/bc-extract.ll
          llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll
          llvm/trunk/test/CodeGen/X86/peep-vector-extract-insert.ll
          llvm/trunk/test/CodeGen/X86/sse-domains.ll
          llvm/trunk/test/CodeGen/X86/sse-minmax.ll
          llvm/trunk/test/CodeGen/X86/zero-remat.ll
      
      Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
      +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Nov 29 16:27:25 2011
      @@ -2121,7 +2121,7 @@
           default: return false;
           case MVT::f32:
             if (X86ScalarSSEf32) {
      -        Opc = Subtarget->hasAVX() ? X86::VFsFLD0SS : X86::FsFLD0SS;
      +        Opc = X86::FsFLD0SS;
               RC  = X86::FR32RegisterClass;
             } else {
               Opc = X86::LD_Fp032;
      @@ -2130,7 +2130,7 @@
             break;
           case MVT::f64:
             if (X86ScalarSSEf64) {
      -        Opc = Subtarget->hasAVX() ? X86::VFsFLD0SD : X86::FsFLD0SD;
      +        Opc = X86::FsFLD0SD;
               RC  = X86::FR64RegisterClass;
             } else {
               Opc = X86::LD_Fp064;
      
      Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
      +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Nov 29 16:27:25 2011
      @@ -2556,6 +2556,8 @@
         bool HasAVX = TM.getSubtarget().hasAVX();
         switch (MI->getOpcode()) {
         case X86::V_SET0:
      +  case X86::FsFLD0SS:
      +  case X86::FsFLD0SD:
           return Expand2AddrUndef(MI, get(HasAVX ? X86::VXORPSrr : X86::XORPSrr));
         case X86::TEST8ri_NOREX:
           MI->setDesc(get(X86::TEST8ri));
      @@ -2911,11 +2913,9 @@
             Alignment = 16;
             break;
           case X86::FsFLD0SD:
      -    case X86::VFsFLD0SD:
             Alignment = 8;
             break;
           case X86::FsFLD0SS:
      -    case X86::VFsFLD0SS:
             Alignment = 4;
             break;
           default:
      @@ -2950,9 +2950,7 @@
         case X86::AVX_SETALLONES:
         case X86::AVX2_SETALLONES:
         case X86::FsFLD0SD:
      -  case X86::FsFLD0SS:
      -  case X86::VFsFLD0SD:
      -  case X86::VFsFLD0SS: {
      +  case X86::FsFLD0SS: {
           // Folding a V_SET0 or V_SETALLONES as a load, to ease register pressure.
           // Create a constant-pool entry and operands to load from it.
       
      @@ -2978,9 +2976,9 @@
           MachineConstantPool &MCP = *MF.getConstantPool();
           Type *Ty;
           unsigned Opc = LoadMI->getOpcode();
      -    if (Opc == X86::FsFLD0SS || Opc == X86::VFsFLD0SS)
      +    if (Opc == X86::FsFLD0SS)
             Ty = Type::getFloatTy(MF.getFunction()->getContext());
      -    else if (Opc == X86::FsFLD0SD || Opc == X86::VFsFLD0SD)
      +    else if (Opc == X86::FsFLD0SD)
             Ty = Type::getDoubleTy(MF.getFunction()->getContext());
           else if (Opc == X86::AVX_SET0PSY || Opc == X86::AVX_SET0PDY)
             Ty = VectorType::get(Type::getFloatTy(MF.getFunction()->getContext()), 8);
      
      Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
      +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Nov 29 16:27:25 2011
      @@ -473,6 +473,7 @@
       
       def HasAVX       : Predicate<"Subtarget->hasAVX()">;
       def HasAVX2      : Predicate<"Subtarget->hasAVX2()">;
      +def HasXMM       : Predicate<"Subtarget->hasXMM()">;
       def HasXMMInt    : Predicate<"Subtarget->hasXMMInt()">;
       
       def HasPOPCNT    : Predicate<"Subtarget->hasPOPCNT()">;
      
      Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
      +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Nov 29 16:27:25 2011
      @@ -240,21 +240,13 @@
       }
       
       // Alias instructions that map fld0 to pxor for sse.
      -// FIXME: Set encoding to pseudo!
      -let isReMaterializable = 1, isAsCheapAsAMove = 1, isCodeGenOnly = 1,
      -    canFoldAsLoad = 1 in {
      -  def FsFLD0SS : I<0xEF, MRMInitReg, (outs FR32:$dst), (ins), "",
      -                   [(set FR32:$dst, fp32imm0)]>,
      -                   Requires<[HasSSE1]>, TB, OpSize;
      -  def FsFLD0SD : I<0xEF, MRMInitReg, (outs FR64:$dst), (ins), "",
      -                   [(set FR64:$dst, fpimm0)]>,
      -                 Requires<[HasSSE2]>, TB, OpSize;
      -  def VFsFLD0SS : I<0xEF, MRMInitReg, (outs FR32:$dst), (ins), "",
      -                    [(set FR32:$dst, fp32imm0)]>,
      -                    Requires<[HasAVX]>, TB, OpSize, VEX_4V;
      -  def VFsFLD0SD : I<0xEF, MRMInitReg, (outs FR64:$dst), (ins), "",
      -                    [(set FR64:$dst, fpimm0)]>,
      -                    Requires<[HasAVX]>, TB, OpSize, VEX_4V;
      +// This is expanded by ExpandPostRAPseudos.
      +let isReMaterializable = 1, isAsCheapAsAMove = 1, canFoldAsLoad = 1,
      +    isPseudo = 1 in {
      +  def FsFLD0SS : I<0, Pseudo, (outs FR32:$dst), (ins), "",
      +                   [(set FR32:$dst, fp32imm0)]>, Requires<[HasXMM]>;
      +  def FsFLD0SD : I<0, Pseudo, (outs FR64:$dst), (ins), "",
      +                   [(set FR64:$dst, fpimm0)]>, Requires<[HasXMMInt]>;
       }
       
       //===----------------------------------------------------------------------===//
      
      Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
      +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Nov 29 16:27:25 2011
      @@ -368,10 +368,6 @@
         case X86::SETB_C64r:    LowerUnaryToTwoAddr(OutMI, X86::SBB64rr); break;
         case X86::MOV8r0:       LowerUnaryToTwoAddr(OutMI, X86::XOR8rr); break;
         case X86::MOV32r0:      LowerUnaryToTwoAddr(OutMI, X86::XOR32rr); break;
      -  case X86::FsFLD0SS:      LowerUnaryToTwoAddr(OutMI, X86::PXORrr); break;
      -  case X86::FsFLD0SD:      LowerUnaryToTwoAddr(OutMI, X86::PXORrr); break;
      -  case X86::VFsFLD0SS:     LowerUnaryToTwoAddr(OutMI, X86::VPXORrr); break;
      -  case X86::VFsFLD0SD:     LowerUnaryToTwoAddr(OutMI, X86::VPXORrr); break;
         case X86::V_SETALLONES:  LowerUnaryToTwoAddr(OutMI, X86::PCMPEQDrr); break;
         case X86::AVX_SET0PSY:   LowerUnaryToTwoAddr(OutMI, X86::VXORPSYrr); break;
         case X86::AVX_SET0PDY:   LowerUnaryToTwoAddr(OutMI, X86::VXORPDYrr); break;
      
      Modified: llvm/trunk/test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/2008-08-25-AsmRegTypeMismatch.ll Tue Nov 29 16:27:25 2011
      @@ -1,5 +1,5 @@
      -; RUN: llc < %s -mcpu=core2 | grep pxor | count 2
      -; RUN: llc < %s -mcpu=core2 | not grep movapd
      +; RUN: llc < %s -mcpu=core2 | grep xorps | count 2
      +; RUN: llc < %s -mcpu=core2 | not grep movap
       ; PR2715
       
       target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
      
      Modified: llvm/trunk/test/CodeGen/X86/bc-extract.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/bc-extract.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/bc-extract.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/bc-extract.ll Tue Nov 29 16:27:25 2011
      @@ -11,7 +11,7 @@
       
       define float @extractFloat2() nounwind {
       entry:
      -  ; CHECK: pxor	%xmm0, %xmm0
      +  ; CHECK: xorps	%xmm0, %xmm0
         %tmp4 = bitcast <1 x double>  to <2 x float>
         %tmp5 = extractelement <2 x float> %tmp4, i32 1
         ret float %tmp5
      
      Modified: llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll Tue Nov 29 16:27:25 2011
      @@ -225,18 +225,20 @@
       ; CHECK-NEXT: je 
       }
       
      -; Check that 0.0 is materialized using pxor
      +; Check that 0.0 is materialized using xorps
       define void @test18(float* %p1) {
         store float 0.0, float* %p1
         ret void
       ; CHECK: test18:
      -; CHECK: pxor
      +; CHECK: xorps
       }
      +
      +; Without any type hints, doubles use the smaller xorps instead of xorpd.
       define void @test19(double* %p1) {
         store double 0.0, double* %p1
         ret void
       ; CHECK: test19:
      -; CHECK: pxor
      +; CHECK: xorps
       }
       
       ; Check that we fast-isel sret
      @@ -252,12 +254,12 @@
       }
       declare void @test20sret(%struct.a* sret)
       
      -; Check that -0.0 is not materialized using pxor
      +; Check that -0.0 is not materialized using xor
       define void @test21(double* %p1) {
         store double -0.0, double* %p1
         ret void
       ; CHECK: test21:
      -; CHECK-NOT: pxor
      +; CHECK-NOT: xor
       ; CHECK: movsd	LCPI
       }
       
      
      Modified: llvm/trunk/test/CodeGen/X86/peep-vector-extract-insert.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/peep-vector-extract-insert.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/peep-vector-extract-insert.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/peep-vector-extract-insert.ll Tue Nov 29 16:27:25 2011
      @@ -1,4 +1,4 @@
      -; RUN: llc < %s -march=x86-64 | grep {pxor	%xmm0, %xmm0} | count 2
      +; RUN: llc < %s -march=x86-64 | grep {xorps	%xmm0, %xmm0} | count 2
       
       define float @foo(<4 x float> %a) {
         %b = insertelement <4 x float> %a, float 0.0, i32 3
      
      Modified: llvm/trunk/test/CodeGen/X86/sse-domains.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-domains.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/sse-domains.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/sse-domains.ll Tue Nov 29 16:27:25 2011
      @@ -45,6 +45,7 @@
       }
       
       ; CHECK: f2
      +; CHECK: for.body
       ;
       ; This loop contains two cvtsi2ss instructions that update the same xmm
       ; register.  Verify that the execution dependency fix pass breaks those
      
      Modified: llvm/trunk/test/CodeGen/X86/sse-minmax.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-minmax.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/sse-minmax.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/sse-minmax.ll Tue Nov 29 16:27:25 2011
      @@ -140,15 +140,15 @@
       }
       
       ; CHECK:      x_ogt:
      -; CHECK-NEXT: pxor  %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; CHECK-NEXT: maxsd %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_ogt:
      -; UNSAFE-NEXT: pxor  %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ogt:
      -; FINITE-NEXT: pxor  %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; FINITE-NEXT: maxsd %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_ogt(double %x) nounwind {
      @@ -158,15 +158,15 @@
       }
       
       ; CHECK:      x_olt:
      -; CHECK-NEXT: pxor  %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; CHECK-NEXT: minsd %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_olt:
      -; UNSAFE-NEXT: pxor  %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_olt:
      -; FINITE-NEXT: pxor  %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; FINITE-NEXT: minsd %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_olt(double %x) nounwind {
      @@ -176,17 +176,17 @@
       }
       
       ; CHECK:      x_ogt_inverse:
      -; CHECK-NEXT: pxor   %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; CHECK-NEXT: minsd  %xmm0, %xmm1
       ; CHECK-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_ogt_inverse:
      -; UNSAFE-NEXT: pxor   %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd  %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ogt_inverse:
      -; FINITE-NEXT: pxor   %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; FINITE-NEXT: minsd  %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -197,17 +197,17 @@
       }
       
       ; CHECK:      x_olt_inverse:
      -; CHECK-NEXT: pxor   %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; CHECK-NEXT: maxsd  %xmm0, %xmm1
       ; CHECK-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_olt_inverse:
      -; UNSAFE-NEXT: pxor   %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd  %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_olt_inverse:
      -; FINITE-NEXT: pxor   %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; FINITE-NEXT: maxsd  %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -220,11 +220,11 @@
       ; CHECK:      x_oge:
       ; CHECK:      ucomisd %xmm1, %xmm0
       ; UNSAFE:      x_oge:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd   %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_oge:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: maxsd   %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_oge(double %x) nounwind {
      @@ -236,11 +236,11 @@
       ; CHECK:      x_ole:
       ; CHECK:      ucomisd %xmm0, %xmm1
       ; UNSAFE:      x_ole:
      -; UNSAFE-NEXT: pxor %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ole:
      -; FINITE-NEXT: pxor %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; FINITE-NEXT: minsd %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_ole(double %x) nounwind {
      @@ -252,12 +252,12 @@
       ; CHECK:      x_oge_inverse:
       ; CHECK:      ucomisd %xmm1, %xmm0
       ; UNSAFE:      x_oge_inverse:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd   %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_oge_inverse:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: minsd   %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -270,12 +270,12 @@
       ; CHECK:      x_ole_inverse:
       ; CHECK:      ucomisd %xmm0, %xmm1
       ; UNSAFE:      x_ole_inverse:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd   %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ole_inverse:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: maxsd   %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -414,11 +414,11 @@
       ; CHECK:      x_ugt:
       ; CHECK:      ucomisd %xmm0, %xmm1
       ; UNSAFE:      x_ugt:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd   %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ugt:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: maxsd   %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_ugt(double %x) nounwind {
      @@ -430,11 +430,11 @@
       ; CHECK:      x_ult:
       ; CHECK:      ucomisd %xmm1, %xmm0
       ; UNSAFE:      x_ult:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd   %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ult:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: minsd   %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_ult(double %x) nounwind {
      @@ -446,12 +446,12 @@
       ; CHECK:      x_ugt_inverse:
       ; CHECK:      ucomisd %xmm0, %xmm1
       ; UNSAFE:      x_ugt_inverse:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd   %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ugt_inverse:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: minsd   %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -464,12 +464,12 @@
       ; CHECK:      x_ult_inverse:
       ; CHECK:      ucomisd %xmm1, %xmm0
       ; UNSAFE:      x_ult_inverse:
      -; UNSAFE-NEXT: pxor    %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd   %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ult_inverse:
      -; FINITE-NEXT: pxor    %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}   %xmm1, %xmm1
       ; FINITE-NEXT: maxsd   %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}}  %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -480,16 +480,16 @@
       }
       
       ; CHECK:      x_uge:
      -; CHECK-NEXT: pxor   %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; CHECK-NEXT: maxsd  %xmm0, %xmm1
       ; CHECK-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_uge:
      -; UNSAFE-NEXT: pxor   %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_uge:
      -; FINITE-NEXT: pxor   %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; FINITE-NEXT: maxsd  %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_uge(double %x) nounwind {
      @@ -499,16 +499,16 @@
       }
       
       ; CHECK:      x_ule:
      -; CHECK-NEXT: pxor   %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; CHECK-NEXT: minsd  %xmm0, %xmm1
       ; CHECK-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_ule:
      -; UNSAFE-NEXT: pxor   %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd  %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ule:
      -; FINITE-NEXT: pxor   %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}}  %xmm1, %xmm1
       ; FINITE-NEXT: minsd  %xmm1, %xmm0
       ; FINITE-NEXT: ret
       define double @x_ule(double %x) nounwind {
      @@ -518,16 +518,16 @@
       }
       
       ; CHECK:      x_uge_inverse:
      -; CHECK-NEXT: pxor  %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; CHECK-NEXT: minsd %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_uge_inverse:
      -; UNSAFE-NEXT: pxor  %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; UNSAFE-NEXT: minsd %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_uge_inverse:
      -; FINITE-NEXT: pxor  %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; FINITE-NEXT: minsd %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; FINITE-NEXT: ret
      @@ -538,16 +538,16 @@
       }
       
       ; CHECK:      x_ule_inverse:
      -; CHECK-NEXT: pxor  %xmm1, %xmm1
      +; CHECK-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; CHECK-NEXT: maxsd %xmm1, %xmm0
       ; CHECK-NEXT: ret
       ; UNSAFE:      x_ule_inverse:
      -; UNSAFE-NEXT: pxor  %xmm1, %xmm1
      +; UNSAFE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; UNSAFE-NEXT: maxsd %xmm0, %xmm1
       ; UNSAFE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; UNSAFE-NEXT: ret
       ; FINITE:      x_ule_inverse:
      -; FINITE-NEXT: pxor  %xmm1, %xmm1
      +; FINITE-NEXT: xorp{{[sd]}} %xmm1, %xmm1
       ; FINITE-NEXT: maxsd %xmm0, %xmm1
       ; FINITE-NEXT: movap{{[sd]}} %xmm1, %xmm0
       ; FINITE-NEXT: ret
      
      Modified: llvm/trunk/test/CodeGen/X86/zero-remat.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/zero-remat.ll?rev=145440&r1=145439&r2=145440&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/zero-remat.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/zero-remat.ll Tue Nov 29 16:27:25 2011
      @@ -16,9 +16,9 @@
       ;CHECK-32: ret
       
       ;CHECK-64: foo:
      -;CHECK-64: pxor
      +;CHECK-64: xorps
       ;CHECK-64: call
      -;CHECK-64: pxor
      +;CHECK-64: xorps
       ;CHECK-64: ret
       }
       
      @@ -33,8 +33,8 @@
       ;CHECK-32: ret
       
       ;CHECK-64: foof:
      -;CHECK-64: pxor
      +;CHECK-64: xorps
       ;CHECK-64: call
      -;CHECK-64: pxor
      +;CHECK-64: xorps
       ;CHECK-64: ret
       }
      
      
      
      From nlewycky at google.com  Tue Nov 29 16:31:37 2011
      From: nlewycky at google.com (Nick Lewycky)
      Date: Tue, 29 Nov 2011 14:31:37 -0800
      Subject: [llvm-commits] Updated pointer-vector patch
      In-Reply-To: <4ED4A7C9.7000506@free.fr>
      References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com>
      	
      	<4ED4A7C9.7000506@free.fr>
      Message-ID: 
      
      On 29 November 2011 01:37, Duncan Sands  wrote:
      
      > Hi Nick,
      >
      > > To elaborate, the comment was that the only pointer types we should
      > > allow are those which would let us load the vector and produce a legal
      > > vector type.
      >
      > presumably i8** would be a valid vector element type.  This means that
      > vector GEP may need more than one index.
      >
      
      No, only single-pointers for now but if there's a use case for them they
      can be added. It means that someone who wants to use gather operations to
      pointer-chase through multiple linked list nodes in parallel will need to
      use a inttoptr between each load. Somehow I'm okay with that. :)
      
      Nick
      
      Ciao, Duncan.
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      >
      -------------- next part --------------
      An HTML attachment was scrubbed...
      URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111129/b08d38cd/attachment.html 
      
      From grosbach at apple.com  Tue Nov 29 16:38:04 2011
      From: grosbach at apple.com (Jim Grosbach)
      Date: Tue, 29 Nov 2011 22:38:04 -0000
      Subject: [llvm-commits] [llvm] r145442 - in /llvm/trunk/lib/Target/ARM:
       ARMExpandPseudoInsts.cpp ARMISelDAGToDAG.cpp ARMInstrNEON.td
       Disassembler/ARMDisassembler.cpp
      Message-ID: <20111129223805.0F4E61BE001@llvm.org>
      
      Author: grosbach
      Date: Tue Nov 29 16:38:04 2011
      New Revision: 145442
      
      URL: http://llvm.org/viewvc/llvm-project?rev=145442&view=rev
      Log:
      ARM assembly parsing and encoding for three-register VST1.
      
      Modified:
          llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
          llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
          llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
          llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
      
      Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=145442&r1=145441&r2=145442&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
      +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue Nov 29 16:38:04 2011
      @@ -269,8 +269,9 @@
       
       { ARM::VST1d64QPseudo,      ARM::VST1d64Q,     false, false, false, SingleSpc,  4, 1 ,true},
       { ARM::VST1d64QPseudo_UPD,  ARM::VST1d64Q_UPD, false, true, true,  SingleSpc,  4, 1 ,true},
      -{ ARM::VST1d64TPseudo,      ARM::VST1d64T,     false, false, false, SingleSpc,  3, 1 ,true},
      -{ ARM::VST1d64TPseudo_UPD,  ARM::VST1d64T_UPD, false, true, true,  SingleSpc,  3, 1 ,true},
      +{ ARM::VST1d64TPseudo,      ARM::VST1d64T,     false, false, false, SingleSpc,  3, 1 ,false},
      +{ ARM::VST1d64TPseudoWB_fixed,  ARM::VST1d64Twb_fixed, false, true, false,  SingleSpc,  3, 1 ,false},
      +{ ARM::VST1d64TPseudoWB_register,  ARM::VST1d64Twb_register, false, true, true,  SingleSpc,  3, 1 ,false},
       
       { ARM::VST1q16Pseudo,       ARM::VST1q16,      false, false, false, SingleSpc,  2, 4 ,false},
       { ARM::VST1q16PseudoWB_fixed,   ARM::VST1q16wb_fixed, false, true, false,  SingleSpc,  2, 4 ,false},
      @@ -1186,7 +1187,8 @@
           case ARM::VST3d8Pseudo_UPD:
           case ARM::VST3d16Pseudo_UPD:
           case ARM::VST3d32Pseudo_UPD:
      -    case ARM::VST1d64TPseudo_UPD:
      +    case ARM::VST1d64TPseudoWB_fixed:
      +    case ARM::VST1d64TPseudoWB_register:
           case ARM::VST3q8Pseudo_UPD:
           case ARM::VST3q16Pseudo_UPD:
           case ARM::VST3q32Pseudo_UPD:
      
      Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=145442&r1=145441&r2=145442&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
      +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Nov 29 16:38:04 2011
      @@ -1579,6 +1579,7 @@
         case ARM::VST1q16PseudoWB_fixed: return ARM::VST1q16PseudoWB_register;
         case ARM::VST1q32PseudoWB_fixed: return ARM::VST1q32PseudoWB_register;
         case ARM::VST1q64PseudoWB_fixed: return ARM::VST1q64PseudoWB_register;
      +  case ARM::VST1d64TPseudoWB_fixed: return ARM::VST1d64TPseudoWB_register;
         }
         return Opc; // If not one we handle, return it unchanged.
       }
      @@ -2885,7 +2886,7 @@
       
         case ARMISD::VST3_UPD: {
           unsigned DOpcodes[] = { ARM::VST3d8Pseudo_UPD, ARM::VST3d16Pseudo_UPD,
      -                            ARM::VST3d32Pseudo_UPD, ARM::VST1d64TPseudo_UPD };
      +                            ARM::VST3d32Pseudo_UPD,ARM::VST1d64TPseudoWB_fixed};
           unsigned QOpcodes0[] = { ARM::VST3q8Pseudo_UPD,
                                    ARM::VST3q16Pseudo_UPD,
                                    ARM::VST3q32Pseudo_UPD };
      
      Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=145442&r1=145441&r2=145442&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
      +++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Tue Nov 29 16:38:04 2011
      @@ -1329,34 +1329,46 @@
       // ...with 3 registers
       class VST1D3 op7_4, string Dt>
         : NLdSt<0, 0b00, 0b0110, op7_4, (outs),
      -          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3),
      -          IIC_VST1x3, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
      +          (ins addrmode6:$Rn, VecListThreeD:$Vd),
      +          IIC_VST1x3, "vst1", Dt, "$Vd, $Rn", "", []> {
         let Rm = 0b1111;
         let Inst{4} = Rn{4};
         let DecoderMethod = "DecodeVSTInstruction";
       }
      -class VST1D3WB op7_4, string Dt>
      -  : NLdSt<0, 0b00, 0b0110, op7_4, (outs GPR:$wb),
      -          (ins addrmode6:$Rn, am6offset:$Rm,
      -           DPR:$Vd, DPR:$src2, DPR:$src3),
      -          IIC_VST1x3u, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
      -          "$Rn.addr = $wb", []> {
      -  let Inst{4} = Rn{4};
      -  let DecoderMethod = "DecodeVSTInstruction";
      +multiclass VST1D3WB op7_4, string Dt> {
      +  def _fixed : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
      +                    (ins addrmode6:$Rn, VecListThreeD:$Vd), IIC_VLD1x3u,
      +                     "vst1", Dt, "$Vd, $Rn!",
      +                     "$Rn.addr = $wb", []> {
      +    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
      +    let Inst{5-4} = Rn{5-4};
      +    let DecoderMethod = "DecodeVSTInstruction";
      +    let AsmMatchConverter = "cvtVSTwbFixed";
      +  }
      +  def _register : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
      +                        (ins addrmode6:$Rn, rGPR:$Rm, VecListThreeD:$Vd),
      +                        IIC_VLD1x3u,
      +                        "vst1", Dt, "$Vd, $Rn, $Rm",
      +                        "$Rn.addr = $wb", []> {
      +    let Inst{5-4} = Rn{5-4};
      +    let DecoderMethod = "DecodeVSTInstruction";
      +    let AsmMatchConverter = "cvtVSTwbRegister";
      +  }
       }
       
      -def VST1d8T      : VST1D3<{0,0,0,?}, "8">;
      -def VST1d16T     : VST1D3<{0,1,0,?}, "16">;
      -def VST1d32T     : VST1D3<{1,0,0,?}, "32">;
      -def VST1d64T     : VST1D3<{1,1,0,?}, "64">;
      -
      -def VST1d8T_UPD  : VST1D3WB<{0,0,0,?}, "8">;
      -def VST1d16T_UPD : VST1D3WB<{0,1,0,?}, "16">;
      -def VST1d32T_UPD : VST1D3WB<{1,0,0,?}, "32">;
      -def VST1d64T_UPD : VST1D3WB<{1,1,0,?}, "64">;
      -
      -def VST1d64TPseudo     : VSTQQPseudo;
      -def VST1d64TPseudo_UPD : VSTQQWBPseudo;
      +def VST1d8T     : VST1D3<{0,0,0,?}, "8">;
      +def VST1d16T    : VST1D3<{0,1,0,?}, "16">;
      +def VST1d32T    : VST1D3<{1,0,0,?}, "32">;
      +def VST1d64T    : VST1D3<{1,1,0,?}, "64">;
      +
      +defm VST1d8Twb  : VST1D3WB<{0,0,0,?}, "8">;
      +defm VST1d16Twb : VST1D3WB<{0,1,0,?}, "16">;
      +defm VST1d32Twb : VST1D3WB<{1,0,0,?}, "32">;
      +defm VST1d64Twb : VST1D3WB<{1,1,0,?}, "64">;
      +
      +def VST1d64TPseudo            : VSTQQPseudo;
      +def VST1d64TPseudoWB_fixed    : VSTQQWBPseudo;
      +def VST1d64TPseudoWB_register : VSTQQWBPseudo;
       
       // ...with 4 registers
       class VST1D4 op7_4, string Dt>
      
      Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=145442&r1=145441&r2=145442&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
      +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Tue Nov 29 16:38:04 2011
      @@ -2196,10 +2196,14 @@
           case ARM::VST1q16wb_register:
           case ARM::VST1q32wb_register:
           case ARM::VST1q64wb_register:
      -    case ARM::VST1d8T_UPD:
      -    case ARM::VST1d16T_UPD:
      -    case ARM::VST1d32T_UPD:
      -    case ARM::VST1d64T_UPD:
      +    case ARM::VST1d8Twb_fixed:
      +    case ARM::VST1d16Twb_fixed:
      +    case ARM::VST1d32Twb_fixed:
      +    case ARM::VST1d64Twb_fixed:
      +    case ARM::VST1d8Twb_register:
      +    case ARM::VST1d16Twb_register:
      +    case ARM::VST1d32Twb_register:
      +    case ARM::VST1d64Twb_register:
           case ARM::VST1d8Q_UPD:
           case ARM::VST1d16Q_UPD:
           case ARM::VST1d32Q_UPD:
      @@ -2264,14 +2268,6 @@
       
         // Second input register
         switch (Inst.getOpcode()) {
      -    case ARM::VST1d8T:
      -    case ARM::VST1d16T:
      -    case ARM::VST1d32T:
      -    case ARM::VST1d64T:
      -    case ARM::VST1d8T_UPD:
      -    case ARM::VST1d16T_UPD:
      -    case ARM::VST1d32T_UPD:
      -    case ARM::VST1d64T_UPD:
           case ARM::VST1d8Q:
           case ARM::VST1d16Q:
           case ARM::VST1d32Q:
      @@ -2334,14 +2330,6 @@
       
         // Third input register
         switch (Inst.getOpcode()) {
      -    case ARM::VST1d8T:
      -    case ARM::VST1d16T:
      -    case ARM::VST1d32T:
      -    case ARM::VST1d64T:
      -    case ARM::VST1d8T_UPD:
      -    case ARM::VST1d16T_UPD:
      -    case ARM::VST1d32T_UPD:
      -    case ARM::VST1d64T_UPD:
           case ARM::VST1d8Q:
           case ARM::VST1d16Q:
           case ARM::VST1d32Q:
      
      
      
      From grosbach at apple.com  Tue Nov 29 16:40:32 2011
      From: grosbach at apple.com (Jim Grosbach)
      Date: Tue, 29 Nov 2011 22:40:32 -0000
      Subject: [llvm-commits] [llvm] r145443 -
      	/llvm/trunk/test/MC/ARM/neon-vst-encoding.s
      Message-ID: <20111129224032.7F8511BE001@llvm.org>
      
      Author: grosbach
      Date: Tue Nov 29 16:40:32 2011
      New Revision: 145443
      
      URL: http://llvm.org/viewvc/llvm-project?rev=145443&view=rev
      Log:
      Enable some VST1 tests and add a few more.
      
      Modified:
          llvm/trunk/test/MC/ARM/neon-vst-encoding.s
      
      Modified: llvm/trunk/test/MC/ARM/neon-vst-encoding.s
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neon-vst-encoding.s?rev=145443&r1=145442&r2=145443&view=diff
      ==============================================================================
      --- llvm/trunk/test/MC/ARM/neon-vst-encoding.s (original)
      +++ llvm/trunk/test/MC/ARM/neon-vst-encoding.s Tue Nov 29 16:40:32 2011
      @@ -1,22 +1,28 @@
       @ RUN: llvm-mc -mcpu=cortex-a8 -triple armv7-apple-darwin -show-encoding < %s | FileCheck %s
       
       	vst1.8	{d16}, [r0, :64]
      -@	vst1.16	{d16}, [r0]
      -@	vst1.32	{d16}, [r0]
      -@	vst1.64	{d16}, [r0]
      -@	vst1.8	{d16, d17}, [r0, :64]
      -@	vst1.16	{d16, d17}, [r0, :128]
      -@	vst1.32	{d16, d17}, [r0]
      -@	vst1.64	{d16, d17}, [r0]
      +	vst1.16	{d16}, [r0]
      +	vst1.32	{d16}, [r0]
      +	vst1.64	{d16}, [r0]
      +	vst1.8	{d16, d17}, [r0, :64]
      +	vst1.16	{d16, d17}, [r0, :128]
      +	vst1.32	{d16, d17}, [r0]
      +	vst1.64	{d16, d17}, [r0]
      +        vst1.8  {d16, d17, d18}, [r0, :64]
      +        vst1.8  {d16, d17, d18}, [r0, :64]!
      +        vst1.8  {d16, d17, d18}, [r0], r3
       
       @ CHECK: vst1.8	{d16}, [r0, :64]        @ encoding: [0x1f,0x07,0x40,0xf4]
      -@ FIXME: vst1.16 {d16}, [r0]            @ encoding: [0x4f,0x07,0x40,0xf4]
      -@ FIXME: vst1.32 {d16}, [r0]            @ encoding: [0x8f,0x07,0x40,0xf4]
      -@ FIXME: vst1.64 {d16}, [r0]            @ encoding: [0xcf,0x07,0x40,0xf4]
      -@ FIXME: vst1.8	{d16, d17}, [r0, :64]   @ encoding: [0x1f,0x0a,0x40,0xf4]
      -@ FIXME: vst1.16 {d16, d17}, [r0, :128] @ encoding: [0x6f,0x0a,0x40,0xf4]
      -@ FIXME: vst1.32 {d16, d17}, [r0]       @ encoding: [0x8f,0x0a,0x40,0xf4]
      -@ FIXME: vst1.64 {d16, d17}, [r0]       @ encoding: [0xcf,0x0a,0x40,0xf4]
      +@ CHECK: vst1.16 {d16}, [r0]            @ encoding: [0x4f,0x07,0x40,0xf4]
      +@ CHECK: vst1.32 {d16}, [r0]            @ encoding: [0x8f,0x07,0x40,0xf4]
      +@ CHECK: vst1.64 {d16}, [r0]            @ encoding: [0xcf,0x07,0x40,0xf4]
      +@ CHECK: vst1.8	{d16, d17}, [r0, :64]   @ encoding: [0x1f,0x0a,0x40,0xf4]
      +@ CHECK: vst1.16 {d16, d17}, [r0, :128] @ encoding: [0x6f,0x0a,0x40,0xf4]
      +@ CHECK: vst1.32 {d16, d17}, [r0]       @ encoding: [0x8f,0x0a,0x40,0xf4]
      +@ CHECK: vst1.64 {d16, d17}, [r0]       @ encoding: [0xcf,0x0a,0x40,0xf4]
      +@ CHECK: vst1.8	{d16, d17, d18}, [r0, :64] @ encoding: [0x1f,0x06,0x40,0xf4]
      +@ CHECK: vst1.8	{d16, d17, d18}, [r0, :64]! @ encoding: [0x1d,0x06,0x40,0xf4]
      +@ CHECK: vst1.8	{d16, d17, d18}, [r0], r3 @ encoding: [0x03,0x06,0x40,0xf4]
       
       
       @	vst2.8	{d16, d17}, [r0, :64]
      
      
      
      From hfinkel at anl.gov  Tue Nov 29 16:47:53 2011
      From: hfinkel at anl.gov (Hal Finkel)
      Date: Tue, 29 Nov 2011 16:47:53 -0600
      Subject: [llvm-commits] Updated pointer-vector patch
      In-Reply-To: 
      References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com>
      	
      	<4ED4A7C9.7000506@free.fr>
      	
      Message-ID: <1322606873.2507.1244.camel@sapling>
      
      On Tue, 2011-11-29 at 14:31 -0800, Nick Lewycky wrote:
      > On 29 November 2011 01:37, Duncan Sands  wrote:
      >         Hi Nick,
      >         
      >         > To elaborate, the comment was that the only pointer types we
      >         should
      >         > allow are those which would let us load the vector and
      >         produce a legal
      >         > vector type.
      >         
      >         
      >         presumably i8** would be a valid vector element type.  This
      >         means that
      >         vector GEP may need more than one index.
      > 
      > 
      > No, only single-pointers for now but if there's a use case for them
      > they can be added. It means that someone who wants to use gather
      > operations to pointer-chase through multiple linked list nodes in
      > parallel will need to use a inttoptr between each load. Somehow I'm
      > okay with that. :)
      
      As I've discussed with Nadav, I feel that these multi-index vector GEPs
      should be supported for completeness, and scalarized, just like we do
      with other vector instructions without target support. Specifically,
      this means adding code to SelectionDAGBuilder::visitGetElementPtr that
      is similar to the code in SelectionDAG::UnrollVectorOp (or suitably
      extending UnrollVectorOp and then calling it from visitGetElementPtr). I
      am planning to do the work for this addition once the basic
      pointer-vector infrastructure is in place.
      
       -Hal
      
      > 
      > 
      > Nick
      > 
      > 
      >         Ciao, Duncan.
      >         _______________________________________________
      >         llvm-commits mailing list
      >         llvm-commits at cs.uiuc.edu
      >         http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      > 
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      -- 
      Hal Finkel
      Postdoctoral Appointee
      Leadership Computing Facility
      Argonne National Laboratory
      
      
      From evan.cheng at apple.com  Tue Nov 29 16:48:34 2011
      From: evan.cheng at apple.com (Evan Cheng)
      Date: Tue, 29 Nov 2011 22:48:34 -0000
      Subject: [llvm-commits] [llvm] r145448 - in /llvm/trunk:
       lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle-38.ll
      Message-ID: <20111129224834.EB8421BE001@llvm.org>
      
      Author: evancheng
      Date: Tue Nov 29 16:48:34 2011
      New Revision: 145448
      
      URL: http://llvm.org/viewvc/llvm-project?rev=145448&view=rev
      Log:
      Add another missing pattern. llvm-gcc likes f64 but clang likes i64 so it was generating poor code for some SSE builtins.
      
      Modified:
          llvm/trunk/lib/Target/X86/X86InstrSSE.td
          llvm/trunk/test/CodeGen/X86/vec_shuffle-38.ll
      
      Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=145448&r1=145447&r2=145448&view=diff
      ==============================================================================
      --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
      +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Nov 29 16:48:34 2011
      @@ -1151,6 +1151,9 @@
                        (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2))))),
                   (VMOVHPSrm VR128:$src1, addr:$src2)>;
         def : Pat<(X86Movlhps VR128:$src1,
      +                 (bc_v4f32 (v2i64 (scalar_to_vector (loadi64 addr:$src2))))),
      +            (VMOVHPSrm VR128:$src1, addr:$src2)>;
      +  def : Pat<(X86Movlhps VR128:$src1,
                        (bc_v4i32 (v2i64 (X86vzload addr:$src2)))),
                   (VMOVHPSrm VR128:$src1, addr:$src2)>;
       
      @@ -1184,6 +1187,9 @@
                        (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2))))),
                   (MOVHPSrm VR128:$src1, addr:$src2)>;
         def : Pat<(X86Movlhps VR128:$src1,
      +                 (bc_v4f32 (v2i64 (scalar_to_vector (loadi64 addr:$src2))))),
      +            (MOVHPSrm VR128:$src1, addr:$src2)>;
      +  def : Pat<(X86Movlhps VR128:$src1,
                        (bc_v4f32 (v2i64 (X86vzload addr:$src2)))),
                   (MOVHPSrm VR128:$src1, addr:$src2)>;
       
      
      Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle-38.ll
      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-38.ll?rev=145448&r1=145447&r2=145448&view=diff
      ==============================================================================
      --- llvm/trunk/test/CodeGen/X86/vec_shuffle-38.ll (original)
      +++ llvm/trunk/test/CodeGen/X86/vec_shuffle-38.ll Tue Nov 29 16:48:34 2011
      @@ -46,7 +46,7 @@
       
       ; rdar://10119696
       ; CHECK: f
      -define <4 x float> @f(<4 x float> %x, double* nocapture %y) nounwind uwtable readonly ssp {
      +define <4 x float> @f(<4 x float> %x, double* nocapture %y) nounwind readonly ssp {
       entry:
         ; CHECK: movlps  (%{{rdi|rdx}}), %xmm0
         %u110.i = load double* %y, align 1
      @@ -56,3 +56,22 @@
         ret <4 x float> %shuffle.i
       }
       
      +define <4 x float> @loadhpi2(%struct.Float2* nocapture %vHiCoefPtr_0, %struct.Float2* nocapture %vLoCoefPtr_0, i32 %s) nounwind readonly ssp {
      +entry:
      +; CHECK: loadhpi2
      +; CHECK: movhps (
      +; CHECK-NOT: movlhps
      +  %0 = bitcast %struct.Float2* %vHiCoefPtr_0 to <1 x i64>*
      +  %idx.ext = sext i32 %s to i64
      +  %add.ptr = getelementptr inbounds <1 x i64>* %0, i64 %idx.ext
      +  %add.ptr.val = load <1 x i64>* %add.ptr, align 1
      +  %1 = bitcast <1 x i64> %add.ptr.val to <2 x float>
      +  %shuffle.i = shufflevector <2 x float> %1, <2 x float> undef, <4 x i32> 
      +  %2 = bitcast %struct.Float2* %vLoCoefPtr_0 to <1 x i64>*
      +  %add.ptr2 = getelementptr inbounds <1 x i64>* %2, i64 %idx.ext
      +  %add.ptr2.val = load <1 x i64>* %add.ptr2, align 1
      +  %3 = bitcast <1 x i64> %add.ptr2.val to <2 x float>
      +  %shuffle.i4 = shufflevector <2 x float> %3, <2 x float> undef, <4 x i32> 
      +  %shuffle1.i5 = shufflevector <4 x float> %shuffle.i, <4 x float> %shuffle.i4, <4 x i32> 
      +  ret <4 x float> %shuffle1.i5
      +}
      
      
      
      From nlewycky at google.com  Tue Nov 29 16:56:35 2011
      From: nlewycky at google.com (Nick Lewycky)
      Date: Tue, 29 Nov 2011 14:56:35 -0800
      Subject: [llvm-commits] Updated pointer-vector patch
      In-Reply-To: <6594DDFF12B03D4E89690887C248699402A6A4E8BF@hasmsx504.ger.corp.intel.com>
      References: <6594DDFF12B03D4E89690887C248699402A69EA452@hasmsx504.ger.corp.intel.com>
      	
      	<6594DDFF12B03D4E89690887C248699402A6A4E8BF@hasmsx504.ger.corp.intel.com>
      Message-ID: 
      
      On 29 November 2011 10:27, Rotem, Nadav  wrote:
      
      > Hi Nick,
      >
      > Thank you for reviewing my code. I made corrections, and prepared a new
      > version. I made the following changes:
      >
      > 1. I added support for icmp of pointer-vectors.
      > 2. Made corrections in LangRef (inbound, summary, inttoptr example, etc).
      > 3. Added additional verifications (vector width, etc)
      > 4. Changed the casts to dyn_casts.
      > 5. Simplified the verification code that you said was confusing.
      > 6. Documented getBitWidth.
      > 7. I went over the users of getIndexedOffset, and changed some of them to
      > abort the optimization if a pointer-vector is used.
      > 8. Fixed IndVarSimplify.
      >
      
      Excellent, thanks! Unfortunately I'm rather busy today and am unlikely to
      be able to finish reviewing it before tomorrow. Sorry.
      
      One high-level question. Are you planning to permit:
      
        %X = load <4 x i8*> %ptr
      
      eventually? I'd been assuming you were, but I realized that I should
      confirm that. When you do, you'll need to audit every place in LLVM that
      looks at the pointer argument of a load or store and assumes that it has a
      pointer (since now it may have a vector).
      
      What I did not fix:
      >
      > 1. I did not add optimizations to ConstantFold. I plan to add these in the
      > future.
      >
      
      Okay. The patch can land first, but this is high priority thereafter. What
      ConstantFold (and ConstantFolding in lib/Analysis) must not do is crash,
      assert or produce invalid IR.
      
      2. I did not fix all of the users of getIndexedOffset. Currently there is
      > an assertion in getIndexOffsets. If the fixes I made are not enough then I
      > will fix additional users.
      >
      
      This might or might not be okay. I'll try to create a testcase which
      crashes due to this and send it to you if successful. If I can't then
      you're probably fine. :)
      
      3. Did not add support to the ASM parser for constant pointer vectors. I
      > may add this feature in the future.
      >
      
      Sorry, but this one needs to happen. The issue is that a module can contain
      these -- they can be created through the API, will pass the module
      verifier, can be serialized and deserialized in .bc files, and will print
      out a .ll that we then can't reparse.
      
      Here's a testcase:
      
        ; RUN: opt -instcombine -S -o - %s | llvm-as
        ; RUN: opt -instcombine -globalopt -S -o - %s | llvm-as
        @G1 = global i32 zeroinitializer
        @G2 = global i32 zeroinitializer
        @g = global <2 x i32*> zeroinitializer
        %0 = type { i32, void ()* }
        @llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()*
      @test }]
        define internal void @test() {
          %A = insertelement <2 x i32*> undef, i32* @G1, i32 0
          %B = insertelement <2 x i32*> %A,  i32* @G2, i32 1
          store <2 x i32*> %B, <2 x i32*>* @g
          ret void
        }
      
      4. I did not add unit tests.    Was this related to the constant  ?
      >
      
      Hm, we don't have any type tests already. I'll keep a list of anything I
      run across that I think really needs a test.
      
      Nick
      
      
      > I attached the revised patch.
      >
      > Thanks,
      > Nadav
      >
      >
      > -----Original Message-----
      > From: Nick Lewycky [mailto:nlewycky at google.com]
      > Sent: Tuesday, November 29, 2011 04:39
      > To: Rotem, Nadav
      > Cc: llvm-commits at cs.uiuc.edu
      > Subject: Re: Updated pointer-vector patch
      >
      > On 28 November 2011 12:33, Rotem, Nadav  wrote:
      > >
      > > I attached the updated pointer-vector patch, following comments from
      > Nick Lewycky.
      >
      > To elaborate, the comment was that the only pointer types we should
      > allow are those which would let us load the vector and produce a legal
      > vector type.
      >
      > +

      In cases where the pointer argument is a vector of pointers, only a > + single index may be used. For example:

      > +
      > + %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets,
      > +
      > Also mention that the number of elements must be the same. > - %X = ptrtoint i32* %X to i8 ; yields truncation on > 32-bit architecture > - %Y = ptrtoint i32* %x to i64 ; yields zero extension on > 32-bit architecture > + %X = ptrtoint i32* %X to i8 ; yields > truncation on 32-bit architecture > > While you're here, please make this use "%x" (lowercase) as the > operand consistently. The existing code "%X = op %X" is bad form > (using its own result). > > Also update the overview and summary for the instruction, replace > "pointer" with "pointer or vector of pointers" and "integer" with > "integer or vector of integers". See the documentation of "add" for > example. The semantics can simply mention that for a vector it does > the operation elementwise. > > Same with inttoptr and bitcast. > > template > static Type *getIndexedTypeInternal(Type *Ptr, ArrayRef IdxList) > { > + if (Ptr->isVectorTy()) { > + IndexTy Index = IdxList[0]; > "Index" is a dead variable right here. Did you mean to use it? > +unsigned GetElementPtrInst::getAddressSpace(Value *Ptr) { > + Type* Ty = Ptr->getType(); > "Type* Ty" --> "Type *Ty". > + if (Ty->isVectorTy()) > + Ty = cast(Ty)->getElementType(); > + > + if (Ty->isPointerTy()) > + return cast(Ty)->getAddressSpace(); > > Please use "if (VectorType *VTy = dyn_cast(Ty)) Ty = > VTy->getElementTy();". The difference is that when compiled in debug > mode, the code you wrote will do two tests. > > + Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), > + "PtrToInt type mismatch", &I); > > Please also verify the number of elements. Again in IntToPtr. > > Type *ElTy = > GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(), Idxs); > Assert1(ElTy, "Invalid indices for GEP pointer type!", &GEP); > - Assert2(GEP.getType()->isPointerTy() && > + if (GEP.getOperand(0)->getType()->isPointerTy()) { > + Assert2(GEP.getType()->isPointerTy() && > cast(GEP.getType())->getElementType() == ElTy, > "GEP is not of right type for indices!", &GEP, ElTy); > + } else { > + Assert1(Idxs.size() == 1, "Invalid number of indices!", &GEP); > > I'm confused. Can this assert ever fire when "Invalid indices for GEP > pointer type!" doesn't? > > bool VectorType::isValidElementType(Type *ElemTy) { > + if (ElemTy->isPointerTy()) > + ElemTy = cast(ElemTy)->getElementType(); > return ElemTy->isIntegerTy() || ElemTy->isFloatingPointTy(); > } > > Again, please use dyn_cast. > > > The changes in this patch fail to address vectors of pointers in an > icmp operation. It's fine if you want to leave that illegal and add > support for it later. The verifier will reject vectors of pointers as > icmp arguments, while continuing to accept integer vectors and scalar > pointers. > > The change to the LangRef doesn't address the meaning of inbounds on a > vector-gep. It seems reasonable to say that it applies to each of the > computations element-wise. > > You need to update the comment on VectorType::getBitWidth to indicate > that it will return zero on vectors of pointers. > > You need to update TargetData::getIndexedOffset to handle a vector > index, or update all of its callers. I don't know how to do this > because it returns a single integer, but you really want something > element-wise. > > Currently SROA will bail on "alloca <4 x i8*>". It (and mem2reg) need > to be taught to handle them. This is important for performance, but > can hold off until later. > > This code in ConstantFold.cpp: > > // If the right hand side is a bitcast, try using its inverse to simplify > // it by moving it to the left hand side. We can't do this if it would turn > // a vector compare into a scalar compare or visa versa. > if (ConstantExpr *CE2 = dyn_cast(C2)) { > Constant *CE2Op0 = CE2->getOperand(0); > if (CE2->getOpcode() == Instruction::BitCast && > CE2->getType()->isVectorTy() == CE2Op0->getType()->isVectorTy()) { > Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType()); > return ConstantExpr::getICmp(pred, Inverse, CE2Op0); > } > } > > assumes that it can produce a bitcast/icmp of any vector you can > bitcast. Now that we permit bitcasting on vectors of pointers, that is > no longer true. Please write a testcase, or let me know if you can't. > > The ASM parser doesn't parse constant vectors of pointers. Testcase: > > // llvm-as < %s -disable-output > @G1 = global i32 zeroinitializer > @G2 = global i32 zeroinitializer > @g = constant <2 x i32*> > > FoldBitCast in ConstantFolding.cpp should be taught that it can create > vectors of pointers too: > > // If this is a scalar -> vector cast, convert the input into a <1 x > scalar> > // vector so the code below can handle it uniformly. > if (isa(C) || isa(C)) { > > || C->getType() is pointer to a vector argument. > > Constant *Ops = C; // don't take the address of C! > return FoldBitCast(ConstantVector::get(Ops), DestTy, TD); > } > > You should add tests for the basic correctness to tests under > unittests/. Show that creating a vector of null pointers becomes a > constant aggregate zero, show that you can create a GEP with a > non-pointer argument (the vector). > > This code inside IndVarSimplify.cpp needs to change > > // Retrieve the pointer operand of the GEP. Don't use GetUnderlyingObject > // because it understands lcssa phis while SCEV does not. > Value *FromPtr = FromVal; > Value *ToPtr = ToVal; > if (GEPOperator *GEP = dyn_cast(FromVal)) { > FromPtr = GEP->getPointerOperand(); > } > if (GEPOperator *GEP = dyn_cast(ToVal)) { > ToPtr = GEP->getPointerOperand(); > } > > because it sends the FromPtr and ToPtr to SCEV: > > const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); > const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); > > which does not support vectors of pointers, only normal pointers. > > Nick > > > > > Thanks, > > Nadav > > > > --------------------------------------------------------------------- > > Intel Israel (74) Limited > > > > This e-mail and any attachments may contain confidential material for > > the sole use of the intended recipient(s). Any review or distribution > > by others is strictly prohibited. If you are not the intended > > recipient, please contact the sender and delete all copies. > --------------------------------------------------------------------- > Intel Israel (74) Limited > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111129/15105c66/attachment.html From daniel at zuster.org Tue Nov 29 16:56:31 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 22:56:31 -0000 Subject: [llvm-commits] [llvm] r145449 - in /llvm/trunk: CMakeLists.txt Makefile Makefile.rules autoconf/configure.ac configure tools/CMakeLists.txt tools/Makefile tools/llvm-config-2/BuildVariables.inc.in tools/llvm-config-2/CMakeLists.txt tools/llvm-config-2/Makefile tools/llvm-config-2/llvm-config.cpp tools/llvm-config/BuildVariables.inc.in tools/llvm-config/CMakeLists.txt tools/llvm-config/Makefile tools/llvm-config/find-cycles.pl tools/llvm-config/llvm-config.cpp tools/llvm-config/llvm-config.in.in Message-ID: <20111129225631.C3B571BE001@llvm.org> Author: ddunbar Date: Tue Nov 29 16:56:31 2011 New Revision: 145449 URL: http://llvm.org/viewvc/llvm-project?rev=145449&view=rev Log: llvm-config: Replace with C++ version (was llvm-config-2). - Reapply of r144300, with lots of fixes/migration easement in between. Added: llvm/trunk/tools/llvm-config/BuildVariables.inc.in - copied, changed from r145443, llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in llvm/trunk/tools/llvm-config/llvm-config.cpp - copied, changed from r145443, llvm/trunk/tools/llvm-config-2/llvm-config.cpp Removed: llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in llvm/trunk/tools/llvm-config-2/CMakeLists.txt llvm/trunk/tools/llvm-config-2/Makefile llvm/trunk/tools/llvm-config-2/llvm-config.cpp llvm/trunk/tools/llvm-config/find-cycles.pl llvm/trunk/tools/llvm-config/llvm-config.in.in Modified: llvm/trunk/CMakeLists.txt llvm/trunk/Makefile llvm/trunk/Makefile.rules llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/tools/CMakeLists.txt llvm/trunk/tools/Makefile llvm/trunk/tools/llvm-config/CMakeLists.txt llvm/trunk/tools/llvm-config/Makefile Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Tue Nov 29 16:56:31 2011 @@ -230,7 +230,7 @@ set(LLVMBUILDTOOL "${LLVM_MAIN_SRC_DIR}/utils/llvm-build/llvm-build") set(LLVMCONFIGLIBRARYDEPENDENCIESINC - "${LLVM_BINARY_DIR}/tools/llvm-config-2/LibraryDependencies.inc") + "${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc") set(LLVMBUILDCMAKEFRAG "${LLVM_BINARY_DIR}/LLVMBuild.cmake") message(STATUS "Constructing LLVMBuild project information") Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Tue Nov 29 16:56:31 2011 @@ -27,11 +27,11 @@ ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style"). ifeq ($(BUILD_DIRS_ONLY),1) - DIRS := lib/Support lib/TableGen utils tools/llvm-config-2 + DIRS := lib/Support lib/TableGen utils tools/llvm-config OPTIONAL_DIRS := tools/clang/utils/TableGen else DIRS := lib/Support lib/TableGen utils lib/VMCore lib tools/llvm-shlib \ - tools/llvm-config tools/llvm-config-2 tools runtime docs unittests + tools/llvm-config tools runtime docs unittests OPTIONAL_DIRS := projects bindings endif Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Nov 29 16:56:31 2011 @@ -79,7 +79,7 @@ # The files we are going to generate using llvm-build. LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild LLVMConfigLibraryDependenciesInc := \ - $(PROJ_OBJ_ROOT)/tools/llvm-config-2/LibraryDependencies.inc + $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc # This is for temporary backwards compatibility. ifndef TARGET_NATIVE_ARCH @@ -528,9 +528,9 @@ endif endif ifeq ($(LLVM_CROSS_COMPILING),1) - LLVM_CONFIG := $(BuildLLVMToolDir)/llvm-config-2$(BUILD_EXEEXT) + LLVM_CONFIG := $(BuildLLVMToolDir)/llvm-config$(BUILD_EXEEXT) else - LLVM_CONFIG := $(LLVMToolDir)/llvm-config-2$(EXEEXT) + LLVM_CONFIG := $(LLVMToolDir)/llvm-config$(EXEEXT) endif ifndef LLVMLD LLVMLD := $(LLVMToolDir)/llvm-ld$(EXEEXT) Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Nov 29 16:56:31 2011 @@ -1578,9 +1578,6 @@ AC_CONFIG_FILES([tools/clang/docs/doxygen.cfg]) fi -dnl Do the first stage of configuration for llvm-config.in. -AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) - dnl OCaml findlib META file AC_CONFIG_FILES([bindings/ocaml/llvm/META.llvm]) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Nov 29 16:56:31 2011 @@ -21100,7 +21100,7 @@ fi -ac_config_files="$ac_config_files tools/llvm-config/llvm-config.in" + ac_config_files="$ac_config_files bindings/ocaml/llvm/META.llvm" Modified: llvm/trunk/tools/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/tools/CMakeLists.txt (original) +++ llvm/trunk/tools/CMakeLists.txt Tue Nov 29 16:56:31 2011 @@ -11,16 +11,9 @@ endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt ) if( NOT WIN32 OR MSYS OR CYGWIN ) - # It is useful to build llvm-config before the other tools, so we - # have a fresh LibDeps.txt for regenerating the hard-coded library - # dependencies. llvm-config/CMakeLists.txt takes care of this but we - # must keep llvm-config as the first entry on the list of tools to - # be built. - add_subdirectory(llvm-config) - - # We currently require 'sed' to build llvm-config-2, so don't try to build it + # We currently require 'sed' to build llvm-config, so don't try to build it # on pure Win32. - add_subdirectory(llvm-config-2) + add_subdirectory(llvm-config) endif() add_subdirectory(opt) Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=145449&r1=145448&r2=145449&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Tue Nov 29 16:56:31 2011 @@ -34,7 +34,7 @@ bugpoint llvm-bcanalyzer llvm-stub \ llvm-diff macho-dump llvm-objdump \ llvm-rtdyld llvm-dwarfdump llvm-cov \ - llvm-size llvm-config-2 + llvm-size # Let users override the set of tools to build from the command line. ifdef ONLY_TOOLS Removed: llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in?rev=145448&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in (original) +++ llvm/trunk/tools/llvm-config-2/BuildVariables.inc.in (removed) @@ -1,26 +0,0 @@ -//===-- BuildVariables.inc.in - llvm-config build variables -*- C++ -*-----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file is configured by the build system to define the variables -// llvm-config wants to report to the user, but which can only be determined at -// build time. -// -// The non .in variant of this file has been autogenerated by the LLVM build. Do -// not edit! -// -//===----------------------------------------------------------------------===// - -#define LLVM_SRC_ROOT "@LLVM_SRC_ROOT@" -#define LLVM_OBJ_ROOT "@LLVM_OBJ_ROOT@" -#define LLVM_CPPFLAGS "@LLVM_CPPFLAGS@" -#define LLVM_CFLAGS "@LLVM_CFLAGS@" -#define LLVM_LDFLAGS "@LLVM_LDFLAGS@" -#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" -#define LLVM_BUILDMODE "@LLVM_BUILDMODE@" -#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" Removed: llvm/trunk/tools/llvm-config-2/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/CMakeLists.txt?rev=145448&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config-2/CMakeLists.txt (removed) @@ -1,41 +0,0 @@ -set(LLVM_LINK_COMPONENTS support) - -# We need to generate the BuildVariables.inc file containing values which are -# only defined when under certain build modes. Unfortunately, that precludes -# doing this inside CMake so we have to shell out to sed. For now, that means we -# can't expect to build llvm-config on Window.s -set(BUILDVARIABLES_SRCPATH ${CMAKE_CURRENT_SOURCE_DIR}/BuildVariables.inc.in) -set(BUILDVARIABLES_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.inc) -set(SEDSCRIPT_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.configure.sed) - -# Compute the substitution values for various items. -get_system_libs(LLVM_SYSTEM_LIBS_LIST) -foreach(l ${LLVM_SYSTEM_LIBS_LIST}) - set(SYSTEM_LIBS ${SYSTEM_LIBS} "-l${l}") -endforeach() -set(C_FLGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") -set(CXX_FLGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") -set(CPP_FLGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") - -add_custom_command(OUTPUT ${BUILDVARIABLES_OBJPATH} - COMMAND echo s!@LLVM_SRC_ROOT@!${LLVM_MAIN_SRC_DIR}! > ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_OBJ_ROOT@!${LLVM_BINARY_DIR}! >> ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_CPPFLAGS@!${CPP_FLGS}! >> ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_CFLAGS@!${C_FLGS}! >> ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_CXXFLAGS@!${CXX_FLGS}! >> ${SEDSCRIPT_OBJPATH} - # TODO: Use general flags for linking! not just for shared libs: - COMMAND echo s!@LLVM_LDFLAGS@!${CMAKE_SHARED_LINKER_FLAGS}! >> ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_BUILDMODE@!${CMAKE_BUILD_TYPE}! >> ${SEDSCRIPT_OBJPATH} - COMMAND echo s!@LLVM_SYSTEM_LIBS@!${SYSTEM_LIBS}! >> ${SEDSCRIPT_OBJPATH} - COMMAND sed -f ${SEDSCRIPT_OBJPATH} < ${BUILDVARIABLES_SRCPATH} > ${BUILDVARIABLES_OBJPATH} - VERBATIM - COMMENT "Building BuildVariables.inc include." - ) - -# Add the llvm-config tool. -add_llvm_tool(llvm-config-2 - llvm-config.cpp - ) - -# Add the dependency on the generation step. -add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) Removed: llvm/trunk/tools/llvm-config-2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/Makefile?rev=145448&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/Makefile (original) +++ llvm/trunk/tools/llvm-config-2/Makefile (removed) @@ -1,57 +0,0 @@ -##===- tools/llvm-config/Makefile---------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LEVEL := ../.. -TOOLNAME := llvm-config-2 -USEDLIBS := LLVMSupport.a - -# We generate sources in the build directory, make sure it is in the include -# paths. -INCLUDE_BUILD_DIR := 1 - -# This tool has no plugins, optimize startup time. -TOOL_NO_EXPORTS := 1 - -# Note that we have to use lazy expansion here. -BUILDVARIABLES_SRCPATH = $(PROJ_SRC_ROOT)/tools/$(TOOLNAME)/BuildVariables.inc.in -BUILDVARIABLES_OBJPATH = $(ObjDir)/BuildVariables.inc -BUILT_SOURCES = $(BUILDVARIABLES_OBJPATH) - -include $(LEVEL)/Makefile.common - -# Combine preprocessor flags (except for -I) and CXX flags. -SUB_CPPFLAGS := ${CPP.BaseFlags} -SUB_CFLAGS := ${CPP.BaseFlags} ${C.Flags} -SUB_CXXFLAGS := ${CPP.BaseFlags} ${CXX.Flags} - -# This is blank for now. We need to be careful about adding stuff here: -# LDFLAGS tend not to be portable, and we don't currently require the -# user to use libtool when linking against LLVM. -SUB_LDFLAGS := - -$(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir - $(Echo) "Building llvm-config BuildVariables.inc file." - $(Verb) $(ECHO) 's/@LLVM_SRC_ROOT@/$(subst /,\/,$(LLVM_SRC_ROOT))/' \ - > temp.sed - $(Verb) $(ECHO) 's/@LLVM_OBJ_ROOT@/$(subst /,\/,$(LLVM_OBJ_ROOT))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_CPPFLAGS@/$(subst /,\/,$(SUB_CPPFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_CFLAGS@/$(subst /,\/,$(SUB_CFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_CXXFLAGS@/$(subst /,\/,$(SUB_CXXFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_LDFLAGS@/$(subst /,\/,$(SUB_LDFLAGS))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \ - >> temp.sed - $(Verb) $(ECHO) 's/@LLVM_SYSTEM_LIBS@/$(subst /,\/,$(LIBS))/' \ - >> temp.sed - $(Verb) $(SED) -f temp.sed < $< > $@ - $(Verb) $(RM) temp.sed Removed: llvm/trunk/tools/llvm-config-2/llvm-config.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config-2/llvm-config.cpp?rev=145448&view=auto ============================================================================== --- llvm/trunk/tools/llvm-config-2/llvm-config.cpp (original) +++ llvm/trunk/tools/llvm-config-2/llvm-config.cpp (removed) @@ -1,335 +0,0 @@ -//===-- llvm-config.cpp - LLVM project configuration utility --------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This tool encapsulates information about an LLVM project configuration for -// use by other project's build environments (to determine installed path, -// available features, required libraries, etc.). -// -// Note that although this tool *may* be used by some parts of LLVM's build -// itself (i.e., the Makefiles use it to compute required libraries when linking -// tools), this tool is primarily designed to support external projects. -// -//===----------------------------------------------------------------------===// - -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" -#include "llvm/Config/config.h" -#include "llvm/Config/llvm-config.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/TargetRegistry.h" -#include "llvm/Support/raw_ostream.h" -#include -#include -#include - -using namespace llvm; - -// Include the build time variables we can report to the user. This is generated -// at build time from the BuildVariables.inc.in file by the build system. -#include "BuildVariables.inc" - -// Include the component table. This creates an array of struct -// AvailableComponent entries, which record the component name, library name, -// and required components for all of the available libraries. -// -// Not all components define a library, we also use "library groups" as a way to -// create entries for pseudo groups like x86 or all-targets. -#include "LibraryDependencies.inc" - -/// \brief Traverse a single component adding to the topological ordering in -/// \arg RequiredLibs. -/// -/// \param Name - The component to traverse. -/// \param ComponentMap - A prebuilt map of component names to descriptors. -/// \param VisitedComponents [in] [out] - The set of already visited components. -/// \param RequiredLibs [out] - The ordered list of required libraries. -static void VisitComponent(StringRef Name, - const StringMap &ComponentMap, - std::set &VisitedComponents, - std::vector &RequiredLibs) { - // Lookup the component. - AvailableComponent *AC = ComponentMap.lookup(Name); - assert(AC && "Invalid component name!"); - - // Add to the visited table. - if (!VisitedComponents.insert(AC).second) { - // We are done if the component has already been visited. - return; - } - - // Otherwise, visit all the dependencies. - for (unsigned i = 0; AC->RequiredLibraries[i]; ++i) { - VisitComponent(AC->RequiredLibraries[i], ComponentMap, VisitedComponents, - RequiredLibs); - } - - // Add to the required library list. - if (AC->Library) - RequiredLibs.push_back(AC->Library); -} - -/// \brief Compute the list of required libraries for a given list of -/// components, in an order suitable for passing to a linker (that is, libraries -/// appear prior to their dependencies). -/// -/// \param Components - The names of the components to find libraries for. -/// \param RequiredLibs [out] - On return, the ordered list of libraries that -/// are required to link the given components. -void ComputeLibsForComponents(const std::vector &Components, - std::vector &RequiredLibs) { - std::set VisitedComponents; - - // Build a map of component names to information. - StringMap ComponentMap; - for (unsigned i = 0; i != array_lengthof(AvailableComponents); ++i) { - AvailableComponent *AC = &AvailableComponents[i]; - ComponentMap[AC->Name] = AC; - } - - // Visit the components. - for (unsigned i = 0, e = Components.size(); i != e; ++i) { - // Users are allowed to provide mixed case component names. - std::string ComponentLower = Components[i].lower(); - - // Validate that the user supplied a valid component name. - if (!ComponentMap.count(ComponentLower)) { - llvm::errs() << "llvm-config: unknown component name: " << Components[i] - << "\n"; - exit(1); - } - - VisitComponent(ComponentLower, ComponentMap, VisitedComponents, - RequiredLibs); - } - - // The list is now ordered with leafs first, we want the libraries to printed - // in the reverse order of dependency. - std::reverse(RequiredLibs.begin(), RequiredLibs.end()); -} - -/* *** */ - -void usage() { - errs() << "\ -usage: llvm-config