Displaying 20 results from an estimated 34 matches for "settargettripl".
Did you mean:
settargettriple
2012 Jun 06
2
[LLVMdev] [PATCH] 8975 - llc should warn about invalid target triple
I changed Module::setTargetTriple to return true/false when an
invalid/valid triple is passed as parameter.
The validation is made using the ADT/Triple.cpp
Last I modified LLParser::ParseTargetDefinition() to check if the
return of setTargetTriple warns about an invalid triple.
John.
-------------- next part --------------
A n...
2012 Jun 07
0
[LLVMdev] [PATCH] 8975 - llc should warn about invalid target triple
Hi César,
> I changed Module::setTargetTriple to return true/false when an
> invalid/valid triple is passed as parameter.
target triples with unknown vendor and other fields occur all the time.
That's fine as long as you don't need those fields. What I am saying is
that a boolean value "valid" or "not valid" i...
2015 May 11
4
[LLVMdev] Set up ExecutionEngine according to actual machine capabilities
I am currently setting up my Module with
module->setTargetTriple(llvm::sys::getProcessTriple()
#ifdef _WIN32
+ "-elf"
#endif
);
And my ExecutionEngine with
llvm::EngineBuilder(std::move(module))
.setErrorStr(&err)
.setMCPU...
2018 Apr 19
1
How to set Target/Triple of ExecutionEngine
...t 1:56 AM, edA-qa mort-ora-y via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Taking one step back, I'm not clear I'm even setting the
> triple/DataLayout on the module correctly:
>
> module = new llvm::Module( "test", *llvm_context );
> module->setTargetTriple( platform::target->triple );
>
> Is that enough to create an appropriate DataLayout for the module? I
> don't see anyway to convert a triple to a DataLayout, so I can't call
> `setDataLayout`.
>
>
> On 19/04/18 10:44, edA-qa mort-ora-y via llvm-dev wrote:
> >...
2018 Mar 22
1
How to extract functions from Module A and put them into Module B, and generate a new IR file?
...s::fs::F_None);
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() ==...
2018 Jan 20
1
No Targets in TargetRegistry
This is from
https://stackoverflow.com/questions/48360685/no-targets-in-targetregistry
I have the following code, which should get the default llvm::Target.
auto const targetTriple = llvm::sys::getDefaultTargetTriple();
llvm_module.setTargetTriple(targetTriple);
std::string error;
auto const * target = llvm::TargetRegistry::lookupTarget(targetTriple,
error);
if (target == nullptr) {
auto targets = llvm::TargetRegistry::targets();
size_t targetCount = 0;
for (auto const & _ : targets) {
++t...
2014 Jul 23
2
[LLVMdev] JIT on armhf, again
On 7/23/14, 1:20 PM, Tim Northover wrote:
[...]
> You should probably be specifying a triple directly, and making it an
> AAPCS-VFP one for good measure: "armv7-linux-gnueabihf" for example,
> or "thumbv7-none-eabihf". You shouldn't even need to set FloatABI for
> those two.
How do I do this? (I can't find any examples, and the API is decidedly
unclear...)
2013 Feb 08
2
[LLVMdev] JIT on armhf
...he Debian LLVM package to try and do JIT on a Linux armhf
device. Unfortunately it seems to be generating armel code rather than
armhf code, and since the ABIs don't match nothing works.
I've tried overriding the triple to arm-unknown-linux-gnueabihf and
arm-linux-gnueabihf (via module->setTargetTriple), and while the triples
are accepted, the actual generated code doesn't change with either.
Unfortunately I don't have enough RAM on any of my ARM boxes to build
LLVM from source, so I can't check to see whether this is a Debian
misconfiguration or an intrinsic LLVM issue.
Before I s...
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
...tializeNativeTargetAsmParser();
llvm::LLVMContext &Context = llvm::getGlobalContext();
llvm::SMDiagnostic Err;
std::unique_ptr<llvm::Module> Mod = llvm::parseIRFile("test.ll", Err,
Context);
std::string triple = llvm::sys::getProcessTriple();
Mod->setTargetTriple(triple);
llvm::Function* f = Mod->getFunction("exec");
llvm::TargetOptions Opts;
Opts.NoFramePointerElim = true;
// Build engine with JIT
std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new
llvm::SectionMemoryManager());
std::string err;...
2018 Apr 19
0
How to set Target/Triple of ExecutionEngine
Taking one step back, I'm not clear I'm even setting the
triple/DataLayout on the module correctly:
module = new llvm::Module( "test", *llvm_context );
module->setTargetTriple( platform::target->triple );
Is that enough to create an appropriate DataLayout for the module? I
don't see anyway to convert a triple to a DataLayout, so I can't call
`setDataLayout`.
On 19/04/18 10:44, edA-qa mort-ora-y via llvm-dev wrote:
> I don't know if I'm setting...
2018 Apr 19
2
How to set Target/Triple of ExecutionEngine
I don't know if I'm setting the triple of my execution engine
correctly. This is leading to an issue where a struct `{i8,i64}` is not
getting the same layout as the ABI expects.
I setup my engine/module like this:
llvm::SmallVector<std::string,2> mattrs;
llvm::EngineBuilder builder{ unique_ptr<llvm::Module>(module) };
llvm::ExecutionEngine * ee = builder.
2012 Jun 17
3
[LLVMdev] BlockAddress instruction is copied instead of cloned during module link?
...makeLLVMModule() {
// Module Construction
Module* mod = new Module("x.ll", getGlobalContext());
mod->setDataLayout("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64");
mod->setTargetTriple("x86_64-unknown-freebsd8.2");
// Type Definitions
PointerType* PointerTy_1 =
PointerType::get(IntegerType::get(mod->getContext(), 8), 0);
ArrayType* ArrayTy_0 = ArrayType::get(PointerTy_1, 3);
PointerType* PointerTy_2 = PointerType::get(ArrayTy_0, 0);
std::vector<Typ...
2009 Oct 22
0
[LLVMdev] Throwing exceptions to code that calls the ExecutionEngine.
...the script) unhandled
exception.
As a proof-of-concept I used the online demo generator to generate C++ code
for the following script;
void test(void)
{
throw -1;
}
I added llvm::ExceptionHandling = true, an ExecutionEngine and
try/catch(...) statements around the runFunction, and changed the
setTargetTriple to the correct value ("i386-apple-darwin"). The result is
the same to all my other experiments, in that it aborts with the message
"terminate called after throwing an instance of 'int'".
If I add a function that calls the same test() function (embraced by
try/catch(......
2011 Sep 25
1
[LLVMdev] Placeholders in the target data layout
Hello,
I have to use the target data layout for my compiler to make the native
linker work. But the target data layout is target specific. My bitcode file
should not be. The only critical thing in the layout is the pointer size:
"p:32:32" vs "p:64:64". Is there a way to use placeholders to insert the bit
width of a pointer at a very late stage? It would be uncool when the
2013 Feb 08
0
[LLVMdev] JIT on armhf
On 8 February 2013 11:01, David Given <dg at cowlark.com> wrote:
> I've tried overriding the triple to arm-unknown-linux-gnueabihf and
> arm-linux-gnueabihf (via module->setTargetTriple), and while the triples
> are accepted, the actual generated code doesn't change with either.
>
Hi David,
If you set the triple to arm it won't help, since it'll default to ARMv4
which doesn't have hard float.
Try setting armv7a-unknown-linux-gnueabihf and see if it works...
2014 Jul 23
2
[LLVMdev] JIT on armhf, again
On 7/23/14, 3:30 PM, Tim Northover wrote:
[...]
> It looks like it's a case of calling Module::setTargetTriple. As with
> most JIT setup questions, though, often the best way to find out is to
> get something working in lli and then look at what it does
> (tools/lli/lli.cpp).
Well, it's *almost* working --- hardfloat code is now being generated,
and it even seems to be right most of the time!...
2015 Mar 11
3
[LLVMdev] DataLayout: Module vs Target
Hi all,
The Language Reference says:
"The function of the data layout string may not be what you expect. Notably, this is not a specification from the frontend of what alignment the code generator should use.
Instead, if specified, the target data layout is required to match what the ultimate code generator expects. This string is used by the mid-level optimizers to improve code, and this
2013 May 10
0
[LLVMdev] Simple Loop Vectorize Question
Hi Josh,
This line works for me:
opt file.ll -loop-vectorize -S -o - -mtriple=x86_64 -mcpu=corei7-avx -debug
You need to specify the triple on the command line if it is not inside the module.
Thanks,
Nadav
On May 9, 2013, at 5:53 PM, Joshua Klontz <josh.klontz at gmail.com> wrote:
> Nadav,
>
> Please forgive my ignorance, but 'opt -mcpu=corei7 -loop-vectorize -S
2018 May 05
0
Slow IR compilation/JIT, profiling points to LLVM?
Hi,
Could you share how you compile IR and which version of JIT you use (Orc, MCJIT)?
Could it be that you are using interpreter instead of actual JIT?
Cheers,
Alex.
> On 5. May 2018, at 08:04, edA-qa mort-ora-y via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I'm having issues of my compiler, and JIT execution, of LLVM IR being
> rather slow. It's accounting for
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
...var, and run it.
Module *module = new Module("myModule", getGlobalContext());
module->setDataLayout(
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128");
module->setTargetTriple("x86_64-unknown-linux-gnu");
Function *func_add = CreateAddFunction(module);
// create a StructType to contain func_add
StructType *myStructType = StructType::create(module->getContext(),
"myStruct");
std::vector<Type*> fields;
fields.push_back(fu...