[llvm] 3db893b - [GISel]: Relax opcode checking at the top level to enable CSE

Aditya Nandakumar via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 17:34:37 PDT 2020


Author: Aditya Nandakumar
Date: 2020-04-22T17:31:33-07:00
New Revision: 3db893b3712a5cc98ac0dbc88e08df70069be216

URL: https://github.com/llvm/llvm-project/commit/3db893b3712a5cc98ac0dbc88e08df70069be216
DIFF: https://github.com/llvm/llvm-project/commit/3db893b3712a5cc98ac0dbc88e08df70069be216.diff

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

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.

Differential Revision: https://reviews.llvm.org/D78684

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp b/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
index 0e4fa219d988..e258ffb5ae76 100644
--- a/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
@@ -217,9 +217,6 @@ void GISelCSEInfo::handleRecordedInsts() {
 }
 
 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);
 }


        


More information about the llvm-commits mailing list