On Dec 16, 2007, at 1:04 PM, Duncan Sands wrote:

> Hi Chris,
>
>>> Remove special casing of inline asm from the
>>> inliner.  There is a potential problem: the verifier
>>> rejects invokes of inline asm (not sure why).
>>
>> Please restore the inliner to not do this or change the verifier to
>> not reject it.  Right now you have broken the tree.
>
> I've reverted the inliner change for the moment.  I plan to change
> the verifier.

Thanks!

>>> +  if (isa<InlineAsm>(Callee) && !CS.isNoUnwind()) {
>>> +    // Inline asm calls cannot throw - mark them 'nounwind'.
>>> +    const ParamAttrsList *PAL = CS.getParamAttrs();
>>> +    uint16_t RAttributes = PAL ? PAL->getParamAttrs(0) : 0;
>>> +    RAttributes |= ParamAttr::NoUnwind;
>>> +
>>> +    ParamAttrsVector modVec;
>>> +    modVec.push_back(ParamAttrsWithIndex::get(0, RAttributes));
>>> +    PAL = ParamAttrsList::getModified(PAL, modVec);
>>> +    CS.setParamAttrs(PAL);
>>> +    Changed = true;
>>> +  }
>>
>> Should this go in a helper function?  Something like
>> CS.addAttribute(ParamAttr::NoUnwind)
>
> I would like to accumulate some more examples of fiddling with
> attributes before factorizing into helper functions, since it
> is not clear to me yet exactly what helpers would be best.

Ok, sounds great, thanks again Duncan,

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to