[PATCH] D11654: Add a TargetMachine hook that verifies DataLayout compatibility
Mehdi AMINI
mehdi.amini at apple.com
Thu Jul 30 11:32:13 PDT 2015
joker.eph 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 {
----------------
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.
http://reviews.llvm.org/D11654
More information about the llvm-commits
mailing list