search for: getinstructioncost

Displaying 15 results from an estimated 15 matches for "getinstructioncost".

2015 Jan 14
6
[LLVMdev] Instruction Cost
Hi, I'm looking for APIs that compute instruction costs, and noticed several of them. 1. A series of APIs of TargetTransformInfo that compute the cost of instructions of a particular type (e.g. getArithmeticInstrCost and getShuffleCost) 2. TargetTransformInfo::getOperationCost 3. CostModel::getInstructionCost::getInstructionCost in lib/Analysis/CostModel.cpp Only the first one is used extensively in LLVM's code base, but the second and third one seems more recently added and more general, making me think if they are designed to replace the first approach. So, what's the recommended way to comp...
2015 Jan 15
2
[LLVMdev] Instruction Cost
CostModule::getInstructionCost also consults TTI ( http://llvm.org/docs/doxygen/html/CostModel_8cpp_source.html#l00380). No? Jingyue On Wed, Jan 14, 2015 at 4:05 PM, Chandler Carruth <chandlerc at google.com> wrote: > > On Wed, Jan 14, 2015 at 3:54 PM, Jingyue Wu <jingyue at google.com> wrote: > >>...
2017 Feb 08
2
ShuffleKind SK_ExtractSubvector
...the semantics of the ShuffleKind SK_ExtractSubvector. It seems a subvector is to be extracted, starting from a given index of a given subtype. First of all, if index 0 is passed, I suppose this would mean a noop? But what about calls like the one made of LoopVectorizer for Instruction::PHI in getInstructionCost(): return TTI.getShuffleCost(TargetTransformInfo::SK_ExtractSubvector, VectorTy, VF - 1, VectorTy); Here the highest index is passed, which doesn't make sense to me. Nor does it make sense to pass the the same VectorTy in both parameters. In BBVectorize, start inde...
2020 Nov 05
4
[Proposal] Introducing the concept of invalid costs to the IR cost model
Hi, I'd like to propose a change to our cost interfaces so that instead of returning an unsigned value from functions like getInstructionCost, getUserCost, etc., we instead return a wrapper class that encodes an integer cost along with extra state. The extra state can be used to express: 1. A cost as infinitely expensive in order to prevent certain optimisations taking place. For example, there are already examples in LLVM where the cos...
2016 Jun 02
4
[GSoC 2016] Parameters of a target architecture
Dear LLVM contributors, I work on the "Improvement of vectorization process in Polly". At the moment I'm trying to implement tiling, interchanging and unrolling of specific loops based on the following algorithm for the analytical modeling [1]. It requires information about the following parameters of a target architecture: 1. Size of double-precision floating-point number. 2.
2014 Jul 17
4
[LLVMdev] Using CostModel to estimate machine cycles of each instruction
There is CostModel.cpp since LLVM3, I am wondering if anyone can give me an concrete example on how to use this pass to estimate cycles used in a given IR file. Thank you very much. Don
2015 Jan 20
2
[LLVMdev] Instruction Cost
Thanks all for replying! I'll try the CostModel class first. Jingyue On Thu, Jan 15, 2015 at 3:47 AM, Jonas Wagner <jonas.wagner at epfl.ch> wrote: > Hi, > > 3. CostModel::getInstructionCost::getInstructionCost in >> lib/Analysis/CostModel.cpp >> > > I've been using the CostModel class in a project, and it has worked quite > well. I don't have very high requirements on precision, though. > > Note that in order to use it, you'll probably have to cr...
2020 Nov 06
1
[Proposal] Introducing the concept of invalid costs to the IR cost model
...To: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> Subject: [EXT] [llvm-dev] [Proposal] Introducing the concept of invalid costs to the IR cost model Hi, I'd like to propose a change to our cost interfaces so that instead of returning an unsigned value from functions like getInstructionCost, getUserCost, etc., we instead return a wrapper class that encodes an integer cost along with extra state. The extra state can be used to express: 1. A cost as infinitely expensive in order to prevent certain optimisations taking place. For example, there are already examples in LLVM where the cos...
2020 Nov 05
0
[Proposal] Introducing the concept of invalid costs to the IR cost model
...Sent: Thursday, November 5, 2020 7:43 AM To: llvm-dev at lists.llvm.org Subject: [EXT] [llvm-dev] [Proposal] Introducing the concept of invalid costs to the IR cost model Hi, I'd like to propose a change to our cost interfaces so that instead of returning an unsigned value from functions like getInstructionCost, getUserCost, etc., we instead return a wrapper class that encodes an integer cost along with extra state. The extra state can be used to express: 1. A cost as infinitely expensive in order to prevent certain optimisations taking place. For example, there are already examples in LLVM where the cos...
2013 Feb 04
0
[LLVMdev] Vectorizer using Instruction, not opcodes
...i64 %indvars.iv.next to i32 LV: Found an estimated cost of 1 for VF 2 For instruction: %exitcond = icmp ne i32 %lftr.wideiv, 256 LV: Found an estimated cost of 0 for VF 2 For instruction: br i1 %exitcond, label %for.body, label %for.end The corresponding code is in LoopVectorizationCostModel::getInstructionCost(). Basically, it just takes the scalar instruction, its type, creates a vector type and asks: How much would an instruction of that vector type cost (Slight simplification). On Feb 4, 2013, at 1:38 PM, Renato Golin <renato.golin at linaro.org> wrote: > The example below is not stopping t...
2020 Nov 06
0
[Proposal] Introducing the concept of invalid costs to the IR cost model
...To: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> Subject: [EXT] [llvm-dev] [Proposal] Introducing the concept of invalid costs to the IR cost model Hi, I'd like to propose a change to our cost interfaces so that instead of returning an unsigned value from functions like getInstructionCost, getUserCost, etc., we instead return a wrapper class that encodes an integer cost along with extra state. The extra state can be used to express: 1. A cost as infinitely expensive in order to prevent certain optimisations taking place. For example, there are already examples in LLVM where the cos...
2020 Nov 17
0
[Proposal] Introducing the concept of invalid costs to the IR cost model
...e is always at least 2, and compare the cost with the scalar loop based on that. Thanks and Regards, Vineet On 2020-11-05 9:12 p.m., David Sherwood via llvm-dev wrote: Hi, I'd like to propose a change to our cost interfaces so that instead of returning an unsigned value from functions like getInstructionCost, getUserCost, etc., we instead return a wrapper class that encodes an integer cost along with extra state. The extra state can be used to express: 1. A cost as infinitely expensive in order to prevent certain optimisations taking place. For example, there are already examples in LLVM where the cos...
2015 Jan 28
5
[LLVMdev] RFC: generation of PSAD instruction
On Wed, Jan 28, 2015 at 7:50 AM, Hal Finkel <hfinkel at anl.gov> wrote: > Hi Vijender, > > Thanks for posting this, there is wide support here for improving our support for reductions of various kinds, both in flavor and robustness. I've cc'd some others who have previously discussed this. > > James has advocated in the past for an intrinsic for horizontal reductions,
2019 May 13
3
How shall I evaluate the latency of each instruction in LLVM IR?
Inspired by https://www.agner.org/optimize/instruction_tables.pdf, which gives us the latency and reciprocal throughput of each instruction in the different architecture of X86, Is there anybody taking the effort to do a similar job for LLVM IR? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Feb 04
6
[LLVMdev] Vectorizer using Instruction, not opcodes
On 4 February 2013 18:25, Arnold Schwaighofer <aschwaighofer at apple.com>wrote: > For cases where this approach breaks really badly we could consider adding > a specialized api or parameters (like the type of a user/use). But we > should do so only as a last resort and backed by actual code that would > benefit from doing so. > Very sensible, more or less what I had in