[PATCH] D11654: Add a TargetMachine hook that verifies DataLayout compatibility
Eric Christopher
echristo at gmail.com
Thu Jul 30 11:42:54 PDT 2015
echristo added inline comments.
================
Comment at: include/llvm/Target/TargetMachine.h:138-141
@@ +137,6 @@
+ ///
+ /// The LLVM Module owns a DataLayout that is used for the target independent
+ /// optimizations and will be used for the CodeGen. This hook provide a target
+ /// specific check on the validity of this DataLayout. The default
+ /// implementation just check for an exact match but Targets can override it.
+ virtual bool isCompatibleDataLayout(const DataLayout &Candidate) const {
----------------
joker.eph wrote:
> echristo wrote:
> > "is used for optimizations and code generation"?
> > "This hook provides a..."
> > "The default implementation just checks..." though do we really need a target override here?
> I was not sure for the Target override, can we imagine that a Target is more flexible on the DataLayout requirement? Can it accept variation on some aspects?
> If it does not make sense I'll make it non virtual.
Yeah, it makes sense eventually. Maybe not at the moment? Entirely up to you though. :)
http://reviews.llvm.org/D11654
More information about the llvm-commits
mailing list