Split SelectionDAGISel::IsLegalAndProfitableToFold to
authorEvan Cheng <evan.cheng@apple.com>
Mon, 15 Feb 2010 19:41:07 +0000 (19:41 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 15 Feb 2010 19:41:07 +0000 (19:41 +0000)
commit014bf215c3457bb34fee348265e8f63a70b4d503
tree6ded73d75a50bf06d3057a79019eea17e1c466b1
parenta7445340daab3bfb15968a414090292d37cc954b
Split SelectionDAGISel::IsLegalAndProfitableToFold to
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.

This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96255 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
lib/Target/PIC16/PIC16ISelLowering.cpp
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
utils/TableGen/DAGISelEmitter.cpp