Displaying 2 results from an estimated 2 matches for "emitcodetochooseresult".
2013 Jul 25
0
[LLVMdev] Steps to addDestination
...he results you want to jump to at
run-time? I think that's the key question you have to answer. You want
to emit LLVM IR to make this decision and produce a single Value
representing it, then use the value just once to create a single
indirectbr.
Your code might look like:
Value *Address = emitCodeToChooseResult(Results, Loc);
IndirectBrInst *IBI = IndirectBrInst::Create(Address, Result.size(), i);
for (rit = Result.begin(); rit != Result.end(); ++rit)
IBI->addDestination(*rit);
Cheers.
Tim.
2013 Jul 24
2
[LLVMdev] Steps to addDestination
Hi
1-
for(rit=Result.begin();rit!=Result.end();++rit)
{
Value* Address= BlockAddress::get (*rit);
IndirectBrInst *IBI = IndirectBrInst::Create(Address,
Result.size(),i->getTerminator() );
IBI->addDestination((*rit));
}
I tried this code , but the needed destination wasn't added.
2- About LLVM backend
$ llc -march=cpp example_file.ll -o
I think it