This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
In function_attribute_inlinable_p, if fndecl is tm_pure and current_function_decl is tm_safe, deny the inlining.
This is because tm_pure is the only escape hatch we have for "do not annotate this". E.g. you want to add a call to printf for debugging, or there's some data you know that shouldn't be part of the transaction.
The fix for this is to implement __tm_waiver. But you know yourself how tricky getting just the transaction blocks correct has been. Adding holes within the region is... nasty. But probably required eventually.
In inline_forbidden_p_stmt, notice asms and prevent them from being inlined if current_function_decl is tm_safe.
This will stop early inlining from breaking tm_safe functions when dealing with e.g. system header files that include inline asms.
Attachment:
curr
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |