Displaying 20 results from an estimated 10000 matches similar to: "Can a Constant have more than one use?"
2017 Aug 17
3
Inst->replaceAllUsesWith and uses in ConstantExpr
I see. Is there a pre-existing way to do this in LLVM?
Cheers,
~Siddharth.
On Thu, 17 Aug 2017 at 02:12 Craig Topper <craig.topper at gmail.com> wrote:
> ConstantExprs are immutable, they can't be changed once they are created.
> And a ConstantExpr can reference other ConstantExprs. So replacing all uses
> of a Value in a ConstantExpr would require creating a new immutable
2017 Aug 17
2
Inst->replaceAllUsesWith and uses in ConstantExpr
Whoops, sorry, I meant "value->replaceAllUsesWith".
Should I create a new post with an updated title?
Thanks
Siddharth
On Thu 17 Aug, 2017, 01:05 Tim Northover <t.p.northover at gmail.com> wrote:
> On 16 August 2017 at 15:39, (IIIT) Siddharth Bhat via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > From what I have observed, using
2017 Nov 20
4
Debugging LLVM IR - Reviving the DebugIR pass
Hello all,
I recently felt the need to have debug info at the LLVM IR level (because
my frontend's semantics vastly differ from IR that it doesn't make much
sense to use it). Asm can sometimes be too "low level", so it's nice to
have the ability to single-step at the IR level.
The pass that used to do this (-debugir) bitrotted and was removed from
tree. I spent the weekend
2017 Sep 05
5
InstCombine, graph rewriting, Equality saturation
Hello all,
I've seen some discussion that InstCombine is "too general" and that llvm
should implement a proper graph rewrite mechanism:
Link to llvm-dev discussion about this:
http://lists.llvm.org/pipermail/llvm-dev/2017-May/113219.html,
Link to review where this came up (and I first heard about it):
https://reviews.llvm.org/D37195.
I wanted to understand what the current issues
2017 Oct 13
2
Why does GEP allow src and destination type to have different address spaces?
The GEP constructor does not assert that the source and destination types
match. Of course, this is incorrect and causes random failures somewhere
down the line.
Could I add general sanity checks to the GEP constructor?
In general, is an Instruction allowed to be in an inconsistent state? If
so, is there some well known method to "verify" whether an instruction is
consistent or not?
2017 Aug 16
2
Inst->replaceAllUsesWith and uses in ConstantExpr
Hello all,
>From what I have observed, using `Inst->replaceAllUsesWith` does not
replace uses of the `Inst` in `ConstantExpr`s. Is there some way to have a
universal replaceAllUsesWith?
Thanks,
~Siddharth.
--
Sending this from my phone, please excuse any typos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2017 Aug 11
2
Converting i32** to [4 x i32]* ?
Hello all,
This is a general question regarding type conversion:
from: <ty>**
to: [<size> x <ty>]*
>From what I understand, bitcast is wrong in this case because a GEP into a
<ty>** should be computed differently from a GEP into [<size> x <ty>]*.
So, what is the correct way to perform this type conversion?
Thanks,
Siddharth
--
Sending this from my
2017 Aug 12
2
Converting i32** to [4 x i32]* ?
What would the "correct form of GEP be"?
Thanks,
Siddharth
On Fri 11 Aug, 2017, 23:47 Krzysztof Parzyszek via llvm-dev, <
llvm-dev at lists.llvm.org> wrote:
> On 8/11/2017 3:40 PM, Siddharth Bhat via llvm-dev wrote:
> >
> > This is a general question regarding type conversion:
> >
> > from: <ty>**
> > to: [<size> x <ty>]*
>
2015 Mar 05
4
[LLVMdev] global variable
Hi all,
I am newbie for llvm. I just create a global variable, there are some statements in my pass like:
LoadInst* int64_64 = new LoadInst(pthreadPID, "", false, OptAplusOne);
int64_64->setAlignment(8);
int64_64->dump();
LoadInst* int32_65 = new LoadInst(gvar_int32_myFlag, "", false, OptAplusOne);
int32_65->setAlignment(4);
2017 Nov 17
2
Ensuring that dead allocations from a custom allocator are killed by LLVM
Hello all,
I have a custom allocator, and would like to teach LLVM about its
semantics. In particular, I would like LLVM to kill allocations that are
"dead", similar to dead new in C++.
Consider this example:
; ModuleID = '<stdin>'
source_filename = "Module"
; Function Attrs: inaccessiblememonly noinline norecurse nounwind
declare i8* @alloc(i64)
2018 May 30
2
Meetup/Social in India
Hi Folks,
We are a group of LLVM compiler developers in Hyderabad area. Considering
few previous mail about meetups in India, we are planning to organize LLVM
meetups in India evry monthly or bimonthly in the best interest of other
developers. Based on the concentration of developers Pune, Bangalore and
Hyderabad are the location we have in mind. Interested folks please reply
stating ur
2018 May 30
0
Meetup/Social in India
I'd be interested in attending and helping organise the Hyderabad meetup.
Cheers
Siddharth
On Wed 30 May, 2018, 14:32 Siddharth Shankar Swain via llvm-dev, <
llvm-dev at lists.llvm.org> wrote:
> Hi Folks,
>
> We are a group of LLVM compiler developers in Hyderabad area. Considering
> few previous mail about meetups in India, we are planning to organize LLVM
> meetups
2017 Dec 16
2
Replace call stack with an equivalent on the heap?
Hello,
I'm implementing a custom Haskell-to-LLVM compiler, and in my
experimentation, noticed that GHC is much slower than clang certain
examples, such as the ackermann function. However, from reading their
respective IRs (Cmm for GHC and LLVM for clang), I don't really see much of
a difference. Here is a link to the numbers. (n, m) are the parameters to
the ackermann function
2017 Oct 14
2
Bug in replaceUsesOfWith: does not keep addrspace consistent in GEP
Hello,
Calling `replaceUsesOfWith` with a value in a different addrspace does not
keep the addrspace of a GEP consistent. Is this known? Is this a bug or
expected behaviour?
Minimal counterexample link
<https://gist.github.com/bollu/152ba5e1c20c03c7fc6d8c7b23ba828f>
Reproduced here:
#include <iostream>
#include "llvm/ADT/APFloat.h"
#include
2017 Dec 19
2
MemorySSA question
On Tue, Dec 19, 2017 at 9:10 AM, Siddharth Bhat via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I could be entirely wrong, but from my understanding of memorySSA, each
> def defines an "abstract heap state" which has the coarsest possible
> definition - any write will be modelled as a "new heap state".
>
This is true for def-def relationships, but
2017 Apr 24
1
[FFI] [OrcJIT] Status update on C FFI for OrcJIT?
I looked around for the status of OrcJIT FFI support. The last e-mail
thread I could find was this one: Link
<http://lists.llvm.org/pipermail/llvm-dev/2015-February/081679.html>
Raw: http://lists.llvm.org/pipermail/llvm-dev/2015-February/081679.html
Is OrcJIT now considered stable enough that there can be "official" exposed
C APIs?
If not, what's the standard approach if I
2018 May 30
1
Help on finding Base GEP
On 05/30/2018 06:04 AM, Siddharth Bhat via llvm-dev wrote:
> You can run SCEV which will see through bitcasts and GEPs, so it
> should give an expression of the form (base + offset) on the pointer
> of the load.
Specifically, you can use ScalarEvolution to subtract the expression for
the base descriptor from the expression for the loaded pointer and see
if the result is a SCEVConstant.
2018 Mar 19
1
How to link against all available targets - problems with NVPTX?
As the question asks, I'm having some trouble using initializeAllTargets().
I have a CMakeLists that uses:
llvm_map_components_to_libnames(LLVM_LIBS ...
AllTargetsAsmParsers
AllTargetsAsmPrinters
AllTargetsDescs
AllTargetsInfos
...)
However, even with these, when I try to compile my program, I get linker
errors:
CMakeFiles/sxhc.dir/src/main.cpp.o: In function
2018 May 30
2
Help on finding Base GEP
Hi,
Below is the snippet of LLVM IR code generated by Flang
---snip--
%3 = getelementptr i64, i64* %"a$sd", i64 11, !dbg !16
%4 = bitcast i64* %3 to i32*, !dbg !16
%5 = load i32, i32* %4, align 4, !dbg !16, !tbaa !22
---snip--
My requirement is for any such LoadInst (example: %5), I want to check if
its base GEP (i.e. %3) loads at particular offset (11) from its
corresponding
2018 May 30
0
Help on finding Base GEP
You can run SCEV which will see through bitcasts and GEPs, so it should
give an expression of the form (base + offset) on the pointer of the load.
Cheers
siddharth
On Wed 30 May, 2018, 16:30 Venkataramanan Kumar via llvm-dev, <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> Below is the snippet of LLVM IR code generated by Flang
>
> ---snip--
> %3 = getelementptr i64,