[llvm-commits] [llvm] r152613 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Bill Wendling
isanbard at gmail.com
Thu Mar 15 15:37:04 PDT 2012
On Mar 15, 2012, at 3:35 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> 2012/3/13 Bill Wendling <isanbard at gmail.com>:
>> Author: void
>> Date: Tue Mar 13 00:51:56 2012
>> New Revision: 152613
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=152613&view=rev
>> Log:
>> Inline the d'tor and add an anchor instead.
>>
>> Modified:
>> llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
>> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>>
>> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=152613&r1=152612&r2=152613&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
>> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Tue Mar 13 00:51:56 2012
>> @@ -820,8 +820,9 @@
>> /// the DAG can optionally implement this interface. This allows the clients
>> /// to handle the various sorts of updates that happen.
>> class DAGUpdateListener {
>> + virtual void anchor();
>> public:
>> - virtual ~DAGUpdateListener();
>> + virtual ~DAGUpdateListener() {}
>>
>> /// NodeDeleted - The node N that was deleted and, if E is not null, an
>> /// equivalent node E that replaced it.
>
> Bill, it is miscompiled by g++-4.4 (I saw in 4.4.4 and 4.4.6)
> Any idea? Could I revert yours?
>
Sure.
-bw
> ...Takumi
>
> // Small testcase
> class DAGUpdateListener {
> public:
> virtual void vvv() = 0;
> virtual ~DAGUpdateListener() {}
> };
>
> class ISelUpdater: public DAGUpdateListener {
> public:
> void vvv() {}
> };
>
> extern void bar(DAGUpdateListener& q);
>
> static inline void ReplaceUses() {
> ISelUpdater q;
> bar(q);
> }
>
> void MSP430SelectIndexedBinOp() {
> ReplaceUses();
> ReplaceUses(); // It sets base class's vtable to 2nd ISU
> }
>
>
> _Z24MSP430SelectIndexedBinOpv:
> pushq %rbx
> subq $16, %rsp
> movq %rsp, %rdi
> movq $_ZTV11ISelUpdater+16, (%rsp)
> call _Z3barR17DAGUpdateListener
> movq %rsp, %rdi
> movq $_ZTV17DAGUpdateListener+16, (%rsp) //// IMPOSSIBLE!
> call _Z3barR17DAGUpdateListener
> addq $16, %rsp
> popq %rbx
> ret
More information about the llvm-commits
mailing list