mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Add target hook for whether it is profitable to reduce load widths
Add an option to disable optimization to shrink truncated larger type loads to smaller type loads. On SI this prevents using scalar load instructions in some cases, since there are no scalar extloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224084 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -753,6 +753,16 @@ public:
|
||||
/// reduce runtime.
|
||||
virtual bool ShouldShrinkFPConstant(EVT) const { return true; }
|
||||
|
||||
// Return true if it is profitable to reduce the given load node to a smaller
|
||||
// type.
|
||||
//
|
||||
// e.g. (i16 (trunc (i32 (load x))) -> i16 load x should be performed
|
||||
virtual bool shouldReduceLoadWidth(SDNode *Load,
|
||||
ISD::LoadExtType ExtTy,
|
||||
EVT NewVT) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// When splitting a value of the specified type into parts, does the Lo
|
||||
/// or Hi part come first? This usually follows the endianness, except
|
||||
/// for ppcf128, where the Hi part always comes first.
|
||||
|
||||
Reference in New Issue
Block a user