[LLVMdev] RFC: Could we move TargetLibraryInfo into lib/Analysis?

Ahmed Bougacha ahmed.bougacha at gmail.com
Wed Jan 14 09:46:00 PST 2015


On Wed, Jan 14, 2015 at 12:03 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> While this is target information, it isn't actually part of the target today
> and doesn't use any part of the target code. Maybe some day we can use a
> target hook to initialize the data structures, but even then I feel like
> this really belongs in the core analysis library.

So I'm curious: do you have an idea of where better to put this
hypothetical hook? Since it's mostly OS-dependent, it doesn't seem
very fit for the way we do targets.

> Would there be any objections to just moving it into Analysis?
>
> Doing this would remove a seriously ugly layering violation we have today. I
> believe this would remove the last dependency on lib/Target by lib/Analysis
> and the largest set of dependencies on lib/Target by lib/Transforms.
>
> If there is general agreement, I will make it so.

FWIW I agree, on all counts.

-Ahmed

> -Chandler
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list