aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorPiotr Sobczak <Piotr.Sobczak@amd.com>2020-11-18 10:01:25 +0100
committerPiotr Sobczak <Piotr.Sobczak@amd.com>2020-11-18 17:00:19 +0100
commitb3b9be4ae77ed1d6e59253d84184654577aa76e7 (patch)
tree432a63b59b5ccaecaf0b9a546c55834bfed9caf6 /llvm/lib/Transforms/Scalar
parent7a8b2f692ec48f515e99572f911e15a86823ed1b (diff)
downloadllvm-project-b3b9be4ae77ed1d6e59253d84184654577aa76e7.tar.gz
SpeculativeExecution: Allow speculating more instruction types
Support more instructions in SpeculativeExecution pass: - ExtractValue - InsertValue - Trunc - Freeze Differential Revision: https://reviews.llvm.org/D91688
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
index 9914a889dc95..5baab5684c96 100644
--- a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
+++ b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
@@ -245,9 +245,13 @@ static unsigned ComputeSpeculationCost(const Instruction *I,
case Instruction::FNeg:
case Instruction::ICmp:
case Instruction::FCmp:
+ case Instruction::Trunc:
+ case Instruction::Freeze:
case Instruction::ExtractElement:
case Instruction::InsertElement:
case Instruction::ShuffleVector:
+ case Instruction::ExtractValue:
+ case Instruction::InsertValue:
return TTI.getUserCost(I, TargetTransformInfo::TCK_SizeAndLatency);
default: