[llvm] [llvm-mca] Add command line option `-use-load-latency` (PR #94566)
    Michael Maitland via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun 10 09:53:58 PDT 2024
    
    
  
================
@@ -230,6 +231,13 @@ static void computeMaxLatency(InstrDesc &ID, const MCInstrDesc &MCDesc,
   }
 
   int Latency = MCSchedModel::computeInstrLatency(STI, SCDesc);
+
+  // If `UseLoadLatency` is set, we use the value in `MCSchedModel::LoadLatency`
+  // for load instructions.
+  if (MCDesc.mayLoad() && UseLoadLatency) {
----------------
michaelmaitland wrote:
What if LoadLatency is not set (i.e. it is `-1`) but `-use-load-latency` is passed? Should a warning be printed if `-use-load-latency` is set?
https://github.com/llvm/llvm-project/pull/94566
    
    
More information about the llvm-commits
mailing list