Displaying 20 results from an estimated 8000 matches similar to: "Writing an LLVM Pass that depends on mem2reg"
2016 Feb 11
2
Writing an LLVM Pass that depends on mem2reg
Oh, I see, that makes a lot of sense.
How do I build the pass pipeline?
On Thu, Feb 11, 2016 at 5:54 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
> > On Feb 11, 2016, at 9:49 AM, Stanislav Manilov via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >
> > Hello,
> >
> > I am used to specifying dependence on other LLVM passes in the
>
2016 Feb 11
3
Writing an LLVM Pass that depends on mem2reg
Hi,
I read your post in LLVM forum. I want to use getAnalysisUsage(AnalysisUsage &AU) to get MachineLoopInfo. I have used this on my passes before but, this time I am trying to get this information in ScheduleDAGRRList scheduler class. There is no runonmachinefunction function. Do you know how I can implement this?
Regards,
Fateme
I will appreciate it you can help me with this problem.
2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have used the following command for my pass (without -mem2reg):
clang -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
For mem2reg, I tried the following:
clang -mllvm -mem2reg -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
On Mon, Mar 21, 2016 at 9:26 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>> On Mar 21, 2016, at 6:23 PM, Syed Rafiul Hussain
2011 Jun 20
2
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I am currently building a BasicBlock pass which requires to run -reg2mem
before it, and need to run -mem2reg after it to clean up.
So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
class MyPass: public BasicBlockPass{
virtual void getAnalysisUsage(AnalysisUsage &AU){
...
AU.addRequired<RegToMem>();
...
}
};
I searched all passes under
2016 Mar 22
1
Passing llvm option -mem2reg to clang
Unless mem2reg does something other than my understanding of it, I can't
see why any pass would "require" that... It is not guaranteed to do
anything to any particular piece of code, so relying on it seems very
unreliable, I would think.
--
Mats
On 22 March 2016 at 04:32, Kevin Hu via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> Hi,
>
> > Is there any way that
2006 May 03
1
[LLVMdev] Patch for transform dependencies
Hi,
A number of transforms are actually independent, so here's a partial fix. I
updated the
dependencies in a cluster of transforms: LowerSwitch, Mem2Reg, LowerSelect,
LowerAllocations, UnifyFunctionExitNodes.
The patch has been tested, but not extensively. PassManager doesn't
complain, and
the result of a test pass that requires all these (except for
LowerAllocations) together
works
2011 Jun 20
0
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I guess AU.addRequiredID(DemoteRegisterToMemoryID) would do the trick.
- xi
On Jun 19, 2011, at 11:03 PM, Chuck Zhao wrote:
> I am currently building a BasicBlock pass which requires to run -reg2mem before it, and need to run -mem2reg after it to clean up.
>
> So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
>
>
> class MyPass: public
2016 May 04
2
Is the CppBackend still supported?
On Wed, May 4, 2016 at 3:10 PM, Stanislav Manilov <
stanislav.manilov at gmail.com> wrote:
> As in "look at the source of clang" or as in "look at the -S -emit-llvm"
> output? If you mean the former, then would that be easy for someone who
> hasn't seen the clang source before?
>
Generally the latter - then potentially set some breakpoints & look at
2017 Jun 22
2
A bug in DependenceAnalysis?
Hi Philip,
I forgot to mention that I was ignoring loop-independent dependences. If I
don't I get an inconsistent, ordered, anti, loop-independent dependence and
an inconsistent, ordered, flow, loop-carried dependence for example A. At
the same time I get just a consistent, ordered, anti, loop-independent
dependence for example B.
Here's the .ll code for example A:
*; Function Attrs:
2017 Jun 21
2
A bug in DependenceAnalysis?
Hi Philip,
Thanks for checking!
I'm running my own Foo pass that registers DependenceAnalysisWrapperPass as
a prerequisite and then I run it like so:
opt -load libfoo.so -foo example.bc
This is LLVM 3.9.
Cheers,
- Stan
On Wed, Jun 21, 2017 at 5:40 PM, Philip Pfaffe <philip.pfaffe at gmail.com>
wrote:
> Hi Stan,
>
> in both cases I get a consistent anti result. Can you
2012 Aug 06
3
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
Hello,
I wrote my own pass which needs to do some loop unrolling.
I can perform loop unrolling via opt:
opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll
-unroll-count=50 mytest.bc -o mytest.bc
This command works perfectly.
However, what I really want is to produce the **same behavior** but
from my own pass (i.e., I don't want to use opt). I wrote a Module
pass which
2016 May 04
2
Is the CppBackend still supported?
The usual advice I provide people is "see what Clang does with an
equivalent C construct"
On Wed, May 4, 2016 at 12:18 PM, Stanislav Manilov <
stanislav.manilov at gmail.com> wrote:
> Hi,
>
> There is another benefit to keeping the CppBackend: it's great for
> learning how to use the IR and the C++ API in particular, as can be seen
> from this SO Q&A:
>
2012 Apr 11
3
[LLVMdev] Incorrect result in LLVM Alias Analysis
I have used the follwing command,
opt -load LLVComMan.so -ComMan -memdep -tbaa -mem2reg maptest.ll -S
What option other than -mem2reg should be included in this case to get the
right results? Does the order in which I specify the optimizations to be run
make a difference?
Duncan Sands wrote:
>
> Hi Adarsh,
>
>> I want to check if the values a and b in the program alias.
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hi Duncan, thanks for the quick answer.
Yes I'm sure the runOnModule is being called, and when I dump the functions
before exiting the method I can see the AlwaysInline attribute.
I'll check InlineAlways.cpp and will reimplement as last resource but I
still wonder why this is not working.
On Mon, Nov 5, 2012 at 5:03 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Arnaldo,
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo,
On 05/11/12 10:02, Arnaldo wrote:
> Hi Duncan, thanks for the quick answer.
>
> Yes I'm sure the runOnModule is being called, and when I dump the functions
> before exiting the method I can see the AlwaysInline attribute.
>
> I'll check InlineAlways.cpp and will reimplement as last resource but I still
> wonder why this is not working.
if you want more
2013 Sep 26
0
[LLVMdev] ARM NEON intrinsics in clang
On 26 September 2013 17:52, Stanislav Manilov
<stanislav.manilov at gmail.com>wrote:
> To answer your question I am testing on a pandaboard currently, which has
> an arm cortex-a9 processor, which I think is 64-bit.
>
Cortex-A9 is still 32-bits, so you'll have all support you need. ;)
however it doesn't if I remove the -ffreestanding flag. I need to figure
> this out
2012 Apr 12
0
[LLVMdev] Incorrect result in LLVM Alias Analysis
Hi Adarsh,
> I have used the follwing command,
> opt -load LLVComMan.so -ComMan -memdep -tbaa -mem2reg maptest.ll -S
> What option other than -mem2reg should be included in this case to get the
> right results? Does the order in which I specify the optimizations to be run
> make a difference?
what is in maptest.ll?
Ciao, Duncan.
2013 Apr 03
1
[LLVMdev] YSU_Student
Hello,
I wrote my own pass which needs to do some loop unrolling.
I can perform loop unrolling via opt:
opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll
-unroll-count=50 mytest.bc -o mytest.bc
This command works perfectly.
However, what I really want is to produce the **same behavior** but
from my own pass (i.e., I don't want to use opt). I wrote a Module
pass which
2012 Apr 13
2
[LLVMdev] Incorrect result in LLVM Alias Analysis
It contains the bitcode file(without any optimization) of the below program,
void map(int *a)
{
*a=20;
}
int main(){
int *a=(int *)malloc(sizeof(int));
*a=15;
map(a);
return 0;
}
I want to check if the pointer operand of each store instruction aliases
with the function's arguments. I have used below code for this,
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
2013 Sep 26
1
[LLVMdev] ARM NEON intrinsics in clang
> To answer your question I am testing on a pandaboard currently, which has
>> an arm cortex-a9 processor, which I think is 64-bit.
>>
>
> Cortex-A9 is still 32-bits, so you'll have all support you need. ;)
>
Ah, Okay, embarrassing...
however it doesn't if I remove the -ffreestanding flag. I need to figure
>> this out next.
>>
>
> Can you at