I am new to llvm and am stuck up with a problem. I am trying to initialize a Value* of type fp128 having the value 0 I am using the following construct ConstantFP::get(APFloat(APInt(128,0,false))); This is returning a double instead of a float and I am confused. Thanks a lot for your help. -- -- Aparna -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090216/7e7b438f/attachment.html>
On Feb 16, 2009, at 6:12 PM, aparna kotha wrote:> I am new to llvm and am stuck up with a problem. > I am trying to initialize a Value* of type fp128 having the value 0 > > I am using the following construct > > ConstantFP::get(APFloat(APInt(128,0,false))); > > This is returning a double instead of a float and I am confused. > > Thanks a lot for your help.FP128Ty is stubbed out, but completely untested and not supported by any targets yet. -Chris
Hello together, I have seen that the analysis-results are stored in llvm-IR as annotations. For example <; preds = %entry> in basicBlock level and <; <i32*> [#uses=2]> for a variable. Is there any documentation about annotations? Regards Raad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090217/28764018/attachment.html>
On Feb 16, 2009, at 6:36 PMPST, Chris Lattner wrote:> > On Feb 16, 2009, at 6:12 PM, aparna kotha wrote: > >> I am new to llvm and am stuck up with a problem. >> I am trying to initialize a Value* of type fp128 having the value 0 >> >> I am using the following construct >> >> ConstantFP::get(APFloat(APInt(128,0,false))); >> >> This is returning a double instead of a float and I am confused. >> >> Thanks a lot for your help. > > FP128Ty is stubbed out, but completely untested and not supported by > any targets yet.More specifically, the compile-time arithmetic stuff *should* Just Work, although nobody has tried it; the conversions of FP128 to and from other formats are not done. They should not be difficult to do by copying & modifying existing code. To do specifically what you're trying to do, add the FP128 case to APFloat::initFromAPInt. The code that reads and writes the IR, and writes assembler output, also needs to be added. (The Float in APFloat means "floating point", not the C float type.)