[PATCH] D78014: [AssumeBundles] Prevent generation of some redundant assumes

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 04:53:51 PDT 2020


Tyker added inline comments.


================
Comment at: llvm/lib/Analysis/AssumeBundleQueries.cpp:190
                                 return isValidAssumeForContext(I, CtxI, DT);
                               });
 }
----------------
jdoerfert wrote:
> [Is this C++14?]
yes,
C++14 is the default build mode.
if you want me to make it C++11 compatible i can.


================
Comment at: llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp:77
   Instruction *InsertBeforeInstruction = nullptr;
-
+  AssumptionCache* AC;
+  DominatorTree* DT = nullptr;
----------------
jdoerfert wrote:
> It should be nullptr or better initialized by the constructor. Same for the other members. There should be a constructor to initialize all of this and nullptrs otherwise.
personally i prefer not having a constructor (or function) taking too many argument as i find it harder to read and write.
but AC should definitely be default initialized to nullptr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78014





More information about the llvm-commits mailing list