aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-10-17 20:24:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-17 20:24:27 +0000
commit0d30cfd0e95d828428d8fae164a4b567c005847a (patch)
treebcec4a74ba7cd1f74232529538cf67791ef27752 /include
parent174cfc0e722b8cfd4887564e6c2d827e7e8764ba (diff)
parent281cc67b6ac794b1eb8232e6efca366d870dad43 (diff)
downloadexternal_llvm-0d30cfd0e95d828428d8fae164a4b567c005847a.zip
external_llvm-0d30cfd0e95d828428d8fae164a4b567c005847a.tar.gz
external_llvm-0d30cfd0e95d828428d8fae164a4b567c005847a.tar.bz2
am 281cc67b: Merge "Bring in fixes for Cortex-A53 errata + build updates."
* commit '281cc67b6ac794b1eb8232e6efca366d870dad43': Bring in fixes for Cortex-A53 errata + build updates.
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h1
-rw-r--r--include/llvm/MC/MCInstrDesc.h12
-rw-r--r--include/llvm/Target/TargetInstrInfo.h9
3 files changed, 18 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 3c82811..1e2db7c 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -614,7 +614,6 @@ public:
/// are not marking copies from and to the same register class with this flag.
bool isAsCheapAsAMove(QueryType Type = AllInBundle) const {
// Only returns true for a bundle if all bundled instructions are cheap.
- // FIXME: This probably requires a target hook.
return hasProperty(MCID::CheapAsAMove, Type);
}
diff --git a/include/llvm/MC/MCInstrDesc.h b/include/llvm/MC/MCInstrDesc.h
index 5896de7..101778e 100644
--- a/include/llvm/MC/MCInstrDesc.h
+++ b/include/llvm/MC/MCInstrDesc.h
@@ -451,9 +451,12 @@ public:
}
/// isRematerializable - Returns true if this instruction is a candidate for
- /// remat. This flag is deprecated, please don't use it anymore. If this
- /// flag is set, the isReallyTriviallyReMaterializable() method is called to
- /// verify the instruction is really rematable.
+ /// remat. This flag is only used in TargetInstrInfo method
+ /// isTriviallyRematerializable.
+ ///
+ /// If this flag is set, the isReallyTriviallyReMaterializable()
+ /// or isReallyTriviallyReMaterializableGeneric methods are called to verify
+ /// the instruction is really rematable.
bool isRematerializable() const {
return Flags & (1 << MCID::Rematerializable);
}
@@ -464,6 +467,9 @@ public:
/// where we would like to remat or hoist the instruction, but not if it costs
/// more than moving the instruction into the appropriate register. Note, we
/// are not marking copies from and to the same register class with this flag.
+ ///
+ /// This method could be called by interface TargetInstrInfo::isAsCheapAsAMove
+ /// for different subtargets.
bool isAsCheapAsAMove() const {
return Flags & (1 << MCID::CheapAsAMove);
}
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 87e7c14..a589d0e 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -200,6 +200,15 @@ public:
unsigned &Size, unsigned &Offset,
const TargetMachine *TM) const;
+ /// isAsCheapAsAMove - Return true if the instruction is as cheap as a move
+ /// instruction.
+ ///
+ /// Targets for different archs need to override this, and different
+ /// micro-architectures can also be finely tuned inside.
+ virtual bool isAsCheapAsAMove(const MachineInstr *MI) const {
+ return MI->isAsCheapAsAMove();
+ }
+
/// reMaterialize - Re-issue the specified 'original' instruction at the
/// specific location targeting a new destination register.
/// The register in Orig->getOperand(0).getReg() will be substituted by