- Overloaded (instruction-based) method is a wrapper around the current (opcode-based) method.
- This patch also changes a few callsites (VectorCombine.cpp, SLPVectorizer.cpp, CodeGenPrepare.cpp) to call the overloaded method.
- This is a split of D128302.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/include/llvm/Analysis/TargetTransformInfo.h | ||
---|---|---|
1181 | Is the Type *val always from instruction? If yes, this parameter can be removed. Alternatively add an assert in the implementation that I->getType() == Val. The latter may be better as Type is readily available at callsite. | |
llvm/test/Analysis/CostModel/AArch64/kryo.ll | ||
36 | This test change belong to the follow up patch. |
Resolve comments.
llvm/include/llvm/Analysis/TargetTransformInfo.h | ||
---|---|---|
1181 | Type* val (representing vector type) could be retrieved from Instruction* I but not necessarily I->getType() (scalar for extract-element, and vector for insert-element) For example, AArch64 TTI requires that Type* val is always vector type (code of asserts), while I->getType() for extract-element is the element type (code of EEI constructor) For insert-element it should be true, since it's intentional that "there is only one instance of a particular type so that type comparison becomes pointer comparison" (class description of type) |
Is the Type *val always from instruction? If yes, this parameter can be removed. Alternatively add an assert in the implementation that I->getType() == Val. The latter may be better as Type is readily available at callsite.