search for: gettargettriple

Displaying 20 results from an estimated 54 matches for "gettargettriple".

2016 Feb 19
3
target triple in 3.8
...Manager *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/201...
2012 Jun 01
0
[LLVMdev] [llvm-commits] [PATCH] Allow per-thread re-direction of outs()/errs()
...this snippet from LinkModules.cpp: if (!SrcM->getDataLayout().empty() && !DstM->getDataLayout().empty() && SrcM->getDataLayout() != DstM->getDataLayout()) errs() << "WARNING: Linking two modules of different data layouts!\n"; if (!SrcM->getTargetTriple().empty() && DstM->getTargetTriple() != SrcM->getTargetTriple()) { errs() << "WARNING: Linking two modules of different target triples: "; if (!SrcM->getModuleIdentifier().empty()) errs() << SrcM->getModuleIdentifier() << ": &...
2012 Jun 01
2
[LLVMdev] [llvm-commits] [PATCH] Allow per-thread re-direction of outs()/errs()
On Thu, May 31, 2012 at 8:06 PM, Chris Lattner <clattner at apple.com> wrote: > > On May 31, 2012, at 2:39 PM, Justin Holewinski wrote: > > > The attached patch add the ability to programmatically re-direct > outs()/errs() to an arbitrary raw_ostream instance, maintaining the > raw_ostream instances in a stack structure so clients can push/pop streams > at will. The
2016 Feb 19
2
target triple in 3.8
I have some trouble making the SIMD vector length visible to the passes. My application is basically on the level of 'opt'. What I did in version 3.6 was functionPassManager->add(new llvm::TargetLibraryInfo(llvm::Triple(Mod->getTargetTriple()))); functionPassManager->add(new llvm::DataLayoutPass()); and then the -basicaa and -loop-vectorizer were able to vectorize the input IR for AVX. Now, with 3.8 that didn't compile. What I do instead is just setting the datalayout to the Module (got that from the Kaleido example). Mod-...
2012 Jun 01
3
[LLVMdev] [llvm-commits] [PATCH] Allow per-thread re-direction of outs()/errs()
...dules.cpp: > > if (!SrcM->getDataLayout().empty() && !DstM->getDataLayout().empty() && > SrcM->getDataLayout() != DstM->getDataLayout()) > errs() << "WARNING: Linking two modules of different data layouts!\n"; > if (!SrcM->getTargetTriple().empty() && > DstM->getTargetTriple() != SrcM->getTargetTriple()) { > errs() << "WARNING: Linking two modules of different target triples: "; > if (!SrcM->getModuleIdentifier().empty()) > errs() << SrcM->getModuleIdentifier(...
2015 May 23
3
[LLVMdev] Moving Private Label Prefixes from MCAsmInfo to MCObjectFileInfo
On 23 May 2015 at 00:08, Jim Grosbach <grosbach at apple.com> wrote: > This is the key question. The LLVM assumption is that these sorts of things > are inferable from the triple. Your observation here that the GNU world’s > notion of triples and LLVM’s need not be the same is a good one. Having a > split and a translation up in clang seems an interesting avenue to explore. >
2010 Dec 26
2
[LLVMdev] Generating target dependent function calls
...#39;m currently considering > is to use the TargetInfo class from Clang's Basic library which can > be used to obtain target specific parameters (such as sizeof(long)) > given a target triple. Interesting. Maybe I can get enough information from the target triple itself. Module::&getTargetTriple should be enough. I did not think about this, but that might work. Thanks for the pointer. Tobi
2017 Mar 29
3
clang 4.0.0: Invalid code for builtin floating point function with -mfloat-abi=hard -ffast-math (ARM)
On 29 March 2017 at 02:33, Saleem Abdulrasool <compnerd at compnerd.org> wrote: > sin/cos are libm functions, and so a libcall to those need to honour the > floating point ABI requests. The calling convention to be followed there > should match `-mfloat-abi` (that is, -mfloat-abi=hard => AAPCS/VFP, > -mfloat-abi=soft => AAPCS). Exactly, but they're not, and that's
2011 Feb 24
0
[LLVMdev] Implementing platform specific library call simplification
...t do that.  SimplifyLibcalls depends on TargetLibraryInfo, which is an analysis pass. However, TargetLibraryInfo does take a target triple (not a bool though) as constructor argument, defaulting to all-unknown. Maybe instead of being an ImmutablePass it should be a ModulePass so it can use Module::getTargetTriple() in runOnModule()? That should make it more compatible with opt & bugpoint.
2018 Jan 01
2
Inspecting 'Triple' from arbitrary source files
...n (TargetTransformInfo and TargetMachine being the most obvious). > During prototyping and exploring, making temporary changes to the > target-independent code is the best way until I understand how to best > implement the final version. For purely personal hacks I'd go via Module::getTargetTriple myself, but then for personal hacks I probably wouldn't even bother checking the target. Cheers. Tim.
2017 Aug 22
2
Subtarget Initialization in <ARCH>TargetMachine constructor
..., bool isLittle) : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT, CPU, FS, Options, getEffectiveRelocModel(TT, RM), getEffectiveCodeModel(CM), OL), TargetABI(computeTargetABI(TT, CPU, Options)), TLOF(createTLOF(getTargetTriple())), isLittle(isLittle) { ... } It does not create a separate Subtarget, and its getSubtargetImpl() tries to get the value from SubtargetMap. Is there any downside to keep BPFTargetMachine as is? Or it is worthwhile to implement it in a similar way to X86/ARM? Thanks! Yonghong -------------- nex...
2018 Mar 22
1
How to extract functions from Module A and put them into Module B, and generate a new IR file?
...llvm::raw_fd_ostream osB("B.bc", "", llvm::sys::fs::F_None); llvm::Module *ModuleA = new llvm::Module("A", context); llvm::Module *ModuleB = new llvm::Module("B", context); ModuleA->setDataLayout(M.getDataLayout()); ModuleA-->setTargetTriple(M.getTargetTriple()); ModuleA-->setModuleInlineAsm(M.getModuleInlineAsm()); ModuleB-->setDataLayout(M.getDataLayout()); ModuleB-->setTargetTriple(M.getTargetTriple()); ModuleB-->setModuleInlineAsm(M.getModuleInlineAsm()); for (Function &F : M) { if (F.getName() == "My Criterion...
2011 Feb 24
2
[LLVMdev] Implementing platform specific library call simplification
On Feb 24, 2011, at 12:41 AM, John Criswell wrote: >>>> At the moment I've got this working locally by adding code to the >>>> simplify-libcalls pass. However this will break on targets where >>>> iprintf() isn't available. Is there a sensible place to add information >>>> about which library functions are available for a particular target?
2018 Jan 01
0
Inspecting 'Triple' from arbitrary source files
...ion (TargetTransformInfo and TargetMachine being the most obvious). > During prototyping and exploring, making temporary changes to > the target-independent code is the best way until I understand how to best > implement the final version. For purely personal hacks I'd go via Module::getTargetTriple myself, but then for personal hacks I probably wouldn't even bother checking the target. Cheers. Tim.
2018 Jan 01
2
Inspecting 'Triple' from arbitrary source files
Hi LLVM-Devs, Sometimes when I am experimenting with a change for my out-of-tree target, I find that to get it working I have to make changes to the target-independent sources for LLVM. Generally I do not like to do this, but sometimes I have not been able to find a pure target-specific solution to the problem I am working on, and have to make these changes in the target-independent code. But
2010 Dec 26
0
[LLVMdev] Generating target dependent function calls
...>> is to use the TargetInfo class from Clang's Basic library which can >> be used to obtain target specific parameters (such as sizeof(long)) >> given a target triple. > > Interesting. Maybe I can get enough information from the target triple > itself. Module::&getTargetTriple should be enough. I did not think about > this, but that might work. Thanks for the pointer. You could also just use a small function to define the API function you wish to use and then use TargetData to get some of the final parts: i.e. if you know you've got something like char GOMP_fo...
2018 Jan 01
0
Inspecting 'Triple' from arbitrary source files
...and TargetMachine being the most obvious). > >> During prototyping and exploring, making temporary changes to the >> target-independent code is the best way until I understand how to best >> implement the final version. > > For purely personal hacks I'd go via Module::getTargetTriple myself, but then for personal hacks I probably wouldn't even bother checking the target. > > Cheers. > > Tim. >
2016 Mar 23
2
Help with pass manager
...hen it reaches add() method of the pass manager. Can you help me figuring out what’s the problem please? here is my function int moduleToObjectFile(llvm::Module *module, std::string &srcname, llvm::LLVMContext &Context) { SMDiagnostic error; Triple moduletriple = Triple(module->getTargetTriple()); if (moduletriple.getTriple().empty()) moduletriple.setTriple(sys::getDefaultTargetTriple()); std::string lookuperror; const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror); if (!moduletarget) { errs() <<...
2016 Mar 24
2
Help with pass manager
...gt; Can you help me figuring out what’s the problem please? here is my function >> >> >> int moduleToObjectFile(llvm::Module *module, std::string &srcname, llvm::LLVMContext &Context) { >> SMDiagnostic error; >> Triple moduletriple = Triple(module->getTargetTriple()); >> >> if (moduletriple.getTriple().empty()) >> moduletriple.setTriple(sys::getDefaultTargetTriple()); >> >> std::string lookuperror; >> const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror);...
2009 Mar 16
1
[LLVMdev] Bit-code file input to ld (was: ...From module/bitcode to Mach-O dylib file directly)
> It is simpler. There is not any Mach-O envelope. The platform linker > can directly read Mach-O files as well as llvm bit-code file (using > llvm bit-code file reader). > > > Not sure if/where the exact form of the Mach-O file that carries bit > > code is documented. Thanks for that. Yes, I see what you mean (no Mach-O envelope), yet there seems to be something