From 33b07d6725ab32e20ebeb62707be21c35a66390c Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Fri, 22 Jul 2016 20:03:43 +0000 Subject: GlobalISel: implement legalization pass, with just one transformation. This adds the actual MachineLegalizeHelper to do the work and a trivial pass wrapper that legalizes all instructions in a MachineFunction. Currently the only transformation supported is splitting up a vector G_ADD into one acting on smaller vectors. llvm-svn: 276461 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp') diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 9eb43d2bec1..b18a186c122 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -165,6 +165,11 @@ addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM, if (PassConfig->addIRTranslator()) return nullptr; + PassConfig->addPreLegalizeMachineIR(); + + if (PassConfig->addLegalizeMachineIR()) + return nullptr; + // Before running the register bank selector, ask the target if it // wants to run some passes. PassConfig->addPreRegBankSelect(); -- cgit v1.2.3