[PATCH] D95832: [SampleFDO][NFC] Refacrot SampleProfileLoad to reuse the code in MachineIR

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 6 14:13:18 PST 2021


dblaikie added a comment.

(sorry if this comment is off-base, I haven't quite understood/followed the reviews, but some of the discussion here seems potentially problematic, so I'll say this... )

If code is being moved into a header to avoid layering/circular dependency violations, that's not OK. Since the layering violation would still exist (from a software design perspective, though not one a linker would diagnose/trip over). Google's build system, for instance, does enforce header layering & we use/support that to avoid creating header-only dependencies.

Another way of thinking about it: We shouldn't create a situation where it's non-trivial to move code between headers and implementation files. That should always be simple/trivial to do.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95832/new/

https://reviews.llvm.org/D95832



More information about the llvm-commits mailing list