summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2018-05-09 05:00:17 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2018-05-09 05:00:17 +0000
commit618437459cd03ab47bcab7b1ba6fd1736f4f78c7 (patch)
treed4cd10ac1ccd018a8a8b38f146df64b95ac8f41f /llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
parent801fca259ed90d9cebcd0c90ac428198d07401f5 (diff)
downloadbcm5719-llvm-618437459cd03ab47bcab7b1ba6fd1736f4f78c7.tar.gz
bcm5719-llvm-618437459cd03ab47bcab7b1ba6fd1736f4f78c7.zip
Revert r331816 and r331820 - [globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64
Reverting this to see if the clang-cmake-aarch64-global-isel and clang-cmake-aarch64-quick bots are failing because of this commit. We know it wasn't r331819. llvm-svn: 331846
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp b/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
deleted file mode 100644
index 2a0692b888a..00000000000
--- a/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//=== lib/CodeGen/GlobalISel/AArch64PreLegalizerCombiner.cpp --------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This pass does combining of machine instructions at the generic MI level,
-// before the legalizer.
-//
-//===----------------------------------------------------------------------===//
-
-#include "AArch64TargetMachine.h"
-#include "llvm/CodeGen/GlobalISel/Combiner.h"
-#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
-#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
-#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
-#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/TargetPassConfig.h"
-#include "llvm/Support/Debug.h"
-
-#define DEBUG_TYPE "aarch64-prelegalizer-combiner"
-
-using namespace llvm;
-using namespace MIPatternMatch;
-
-namespace {
-class AArch64PreLegalizerCombinerInfo : public CombinerInfo {
-public:
- AArch64PreLegalizerCombinerInfo()
- : CombinerInfo(/*AllowIllegalOps*/ true, /*ShouldLegalizeIllegal*/ false,
- /*LegalizerInfo*/ nullptr) {}
- virtual bool combine(MachineInstr &MI, MachineIRBuilder &B) const override;
-};
-
-bool AArch64PreLegalizerCombinerInfo::combine(MachineInstr &MI,
- MachineIRBuilder &B) const {
- CombinerHelper Helper(B);
-
- switch (MI.getOpcode()) {
- default:
- return false;
- case TargetOpcode::G_ANYEXT:
- case TargetOpcode::G_SEXT:
- case TargetOpcode::G_ZEXT:
- return Helper.tryCombineExtendingLoads(MI);
- }
-
- return false;
-}
-
-// Pass boilerplate
-// ================
-
-class AArch64PreLegalizerCombiner : public MachineFunctionPass {
-public:
- static char ID;
-
- AArch64PreLegalizerCombiner();
-
- StringRef getPassName() const override { return "AArch64PreLegalizerCombiner"; }
-
- bool runOnMachineFunction(MachineFunction &MF) override;
-
- void getAnalysisUsage(AnalysisUsage &AU) const override;
-};
-}
-
-void AArch64PreLegalizerCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequired<TargetPassConfig>();
- MachineFunctionPass::getAnalysisUsage(AU);
-}
-
-AArch64PreLegalizerCombiner::AArch64PreLegalizerCombiner() : MachineFunctionPass(ID) {
- initializeAArch64PreLegalizerCombinerPass(*PassRegistry::getPassRegistry());
-}
-
-bool AArch64PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
- if (MF.getProperties().hasProperty(
- MachineFunctionProperties::Property::FailedISel))
- return false;
- auto *TPC = &getAnalysis<TargetPassConfig>();
- AArch64PreLegalizerCombinerInfo PCInfo;
- Combiner C(PCInfo, TPC);
- return C.combineMachineInstrs(MF);
-}
-
-char AArch64PreLegalizerCombiner::ID = 0;
-INITIALIZE_PASS_BEGIN(AArch64PreLegalizerCombiner, DEBUG_TYPE,
- "Combine AArch64 machine instrs before legalization",
- false, false)
-INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
-INITIALIZE_PASS_END(AArch64PreLegalizerCombiner, DEBUG_TYPE,
- "Combine AArch64 machine instrs before legalization", false,
- false)
-
-
-namespace llvm {
-FunctionPass *createAArch64PreLegalizeCombiner() {
- return new AArch64PreLegalizerCombiner();
-}
-} // end namespace llvm
OpenPOWER on IntegriCloud