diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-12 07:26:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 07:26:51 +0000 |
commit | 24ac95abc12ffe4cf5e940c2553cbdf83b8894df (patch) | |
tree | 0aeacb46ff2651d93f27960ce1023bf83fd167ac /llvm/lib | |
parent | 91b6af24ac892d03e82ba774ba0b9e52929034b1 (diff) | |
download | bcm5719-llvm-24ac95abc12ffe4cf5e940c2553cbdf83b8894df.tar.gz bcm5719-llvm-24ac95abc12ffe4cf5e940c2553cbdf83b8894df.zip |
Add new TargetInstrDesc::hasImplicitUseOfPhysReg and
hasImplicitDefOfPhysReg methods. Use them to remove a
look in X86 fast isel.
llvm-svn: 68886
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 7b114ddbc38..0146b0730de 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -808,21 +808,9 @@ bool X86FastISel::X86SelectBranch(Instruction *I) { } const TargetInstrDesc &TID = MI.getDesc(); - const unsigned *ImpDefs = TID.getImplicitDefs(); - - if (TID.hasUnmodeledSideEffects()) break; - - bool ModifiesEFlags = false; - - if (ImpDefs) { - for (unsigned u = 0; ImpDefs[u]; ++u) - if (ImpDefs[u] == X86::EFLAGS) { - ModifiesEFlags = true; - break; - } - } - - if (ModifiesEFlags) break; + if (TID.hasUnmodeledSideEffects() || + TID.hasImplicitDefOfPhysReg(X86::EFLAGS)) + break; } if (SetMI) { |