Details
- Reviewers
rjmccall jdoerfert erichkeane
Diff Detail
Event Timeline
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1617 | I don't believe this is the correct answer here. I think we need to store the AllocaAddress out of the CreateTempAlloca call we do in the NRVO case above. In the other cases, the AllocaAddr and the DebugAddr should be the same, so there is no need to strip casts. You probably want to do it more like how the below function is done, the AllocaAddr variable is already there, it just isn't set on every branch. |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1617 | I don't believe this is correct either, AllocaAddr is set in a couple of cases. There are two options I see here as potential: But doing it off of the logic from above (in this case, the incorrect logic, but logic from above all the same) is too fragile. |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1617 | I opted for option 2, mostly because I am not sure what should the value of AllocaAddr be in case NRVO is true. I see that AllocaAddr is calculated from the CreateTempAlloc function for the other case. |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1508–1509 | I suspect in the N RVO case we want the AllocAddr from the optional 5th parameter here. |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1508–1509 | Yes I saw that, but even that call is under a condition that in some OpenMP test case is not satisfied and I wind up with an AllocAddr invalid! |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1436 | I think there are a couple of places this needs to be set in order to be 'correct', I'll comment below: | |
1449–1450 | Probably should be the same as address here. | |
1495–1496 | For the 'else' cases to all the below 'ifs', it is the same as address here too. | |
1508–1509 | Should be the last param here as said above. | |
1612 | This is the last case, if it pops into this UsePointerValue, we should do the same as DebugAddr here. |
clang/lib/CodeGen/CGDecl.cpp | ||
---|---|---|
1517 | This looks wrong, it looks like it overwrites the value put in on 1507, doesn't it? Should you put this on 1496 so that it gets overwritten by the CreateTempAlloc instead of the reverse? | |
1612 | Missed this one, which might be why you were tempted to have the NRVO case wrong above. |
I think there are a couple of places this needs to be set in order to be 'correct', I'll comment below: