Enable early if conversion on PPC
authorHal Finkel <hfinkel@anl.gov>
Fri, 5 Apr 2013 23:29:01 +0000 (23:29 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 5 Apr 2013 23:29:01 +0000 (23:29 +0000)
commitff56d1a2011f239e114267c13302ea26db4f8046
tree62f5494a854361bfdd2397eda50653cdbb0b6257
parentde80951ae9bb86ab6b4183f0d482d426c02ab708
Enable early if conversion on PPC

On cores for which we know the misprediction penalty, and we have
the isel instruction, we can profitably perform early if conversion.
This enables us to replace some small branch sequences with selects
and avoid the potential stalls from mispredicting the branches.

Enabling this feature required implementing canInsertSelect and
insertSelect in PPCInstrInfo; isel code in PPCISelLowering was
refactored to use these functions as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178926 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
lib/Target/PowerPC/PPCTargetMachine.cpp
test/CodeGen/PowerPC/ifcvt.ll [new file with mode: 0644]