[llvm-commits] [llvm] r55865 - in /llvm/trunk: include/llvm/Analysis/CallGraph.h lib/Analysis/IPA/CallGraph.cpp lib/CodeGen/SelectionDAG/FastISel.cpp lib/Transforms/IPO/PruneEH.cpp lib/Transforms/Utils/InlineFunction.cpp

Duncan Sands baldrick at free.fr
Sat Sep 6 09:32:01 PDT 2008


Hi Owen,

> Revert r55859.  This is breaking the build in the abscence of its companion commit.

got an example of what it breaks.  It wasn't supposed
to change any functionality...

Also, you seem to have reverted something more:

> --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Fri Sep  5 18:36:01 2008
> @@ -35,7 +35,8 @@
>    MVT::SimpleValueType VT = TLI.getValueType(V->getType()).getSimpleVT();
>    if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
>      if (CI->getValue().getActiveBits() > 64)
> -      return 0;
> +      return TargetMaterializeConstant(CI,
> +                                       MBB->getParent()->getConstantPool());
>      // Don't cache constant materializations.  To do so would require
>      // tracking what uses they dominate.
>      Reg = FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
> @@ -52,16 +53,19 @@
>        uint32_t IntBitWidth = IntVT.getSizeInBits();
>        if (Flt.convertToInteger(x, IntBitWidth, /*isSigned=*/true,
>                                 APFloat::rmTowardZero) != APFloat::opOK)
> -        return 0;
> +        return TargetMaterializeConstant(CF,    
> +                                         MBB->getParent()->getConstantPool());
>        APInt IntVal(IntBitWidth, 2, x);
>  
>        unsigned IntegerReg = FastEmit_i(IntVT.getSimpleVT(), IntVT.getSimpleVT(),
>                                         ISD::Constant, IntVal.getZExtValue());
>        if (IntegerReg == 0)
> -        return 0;
> +        return TargetMaterializeConstant(CF,
> +                                         MBB->getParent()->getConstantPool());
>        Reg = FastEmit_r(IntVT.getSimpleVT(), VT, ISD::SINT_TO_FP, IntegerReg);
>        if (Reg == 0)
> -        return 0;
> +        return TargetMaterializeConstant(CF,
> +                                         MBB->getParent()->getConstantPool());;
>      }
>    } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
>      if (!SelectOperator(CE, CE->getOpcode())) return 0;
> @@ -73,6 +77,10 @@
>      return 0;
>    }
>    
> +  if (!Reg && isa<Constant>(V))
> +    return TargetMaterializeConstant(cast<Constant>(V),
> +                                     MBB->getParent()->getConstantPool());
> +  
>    LocalValueMap[V] = Reg;
>    return Reg;
>  }

Ciao,

Duncan.



More information about the llvm-commits mailing list