aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-27 15:50:12 -0700
committerMatt Arsenault <arsenm2@gmail.com>2020-07-31 10:42:43 -0400
commit57bd64ff8434aa55aeb1c7a1035f4b5b7468b809 (patch)
tree7fe262041bff144c5784a985a97b9be1186701a5 /llvm/lib/CodeGen/TargetLoweringBase.cpp
parent6983cf3a57aa6d8619eb39e1625eed5340ba05c7 (diff)
downloadllvm-57bd64ff8434aa55aeb1c7a1035f4b5b7468b809.zip
llvm-57bd64ff8434aa55aeb1c7a1035f4b5b7468b809.tar.gz
llvm-57bd64ff8434aa55aeb1c7a1035f4b5b7468b809.tar.bz2
Support addrspacecast initializers with isNoopAddrSpaceCast
Moves isNoopAddrSpaceCast to the TargetMachine. It logically belongs with the DataLayout.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index db4fcf7..4562e1e 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -801,6 +801,11 @@ bool TargetLoweringBase::canOpTrap(unsigned Op, EVT VT) const {
}
}
+bool TargetLoweringBase::isFreeAddrSpaceCast(unsigned SrcAS,
+ unsigned DestAS) const {
+ return TM.isNoopAddrSpaceCast(SrcAS, DestAS);
+}
+
void TargetLoweringBase::setJumpIsExpensive(bool isExpensive) {
// If the command-line option was specified, ignore this request.
if (!JumpIsExpensiveOverride.getNumOccurrences())