[PATCH] D79537: Add NoMerge MIFlag to avoid MIR branch folding

Zequan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 13:36:34 PDT 2020


zequanwu added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:1916
+  void addNoMergeSiteInfo(const SDNode *Node, bool NoMerge) {
+    SDCallSiteDbgInfo[Node].NoMerge = NoMerge;
+  }
----------------
rnk wrote:
> If `NoMerge` is false, you can skip this hash table insertion. Otherwise, we will do this hash insertion for each and ever call instruction, but we only need to do it for this feature.
Previously, I put the check before each call site of this function. 
I agree that put the check inside the function is better. 


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

https://reviews.llvm.org/D79537





More information about the llvm-commits mailing list