Incorporate per-lane offsets for varying data in the front-end.

Previously, it was only in the GatherScatterFlattenOpt optimization pass that
we added the per-lane offsets when we were indexing into varying data.
(Specifically, the case of float foo[]; int index; foo[index], where foo
is an array of varying elements rather than uniform elements.)  Now, this
is done in the front-end as we're first emitting code.

In addition to the basic ugliness of doing this in an optimization pass, 
it was also error-prone to do it there, since we no longer have access
to all of the type information that's around in the front-end.

No functionality or performance change.
This commit is contained in:
Matt Pharr
2011-11-03 13:15:07 -07:00
parent 6084d6aeaf
commit 43a2d510bf
7 changed files with 247 additions and 129 deletions

4
expr.h
View File

@@ -303,8 +303,8 @@ public:
Expr *TypeCheck();
int EstimateCost() const;
virtual int getElementNumber() const;
virtual int getElementNumber() const = 0;
virtual const Type *getElementType() const = 0;
std::string getCandidateNearMatches() const;
Expr *expr;