diff options
author | Michael Liao <michael.liao@intel.com> | 2013-03-28 23:13:21 +0000 |
---|---|---|
committer | Michael Liao <michael.liao@intel.com> | 2013-03-28 23:13:21 +0000 |
commit | 816f6d0ac76c0ffb2ea9ecb72349d5d7d0fa8d1a (patch) | |
tree | ca2e482074d2d172d8fa38077e8cfedefaadb7cb /lib/Target/X86/X86InstrControl.td | |
parent | d02e46be1a3be9e8b871bdb0028fa5b9a2593848 (diff) | |
download | external_llvm-816f6d0ac76c0ffb2ea9ecb72349d5d7d0fa8d1a.zip external_llvm-816f6d0ac76c0ffb2ea9ecb72349d5d7d0fa8d1a.tar.gz external_llvm-816f6d0ac76c0ffb2ea9ecb72349d5d7d0fa8d1a.tar.bz2 |
Skip moving call address loading into callseq when targets prefer register indirect call.
To enable a load of a call address to be folded with that call, this
load is moved from outside of callseq into callseq. Such a moving
adds a non-glued node (that load) into a glued sequence. This non-glue
load is only removed when DAG selection folds them into a memory form
call instruction. When such instruction selection is disabled, it breaks
DAG schedule.
To prevent that, such moving is disabled when target favors register
indirect call.
Previous workaround disabling CALL32m/CALL64m insn selection is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrControl.td')
-rw-r--r-- | lib/Target/X86/X86InstrControl.td | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86InstrControl.td b/lib/Target/X86/X86InstrControl.td index 1027ded..0e69651 100644 --- a/lib/Target/X86/X86InstrControl.td +++ b/lib/Target/X86/X86InstrControl.td @@ -170,7 +170,8 @@ let isCall = 1 in def CALL32m : I<0xFF, MRM2m, (outs), (ins i32mem:$dst), "call{l}\t{*}$dst", [(X86call (loadi32 addr:$dst))], IIC_CALL_MEM>, - Requires<[In32BitMode]>, Sched<[WriteJumpLd]>; + Requires<[In32BitMode,FavorMemIndirectCall]>, + Sched<[WriteJumpLd]>; def FARCALL16i : Iseg16<0x9A, RawFrmImm16, (outs), (ins i16imm:$off, i16imm:$seg), @@ -245,7 +246,7 @@ let isCall = 1, Uses = [RSP], SchedRW = [WriteJump] in { def CALL64m : I<0xFF, MRM2m, (outs), (ins i64mem:$dst), "call{q}\t{*}$dst", [(X86call (loadi64 addr:$dst))], IIC_CALL_MEM>, - Requires<[In64BitMode]>; + Requires<[In64BitMode,FavorMemIndirectCall]>; def FARCALL64 : RI<0xFF, MRM3m, (outs), (ins opaque80mem:$dst), "lcall{q}\t{*}$dst", [], IIC_CALL_FAR_MEM>; |