[PATCH] D78684: [GISel]: Relax opcode checking at the top level to enable CSE

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 15:48:35 PDT 2020


aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: arsenm, aemerson, qcolombet, paquette, dsanders, volkan, bogner.
Herald added subscribers: hiraditya, wdng.
Herald added a project: LLVM.

Loosen the restriction on what kinds of opcodes can be CSEd as targets may want to CSE some generic target specific pseudos.
NFC as far as this change is concerned as CSEConfig still pretty much is a subset of this check.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78684

Files:
  llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp


Index: llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
+++ llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
@@ -217,9 +217,6 @@
 }
 
 bool GISelCSEInfo::shouldCSE(unsigned Opc) const {
-  // Only GISel opcodes are CSEable
-  if (!isPreISelGenericOpcode(Opc))
-    return false;
   assert(CSEOpt.get() && "CSEConfig not set");
   return CSEOpt->shouldCSEOpc(Opc);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78684.259417.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/67a2eb24/attachment.bin>


More information about the llvm-commits mailing list