Displaying 3 results from an estimated 3 matches for "a2g".
Did you mean:
a2
2011 Oct 01
1
[LLVMdev] Tablegen: RegisterInfoEmitter.cpp
...is reached. Data[2] is then less than RHS.Data[2], so a12 < a1b. But in the case for a22 and a1b, we get the opposite, since '2'!='1', and 22 is more digits than 1. So we get a12 < a1b < a22, which is incorrect, because a12==a22.
My problem was with these registers: a23g, a2g and a3g. When I renamed a23g to aa23g, it worked. Since '2'=='2', the problem was that a23g<a2g.
I think the fix is to first check for two digits, and move the equality comparison to after this. Then a2g < a3g < a23g:
/// compare_numeric - Compare strings, handle embedded...
2011 Sep 30
0
[LLVMdev] Tablegen: RegisterInfoEmitter.cpp
On Sep 30, 2011, at 8:29 AM, Jonas Paulsson wrote:
> The conclusion is that the StringRef::compare_numeric() is not deterministic
Thanks for tracking this down.
I believe we have a bug in compare_numeric() causing it to be non-transitive sometimes. It is supposed to provide a total ordering of strings. Can you find the bug?
/jakob
-------------- next part --------------
An HTML attachment
2011 Sep 30
3
[LLVMdev] Tablegen: RegisterInfoEmitter.cpp
Hi,
I just bumped into a bug in this code. The problem was as follows:
I have defined a set of registers with rather similar names including digits.
The code section at
RegisterInfoEmitter::run(){
...
// Process sub-register sets.
runs and fills the RegisterAliases map.
then,
...
for (unsigned i = 0, e = Regs.size(); i != e; ++i) {
RegNo[Regs[i].TheDef] = i;
NumAliases +=