[PATCH] D37686: [DAG] Consolidating Instruction->SDNode Flags propagation in one class for better code management.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:21:16 PDT 2017


spatel added a comment.

I pointed out 2 more places where I think we can eliminate the existing transfer of flags. I think you should do a complete audit for those.



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2762-2780
   bool nuw = false;
   bool nsw = false;
   bool exact = false;
 
   if (Opcode == ISD::SRL || Opcode == ISD::SRA || Opcode == ISD::SHL) {
 
     if (const OverflowingBinaryOperator *OFBinOp =
----------------
Delete?


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2790-2792
   SDNodeFlags Flags;
   Flags.setExact(isa<PossiblyExactOperator>(&I) &&
                  cast<PossiblyExactOperator>(&I)->isExact());
----------------
Delete?


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:666
+  // a given Value.
+  SDNode * getDAGNode(const Value *);
+
----------------
RKSimon wrote:
> spatel wrote:
> > Formatting/spacing is non-standard here and below. Run clang-format?
> is this needed in this patch?
Same question as earlier (I don't think it was answered). 

Can we use the existing SelectionDAGBuilder::getValue() to get to the node's flags?


https://reviews.llvm.org/D37686





More information about the llvm-commits mailing list