[PATCH] D30438: SplitKit: Correctly implement partial copies

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 14:24:33 PDT 2017


MatzeB marked 2 inline comments as done.
MatzeB added a comment.

In https://reviews.llvm.org/D30438#700956, @rampitec wrote:

> The other question, what would happen if target implements its own addOptimizedRegAlloc and skips VirtRegRewriter? I guess in this case copies will remain bundled. Looks like NVPTX does not use it.


If they have their own regalloc they probably cannot use SplitKit either. If they do use SplitKit, well they have to implement their own expansion mechanism (though it seems SplitKit has references to VirtRegMap so I don't think you realistically will use SplitKit without the VirtRegRewriter).



================
Comment at: lib/CodeGen/VirtRegMap.cpp:384
+
+  if (MI.isBundledWithPred() && !MI.isBundledWithSucc()) {
+    // Only do this when the complete bundle is made out of COPYs.
----------------
rampitec wrote:
> I think it can break something which was bundled not by SplitKit. I wish we could mark these somehow... It will not happen now because we do not use bundles, but potentially a problem. Maybe insert some sort of a marker into the bundle or slot, or create a new MIFlag? Ideally of course it shall not use bundles just to keep LIS correct :(
I was hoping that targets would always use a target specific bundle header instructions, so this would be the only situation in which we have a headerless bundle. Admittedly this is somewhat weak, but I hoped we can delay this discussion until we actually have targets using bundles pre-regalloc more.


Repository:
  rL LLVM

https://reviews.llvm.org/D30438





More information about the llvm-commits mailing list