[PATCH] D93983: RegAllocFast: Do not free later early-clobbered registers.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 11:10:08 PST 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:1241
+      // Do not free later early-clobbered registers when MI is MSVCInlineAsm
+      if (MI.isMSInlineAsm()) {
+        unsigned J = 0;
----------------
I don't understand what's special about MSVC inline asm. Aren't the constraints semantically the same for any asm type?


================
Comment at: llvm/test/CodeGen/X86/corner-msInline-fastregalloc.mir:5-24
+
+--- |
+  ; ModuleID = 'llvm/test/CodeGen/X86/phys-msInline-fastregalloc.ll'
+  source_filename = "llvm/test/CodeGen/X86/phys-msInline-fastregalloc.ll"
+  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+  
+  define dso_local i32 @foo() {
----------------
You should be able to drop the whole IR section


================
Comment at: llvm/test/CodeGen/X86/corner-msInline-fastregalloc.mir:26-62
+name:            foo
+alignment:       16
+exposesReturnsTwice: false
+legalized:       false
+regBankSelected: false
+selected:        false
+failedISel:      false
----------------
Can delete most of this (-simplify-mir helps)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93983



More information about the llvm-commits mailing list