[LLVMdev] PR 5723
dag at cray.com
Wed Dec 9 12:18:11 PST 2009
On Wednesday 09 December 2009 14:10, Anton Korobeynikov wrote:
> > Is there a reason that route was taken in TOT? Why have an SDNode
> > represent a bunch of instructions rather than just "properly" creating
> > them?
> Yes. We need to be sure that "special" code is glued properly to the
> call (mostly due to presence of post-RA scheduler). And technically
Isn't that what the chain/flag is for?
> this "bunch of instructions" is a whole, not something + call.
Conceptually, yes, but it ends up being multiple instructions. Doing
things like this can REALLY screw up certain kinds of optimizations. I
can't tell you how much pain I went through in school fixing a code generator
so I could properly do software instruction prefetching. It's just generally
a bad idea to do pseudo-ops like this because the IR doesn't represent what's
actually going to be executed.
> > Well, we shouldn't be using the redzone because any function that uses
> > TLS is not a leaf (at least on X86). Simply marking the function
> > "noredzone" seems like a bit of a hack to me. How do we guarantee some
> > other piece of code that thinks the function is a leaf won't do something
> > else to screw things up?
> As I said, this is temporary workaround until I will commit a fix
> (just in the case if you're in hurry).
More information about the llvm-dev