Hi all, I was wondering if it is possible to stop floating-point constants being converted to use the constant pool? As for our back-end we would like to be able to treat floating point constants the same way integer constants are treated instead of having to go via the constant pool. Thanks for your help, Rob - This message is subject to Imagination Technologies' e-mail terms: http://www.imgtec.com/e-mail.htm Imagination Technologies Ltd is a limited company registered in England No: 1306335 Registered Office: Imagination House, Home Park Estate, Kings Langley, Hertfordshire, WD4 8LZ. Email to and from the company may be monitored for compliance and other administrative purposes. -
Hello> I was wondering if it is possible to stop floating-point constants being converted to use the constant pool? As for our back-end we would like to be able to treat floating point constants the same way integer constants are treated instead of having to go via the constant pool.Yes, surely. Just make ISD::ConstantFP for given type legal and handle it during isel. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Is that really sufficient? See X86ISelLowering.cpp, look for addLegalFPImmediate. Usually targets have to tell legalizer what fp immediates are legl. Evan On Jan 5, 2010, at 8:38 AM, Anton Korobeynikov wrote:> Hello > >> I was wondering if it is possible to stop floating-point constants being converted to use the constant pool? As for our back-end we would like to be able to treat floating point constants the same way integer constants are treated instead of having to go via the constant pool. > Yes, surely. Just make ISD::ConstantFP for given type legal and handle > it during isel. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev