search for: getoperationcost

Displaying 9 results from an estimated 9 matches for "getoperationcost".

2016 Jan 05
3
TargetTransformInfo getOperationCost uses
...model tests) seem to not matter for this. The huge cost I've assigned division doesn't prevent the loop from being unrolled, because it isn't actually considered when loop unrolling. The loop unrolled uses CodeMetrics, which via getUserCost ultimately uses TargetTransformInfoImplBase::getOperationCost(), which returns various fixed values (4 for division (TCC_Expensive, but this isn't nearly expensive enough)). getOperationCost only uses the type and opcode to estimate, so it doesn't require a value. No target overrides this. The hooks that targets do really implement, like getArithmet...
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&...
2019 Sep 30
3
[cfe-dev] CFG simplification question, and preservation of branching in the original code
...right. See copied again the IR code that gets generated for the C code that I posted before. This IR code, including the presence of expensive shifts ( %a.lobit = lshr i32 %a, 31) is generated when -mllvm -phi-node-folding-threshold=1 is specified in the command line, or when the Target implements getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) to return TCC_Expensive for operator types that are bigger than the default target register size. > > > > ; ModuleID = 'main.c' > source_filename = "main.c" > target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:...
2019 Sep 30
2
[cfe-dev] CFG simplification question, and preservation of branching in the original code
...ain the IR code that gets generated for the C > code that I posted before. This IR code, including the presence of > expensive shifts ( %a.lobit = lshr i32 %a, 31) is generated when -mllvm > -phi-node-folding-threshold=1 is specified in the command line, or when the > Target implements getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) > to return TCC_Expensive for operator types that are bigger than the default > target register size. > > > > ; ModuleID = 'main.c' > source_filename = "main.c" > target datalayout = > "e-m:e-p:16:16-i32:16-i64...
2019 Sep 29
2
[cfe-dev] CFG simplification question, and preservation of branching in the original code
On Sun, Sep 29, 2019 at 3:35 PM Joan Lluch via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi Sanjay, > > Actually, the CodeGenPrepare::optimizeSelectInst is not doing the best it could do in some circumstances: The case of “OptSize" for targets not supporting Select was already mentioned to be detrimental. > > For targets that actually have selects, but branches
2015 Jan 15
2
[LLVMdev] Instruction Cost
...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 a...
2019 Oct 01
3
[cfe-dev] CFG simplification question, and preservation of branching in the original code
...right. See copied again the IR code that gets generated for the C code that I posted before. This IR code, including the presence of expensive shifts ( %a.lobit = lshr i32 %a, 31) is generated when -mllvm -phi-node-folding-threshold=1 is specified in the command line, or when the Target implements getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) to return TCC_Expensive for operator types that are bigger than the default target register size. >>> >>> >>> >>> ; ModuleID = 'main.c' >>> source_filename = "main.c" >>> target datalay...
2015 Jul 01
2
[LLVMdev] Deriving undefined behavior from nsw/inbounds/poison for scalar evolution
----- Original Message ----- > From: "Bjarke Roune" <broune at google.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: llvmdev at cs.uiuc.edu, "Jingyue Wu" <jingyue at google.com> > Sent: Wednesday, July 1, 2015 2:27:59 PM > Subject: Re: [LLVMdev] Deriving undefined behavior from nsw/inbounds/poison for scalar evolution > >
2019 Oct 03
2
[cfe-dev] CFG simplification question, and preservation of branching in the original code
...right. See copied again the IR code that gets generated for the C code that I posted before. This IR code, including the presence of expensive shifts ( %a.lobit = lshr i32 %a, 31) is generated when -mllvm -phi-node-folding-threshold=1 is specified in the command line, or when the Target implements getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) to return TCC_Expensive for operator types that are bigger than the default target register size. >>>> >>>> >>>> >>>> ; ModuleID = 'main.c' >>>> source_filename = "main.c" >&gt...