This is an archive of the discontinued LLVM Phabricator instance.

Kill deprecated attribute API
ClosedPublic

Authored by deadalnix on Aug 1 2016, 4:01 PM.

Details

Summary

This kill various depreacated API related to attribute :

  • The deprecated C API attribute based on LLVMAttribute enum.
  • The Raw attribute set format (planned to be removed in 4.0).

Diff Detail

Repository
rL LLVM

Event Timeline

deadalnix updated this revision to Diff 66397.Aug 1 2016, 4:01 PM
deadalnix retitled this revision from to Kill deprecated attribute API.
deadalnix updated this object.
deadalnix added a subscriber: llvm-commits.
mehdi_amini edited edge metadata.Aug 1 2016, 4:03 PM

Can you update the release notes with this list and the "new recommended way" to replace these?

deadalnix updated this revision to Diff 66403.Aug 1 2016, 4:53 PM
deadalnix edited edge metadata.

Update release notes

mehdi_amini added inline comments.Sep 13 2016, 4:29 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

Could we miscompile such bitcode files? It is not clear what is dropped here.

deadalnix added inline comments.Sep 14 2016, 12:21 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

We are basically ignoring attributes for these. This indeed probably breaks some old bytecode. This was a planned removal, so I think this is fine. However, we may want to have some from form of error triggered rather than just ignoring the old attribute format. I'll do whatever the community think is best here.

mehdi_amini added inline comments.Sep 14 2016, 1:20 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

Sorry but "This indeed probably breaks some old bytecode" followed by "I think this is fine" does not get along together well :)

We are supposed to process correctly bitcode as old as 3.0.

deadalnix added inline comments.Sep 14 2016, 2:05 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

This is clearly documented that this is going away in 4.0 . Would generating an error be fine ?

mehdi_amini added inline comments.Sep 14 2016, 2:07 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

All these comments that refer to 4.0 are stalled: the policy changed when we change the numbering format.

deadalnix added inline comments.Sep 19 2016, 2:08 PM
docs/ReleaseNotes.rst
44 ↗(On Diff #71251)

Alright I'll restore the bc support.

deadalnix updated this revision to Diff 76900.Nov 3 2016, 4:00 PM
deadalnix updated this object.

Restore the support for legacy bytecode.

mehdi_amini added inline comments.Nov 5 2016, 12:58 PM
docs/ReleaseNotes.rst
39 ↗(On Diff #76900)

Were these marked as deprecated in 3.9?

41 ↗(On Diff #76900)

Same question?

deadalnix added inline comments.Nov 5 2016, 1:31 PM
docs/ReleaseNotes.rst
39 ↗(On Diff #76900)

Yes.

The C API enum LLVMAttribute and associated API is deprecated in favor of the new LLVMAttributeRef API. The deprecated functions are LLVMAddFunctionAttr, LLVMAddTargetDependentFunctionAttr, LLVMRemoveFunctionAttr, LLVMGetFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, LLVMGetAttribute, LLVMAddInstrAttribute, LLVMRemoveInstrAttribute and LLVMSetInstrParamAlignment.
41 ↗(On Diff #76900)

Same answer :)

mehdi_amini added inline comments.Nov 5 2016, 2:04 PM
lib/Bitcode/Reader/BitcodeReader.cpp
1359 ↗(On Diff #76900)

Why? Can you elaborate the FIXME comment?

1431 ↗(On Diff #76900)

This one should be removed, we're in 4.0 timeframe now and it won't be special.

deadalnix added inline comments.Nov 5 2016, 4:13 PM
lib/Bitcode/Reader/BitcodeReader.cpp
1359 ↗(On Diff #76900)

This code is just moved around. I did not write that comment.

1431 ↗(On Diff #76900)

Same here.

lib/IR/Attributes.cpp
476 ↗(On Diff #76900)

Comment used to be here.

1529 ↗(On Diff #76900)

dito

mehdi_amini accepted this revision.Nov 5 2016, 6:18 PM
mehdi_amini edited edge metadata.

OK! LGTM.

lib/Bitcode/Reader/BitcodeReader.cpp
1359 ↗(On Diff #76900)

OK, but we don't really know why is this comment here, annoying...

1431 ↗(On Diff #76900)

OK, still, remove this comment.

This revision is now accepted and ready to land.Nov 5 2016, 6:18 PM
This revision was automatically updated to reflect the committed changes.