This is an archive of the discontinued LLVM Phabricator instance.

Remove unused includes
AbandonedPublic

Authored by clemenswasser on Feb 20 2022, 7:29 AM.

Details

Summary

Remove unused includes, that were identified as being quiet heavy by clang build analyzer, saves compilation time.

Diff Detail

Event Timeline

clemenswasser created this revision.Feb 20 2022, 7:29 AM
clemenswasser requested review of this revision.Feb 20 2022, 7:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2022, 7:29 AM
MaskRay added inline comments.Feb 20 2022, 10:03 AM
llvm/include/llvm/MCA/HWEventListener.h
69

ArrayRef is used

80

ArrayRef is used.

clemenswasser marked 2 inline comments as done.Feb 20 2022, 10:08 AM
clemenswasser added inline comments.
llvm/include/llvm/MCA/HWEventListener.h
69

D120208 will forward declare ArrayRef. So this is currently blocked on it.

80

Same as above

clemenswasser marked 2 inline comments as done.Feb 20 2022, 10:13 AM
clemenswasser added inline comments.
llvm/include/llvm/MCA/HWEventListener.h
69

Actually I think ArrayRef is already forward declared somewhere. We are however still blocked on D120208, since it will move some implementations from the header into the corresponding cpp files, which currently cause this build to fail.

RKSimon added inline comments.Feb 20 2022, 11:08 AM
llvm/include/llvm/MCA/HWEventListener.h
69

We need the full def, not just the forward declaration here though as we're actually instantiating ArrayRef<ResourceUse> in HWInstructionIssuedEvent, not just passing it in an arg.

It looks like you're depending on ArrayRef.h include from one of the remaining headers (well, both actually...), which the style guide allows, but we typically don't tend to rely on that unless we only require the local use of the def because of the other header.

https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible

clemenswasser added inline comments.Feb 20 2022, 11:14 AM
llvm/include/llvm/MCA/HWEventListener.h
69

Oh, yes, you are totally right. Will remove this change.

RKSimon resigned from this revision.Mar 23 2022, 3:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 3:06 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
MaskRay requested changes to this revision.Jun 3 2022, 4:34 PM
MaskRay added inline comments.
llvm/include/llvm/IR/Intrinsics.h
18

This is needed.

llvm/lib/IR/Function.cpp
13

This is needed.

This revision now requires changes to proceed.Jun 3 2022, 4:34 PM
clemenswasser abandoned this revision.Jul 16 2022, 2:36 PM