[PATCH] D118303: [Spill2Reg] Added live register tracking.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 17:56:29 PST 2022


vporpo created this revision.
Herald added subscribers: pengfei, hiraditya, qcolombet.
vporpo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch implements tracking of live registers. This is used to look for free
vector registers. It works by walking up the CFG from the reloads all the way
to the spills, accumulating the register units being used.
This implementation caches the live register units used by each MBB for faster
compilation time.

Note: Live register tracking relies on MBB liveins/outs being maintained
correctly, which is implemented in a follow-up patch. So this patch will still
not generate correct code for all but some simple cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118303

Files:
  llvm/lib/CodeGen/Spill2Reg.cpp
  llvm/test/CodeGen/X86/spill2reg_end_to_end_16bit.ll
  llvm/test/CodeGen/X86/spill2reg_end_to_end_32bit.ll
  llvm/test/CodeGen/X86/spill2reg_end_to_end_64bit.ll
  llvm/test/CodeGen/X86/spill2reg_end_to_end_8bit.ll
  llvm/test/CodeGen/X86/spill2reg_liveregs_all_live.mir
  llvm/test/CodeGen/X86/spill2reg_liveregs_call.mir
  llvm/test/CodeGen/X86/spill2reg_liveregs_defined_in_bb.mir
  llvm/test/CodeGen/X86/spill2reg_liveregs_livein.mir
  llvm/test/CodeGen/X86/spill2reg_liveregs_reload_mbb_and_intermediate.mir
  llvm/test/CodeGen/X86/spill2reg_simple_2.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118303.403456.patch
Type: text/x-patch
Size: 54506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/28969577/attachment-0001.bin>


More information about the llvm-commits mailing list