[llvm-commits] Source register same as write-back base
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Apr 12 14:21:57 PDT 2011
On Apr 12, 2011, at 1:02 PM, Joe Abbey wrote:
>
>> What kind of code is producing this instruction? It seems odd to store
> a pointer to itself:
>> *p++ = p;
>
> STL:
>
> #include <vector>
> #include <list>
>
> using namespace std;
>
> int main(void)
> {
> list<int> intList;
> vector<list<int> > vectorOfLists;
> vectorOfLists.push_back(intList);
>
> return 0;
> }
Ah, that makes sense, std::list is probably implemented as a circular list.
It seems that fast-isel doesn't generate the *_POST variants of stores, so there is no harm in adding @earlyclobber constraints to those instructions.
Do you know exactly which instructions have this constraint?
/jakob
More information about the llvm-commits
mailing list