aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2022-09-03 13:12:15 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2022-09-03 13:12:22 +0100
commite2d140e9c33739032db40b18a019ece4fb3f687a (patch)
tree3b0b20c211e5f2e7334fe3c1e9bcdbec3930f526 /clang/lib/CodeGen/CodeGenFunction.cpp
parent30dadaa2eb499395f5bef44b9e1a18db6360ad1f (diff)
downloadllvm-e2d140e9c33739032db40b18a019ece4fb3f687a.zip
llvm-e2d140e9c33739032db40b18a019ece4fb3f687a.tar.gz
llvm-e2d140e9c33739032db40b18a019ece4fb3f687a.tar.bz2
[TTI] Add isExpensiveToSpeculativelyExecute wrapper
CGP uses a raw `getInstructionCost(I, TargetTransformInfo::TCK_SizeAndLatency) >= TCC_Expensive` check to see if its better to move an expensive instruction used in a select behind a branch instead. This is causing issues with upcoming improvements to TCK_SizeAndLatency costs on X86 as we need to use TCK_SizeAndLatency as an uop count (so its compatible with various target-specific buffer sizes - see D132288), but we can have instructions that have a low TCK_SizeAndLatency value but should still be treated as 'expensive' (FDIV for example) - by adding a isExpensiveToSpeculativelyExecute wrapper we can keep the current behaviour but still add an x86 override in a future patch when the cost tables are updated to compensate.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions