Hello, The LLVM IR opcodes Add, Sub, and Mul have been each split into two. Add, Sub, and Mul now only handle integer types, and three new opcodes, FAdd, FSub, and FMul now handle floating-point types. The main LLVM APIs are currently preserving backwards compatibility, transparently mapping integer opcodes to corresponding floating-point opcodes when the operands have floating-point types. This compatibility code will eventually be removed, so front-end writers should update their front-ends to use the new opcodes. I've updated llvm-gcc as an example. As an aid to this process, the attached patch can be applied to a local LLVM tree to remove the backward-compatibility code, to allow front-ends to be tested. -------------- next part -------------- A non-text attachment was scrubbed... Name: add-fadd.patch Type: application/octet-stream Size: 3166 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090615/a38f33ff/attachment.obj> -------------- next part -------------- Dan
----- Original Message ----- From: "Dan Gohman" <gohman at apple.com> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Tuesday, June 16, 2009 12:23 AM Subject: [LLVMdev] Upcoming API change: FAdd, FSub, FMul> Hello, > > The LLVM IR opcodes Add, Sub, and Mul have been each split into > two. Add, Sub, and Mul now only handle integer types, and three > new opcodes, FAdd, FSub, and FMul now handle floating-point types. > > The main LLVM APIs are currently preserving backwards > compatibility, transparently mapping integer opcodes to > corresponding floating-point opcodes when the operands have > floating-point types. This compatibility code will eventually be > removed, so front-end writers should update their front-ends to > use the new opcodes. I've updated llvm-gcc as an example. > > As an aid to this process, the attached patch can be applied to a > local LLVM tree to remove the backward-compatibility code, to > allow front-ends to be tested. > >--------------------------------------------------------------------------------> > > Dan > >--------------------------------------------------------------------------------> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
> The LLVM IR opcodes Add, Sub, and Mul have been each split into > two. Add, Sub, and Mul now only handle integer types, and three > new opcodes, FAdd, FSub, and FMul now handle floating-point types.Dan, Wondering the reason why there is no FDiv ? Thanks, Aaron
On Jun 16, 2009, at 7:34 AM, Aaron Gray wrote:>> The LLVM IR opcodes Add, Sub, and Mul have been each split into >> two. Add, Sub, and Mul now only handle integer types, and three >> new opcodes, FAdd, FSub, and FMul now handle floating-point types. > > Dan, > > Wondering the reason why there is no FDiv ?FDiv already exists; div was split quite a while ago. Dan
Aaron Gray wrote:>> The LLVM IR opcodes Add, Sub, and Mul have been each split into >> two. Add, Sub, and Mul now only handle integer types, and three >> new opcodes, FAdd, FSub, and FMul now handle floating-point types. > > Dan, > > Wondering the reason why there is no FDiv ?It already existed, and still does: http://llvm.org/docs/LangRef.html#i_fdiv
On Jun 15, 2009, at 4:23 PM, Dan Gohman wrote:> Hello, > > The LLVM IR opcodes Add, Sub, and Mul have been each split into > two. Add, Sub, and Mul now only handle integer types, and three > new opcodes, FAdd, FSub, and FMul now handle floating-point types. > > The main LLVM APIs are currently preserving backwards > compatibility, transparently mapping integer opcodes to > corresponding floating-point opcodes when the operands have > floating-point types. This compatibility code will eventually be > removed, so front-end writers should update their front-ends to > use the new opcodes. I've updated llvm-gcc as an example.Thanks Dan, fwiw, I updated clang. -Chris