Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] How to force a MachineFunctionPass to be the last one ?"
2014 Jan 22
2
[LLVMdev] How to force a MachineFunctionPass to be the last one ?
On Jan 21, 2014, at 3:20 PM, Andrew Trick <atrick at apple.com> wrote:
>
> On Jan 21, 2014, at 2:20 PM, sebastien riou <matic at nimp.co.uk> wrote:
>
>> Hi,
>>
>> I would like to execute a MachineFunctionPass after all other passes
>> which modify the machine code.
>> In other words, if we call llc to generate assembly file, that pass
>>
2012 Feb 09
1
[LLVMdev] Questions on MachineFunctionPass and relaxation of pcrel calls (ARM/thumb2)
While implementing a MachineFunctionPass that runs as part of the
ARMTargetMachine::addPreEmitPass(), I've run into a problem.
This particular MFP can drastically increase the size (in MachineInstr
count) of the MachineFunction that it processes, so much so that
there is a real danger of pcrel calls and branches that use immediate
offsets to not be sufficient.
A naive test confirmed that
2013 Aug 08
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Does this count have to be exact, or just an accurate approximation? The
back-end may add/remove registers fairly late in the codegen process, so if
you need an exact count you may need to run *just* before the assembly
printer.
Perhaps we could introduce a special machine node that represents a shared
memory allocation. The node's value would be the shared address space
pointer of the
2013 Feb 27
2
[LLVMdev] arm compiler benchmarks
What about benchmarks on other Arm devices?
On 02/26/2013 02:52 PM, Jim Grosbach wrote:
> Cortex-M0 is a Thumb1 only device. There hasn't been any concerted
> effort to tune LLVM's Thumb1 output in quite a long time. Even back then
> (2008 or so), the effort was mainly to get it to work acceptably, with
> the real performance tuning work being done for Thumb2. I'm not
>
2013 Aug 08
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Yes, total number of PTX registers that will be emitted is exactly what I
need. It's hard to figure out this in LLVM IR level.
2013/8/7 Justin Holewinski <justin.holewinski at gmail.com>
> Is there any way you could approximate the register/instruction usage and
> perform live-range analysis in a higher-level LLVM IR pass? I'm not sure
> how useful NVPTXRegisterInfo
2013 Feb 27
0
[LLVMdev] arm compiler benchmarks
I've not run any on non-iOS devices, and haven't looked at GCC since v4.2.1 due to licensing issues, so I don't have a good feel for comparative benchmarking.
-Jim
On Feb 26, 2013, at 4:20 PM, Reed Kotler <rkotler at mips.com> wrote:
> What about benchmarks on other Arm devices?
>
> On 02/26/2013 02:52 PM, Jim Grosbach wrote:
>> Cortex-M0 is a Thumb1 only
2013 Feb 26
2
[LLVMdev] arm compiler benchmarks
Hi,
I didn't do any serious benchmarking but so far I never found
a case where LLVM does better than IAR on CortexM0, but I saw a lot of
cases where IAR output is better than LLVM...
That said I did not use
-Os or -Oz, I just used -O3.
A recurrent situation is that LLVM
push/pop one or two extra registers compared to IAR, I guess it does so
in order to comply with a standard ABI or
2013 Feb 26
0
[LLVMdev] arm compiler benchmarks
Cortex-M0 is a Thumb1 only device. There hasn't been any concerted effort to tune LLVM's Thumb1 output in quite a long time. Even back then (2008 or so), the effort was mainly to get it to work acceptably, with the real performance tuning work being done for Thumb2. I'm not surprised that an embedded market focussed compiler like IAR is better tuned for a chip like that.
-Jim
On Feb
2013 Feb 05
1
[LLVMdev] logic function optimization: IAR 1 - LLVM 0 ?
Hi,
clang -O3 -target thumbv7-eabi -emit-llvm ...
llc ... -debug
-O3 -code-model=small -march=thumb -mcpu=cortex-m3 ...
Does generate
slightly better code, but it still computes 7 xor + 7 and.
Anyway this
should be a target independent optimization isn't it ??
Cheers
Sebastien
On 2013-02-04 16:46, Bill Wendling wrote:
> Have you tried
armv7?
>
> -bw
>
> On Feb 2,
2015 Nov 04
3
Confused on how to do a machinefunction pass
Thank you so much.
That helped alot.
Fami
On Wed, Nov 4, 2015 at 9:40 AM, John Criswell <jtcriswel at gmail.com> wrote:
> On 11/3/15 7:54 PM, fateme Hoseini wrote:
>
> Dear John,
> Thank you so much for your help. I looked at those documents. Could you
> kindly answer the following questions:
>
> Does it mean that I have to make my own backend target in order to write
2013 Feb 02
2
[LLVMdev] logic function optimization: IAR 1 - LLVM 0 ?
I gave the following function to IAR compiler (targeting CortexM0)
and to clang/LLVM 3.2 (clang -O3 -target thumbv6-eabi -emit-llvm)
int
calleeSave8(int in[]){
int out=0;
int i;
for(i=0;i<8;i++){
out ^=
in[i] & in[(i+1)%8];
}//expand to out =
(in[0]&in[1])^(in[1]&in[2])^(in[2]&in[3])^(in[3]&in[4])^(in[4]&in[5])^(in[5]&in[6])^(in[6]&in[7])^(in[7]&in[0])
2015 Nov 17
2
Confused on how to do a machinefunction pass
Hi,
So, I run my pass in X86 target with llc command and it printed out
"hello****". Now I am trying to do the same pass for ARM target. So I did
exactly what I did for X86 as mentioned in my previous posts. When I run
the following command:
llc -march=arm test.ll -o test
nothing prints out. I did the same for MIPS target too and I got no result.
Can anyone tell me what I'm doing
2016 Feb 27
1
Need help on how to write MachineFunctionPass
Deer All,
I wanted to write MachineFunctionPass which needs to be run after global
register allocation pass.
I have read LLVM documentation and blogs and able to write simple pass
which will is invoked through opt command line.
However, I could able to find any blogs or document to explains clear steps
for writing MachineFunctionPass.
Please suggest some documents or blogs which will help me
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Antony,
What are you trying to accomplish in this case? I did something very similar in the AMDIL backend, but it was not the cleanest solution and you are correct it has to be do at doInitialization stage and not at runOnMachineFunction.
Micah
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Antony Yu
> Sent:
2016 Mar 01
0
How to write a simple MachineFunctionPass
First you should learn how to write a pass and then a MachineFunctionPass.
>From LLVM website, you can refer to
http://llvm.org/docs/WritingAnLLVMPass.html
And for outside pass, you can refer to
http://adriansampson.net/blog/llvm.html
It's a great article.
And the author put the source code on Github
<https://github.com/sampsyo/llvm-pass-skeleton>.
2016-03-01 14:36 GMT+08:00
2016 Mar 01
2
How to write a simple MachineFunctionPass
Hello everyone,
I have written simple LLVM passes, but I cannot able to write a
MachineFunctionPass pass.
I am following the steps form the following link but it is not working:
http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/
Please share the sample MachineFunctionPass code or steps to follow to
write MachineFunctionPass.
Thanks,
Bala
--
Thanks,
Bala
IIITA Allahabad
--------------
2013 Aug 05
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Hello,
I want to add a global variable of arrayType in my MachineFunctionPass.
However, I only get const Module from MachineFunction.getMMI().getModule().
I can't add any global variable to a const Module.
Another way is to add a global variable in doInitialization in my
MachineFunctionPass, but I can't determine the size of my arrayType for
global variable in doInitialization.
Is there
2009 Sep 15
2
[LLVMdev] Registering a MachineFunctionPass to JIT codegen
Hi all,
I can't find a way to add a MachineFunctionPass to the common codegen
passes (LLVMTargetMachine::addPassesToEmitMachineCode) while JITting
(the pass manager is associated with the jitstate of the JIT and I can't
access it because it's private). Have I missed something? Or adding a
MachineFunctionPass to codegen requires to change the
2016 Feb 26
0
Help Required llc runtime error for simple MachineFunctionPass
Hello ,
I have written a very simple MachineFunction Pass that currently does
nothing. It compiles fine but when I try to load it with llc it give me
following error:
llc -optimize-regalloc=0 -load lib/GCRA.dylib -regalloc=gc test/fibo.bc
Pass 'Bundle Machine CFG Edges' is not initialized.
Verify if there is a pass dependency cycle.
What is going wrong here ?
Here is my very simple
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
I found that : "Code generator passes are registered and initialized
specially by TargetMachine::addPassesToEmitFile and similar routines, so
they cannot generally be run from the *opt* or *bugpoint* commands."...So
how I can run a MachineFunctionPass? In the end, I just want to apply a DFS
on a CFG of a function. And I need oriented edges and wanted to use