[IR] Optimize no-op removal from AttributeSet (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 22 May 2021 16:53:17 +0000 (18:53 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 22 May 2021 16:55:25 +0000 (18:55 +0200)
commitfd46ed3f397d6cf41bc6c5a04ab2089f585afe44
tree2ee5b1d35d010c53c17c68d02fe9001dae9d2b26
parent6f9ac11e3960bf5953b3af4b0c4e2682ea802081
[IR] Optimize no-op removal from AttributeSet (NFC)

When removing an AttrBuilder from an AttributeSet, first check
whether there is any overlap. If nothing is being removed, we can
directly return the original set.
llvm/lib/IR/Attributes.cpp