[PATCH] D45183: [CodeGen]Add NoVRegs property on PostRASink and ShrinkWrap
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 3 08:58:20 PDT 2018
junbuml updated this revision to Diff 140807.
junbuml retitled this revision from "[PostRASink] Add NoVRegs property" to "[CodeGen]Add NoVRegs property on PostRASink and ShrinkWrap".
junbuml edited the summary of this revision.
junbuml added a comment.
Added NoVRegs for ShrinkWrap as well.
Updated summary and title.
https://reviews.llvm.org/D45183
Files:
lib/CodeGen/MachineSink.cpp
lib/CodeGen/ShrinkWrap.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
Index: lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
===================================================================
--- lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -264,16 +264,15 @@
// virtual registers. Consider removing their restrictions and re-enabling
// them.
- // Has no asserts of its own, but was not written to handle virtual regs.
- disablePass(&ShrinkWrapID);
-
// These functions all require the NoVRegs property.
disablePass(&MachineCopyPropagationID);
+ disablePass(&PostRAMachineSinkingID);
disablePass(&PostRASchedulerID);
disablePass(&FuncletLayoutID);
disablePass(&StackMapLivenessID);
disablePass(&LiveDebugValuesID);
disablePass(&PatchableFunctionID);
+ disablePass(&ShrinkWrapID);
TargetPassConfig::addPostRegAlloc();
}
Index: lib/Target/NVPTX/NVPTXTargetMachine.cpp
===================================================================
--- lib/Target/NVPTX/NVPTXTargetMachine.cpp
+++ lib/Target/NVPTX/NVPTXTargetMachine.cpp
@@ -238,9 +238,11 @@
disablePass(&TailDuplicateID);
disablePass(&StackMapLivenessID);
disablePass(&LiveDebugValuesID);
+ disablePass(&PostRAMachineSinkingID);
disablePass(&PostRASchedulerID);
disablePass(&FuncletLayoutID);
disablePass(&PatchableFunctionID);
+ disablePass(&ShrinkWrapID);
// NVVMReflectPass is added in addEarlyAsPossiblePasses, so hopefully running
// it here does nothing. But since we need it for correctness when lowering
Index: lib/CodeGen/ShrinkWrap.cpp
===================================================================
--- lib/CodeGen/ShrinkWrap.cpp
+++ lib/CodeGen/ShrinkWrap.cpp
@@ -219,6 +219,11 @@
MachineFunctionPass::getAnalysisUsage(AU);
}
+ MachineFunctionProperties getRequiredProperties() const override {
+ return MachineFunctionProperties().set(
+ MachineFunctionProperties::Property::NoVRegs);
+ }
+
StringRef getPassName() const override { return "Shrink Wrapping analysis"; }
/// \brief Perform the shrink-wrapping analysis and update
Index: lib/CodeGen/MachineSink.cpp
===================================================================
--- lib/CodeGen/MachineSink.cpp
+++ lib/CodeGen/MachineSink.cpp
@@ -953,6 +953,11 @@
MachineFunctionPass::getAnalysisUsage(AU);
}
+ MachineFunctionProperties getRequiredProperties() const override {
+ return MachineFunctionProperties().set(
+ MachineFunctionProperties::Property::NoVRegs);
+ }
+
private:
/// Track which registers have been modified and used.
BitVector ModifiedRegs, UsedRegs;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45183.140807.patch
Type: text/x-patch
Size: 2619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/56f3e4af/attachment.bin>
More information about the llvm-commits
mailing list