Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] counting branch frequencies"
2012 Sep 18
4
[LLVMdev] counting branch frequencies
I tried getting profile data from LLVM 3.1, using the method mentioned
below. I tried it out on a simple matrix multiplication program.
However, I noticed the following problems:
1. There is a warning message: "WARNING: profile information is
inconsistent with the current program!"
2. The basic block counts (obtained from
ProfileInfo::getExecutionCount(const BasicBlock*)) are
2012 Sep 19
0
[LLVMdev] counting branch frequencies
Hi Apala,
Dibyendu is correct that this is likely due to pass order, but things
get a bit complicated with -O[1-9] or -std-compile-opts as they insert
early passes *before* the profiling code.
I recommend that you use identical optimizations to insert
instrumentation and to load the profiling data.
E.g.:
opt -insert-edge-profiling -O3 foo.bc -o foo.2.bc
opt -profile-loader -O3 foo.bc
2012 Sep 13
0
[LLVMdev] counting branch frequencies
Hi Apala,
On 11/09/12 11:20, apala guha wrote:
> Is it possible to associate the branch frequency counts with the basic
> blocks
> in the intermediate representation? (e.g. Can I access basic block
> frequencies in runOnFunction()?)
Profile data really needs to be loaded at a module level, but once this
has been done it can be accessed at any level (including function).
In LLVM
2012 Sep 19
3
[LLVMdev] counting branch frequencies
Thanks everyone for the replies. After some experimentation, I found
that the order in which the passes are specified matters:
opt -O3 -profile-loader matmult.bc -o matmult.opt.bc (works)
opt -profile-loader -O3 matmult.bc -o matmult.opt.bc (does not work)
Also, I am able to avoid the inconsistency warning only for optimization
levels -O3 and -O2. I get that warning when using -O1 and
2012 Sep 19
0
[LLVMdev] counting branch frequencies
Another issue is with ProfileInfo::getExecutionCount(Function* F).
Looking at the source code and results, I am seeing that it always
returns the execution count of the entry basic block of the function. If
the entry basic block is part of a loop, its execution count does not
match the function invocation count.
Is my assumption wrong, that ProfileInfo::getExecutionCount(Function* F)
is
2012 Sep 19
1
[LLVMdev] counting branch frequencies
Can we not run the -insert-edge-profiling and -profile-loader passes at the beginning of the opt? Orthogonal point is, is it worth doing any optimizations when -insert-edge-profiling is specified on command line?
-Prashantha
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Alastair Murray
Sent: Wednesday, September 19, 2012
2012 Sep 07
2
[LLVMdev] counting branch frequencies
Hi,
Is there a way to count branch frequencies using LLVM infrastructure?
Thanks.
-Apala
Postdoctoral Scholar
Department of Computer Science, University of Chicago
Computation Institute, Argonne National Laboratory
http://sites.google.com/site/apalaguha/home/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Jul 16
2
[LLVMdev] RFC: Profiling Enhancements (GSoC)
Hi all,
In light of the expected removal of ProfileInfo this is a request for
comments on the next few items that I now plan to work on for GSoC.
Planned tasks:
#0 Add support for determining branch weight metadata by profiling
At the absolute minimum this will require writing a new profile loader
which will set branch weight metadata based on profiling data.
#1 Optionally use profiling
2012 Jul 15
3
[LLVMdev] FYI: Planning to remove ProfileInfo and related passes from LLVM
On Sun, Jul 15, 2012 at 8:32 AM, Alastair Murray <alastairmurray42 at gmail.com
> wrote:
> Hi Chandler,
>
> I'm a GSoC student working on profiling support (mentor CC'ed). I'm no
> stranger to the issues with the current system: my original proposal was
> written without knowledge of the limitations. This is why this list
> hasn't heard much from me yet.
2012 Jul 15
0
[LLVMdev] FYI: Planning to remove ProfileInfo and related passes from LLVM
Hi Chandler,
I'm a GSoC student working on profiling support (mentor CC'ed). I'm no
stranger to the issues with the current system: my original proposal was
written without knowledge of the limitations. This is why this list
hasn't heard much from me yet.
I would like to continue working on profiling support but I'm not
attached to ProfileInfo and wouldn't be
2009 Sep 09
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
Thanks for such a rapid response!
> Don't know about Passes in the backend, but this could be a problem of
> an FunctionPassManager trying to use a ModulePass.
I manually applied the patch you provided for llc (I'm using the 2.5
release of LLVM not ToT) and it fixed my compilation error. When your
patch replaced the FunctionPassManager used by llc with a PassManager
the error went
2009 Jun 29
7
[LLVMdev] Profiling in LLVM Patch
Hi all,
as proposed in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/020396.html
I implemented the algorithm presented in [Ball94]. It only instruments
the minimal number of edges necessary for edge profiling.
The main changes introduced by this patch are:
*) a interface compatible rewrite of ProfileInfo
*) a cleanup of ProfileInfoLoader
(some functionality in ProfileInfoLoader
2009 Jul 01
0
[LLVMdev] Profiling in LLVM Patch
Hi Andreas,
First, thanks again for undertaking this work and submitting it back. There is a
lot of good stuff here and it would be great to see it get back into the tree.
I have a few major high-level comments on the patch. First off, the patch is
quite large and should be broken down into separate incremental changes which
are easier to review and apply. I think the patches should more or less
2012 Jul 15
4
[LLVMdev] FYI: Planning to remove ProfileInfo and related passes from LLVM
Hello folks,
I'd like to remove all of the old and defunct profile info passes from
LLVM. These have been almost entirely supplanted by the BranchProbability
and BlockFrequency systems, which are actually on by default, and in use in
optimization passes.
The old system is not on, and hasn't been touched in years except to do
minor build fixes and updates.
As far as I'm aware, the
2012 Jul 17
0
[LLVMdev] RFC: Profiling Enhancements (GSoC)
Hi Alastair,
In addition to your planned tasks, you might want to put in some work to ensure branch probabilities are not lost during optimization. One known issue is LLVM optimizer can turn branchy code into switch statements and it would completely discard probability. Here is a simple example:
static void func2(int N, const int *a, const int *b, int *c) __attribute__((always_inline));
void
2009 Sep 10
2
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
Shuguang Feng wrote:
>> What does "llc -debug-pass=Structure" say? Is the ProfileLoaderPass
>> really the last pass to touch the ProfileInfo before you are using it?
>
> Below is the sequence of passes that I see. Although the
> NoProfileInfo pass is being run, it should be subsequently overridden
> by ProfileInfoLoaderPass (LoaderPass) correct?
Yes.
>
2009 Jul 01
12
[LLVMdev] Profiling in LLVM Patch
Hi Daniel,
Daniel Dunbar wrote:
> Hi Andreas,
>
> First, thanks again for undertaking this work and submitting it back. There is a
> lot of good stuff here and it would be great to see it get back into the tree.
Thanks for taking the time to review this, I know its a huge patch. I still have a few questions on how you would like this patch to be re-factored and split up.
> [...]
2012 Aug 09
0
[LLVMdev] Profile Based Branch Weight Metadata
Hi Alastair,
Your patch looks great. I am new on this part of llvm. Why do we want to get rid of ProfileInfo? Is there any email thread related to this?
I understand that we want to setBranchWeightMetadata from the profiling data generated by -insert-edge-profiling.
I thought the existing loader can parse the profiling data and map the data to the IR, and only the setting of metadata is missing.
2010 Feb 25
3
[LLVMdev] Using Profile Information
Hi,
How can I use profile information into my pass for performing some analysis.
I tried something like:
PassManager PassMgr = PassManager();
cl::opt<std::string> ProfileDataFile(cl::Positional,
cl::desc("<llvmprof.out file>"),
cl::Optional, cl::init("llvmprof.out"));
PassMgr.add(createProfileLoaderPass(ProfileDataFile));
2012 Nov 09
0
[LLVMdev] translating from OpenMP to CUDA
The PTX back-end is robust (it's based on the sources used by nvcc), but
I'm not sure about the OpenMP representation in LLVM IR. I believe the
OpenMP constructs are already lowered into libgomp calls before leaving
DragonEgg. It's been awhile since I've loooked at it though.
If you use the PTX back-end and have any issues, please don't hesitate to
post to the list and cc: