Fix parenthesization bugs in cost estimates.
Also added the debugging print that helped find these issues. Revert inlining some functions in examples
This commit is contained in:
@@ -707,9 +707,12 @@ lEmitFunctionCode(FunctionEmitContext *ctx, llvm::Function *function,
|
||||
|
||||
// Finally, we can generate code for the function
|
||||
if (code != NULL) {
|
||||
int costEstimate = code->EstimateCost();
|
||||
bool checkMask = (ft->isTask == true) ||
|
||||
((function->hasFnAttr(llvm::Attribute::AlwaysInline) == false) &&
|
||||
code->EstimateCost() > 16);
|
||||
costEstimate > 16);
|
||||
Debug(code->pos, "Estimated cost for function \"%s\" = %d\n",
|
||||
funSym->name.c_str(), costEstimate);
|
||||
// If the body of the function is non-trivial, then we wrap the
|
||||
// entire thing around a varying "cif (true)" test in order to reap
|
||||
// the side-effect benefit of checking to see if the execution mask
|
||||
|
||||
Reference in New Issue
Block a user