[PATCH] D67383: Add new optimization pass of Tree-Height-Reduction

François Saint-Jacques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 12:08:34 PST 2019


fsaintjacques requested changes to this revision.
fsaintjacques added a comment.
This revision now requires changes to proceed.

I would appreciate if bitwise operators were supported, see my comments and example (could it be added in the unit test?)



================
Comment at: lib/Transforms/Scalar/TreeHeightReduction.cpp:506
+  case Instruction::Add:
+  case Instruction::Mul:
+    return true;
----------------
This should also work with bitwise instructions (AND, OR, XOR). I'm writing a small query language for bitmaps and was wondering if such re-balancing optimization existed. See [[ https://godbolt.org/z/ZPZZmH | example ]] for IR which would benefit from this.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67383/new/

https://reviews.llvm.org/D67383





More information about the llvm-commits mailing list