aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
diff options
context:
space:
mode:
authorThorsten Schütt <schuett@gmail.com>2024-07-25 19:21:28 +0200
committerGitHub <noreply@github.com>2024-07-25 19:21:28 +0200
commitdb8c84fc7a75dd60bcfff7160b51e1a55e7e0f73 (patch)
tree7d315cce35c976279ac7cdbd2f864e0d38118828 /llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
parenta55df237375e98cfc2520d5eb1a23b302ef02ba0 (diff)
downloadllvm-db8c84fc7a75dd60bcfff7160b51e1a55e7e0f73.zip
llvm-db8c84fc7a75dd60bcfff7160b51e1a55e7e0f73.tar.gz
llvm-db8c84fc7a75dd60bcfff7160b51e1a55e7e0f73.tar.bz2
[GlobalIsel] Push cast through select. (#100539)
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index 8c05931..d930ab2 100644
--- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@ -68,6 +68,16 @@ const TargetLowering &CombinerHelper::getTargetLowering() const {
return *Builder.getMF().getSubtarget().getTargetLowering();
}
+const MachineFunction &CombinerHelper::getMachineFunction() const {
+ return Builder.getMF();
+}
+
+const DataLayout &CombinerHelper::getDataLayout() const {
+ return getMachineFunction().getDataLayout();
+}
+
+LLVMContext &CombinerHelper::getContext() const { return Builder.getContext(); }
+
/// \returns The little endian in-memory byte position of byte \p I in a
/// \p ByteWidth bytes wide type.
///