Chandler Carruth
2015-Jan-14 11:03 UTC
[LLVMdev] RFC: Could we move TargetLibraryInfo into lib/Analysis?
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. 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. -Chandler -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150114/8e78f2af/attachment.html>
Ahmed Bougacha
2015-Jan-14 17:46 UTC
[LLVMdev] RFC: Could we move TargetLibraryInfo into lib/Analysis?
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 >
Chandler Carruth
2015-Jan-14 19:33 UTC
[LLVMdev] RFC: Could we move TargetLibraryInfo into lib/Analysis?
On Wed, Jan 14, 2015 at 9:46 AM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:> 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. >No idea at all, and I completely agree with you. Ultimately, I think the word "target" here is misleading. It means target in the since of a cross compilation target, but it has little to no relevance to LLVM targets. As you mention, it is an OS and runtime library availability issue. Anyways, we don't need a hook today, and if we do at some point in the future we can figure out how to add one.> > > 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.Awesome. Will make it so. (Especially now that the release is branched.) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150114/b180a1da/attachment.html>