[PATCH] D62247: CodeGen: refactor swifterror tracking into CodeGen

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 04:35:05 PDT 2019


t.p.northover created this revision.
t.p.northover added a reviewer: aemerson.
Herald added subscribers: hiraditya, mgorny, mcrosier.
Herald added a project: LLVM.

The special "swifterror" attribute is basically a register pretending to be a pointer in IR, so it needs a mini-mem2reg to implement the liveness and value tracking. Until now this has lived in FunctionLoweringInfo, but it's also usable virtually unchanged for GlobalIsel, provided we can get it out of lib/CodeGen/SelectionDAG.

So this patch extracts those facilities into a separate class that lives under just lib/CodeGen. The bulk of the code is identical, but I made a couple of interface improvements while I was there.

1. Removed redundant "SwiftError" name components.
2. Simplified the interface for the getOrCreateVReg* functions. The Def function was always used in conjunction with setCurrentVReg so I merged them, allowing the functions to return a simple register rather than a pair.

There should be no functional change, so no tests.


Repository:
  rL LLVM

https://reviews.llvm.org/D62247

Files:
  llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
  llvm/include/llvm/CodeGen/SelectionDAGISel.h
  llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  llvm/lib/CodeGen/SwiftErrorValueTracking.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62247.200701.patch
Type: text/x-patch
Size: 42317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/7f6d52b0/attachment.bin>


More information about the llvm-commits mailing list