Displaying 20 results from an estimated 80000 matches similar to: "[LLVMdev] MachineLoopInfo question"
2008 May 09
3
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs,
On May 9, 2008, at 3:47 AM, Matthijs Kooijman wrote:
> Hi All,
>
> the attached patch performs the splitting in the proposed manner.
> before applying the patch, please execute
> svn cp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Utils/
> UnrollLoop.cpp
> to make the patch apply and preserve proper history.
>
> Transforms/Utils/UnrollLoop.cpp
2007 Dec 07
2
[LLVMdev] MachineLoopInfo Analysis Not Done
I'm trying to create the Machine LICM pass and I have this defined:
class VISIBILITY_HIDDEN MachineLICM : public MachineFunctionPass {
...
public:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<MachineLoopInfo>();
AU.addRequired<MachineDominatorTree>();
}
...
};
But when I go to use it:
2007 Dec 07
0
[LLVMdev] MachineLoopInfo Analysis Not Done
On Dec 6, 2007, at 5:56 PM, Bill Wendling wrote:
> I'm trying to create the Machine LICM pass and I have this defined:
>
> But when I go to use it:
>
> bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
> ...
> // Get our Loop information...
> LI = &getAnalysis<MachineLoopInfo>();
> ...
> for (MachineLoopInfo::iterator
2010 Oct 15
2
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
Hello, we can get BasicBlock from MachineBasicBlock through MachineBasicBlock::getBasicBlock() function, but how can I get MachineBasicBlock of a BasicBlock?
Thank you!
2010 Oct 15
0
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
I don't think you can.
The BasicBlock is a member of MachineBasicBlock. It is not inherited,
so it cannot be cast. The number of the MachineBasicBlock is not the
same as any BasicBlock values. So
MachineFunction::getMachineBasicBlock( BasicBlock::{get the number} )
cannot work. I do not see much in the basic block which can identify
it.
So you can search for it.
typedef struct findBlock {
2010 Oct 15
1
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
Also note: there may be multiple MachineBasicBlock's for a single
BasicBlock.
- David M
On Fri, Oct 15, 2010 at 4:59 AM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> I don't think you can.
>
> The BasicBlock is a member of MachineBasicBlock. It is not inherited,
> so it cannot be cast. The number of the MachineBasicBlock is not the
> same as any BasicBlock values.
2010 May 07
0
[LLVMdev] getTripCount requires which optimization passes?
hi,
On Fri, May 7, 2010 at 8:59 AM, Trevor Harmon <Trevor.W.Harmon at nasa.gov>wrote:
> Hi,
>
> For me, getTripCount always returns null, even for trivial loops such
> as:
>
> void simple(int j) {
> for (int i = 0; i < 10; i++) {
> j++;
> }
> }
>
> Looking through the mailing list archive, it appears that getTripCount
> requires
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
Hi,
For me, getTripCount always returns null, even for trivial loops such
as:
void simple(int j) {
for (int i = 0; i < 10; i++) {
j++;
}
}
Looking through the mailing list archive, it appears that getTripCount
requires certain optimization passes to run first, but it's not clear
which ones. There doesn't seem to be any documentation on this. Does
anybody
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
Sorry, I could not the the loop trip count with getTripCount(). I used
a simple program as a test case:
------------------------------------------------------
#include <stdio.h>
int getV(int i)
{
return i * 2;
}
int main()
{
int num = 10;
int sum=0;
int i;
for (i=0; i<num; i++)
{
sum += getV(i);
}
return 0;
2010 Mar 09
1
[LLVMdev] Find all backedges of CFG by MachineDominatorTree. please look at my jpg.
Thank you, Nick.
Yes, I have add getAnalysisUsage.
As I know, some CFG is irreducible.
At this time, Dominator Tree can not find
some backedge. Is it means some MachineLoop is
not be found?
dominatorTree.jpg is a previous exmaple.
best regards!
renkun
--- 10年3月9日,周二, Nick Lewycky <nicholas at mxc.ca> 写道:
> 发件人: Nick Lewycky <nicholas at mxc.ca>
> 主题: Re: [LLVMdev] Find
2008 May 09
0
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hi All,
the attached patch performs the splitting in the proposed manner.
before applying the patch, please execute
svn cp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Utils/UnrollLoop.cpp
to make the patch apply and preserve proper history.
Transforms/Utils/UnrollLoop.cpp contains the unrollLoop function, which is now
used by the LoopUnroll pass. I've also moved the
2008 Apr 26
2
[LLVMdev] Getting the trip count of a loop
Hi,
I am trying to add a new loop pass in which I making a call to get the trip
count of the loop using
Value *TripCountValue = L->getTripCount()
However I am always getting NULL for TripCountValue (confirmed through gdb).
I am running this pass after the canonicalization of induction variables:
opt --debug-pass=Structure -stats -indvars -loop-rotate -my-loop-pass <
main.bc >
2010 Mar 09
1
[LLVMdev] Find all backedges of CFG by MachineDominatorTree. please look at my jpg.
Hi:
I want to do some optimization on MachineLoop.
So I want to get MachineLoopInfo from MachineFunction.
I reference MachineLICM.cpp.
So I try to write a pass in Target/mytarget directory.
I find there is Error.
llvm/include/llvm/PassAnalysisSupport.h:198: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::MachineLoopInfo]: Assertion
2009 Mar 08
1
[LLVMdev] getTripCount()
Hello,
I'm writing a new function pass, and I'm having trouble with
getTripCount() in Loop. If I generate the bitcode for the test code
with no optimization then getTripCount() returns NULL, but if I pass -
O3 to the front-end then getTripCount() returns fine. My phase calls
addRequiredID(LoopSimplifyID) from getAnalysisUsage() and I also tried
putting -mem2reg at the front
2010 Sep 13
1
[LLVMdev] isLCSSAForm failed
Hi folk,
I have a Module pass. I tested the pass against the following code.
./gcc.dg/20030721-1.c
extern void abort(void);
void foo(int) __attribute__((__noinline__));
void foo(int i)
{
abort();
}
int main()
{
int i;
int first= 0;
int last= 0;
while (last<3) {
last = first;
while (first<=last) {
first++;
for (i=0;i<3;i++)
last++;
if
2010 Sep 13
0
[LLVMdev] isLCSSAForm failed
Never mind, I've figured out the problem.
On 09/12/2010 07:41 PM, Neal N. Wang wrote:
Hi folk,
I have a Module pass. I tested the pass against the following code.
./gcc.dg/20030721-1.c
extern void abort(void);
void foo(int) __attribute__((__noinline__));
void foo(int i)
{
abort();
}
int main()
{
int i;
int first= 0;
int last= 0;
while (last<3) {
last = first;
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!!
I guess once I am able to get *V* (which probably is a pointer to a
Value object), then, I can instrument some code at the IR level to
dump V. As long as I maintain V at this pass stage, I should be able
to dump the loop trip count. This is true, isn't it?
Basically, what I am going to do is to add a function call before the
loop body, such as:
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
On May 6, 2010, at 6:32 PM, ether zhhb wrote:
> As the comment said:
> /// The IndVarSimplify pass transforms loops to have a form that
> this
> /// function easily understands.
>
> you could try -indvars.
After adding -indvars to the opt command, getTripCount still returns
null.
I suppose it's possible, depending on the scheduling of the pass
manager, that
2007 Nov 29
2
[LLVMdev] LLVM on MinGW
Antony Blakey wrote:
> SVN head LLVM and Clang built out of the box for me a week ago on
> MSYS/MINGW, using the following files:
Ok, I tried to do the same. The compilations stops with the following
error message (actually, I got to the same point in my attempt to build
LLVM with the MinGW compiler shipped with Cygwin):
llvm[1]: Compiling MachineLoopInfo.cpp for Debug build
2011 Oct 20
2
[LLVMdev] Question regarding basic-block placement optimization
Thanks for all of the comments Andy and Jakob. A new patch is attached that
is *much* less of a rough draft. Sorry for any confusion due to the early
state of the patch.
Also, many many thanks to Jakob for his explanation of how the branches
between MBBs should be handled, and Andy, Jim, and Eric who helped answer my
questions on IRC when I ran into stumbling blocks. Also, Nick, who shoulder