[PATCH] D45183: [PostRASink] Add NoVRegs property
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 2 13:33:44 PDT 2018
junbuml created this revision.
junbuml added reviewers: dschuff, jlebar, tra, jgravelle-google, MatzeB, sebpop, thegameg, mcrosier.
Herald added subscribers: sunfish, aheejin, sbc100, jfb, jholewinski.
This change declare that PostRAMachineSinking pass require NoVRegs property, so
now the MachineFunctionPass can enforce this check.
Disable the PostRAMachineSinking pass for NVPTX & WebAssembly.
https://reviews.llvm.org/D45183
Files:
lib/CodeGen/MachineSink.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
@@ -250,6 +250,7 @@
// These functions all require the NoVRegs property.
disablePass(&MachineCopyPropagationID);
+ disablePass(&PostRAMachineSinkingID);
disablePass(&PostRASchedulerID);
disablePass(&FuncletLayoutID);
disablePass(&StackMapLivenessID);
Index: lib/Target/NVPTX/NVPTXTargetMachine.cpp
===================================================================
--- lib/Target/NVPTX/NVPTXTargetMachine.cpp
+++ lib/Target/NVPTX/NVPTXTargetMachine.cpp
@@ -228,6 +228,7 @@
disablePass(&TailDuplicateID);
disablePass(&StackMapLivenessID);
disablePass(&LiveDebugValuesID);
+ disablePass(&PostRAMachineSinkingID);
disablePass(&PostRASchedulerID);
disablePass(&FuncletLayoutID);
disablePass(&PatchableFunctionID);
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.140683.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/1f7e5e87/attachment.bin>
More information about the llvm-commits
mailing list