[llvm-commits] [dragonegg] r171641 - /dragonegg/trunk/src/Backend.cpp

Chandler Carruth chandlerc at google.com
Sat Jan 5 15:41:31 PST 2013


On Sat, Jan 5, 2013 at 3:30 PM, Duncan Sands <baldrick at free.fr> wrote:

> Author: baldrick
> Date: Sat Jan  5 17:30:40 2013
> New Revision: 171641
>
> URL: http://llvm.org/viewvc/llvm-project?rev=171641&view=rev
> Log:
> After Chandler's latest changes, having TTI seems to have become obligatory
> (otherwise you can get a crash in SelectionDAG.cpp:3392, in the second of
> the
> following two lines:
>   const TargetTransformInfo *TTI = DAG.getTargetTransformInfo();
>   if (TTI->getIntImmCost(Val, VT.getTypeForEVT(*DAG.getContext())) < 2)
> )
>

Yea, this is what I thought it was, but there were other candidates as well.

This will all go away when I finish making it a *real* analysis, and then
it will be optional, but without it you'll get poor behavior from LSR /
vectorizer / popcnt recognizer / etc...


>
> 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=171641&r1=171640&r2=171641&view=diff
>
> ==============================================================================
> --- dragonegg/trunk/src/Backend.cpp (original)
> +++ dragonegg/trunk/src/Backend.cpp Sat Jan  5 17:30:40 2013
> @@ -44,6 +44,7 @@
>  #include "llvm/Support/SourceMgr.h"
>  #include "llvm/Support/TargetRegistry.h"
>  #include "llvm/Target/TargetLibraryInfo.h"
> +#include "llvm/TargetTransformInfo.h"
>  #include "llvm/Transforms/IPO.h"
>  #include "llvm/Transforms/IPO/PassManagerBuilder.h"
>
> @@ -683,6 +684,8 @@
>
>    PerModulePasses = new PassManager();
>    PerModulePasses->add(new DataLayout(TheModule));
> +
>  PerModulePasses->add(createNoTTIPass(TheTarget->getScalarTargetTransformInfo(),
> +
> TheTarget->getVectorTargetTransformInfo()));
>
>    bool NeedAlwaysInliner = false;
>    llvm::Pass *InliningPass = 0;
> @@ -735,6 +738,8 @@
>        FunctionPassManager *PM = CodeGenPasses =
>          new FunctionPassManager(TheModule);
>        PM->add(new DataLayout(*TheTarget->getDataLayout()));
> +      PM->add(createNoTTIPass(TheTarget->getScalarTargetTransformInfo(),
> +                              TheTarget->getVectorTargetTransformInfo()));
>
>        // Request that addPassesToEmitFile run the Verifier after running
>        // passes which modify the IR.
>
>
> _______________________________________________
> 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.llvm.org/pipermail/llvm-commits/attachments/20130105/97d5f131/attachment.html>


More information about the llvm-commits mailing list