Displaying 20 results from an estimated 2000 matches similar to: "Performance of large llvm::ConstantDataArrays"
2017 Sep 10
2
Performance of large llvm::ConstantDataArrays
On Sat, Sep 9, 2017 at 10:18 PM, Chris Lattner via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> On Sep 7, 2017, at 11:06 PM, Chris Lovett via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> I'm running into some pretty bad performance in llc.exe when compiling
> some large neural networks into code that contains some very large llvm::ConstantDataArrays,
2013 Oct 17
1
[LLVMdev] get the value of a Constant in LLVM IR
Hello,
i parse the llvm IR (llvm-3.3 version) and when i meet a constant, i want
to get it's value.
eg i32 5, i want to get the 5.
I am interested in ConstantInt-ConstantFP-ConstantArray-ConstantStruct
subclasses.
Things are a bit easier with ConstantInt and ConstantFP constants but how
could i get the value of a ConstantArray?
The
2012 Nov 16
2
[LLVMdev] porting to 3.1: ConstantDataArray
Hi,
In llvm 3.0 llvm::ConstantArray had a ::getAsCString() method that
returned the buffer as a std::string. Now it seems that 3.1 this
method dissapeared.
I found that llvm::ConstantDataArray has a method called
getAsString(), but it returns a Constant*.
What is the safe way to retrieve the pointer of the Constant array as
a C string?
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast
infrastructure to handle this.
On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote:
> On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> TypeLoc casting looks bogus.
>>
>> TypeLoc derived types return true from classof when the dynamic type
>>
2012 Nov 16
0
[LLVMdev] porting to 3.1: ConstantDataArray
On 16 November 2012 13:55, charles quarra
<charllsnotieneningunputocorreo at gmail.com> wrote:
> In llvm 3.0 llvm::ConstantArray had a ::getAsCString() method that
> returned the buffer as a std::string. Now it seems that 3.1 this
> method dissapeared.
>
> I found that llvm::ConstantDataArray has a method called
> getAsString(), but it returns a Constant*.
In 3.1
2015 Jan 14
2
[LLVMdev] Bug in InsertElement constant propagation?
Hi,
When I run opt on the following LLVM IR:
define i32 @foo() {
bb0:
%0 = bitcast i32 2139171423 to float
%1 = insertelement <1 x float> undef, float %0, i32 0
%2 = extractelement <1 x float> %1, i32 0
%3 = bitcast float %2 to i32
ret i32 %3
}
->
It generates:
define i32 @foo() {
bb0:
ret i32 2143365727
}
While tracking the value I see that the floating point value
2007 May 11
2
[LLVMdev] identifing mallocs with constant sizes
I am writing some code to identify malloc instructions with constant
request sizes and to determine the request size if it is constant. I
have two questions.
1) If a malloc is for an array allocation and the array size is a
ConstantExpr, how can I obtain the value of the ConstantExpr?
2) I am using the following logic to determine if the malloc is for a
constant request size and to
2012 Sep 05
2
[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?
Hi all;
I have been trying to use the llvm::ConstantArray::get(llvm::LLVMContext&,
llvm::StringRef, bool) function but seems it has been deprecated.
ProfileDependence.cpp:68:73: error: no matching function for call to
‘llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)’
ProfileDependence.cpp:68:73: note: candidate is:
2019 Jan 29
2
[cfe-dev] Create a BlockAddress array from LLVM Pass
Sorry for emailing both group.
As I will have a constant array of BlockAddress, what type I should use in Constant Array for its ArrayType declaration?
I am creating the list in following way:
unsigned int nBr = fit->second.size();
llvm::Constant *listBA[nBr];
unsigned int Idx = 0;
for (std::set<llvm::BasicBlock *>::iterator it = fit->second.begin();
it != fit->second.end(); ++it)
2016 Nov 21
2
RFC: Insertion of nops for performance stability
Hi Hal,
Thanks for the reference. I’ve looked at PPCBranchSelector and the PowerPC backend. It is very different from the X86 architecture and unfortunately the way branch relaxation and alignment related issues are handled in PPC cannot be copied to X86. This is because:
1. PPC instructions are of fixed length while X86 instructions are of variable length, and their length can change
2019 Jan 28
2
Create a BlockAddress array from LLVM Pass
Hi
Good day. For the following function local static constant array:
static const __attribute__((used))
__attribute__((section("data"))) void *codetable[] = {
&&RETURN, &&INCREMENT, &&DECREMENT, &&DOUBLE, &&SWAPWORD};
I have the following in the LLVM IR.
@sampleCode.codetable = internal global [5 x i8*] [i8* blockaddress(@sampleCode, %19), i8*
2007 May 11
0
[LLVMdev] identifing mallocs with constant sizes
Ryan M. Lefever wrote:
> I am writing some code to identify malloc instructions with constant
> request sizes and to determine the request size if it is constant. I
> have two questions.
>
> 1) If a malloc is for an array allocation and the array size is a
> ConstantExpr, how can I obtain the value of the ConstantExpr?
>
The only way I know of is to determine what type
2016 Mar 01
0
Possible Memory Savings for tools emitting large amounts of existing data through MC
On Mon, Feb 29, 2016 at 03:47:49PM -0800, David Blaikie wrote:
> On Mon, Feb 29, 2016 at 3:36 PM, Peter Collingbourne <peter at pcc.me.uk>
> wrote:
>
> > Hi David,
> >
> > The way I imagined that we might want to extend the MCStreamer API (this
> > was motivated by DIEData) is by allowing clients to move bytes and fixups
> > into the MC layer.
>
2016 Feb 29
2
Possible Memory Savings for tools emitting large amounts of existing data through MC
On Mon, Feb 29, 2016 at 3:36 PM, Peter Collingbourne <peter at pcc.me.uk>
wrote:
> Hi David,
>
> The way I imagined that we might want to extend the MCStreamer API (this
> was motivated by DIEData) is by allowing clients to move bytes and fixups
> into the MC layer.
>
> This is the sort of API that I was imagining:
>
> void
2013 Mar 04
2
[LLVMdev] llvm cannot iterate a [3 x i8]
Hello everyone,
I am trying to "parse" a part of LLVM IR. More exactly, from
@.str = private unnamed_addr constant [3 x i8] c"DS\00", section
"llvm.metadata"
I want to get "DS". It is the single place in the whole bytecode from where
I can get it. I have :
...
Value *VV = cast<Value>(LD100->getOperand(1)->getOperand(0));
2015 Jan 20
2
[LLVMdev] Bug in InsertElement constant propagation?
Does anybody else have an opinion on this issue? I'm planning to submit a patch which would add a new get method for ConstantDataVector taking an ArrayRef<Constant*> and use that in the few places in constant propagation where convertToFloat is used.
Let me know if you think there is a more obvious way to do it.
Right now the only way to create a ConstantDataVector are those method:
2015 Jan 15
2
[LLVMdev] Handling of undef in the IR
Hi all,
I have a very simple test case (thanks to bugpoint) that hit an assert in reassociate.
(the assert is (C->getType()->isIntOrIntVectorTy() && "Cannot NEG a nonintegral value!"), function getNeg)
The function is taking a Constant as argument, but the assert does not expect an undef. I’m not sure whose responsibility is it to handle that (caller?).
Do we have to
2010 Mar 15
3
[LLVMdev] [patch] Writing ConstantUnions
Hello,
I noticed a bit of a gap in the current code for unions: a
ConstantUnion cannot be written out to .ll.
Hopefully I'm not stepping on Talin's toes by posting this, it's a
fairly straightforward adaptation of the code for structs just above.
Tim.
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
--------------
2016 Sep 24
2
RFC: ConstantData should not have use-lists
> On 2016-Sep-24, at 15:16, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>>
>> On Sep 24, 2016, at 3:06 PM, Duncan P. N. Exon Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> r261464 added a type called ConstantData to the Value hierarchy. This
>> is a parent type for constants with no operands, such as i32 0 and null.
>>
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote:
> This probably needs to be slightly tweaked to work with mainline. I don't see anything objectionable, but I think Daniel needs to review this one.
Updated patch to work with mainline.
http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94
- Michael Spencer