diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-03-25 17:25:00 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-03-25 17:25:00 +0000 |
| commit | 49e121d5e42c5d7429805d7a5a0d1f40b91edecf (patch) | |
| tree | f3c5a65fadc46e6e27b4c610abf56eb74b79ce6f /llvm/lib/Target/X86/X86.td | |
| parent | 3f540c0d7d4eb7a8bb42f19e646ad5c79ecffc00 (diff) | |
| download | bcm5719-llvm-49e121d5e42c5d7429805d7a5a0d1f40b91edecf.tar.gz bcm5719-llvm-49e121d5e42c5d7429805d7a5a0d1f40b91edecf.zip | |
Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.
On Nehalem and newer CPUs there is a 2 cycle latency penalty on using a register
in a different domain than where it was defined. Some instructions have
equvivalents for different domains, like por/orps/orpd.
The SSEDomainFix pass tries to minimize the number of domain crossings by
changing between equvivalent opcodes where possible.
This is a work in progress, in particular the pass doesn't do anything yet. SSE
instructions are tagged with their execution domain in TableGen using the last
two bits of TSFlags. Note that not all instructions are tagged correctly. Life
just isn't that simple.
The SSE execution domain issue is very similar to the ARM NEON/VFP pipeline
issue handled by NEONMoveFixPass. This pass may become target independent to
handle both.
llvm-svn: 99524
Diffstat (limited to 'llvm/lib/Target/X86/X86.td')
| -rw-r--r-- | llvm/lib/Target/X86/X86.td | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td index 2be51e1a136..5788e2a71f6 100644 --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -164,6 +164,7 @@ def X86InstrInfo : InstrInfo { "FPFormBits", "hasLockPrefix", "SegOvrBits", + "DomainBits", "Opcode"]; let TSFlagsShifts = [0, 6, @@ -174,6 +175,7 @@ def X86InstrInfo : InstrInfo { 16, 19, 20, + 22, 24]; } |

