Displaying 20 results from an estimated 2000 matches similar to: "Inst->replaceAllUsesWith and uses in ConstantExpr"
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 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 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 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 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
2017 Sep 17
1
Sharing llvm IR infrastructure for Equality saturation
I've started hacking up a branch with a rough implementation of equality
saturation. This needs me to add objects such as PEGBasicBlock,
PEGInstruction, PEGTerminatorInstruction, etc. (PEG stands for "program
expression block"). I wish to share most of the infrastructure that exists
- I believe this is already done with Machine*.
How do I do this for PEGs? I'd also like to get
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 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 09
2
Can a Constant have more than one use?
As the question asks. IIRC, I have only seen constants use to:
1. setup globals
2. as "constant parameters" to instructions.
In both these cases, from what I understand, they will have a single use.
Is it possible to create a Constant with multiple use(r)s?
Thanks,
Siddharth
--
Sending this from my phone, please excuse any typos!
-------------- next part --------------
An HTML
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>]*
>
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 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
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.
2019 Jan 14
3
Function - replaceAllUsesWith
Hello LLVM-World,
currently I play around with a "llvm::Module" and an external function defined there "puts". Normally this function gets resolved in the JIT-Process but I wonder about two things:
1. Can I resolve the function already in this step? I used "replaceAllUsesWith" and passed a "llvm::ConstantInt" to the function. But this didn't
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
2008 Jun 17
4
[LLVMdev] Transforming ConstantExprs to Instructions
Hi,
I've been struggling with constantexprs for a bit. I'm working on a pass that
transforms global variables to local variables, and in particular the
GetElementPtrConstantExpr is a bit troublesome. For my transformation to
properly work, a global value should only be used by Instructions, not by
ConstantExprs.
I was thinking to add a ConstantExpr::replaceWithInstr() virtual method,