search for: constantfoldinstoperand

Displaying 7 results from an estimated 7 matches for "constantfoldinstoperand".

2014 Apr 22
2
[LLVMdev] InstCombine strips the inBounds attribute in GetElementPtr ConstantExpr
...n(CE, TD, TLI)) C = Folded; } The generated ConstantExpr C doesn't inherit the inBounds attribute of the original GEP. FYI, the callstack is #0 CastGEPIndices (Ops=..., ResultTy=0x2fb2850, TD=0x2fc8830, TLI=0x2feb390) at ConstantFolding.cpp:623 #1 0x0000000001892dd1 in llvm::ConstantFoldInstOperands (Opcode=29, DestTy=0x2fb2850, Ops=..., TD=0x2fc8830, TLI=0x2feb390) at ConstantFolding.cpp:1040 #2 0x0000000001892647 in ConstantFoldConstantExpressionImpl (CE=0x2fcb0f8, TD=0x2fc8830, TLI=0x2feb390, FoldedOps=...) at ConstantFolding.cpp:931 #3 0x00000000018926d5 in llvm::Consta...
2010 Mar 03
5
[LLVMdev] folding x * 0 = 0
...; <float> [#uses=1] %mul2 = fmul float %mul, 0.000000e+000 ; <float> [#uses=1] %mul6 = fmul float 0x3FDAED54A0000000, %mul2 ; <float> [#uses=1] ret float %mul6 } the sin and cos calls are folded, but not the mul by zero. May be this is missing in llvm::ConstantFoldInstOperands in ConsantFolding.cpp? I would expect the following optimizations, but didn't find them in the code: x + 0 = x x * 0 = 0 x * 1 = 1 x * -1 = -x -Jochen
2014 Sep 19
2
[LLVMdev] More careful treatment of floating point exceptions
Hi Sanjay, Thanks, I saw this flag and it's definitely should be considered, but it appeared to me to be static characteristic of target platform. I'm not sure how appropriate it would be to change its value from a front-end. It says "Has", while optional flag would rather say "Uses" meaning that implementation cares about floating point exceptions. Regards, Sergey
2014 Sep 25
2
[LLVMdev] More careful treatment of floating point exceptions
...const DataLayout *TD = nullptr, - const TargetLibraryInfo *TLI =nullptr); + const TargetLibraryInfo *TLI = nullptr, + bool HonorFPExceptions = false); /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the /// specified operands. If successful, the constant result is returned, if not, @@ -56,7 +58,8 @@ Constant *ConstantFoldConstantExpression(const ConstantExpr *CE, Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,...
2010 Mar 01
2
[LLVMdev] constant folding for standard math functions
Hi! I'd like to replace all calls to standard math functions (e.g. sin(0.5)) by their result. What strategy do you recommend? Should I write a pass that does only this or should I copy and modify the SCCP pass? A problem with an extra pass could be that that I need to alternate my pass and SCCP several times since the results of the math functions could be folded again. -Jochen
2010 Mar 01
0
[LLVMdev] constant folding for standard math functions
On Mar 1, 2010, at 9:44 AM, Jochen Wilhelmy wrote: > Hi! > > I'd like to replace all calls to standard math functions (e.g. sin(0.5)) by > their result. > What strategy do you recommend? > Should I write a pass that does only this or should I copy and > modify the SCCP pass? > > A problem with an extra pass could be that that I need to alternate > my pass and
2010 Mar 05
0
[LLVMdev] folding x * 0 = 0
...%mul2 = fmul float %mul, 0.000000e+000 ;<float> [#uses=1] > %mul6 = fmul float 0x3FDAED54A0000000, %mul2 ;<float> [#uses=1] > ret float %mul6 > } > > the sin and cos calls are folded, but not the mul by zero. > May be this is missing in llvm::ConstantFoldInstOperands in > ConsantFolding.cpp? > > I would expect the following optimizations, but didn't find them in the > code: > x + 0 = x > x * 0 = 0 > x * 1 = 1 > x * -1 = -x > > -Jochen > > _______________________________________________ > LLVM Developers mailing list...