[PATCH] D9887: [DebugInfo][FastISel] Prevent using debug location from previous block for local values

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 16:10:52 PST 2015


probinson added a subscriber: wolfgangp.
probinson added a comment.

> that was removed a while back IIRC by (or because of) Paul


"It was that way when I found it."

Loading constants at the top of the (sub-)block, with no attached location, is how things stood when I took my first crack at it. Having the first instruction in a block inherit a source location from the tail of the physically preceding block is obviously not good. Attaching the original source location to the constant load isn't really better, because of the jumping-around thing.

My original patch had problems, which is one reason it didn't go in (or went in and came back out, I don't recall). We've been carrying it locally and most recently Wolfgang Pieb has been tweaking it.  I've cc'd him.

I guess my real fundamental question is:  Why does FastISel work backwards from the end of the block anyhow?  I'm pretty sure we've seen cases where a bunch of constants get loaded up front, then there's so much register pressure that you start seeing spills.  Working forward from the beginning, constants would be loaded as they are needed, and can hang around for re-use later in the block without screwing up source location info.  I think we'd see less spilling and for sure the source location info would be smoother.


Repository:
  rL LLVM

http://reviews.llvm.org/D9887





More information about the llvm-commits mailing list