Displaying 20 results from an estimated 1000 matches similar to: "question about mem2reg"
2020 Sep 14
3
Mem2reg: load before single store
Hi all!
While playing with LLVM, I've found a weird behavior in mem2reg pass.
When optimizing single stores, undefined value is placed before any load
preceding the store (based on basicblock's ordering and simple dominator
analysis, if I remember correctly).
This is the line that is responsible for the behavior: (LLVM9 does the same)
2016 Jan 12
3
Does LLVM have java frontend?
Hi,
Does LLVM have java frontend which can change Java bytecode to LLVM IR?
Thanks a lot!
Best,
Linhai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160112/1d9c0c7b/attachment.html>
2018 Jan 26
2
count how many basic block executed
Hello everyone,
I am writing a pass to instrument program and count how many basic block executed. What I have tried is to instrument a local counter inside each function, add 1 to the local counter inside each basic block, and save the counter value to a global counter. The current runtime overhead is around 25%. Is there any way I can try to lower the overhead? Like keeping the local counter
2018 Jan 28
1
count how many basic block executed
Hi John,
Thanks a lot for the reply! I try mem2reg opt and also implement the algorithm proposed in "Efficiently Counting Program Events with Support for On-line Queries" to place the local counter smarter. If I build the executable by using -O0, the overhead would be 20% - 30%. But if I build the executable by using -O2, the overhead would be more than 3X. I feel instrumenting counter
2011 Jan 17
5
[LLVMdev] How to get the name and argument of a function
Hi everyone:
The code I am analyzing is :
int main()
{
int i = 0;
printf("hello world!");
printf( "%d" , i );
}
I want to get each place where printf is called, and the argument used
during that call.
so I write llvm pass code like:
void Myfunction( Function & F){
for( Function::iterator b = F.begin() , be = F.end() ;
2018 Jan 27
0
count how many basic block executed
On 1/26/18 1:04 AM, Linhai Song via llvm-dev wrote:
>
> Hello everyone,
>
>
> I am writing a pass to instrument program and count how many basic
> block executed. What I have tried is to instrument a local counter
> inside each function, add 1 to the local counter inside each basic
> block, and save the counter value to a global counter. The current
> runtime
2011 Jan 26
2
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
> On 1/26/11 2:40 PM, songlh at cs.wisc.edu wrote:
>> thanks!
>>
>> After I check the ll file, I find this:
>>
>> %1 = load %struct.nsAString** %aBuf_addr, align 4, !dbg !2048
>> %2 = getelementptr inbounds %struct.nsAString* %1, i32 0, i32 0, !dbg
>> !2048
>> %3 = getelementptr inbounds %struct.nsISupports* %2, i32 0, i32 0, !dbg
>> !2048
2013 Jan 17
3
[LLVMdev] the latest version of llvm-gcc is 4.2?
Hi,
I am wondering whether the latest llvm-gcc version is 4.2. This is
the latest version I can find on llvm web site.
Thanks a lot!
Best,
Linhai
2013 Jan 31
2
[LLVMdev] Could I explicitly tell clang not inline some functions?
Hi,
I am wondering whether there are some ways I can tell clang not
inline some or all functions.
Thanks a lot!
Linhai
2014 Apr 29
2
[LLVMdev] how to identify basic blocks added for switch instruction without default?
Hi,
I just notice that front-end will add an extra block for switch
instruction without default. How could I identify basic blocks added due
to this reason?
The added codes looks like:
sw.default.i625: ; preds = %if.end512
tail call void @fancy_abort(i8* getelementptr inbounds ([38 x i8]*
@.str, i64 0, i64 0), i32 3045, i8* getelementptr inbounds
2011 Jan 26
2
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
> On 1/26/11 3:00 PM, songlh at cs.wisc.edu wrote:
>>> On 1/26/11 2:40 PM, songlh at cs.wisc.edu wrote:
>>>> thanks!
>>>>
>>>> After I check the ll file, I find this:
>>>>
>>>> %1 = load %struct.nsAString** %aBuf_addr, align 4, !dbg !2048
>>>> %2 = getelementptr inbounds %struct.nsAString* %1, i32 0, i32 0, !dbg
2014 Oct 15
2
[LLVMdev] how to choose which alias analysis used in my pass?
----- Original Message -----
> From: "Jingyue Wu" <jingyue at google.com>
> To: "songlh" <songlh at cs.wisc.edu>, llvmdev at cs.uiuc.edu
> Sent: Wednesday, October 15, 2014 2:50:12 PM
> Subject: Re: [LLVMdev] how to choose which alias analysis used in my pass?
>
>
> Isn't -basicaa the default alias analysis already?
No, -basicaa is added
2011 Jan 26
0
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
On 1/26/11 3:00 PM, songlh at cs.wisc.edu wrote:
>> On 1/26/11 2:40 PM, songlh at cs.wisc.edu wrote:
>>> thanks!
>>>
>>> After I check the ll file, I find this:
>>>
>>> %1 = load %struct.nsAString** %aBuf_addr, align 4, !dbg !2048
>>> %2 = getelementptr inbounds %struct.nsAString* %1, i32 0, i32 0, !dbg
>>> !2048
>>> %3
2019 Jan 07
2
[LLD] [WASM] wasm/function-index.test failing
I'm seeing the following fail on Linux x86-64, for the last couple weeks
at least. This is from 'ninja check-all'.
-David
FAIL: lld :: wasm/function-index.test (1941 of 1955)
******************** TEST 'lld :: wasm/function-index.test' FAILED ********************
Script:
--
: 'RUN: at line 1'; /build/x86_64/bin/llc -filetype=obj
2020 May 12
4
bug report on mem2reg
Hi, all,
I think I found a bug on mem2reg in a particular case.
When I ran opt -mem2reg -basicaa -scalar-evolution -loops -da -analyze opts.ll, it collapsed. While without mem2reg option, it runs well. so I guess it has something to do with mem2reg.
The relative files have been affixed, please check them for me.
Thanks in advance.
liubaosen at tsinghua.edu.cn
-------------- next part
2015 Nov 18
4
Mips unconditionally uses fast-isel?
Well, 'optnone' is already not identical to -O0, and given the nature of things, probably can't be; but I am persuaded that it's reasonable for it to honor the -fast-isel option as a debugging tactic. I'll take an AI to make this happen.
Thanks,
--paulr
P.S. One nit, the "O0 + optnone" case should not have an asterisk, the FastISel flag is not manipulated if the opt
2017 Jan 11
9
Redefining optnone to help LTO
In D28404, Mehdi wanted to use the 'optnone' attribute as a way to record
"I was compiled with -O0" in the IR, because it seems like a good idea to
remember that fact in an LTO compilation and there is no way to remember
that fact currently. A couple of people felt it might be better to have
this idea discussed on the dev list, where it might get better exposure,
so I'm
2015 Nov 17
3
Mips unconditionally uses fast-isel?
> > The other thing that might work, is having TargetMachine remember how
> > the fast-isel option got set, and make OptLevelChanger do the right
> > thing. But that seems like a hack to work around Mips not obeying the
> > specified optimization level, honestly.
>
> I think we should do that as well. I don't think it's right that optnone
> enables Fast
2015 Feb 11
3
[LLVMdev] question about licm
----- Original Message -----
> From: "Ashutosh Nema" <Ashutosh.Nema at amd.com>
> To: "songlh" <songlh at cs.wisc.edu>, llvmdev at cs.uiuc.edu
> Sent: Wednesday, February 11, 2015 3:20:27 AM
> Subject: Re: [LLVMdev] question about licm
>
> Hi,
>
> LICM can only hoist instructions which dominates all loop exit
> blocks.
> In this case
2017 Jun 22
8
How to prevent optimizing away a call + its arguments
On Wed, Jun 21, 2017 at 05:25:04PM -0700, Mehdi AMINI via llvm-dev wrote:
> Hi Kuba,
>
> Try:
>
> __attribute__(optnone)
>
> See
> https://clang.llvm.org/docs/AttributeReference.html#optnone-clang-optnone
Actually, it should be enough to use:
__attribute__((noinline))
void please_do_not_optimize_me_away(int arg1, void *arg2) {
asm