[PATCH] D91174: [Support] Introduce a new InstructionCost class
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 10:27:34 PST 2020
RKSimon added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:24
+#include "llvm/Support/InstructionCost.h"
#include "llvm/IR/InstrTypes.h"
----------------
clang-format this (sorting)
================
Comment at: llvm/include/llvm/IR/DiagnosticInfo.h:41
class SMDiagnostic;
+class InstructionCost;
----------------
(sorting)
================
Comment at: llvm/lib/IR/DiagnosticInfo.cpp:19
#include "llvm/ADT/iterator_range.h"
+#include "llvm/Support/InstructionCost.h"
#include "llvm/IR/BasicBlock.h"
----------------
(sorting)
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7167
case Instruction::ExtractValue:
- return TTI.getInstructionCost(I, TTI::TCK_RecipThroughput);
+ return *(TTI.getInstructionCost(I, TTI::TCK_RecipThroughput).getValue());
default:
----------------
Is it a good idea to always "dereference" optionals like this?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91174/new/
https://reviews.llvm.org/D91174
More information about the llvm-commits
mailing list