aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnroll.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-01-28 01:20:14 +0000
committerJuergen Ributzka <juergen@apple.com>2014-01-28 01:20:14 +0000
commit659ce00d60decfa1219274f82b249f0979cd1132 (patch)
treebcf87bc345d4128ba210d7164990e3dd44330297 /llvm/lib/Transforms/Utils/LoopUnroll.cpp
parent18865db3c1fef7922288ca3dabdd1a2b7e54ba04 (diff)
downloadllvm-659ce00d60decfa1219274f82b249f0979cd1132.zip
llvm-659ce00d60decfa1219274f82b249f0979cd1132.tar.gz
llvm-659ce00d60decfa1219274f82b249f0979cd1132.tar.bz2
[TLI] Add a new hook to TargetLowering to query the target if a load of a constant should be converted to simply the constant itself.
Before this patch we used getIntImmCost from TargetTransformInfo to determine if a load of a constant should be converted to just a constant, but the threshold for this was set to an arbitrary value. This value works well for the two targets (X86 and ARM) that implement this target-hook, but it isn't target-independent at all. Now targets have the possibility to decide directly if this optimization should be performed. The default value is set to false to preserve the current behavior. The target hook has been moved to TargetLowering, which removed the last use and need of TargetTransformInfo in SelectionDAG. llvm-svn: 200271
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnroll.cpp')
0 files changed, 0 insertions, 0 deletions