[llvm-dev] Can attributes be deleted from generated .ll code?
Matt Arsenault via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 24 14:34:21 PST 2019
> On Jan 24, 2019, at 5:18 PM, Peng Yu via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> I tried to delete some attributes (things like #number) from generated
> .ll code. And the compiled code runs just fine. Is it guaranteed to
> work if the attributes are removed? Are these attributes are just for
> optimization or sometimes removing them can break the code?
Most can be safely removed, but not all. Convergent can’t be safely dropped for example. In the special case of intrinsic declarations, the attributes are re-populated during parsing from the definition, so the attribute list isn’t so important.
More information about the llvm-dev