search for: simplifythis

Displaying 5 results from an estimated 5 matches for "simplifythis".

2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); It does simplify _some_ things. For example: ready> def simplifyThis(x) (x*2)+(2*x); Read function definition: define double @simplifyThis(double %x) readonly { entry: %multmp = fmul double %x, 2.000000e+00 %addtmp = fadd double %multmp, %multmp ret double %addtmp } > -----Original Message----- > From: Duncan Sands [mailto:baldrick at free.fr] > Sen...
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Rob, > Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") did you run the gvn pass (preceded by basic-aa)? Ciao, Duncan.
2010 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
> You need to set attribute ReadOnly on the sin / cos functions, using > Function::addFnAttr(Attribute) for example. Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") declare double @sin(double) readonly declare double @cos(double) readonly define double @foo(double %x) readonly { entry: %calltmp = call
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); It does simplify _some_ things. For example: ready> def simplifyThis(x) (x*2)+(2*x); Read function definition: define double @simplifyThis(double %x) readonly { entry: %multmp = fmul double %x, 2.000000e+00 %addtmp = fadd double %multmp, %multmp ret double %addtmp } > -----Original Message----- > From: Duncan Sands [mailto:baldrick at free.fr] > Sen...
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...Pass()); > // Eliminate Common SubExpressions. > OurFPM.add(createGVNPass()); > // Simplify the control flow graph (deleting unreachable blocks, etc). > OurFPM.add(createCFGSimplificationPass()); > > It does simplify _some_ things. For example: > > ready> def simplifyThis(x) (x*2)+(2*x); > Read function definition: > define double @simplifyThis(double %x) readonly { > entry: > %multmp = fmul double %x, 2.000000e+00 > %addtmp = fadd double %multmp, %multmp > ret double %addtmp > } > > >> -----Original Message----- >> Fr...