Skip to content

Commit

Permalink
Flip constexpr hoisting on globally.
Browse files Browse the repository at this point in the history
* Disables old FusionOfTensors slow-path.
  • Loading branch information
stellaraccident committed Aug 2, 2023
1 parent 0512707 commit a3d75cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ namespace iree_compiler {
namespace IREE {
namespace Flow {

// TODO(#12033): solve for the slow linalg transpose folder and remove the flag.
// TODO: Remove this and the backing code once consteval is beyond being
// rolled back.
static llvm::cl::opt<int64_t> clLinalgMaxConstantFoldElements(
"iree-codegen-linalg-max-constant-fold-elements",
llvm::cl::desc("Maximum number of elements to try to constant fold."),
llvm::cl::init(INT64_MAX));
llvm::cl::init(0));

/// Check if any of the use dominates all other uses of the operation.
static std::optional<OpOperand *> getFusableUse(Operation *op,
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/iree/compiler/Pipelines/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct InputDialectOptions {
// Options controlling high level optimizations.
struct HighLevelOptimizationOptions {
// Enables const-expr hoisting into globals.
bool constExprHoisting = false;
bool constExprHoisting = true;

// Enables recursive evaluation of immutable globals using the compiler
// and runtime.
Expand Down

0 comments on commit a3d75cc

Please sign in to comment.