[PATCH] D19005: CodeGen, AArch64, ARM, X86: Simplify SplitCSR

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 21:39:49 PDT 2016


MatzeB created this revision.
MatzeB added reviewers: qcolombet, manmanren, hfinkel.
MatzeB added a subscriber: llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added subscribers: mcrosier, rengolin, aemerson.

Simplify SplitCSR code:
- Move generic legality checking code from
  SelectionDAG::runOnMachineFunction() to
  TargetLoweringBase::mayUseSplitCSR().
- Avoid TargetLoweringInfo::supportSplitCSR() and initializeSplitCSR()
  callbacks simply by performing the lowering as part of
  TargetLowering::LowerFormals()
- Avoid TargetLoweringInfo::insertCopiesSplitCSR() callback by using
  MachingFunction::addLiveIn() to get copies to vregs at the entry block
  and by creating CopyFromReg/CopyToReg nodes when lowering the return
  in LowerReturn. Provide a convenience function addCalleeSaveRegOps()
  for this.

This will be used to handle parameters passed in callee saves with the SplitCSR logic.

Repository:
  rL LLVM

http://reviews.llvm.org/D19005

Files:
  include/llvm/CodeGen/FunctionLoweringInfo.h
  include/llvm/Target/TargetLowering.h
  include/llvm/Target/TargetRegisterInfo.h
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Target/AArch64/AArch64FastISel.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/AArch64/AArch64MachineFunctionInfo.h
  lib/Target/AArch64/AArch64RegisterInfo.cpp
  lib/Target/AArch64/AArch64RegisterInfo.h
  lib/Target/ARM/ARMBaseRegisterInfo.cpp
  lib/Target/ARM/ARMBaseRegisterInfo.h
  lib/Target/ARM/ARMFastISel.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/ARM/ARMMachineFunctionInfo.cpp
  lib/Target/ARM/ARMMachineFunctionInfo.h
  lib/Target/X86/X86FastISel.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86MachineFunctionInfo.h
  lib/Target/X86/X86RegisterInfo.cpp
  lib/Target/X86/X86RegisterInfo.h
  test/CodeGen/ARM/cxx-tlscc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19005.53364.patch
Type: text/x-patch
Size: 40126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160412/4153f1b4/attachment-0001.bin>


More information about the llvm-commits mailing list