[llvm-commits] [LLVMdev] SSI Patch

Nick Lewycky nicholas at mxc.ca
Mon Sep 28 23:10:33 PDT 2009


Andre Tavares wrote:
> Sorry for the delay.

Thanks! Unfortunately, it hits one of our regression tests. Be sure to 
run 'make check' before sending out a patch:

$ make check
[...]
Running /home/nicholas/llvm-commit3/test/Transforms/SSI/dg.exp ...
FAIL: 
/home/nicholas/llvm-commit3/test/Transforms/SSI/2009-07-09-Invoke.ll for 
PR4511
Failed with signal(SIGABRT) at line 1
while running:  opt < 
/home/nicholas/llvm-commit3/test/Transforms/SSI/2009-07-09-Invoke.ll 
-ssi-everything -disable-output
Invoke result not available in the unwind destination!
   %0 = invoke fastcc 
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"* 
@_ZSt24__uninitialized_copy_auxIPSsS0_ET0_T_S2_S1_St12__false_type(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"* undef, 
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"* undef, 
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"* undef)
           to label %invcont14.i unwind label %ppad81.i ; 
<%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"*> [#uses=5]  %SSI_phi = phi 
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"* [ %0, %_ZNSt12_Vector_baseISsSaISsEE11_M_allocateEj.exit.i ], [ 
%SSI_sigma, %bb19.i ], [ %0, %lpad.i29.i ] ; 
<%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >"*> [#uses=0]Broken module found, compilation aborted!
0   opt 0x08488ac9
1   opt 0x08489095
2       0xffffe400 __kernel_sigreturn + 0
Stack dump:
0.      Running pass 'Function Pass Manager' on module '<stdin>'.
1.      Running pass 'Module Verifier' on function 
'@_ZNSt6vectorISsSaISsEE9push_backERKSs'

Please take a look.

Nick

> Nick Lewycky wrote:
>> Ping!
>>
>> Nick Lewycky wrote:
>>> Andre Tavares wrote:
>>>> I made all changes. Hope it is good now.
>>>
>>>       // Treat SSI_PHI
>>>       if (Variable *var = getVarFromPhi(PN)) {
>>>         var->addValueStack(PN);
>>>         defined.insert(var);
>>>       }
>>>
>>>       // Treat SSI_SIG
>>>       else if (Variable *var = getVarFromPhi(PN)) {
>>>         substituteUse(I);
>>>         var->addValueStack(PN);
>>>         defined.insert(var);
>>>       }
>>>
>>> Those are both testing getVarFromPhi. Should the second one be 
>>> getVarFromSigma instead?
>>>
>>> And since we have to make one change, we may as well make others :)
>>>
>>>   for (unsigned i = 0, e = PN->getNumIncomingValues(); i<e ; ++i) {
>>>
>>> Whitespace.
>>>
>>>     if (PHINode *PN_inc = dyn_cast<PHINode>(inc)) {
>>>       if (isSigPhi(PN_inc, I, Set))
>>>         continue;
>>>       return false;
>>>     }
>>>     return false;
>>>   }
>>>
>>> Isn't that just:
>>>
>>>     Value *PN_inc = dyn_cast<PHINode>(inc);
>>>     if (!PN_inc || !isSigPhi(PN_inc, I, Set))
>>>       return false;
>>>   }
>>>
>>> given that the final } is closing the loop?
>>>
>>> Finally, 'isSigPhi' is an ambiguous name. Perhaps it should be named 
>>> 'isSigma'?
>>>
>>> Nick
>>
>>
> 




More information about the llvm-commits mailing list