[llvm-commits] [llvm] r166911 - /llvm/trunk/lib/Target/TargetTransformImpl.cpp
Hal Finkel
hfinkel at anl.gov
Mon Oct 29 04:37:01 PDT 2012
----- Original Message -----
> From: "Nadav Rotem" <nrotem at apple.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Monday, October 29, 2012 12:28:35 AM
> Subject: [llvm-commits] [llvm] r166911 - /llvm/trunk/lib/Target/TargetTransformImpl.cpp
>
> Author: nadav
> Date: Mon Oct 29 00:28:35 2012
> New Revision: 166911
>
> URL: http://llvm.org/viewvc/llvm-project?rev=166911&view=rev
> Log:
> Calling TLI->getNumRegisters creates a circular dependency when
> building LLVM using cmake.
Was this specific to cmake, or was there generally a problem with shared-library builds?
-Hal
>
> Get the number of registers by calling getTypeLegalizationCost.
>
> PR14199.
>
>
> Modified:
> llvm/trunk/lib/Target/TargetTransformImpl.cpp
>
> Modified: llvm/trunk/lib/Target/TargetTransformImpl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetTransformImpl.cpp?rev=166911&r1=166910&r2=166911&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/TargetTransformImpl.cpp (original)
> +++ llvm/trunk/lib/Target/TargetTransformImpl.cpp Mon Oct 29 00:28:35
> 2012
> @@ -270,7 +270,7 @@
> return getScalarizationOverhead(ValTy, true, false) + Num *
> Cost;
> }
>
> - // Unknown scalar opcode.
> + // Unknown scalar opcode.
> return 1;
> }
>
> @@ -300,6 +300,8 @@
>
> unsigned
> VectorTargetTransformImpl::getNumberOfParts(Type *Tp) const {
> - return TLI->getNumRegisters(Tp->getContext(),
> TLI->getValueType(Tp));
> + std::pair<unsigned, EVT> LT =
> + getTypeLegalizationCost(Tp->getContext(),
> TLI->getValueType(Tp));
> + return LT.first;
> }
>
>
>
> _______________________________________________
> 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
More information about the llvm-commits
mailing list