[PATCH] D69556: [CodeGen] Move ARMCodegenPrepare to TypePromotion
    Sjoerd Meijer via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 29 07:02:34 PDT 2019
    
    
  
SjoerdMeijer added a comment.
I guess this step make sense: there was very little ARM specific about this, so why not promote this to a generic codegen pass. It's a generic optimisation, so other targets could benefit from this, but not sure if that then requires some evidence before moving this code.
Some nits inlined.
================
Comment at: lib/CodeGen/TypePromotion.cpp:935
+
+  if (auto *TPC = getAnalysisIfAvailable<TargetPassConfig>()) {
+    const TargetMachine &TM = TPC->getTM<TargetMachine>();
----------------
If TLI is not available, could we also just bail here?
Does that avoid the constant and check below, see next inline comment?
================
Comment at: lib/CodeGen/TypePromotion.cpp:962
+          // Default promotion width.
+          unsigned PromotedWidth = 32;
+          if (TLI) {
----------------
This one.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69556/new/
https://reviews.llvm.org/D69556
    
    
More information about the llvm-commits
mailing list