search for: codemetrics

Displaying 20 results from an estimated 30 matches for "codemetrics".

2012 Dec 03
3
[LLVMdev] [RFC] "noclone" function attribute
...w requests though: 1) please name it "noduplicate". "cloning" has other naming implications in llvm related to function bodies, but calls to a noduplicate function should not be duplicated in any way (e.g. tail duplication, loop unrolling, etc). 2) please have the llvm/Analysis/CodeMetrics.h code consider them to be unduplicatable (generalizing the containsIndirectBr bit). 3) Please change random parts of the compiler to use CodeMetrics, instead of scattering random checks for this attribute throughout the code. Anything duplicating code and not using CodeMetrics is just plain inc...
2012 Dec 03
0
[LLVMdev] [RFC] "noclone" function attribute
On Dec 2, 2012, at 10:11 PM, Chris Lattner <clattner at apple.com> wrote: > 3) Please change random parts of the compiler to use CodeMetrics, instead of scattering random checks for this attribute throughout the code. Anything duplicating code and not using CodeMetrics is just plain incorrect. One problem that we may run into when using CodeMetrics is compile time. In many cases we are looking for one particular trait and can exit as...
2012 Dec 03
2
[LLVMdev] [RFC] "noclone" function attribute
Hi, Thanks for the pointers. My patch now calls the attribute "noduplicate", and updates CodeMetrics to have another field: bool notDuplicatable; Which semantically is "containsIndirectBr || containsNoDuplicateInst". I didn't repurpose containsIndirectBr because I felt what I'm looking for is sufficiently different (indirectbr inhibits inlining, whereas noduplicate does not, if...
2012 Dec 03
1
[LLVMdev] [RFC] "noclone" function attribute
On Sun, Dec 2, 2012 at 10:27 PM, Nadav Rotem <nrotem at apple.com> wrote: > > On Dec 2, 2012, at 10:11 PM, Chris Lattner <clattner at apple.com> wrote: > > 3) Please change random parts of the compiler to use CodeMetrics, instead > of scattering random checks for this attribute throughout the code. > Anything duplicating code and not using CodeMetrics is just plain > incorrect. > > > One problem that we may run into when using CodeMetrics is compile time. > In many cases we are looking for one...
2010 May 18
0
[LLVMdev] suggestion: add a member in llvm::CodeMetrics
Is it worthwhile to add a void analyzeInstRange(InstIter begin, InstIter end) {} which estimate code metrics of any instruction range in a basic block. Or we are good with analyzeBasicBlock as an upperbound? thanks yuanfang
2012 Dec 04
2
[LLVMdev] [RFC] "noclone" function attribute
Hi all + llvm-commits, After the discussion below, please find attached my patch to add a new "noduplicate" function attribute. I've modified CodeMetrics and LoopInfo, which covers most cases, but JumpThreading and InlineCost don't use CodeMetrics yet, so they required changing manually. Cheers, James On Mon, 2012-12-03 at 23:46 +0000, Chris Lattner wrote: > On Dec 3, 2012, at 9:48 AM, James Molloy <James.Molloy at arm.com> wrote: &g...
2019 Jan 17
2
stale info in the assumption cache
...ls that were moved to the outlined function in the parent function's cache. The problem can be reproduced on the attached file as follows (many thanks to Andy Kaylor for creating this reproducer) $ opt -slp-vectorizer -hotcoldsplit -slp-vectorizer -S -o - extract.ll opt: .../llvm/lib/Analysis/CodeMetrics.cpp:107: static void llvm::CodeMetrics::collectEphemeralValues(const llvm::Function*, llvm::AssumptionCache*, llvm::SmallPtrSetImpl<const llvm::Value*>&): Assertion `I->getParent()->getParent() == F && "Found assumption for the wrong function!"' failed. ... Th...
2010 Apr 22
0
[LLVMdev] 2.7 release notes
...access): I committed several typo fixes / rewording fixes to the release notes just now. The following paragraph under the "New Useful APIs" section needs to be reworded but I am not sure what is trying to be expressed so I have not done anything with it yet: The optimizer uses the new CodeMetrics class to measure the size of code. Various passes that use thing (like the inliner, loop unswitcher, etc) all use this to make more accurate estimates of the code size impact of various optimizations. The "use thing" could just be reworded to "use things" but this still doesn...
2012 Dec 03
0
[LLVMdev] [RFC] "noclone" function attribute
On Dec 3, 2012, at 9:48 AM, James Molloy <James.Molloy at arm.com> wrote: > Hi, > > Thanks for the pointers. My patch now calls the attribute "noduplicate", > and updates CodeMetrics to have another field: > > bool notDuplicatable; > > Which semantically is "containsIndirectBr || containsNoDuplicateInst". I > didn't repurpose containsIndirectBr because I felt what I'm looking for > is sufficiently different (indirectbr inhibits inlining, wh...
2012 Dec 06
0
[LLVMdev] [RFC] "noclone" function attribute
...m-commits Cc: Nadav Rotem; Kuperstein, Michael M; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] [RFC] "noclone" function attribute Hi all + llvm-commits, After the discussion below, please find attached my patch to add a new "noduplicate" function attribute. I've modified CodeMetrics and LoopInfo, which covers most cases, but JumpThreading and InlineCost don't use CodeMetrics yet, so they required changing manually. Cheers, James On Mon, 2012-12-03 at 23:46 +0000, Chris Lattner wrote: > On Dec 3, 2012, at 9:48 AM, James Molloy <James.Molloy at arm.com> wrote: &g...
2019 Jan 17
2
stale info in the assumption cache
...ls that were moved to the outlined function in the parent function's cache. The problem can be reproduced on the attached file as follows (many thanks to Andy Kaylor for creating this reproducer) $ opt -slp-vectorizer -hotcoldsplit -slp-vectorizer -S -o - extract.ll opt: .../llvm/lib/Analysis/CodeMetrics.cpp:107: static void llvm::CodeMetrics::collectEphemeralValues(const llvm::Function*, llvm::AssumptionCache*, llvm::SmallPtrSetImpl<const llvm::Value*>&): Assertion `I->getParent()->getParent() == F && "Found assumption for the wrong function!"' failed. ... Th...
2012 Dec 06
2
[LLVMdev] [RFC] "noclone" function attribute
...stein, Michael M; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] [RFC] "noclone" function attribute > > Hi all + llvm-commits, > > After the discussion below, please find attached my patch to add a new "noduplicate" function attribute. > > I've modified CodeMetrics and LoopInfo, which covers most cases, but JumpThreading and InlineCost don't use CodeMetrics yet, so they required changing manually. > > Cheers, > > James > > On Mon, 2012-12-03 at 23:46 +0000, Chris Lattner wrote: > > On Dec 3, 2012, at 9:48 AM, James Molloy <James...
2013 Feb 06
2
[LLVMdev] CostModelAnalysis for 3.0 release
Hi All, I wanted to do some basic cost estimation of Instruction/BB. There're CostModelAnalysis and CodeMetrics available in 3.1 and 3.2 releases. I've been using 3.0 for a while. I'm wondering whether similar analysis can be done in the old 3.0 release, e.g. back porting the implementation. Thank you! Best, Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: <ht...
2012 Dec 07
0
[LLVMdev] [RFC] "noclone" function attribute
...stein, Michael M; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] [RFC] "noclone" function attribute > > Hi all + llvm-commits, > > After the discussion below, please find attached my patch to add a new "noduplicate" function attribute. > > I've modified CodeMetrics and LoopInfo, which covers most cases, but JumpThreading and InlineCost don't use CodeMetrics yet, so they required changing manually. > > Cheers, > > James > > On Mon, 2012-12-03 at 23:46 +0000, Chris Lattner wrote: > > On Dec 3, 2012, at 9:48 AM, James Molloy <James...
2012 Dec 02
0
[LLVMdev] [RFC] "noclone" function attribute
I definitely support this. In fact we were about to send a very similar proposal. The main difference I can see between this proposal and ours was that we named the attribute "noduplicate". I graciously defer to James on the bikeshade color issue. Michael -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of James Molloy
2010 Apr 22
8
[LLVMdev] 2.7 release notes
Ok, the LLVM 2.7 release notes are in near final shape. Please take a look and suggest improvements (or, better yet, just commit improvements if you have commit access): http://llvm.org/docs/ReleaseNotes.html Things still needed are marked with FIXMEs. These include: 1. Clang needs a blurb describing what's new in 2.7. Have the clang folks been doing anything for the last 6 months? 2. I
2013 Feb 07
0
[LLVMdev] CostModelAnalysis for 3.0 release
...n passes) may use TTI and the cost model. Higher-level canonicalization passes should not use it. Thanks, Nadav On Feb 6, 2013, at 1:26 AM, ryan <stdstack at gmail.com> wrote: > Hi All, > I wanted to do some basic cost estimation of Instruction/BB. There're CostModelAnalysis and CodeMetrics available in 3.1 and 3.2 releases. > I've been using 3.0 for a while. I'm wondering whether similar analysis can be done in the old 3.0 release, e.g. back porting the implementation. > > Thank you! > > Best, > Ryan > _______________________________________________ &g...
2016 Jan 05
3
TargetTransformInfo getOperationCost uses
...alues that are ultimately reported by opt -cost-model -analyze (the actual cost 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. N...
2012 Dec 01
6
[LLVMdev] [RFC] "noclone" function attribute
Hi, OpenCL has a "barrier" function with very specific semantics, and there is currently no analogue to model this in LLVM. This has been touched on by the SPIR folks but I don't believe they put forward a proposal. The barrier function is a special function that ensures that all workitems executing a kernel have executed up to that point before execution on any workitem can
2013 Feb 07
2
[LLVMdev] CostModelAnalysis for 3.0 release
...er-level canonicalization > passes should not use it. > > Thanks, > Nadav > > On Feb 6, 2013, at 1:26 AM, ryan <stdstack at gmail.com> wrote: > > > Hi All, > > I wanted to do some basic cost estimation of Instruction/BB. There're > CostModelAnalysis and CodeMetrics available in 3.1 and 3.2 releases. > > I've been using 3.0 for a while. I'm wondering whether similar analysis > can be done in the old 3.0 release, e.g. back porting the implementation. > > > > Thank you! > > > > Best, > > Ryan > > _____________...