[FastISel] Breakout intrinsic lowering into a separate function and add a target-hook.

Create a separate helper function for target-independent intrinsic lowering. Also
add an target-hook that allows to directly call into a target-sepcific intrinsic
lowering method. Currently the implementation is opt-in and doesn't affect
existing target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Juergen Ributzka
2014-07-11 20:42:12 +00:00
parent 7f50100cfa
commit 2f58a513f1
2 changed files with 45 additions and 34 deletions

View File

@@ -27,6 +27,7 @@ class CallInst;
class DataLayout;
class FunctionLoweringInfo;
class Instruction;
class IntrinsicInst;
class LoadInst;
class MVT;
class MachineConstantPool;
@@ -179,6 +180,10 @@ protected:
/// argument lowering. It returns true if it was successful.
virtual bool FastLowerArguments();
/// This method is called by target-independent code to do target specific
/// intrinsic lowering. It returns true if it was successful.
virtual bool FastLowerIntrinsicCall(const IntrinsicInst *II);
/// This method is called by target-independent code to request that an
/// instruction with the given type and opcode be emitted.
virtual unsigned FastEmit_(MVT VT,
@@ -390,6 +395,7 @@ private:
bool SelectStackmap(const CallInst *I);
bool SelectCall(const User *I);
bool SelectIntrinsicCall(const IntrinsicInst *II);
bool SelectBitCast(const User *I);