[llvm-dev] target triple in 3.8

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 19 12:24:21 PST 2016


I added your suggestion and am using this now

llvm::legacy::FunctionPassManager *functionPassManager = new 
llvm::legacy::FunctionPassManager(Mod);

llvm::PassRegistry &registry = *llvm::PassRegistry::getPassRegistry();
initializeScalarOpts(registry);

functionPassManager->add( new 
llvm::TargetLibraryInfoWrapperPass(llvm::TargetLibraryInfoImpl(targetMachine->getTargetTriple())) 
);


still,

LV: The Widest register is: 32 bits.


so, unfortunately no change.

If I dump the Module, it starts with:

; ModuleID = 'module'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"


Does this datalayout look good for x86-64 AVX ?


Frank



On 02/19/2016 03:14 PM, Mehdi Amini wrote:
> Do you have the TTI in your pass manager?
>
> Something like:
>
>      // Add the TTI (required to inform the vectorizer about register size for
>      // instance)
>      PM.add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis()));
>
> Also, are you populating the pass manager using the passmanagerbuilder? You still need the TLI:
>
>      // Populate the PassManager
>      PassManagerBuilder PMB;
>      PMB.LibraryInfo = new TargetLibraryInfoImpl(TM->getTargetTriple());
> ....
>
>
> Or without the PassManagerBuild, something like:
>
>      PM.add(new TargetLibraryInfoWrapperPass(TargetLibraryInfoImpl(TM->getTargetTriple())));
>
>




More information about the llvm-dev mailing list