Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Finding the host datalayout"
2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting the data layout:
int main(int argc, char** argv)
{
llvm::InitializeNativeTarget();
llvm::LLVMContext TheContext;
unique_ptr<Module> Mod(new Module("A",TheContext));
llvm::EngineBuilder engineBuilder(std::move(Mod));
std::string mcjit_error;
engineBuilder.setMCPU(llvm::sys::getHostCPUName());
2012 Jan 12
4
[LLVMdev] How to pass an array to a function using GenericValue
Hi,
My application generates some LLVM assembly code which I then convert to IR
code using ParseAssemblyString. If I have the following LLVM assembly code:
define double @test() {
ret double 1.230000e+02
}
then, using ExecutionEngine::runFunction, I get a GenericValue return value
which DoubleVal property is indeed equal to 123. So, all is fine there.
However, if I have the
2016 Sep 14
2
setDataLayout segfault
Ok. I can make a copy of the unique_ptr before moving it into the
builder's constructor and use the copy later on. It is confusing to
require a unique_ptr.
Frank
On 09/14/2016 12:11 PM, Frank Winter via llvm-dev wrote:
> I am constructing the engine builder in the following way:
>
> llvm::SMDiagnostic Err;
> unique_ptr<Module> Mod = getLazyIRFileModule("f.ll",
2012 Jan 12
1
[LLVMdev] How to pass an array to a function using GenericValue
> > Yes, it was the entire LLVM assembly code that I generated. However, I
> > have now prepended targetdata to the code I generate (using
> > executionEngine->getTargetData()->getStringRepresentation()), but to
> > executionEngine->no
> > avail. I still get the exact same result...?!
>
> What is the string you prepended? If the execution engine
2012 Jan 12
0
[LLVMdev] How to pass an array to a function using GenericValue
Hi Alan,
On 12/01/12 20:19, Alan Garny wrote:
>>> Yes, it was the entire LLVM assembly code that I generated. However, I
>>> have now prepended targetdata to the code I generate (using
>>> executionEngine->getTargetData()->getStringRepresentation()), but to
>>> executionEngine->no
>>> avail. I still get the exact same result...?!
>>
2015 Jun 24
3
[LLVMdev] DataLayout
Hi all,
We have multiple DataLayout object in flight during a compilation: at least the one owned by the Module and the one owned by the TargetMachine.
There are two issues:
1) What if they differ? I guess we could assert at the beginning of CodeGen.
2) The DataLayout has internal mutable state (a cache of StructLayout).
The latter is my current concern: the cache in DataLayout is based on Type
2014 Oct 21
2
[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?
On Mon, Oct 20, 2014 at 9:11 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Oct 20, 2014, at 8:22 PM, Eric Christopher <echristo at gmail.com> wrote:
>
>> On Mon, Oct 20, 2014 at 7:51 PM, Chris Lattner <clattner at apple.com> wrote:
>>> Hi Eric,
>>>
>>> Can you elaborate on your goals and what problem you are trying to solve? As
2015 Mar 11
3
[LLVMdev] DataLayout: Module vs Target
Hi all,
The Language Reference says:
"The function of the data layout string may not be what you expect. Notably, this is not a specification from the frontend of what alignment the code generator should use.
Instead, if specified, the target data layout is required to match what the ultimate code generator expects. This string is used by the mid-level optimizers to improve code, and this
2014 Oct 22
2
[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?
On Wed Oct 22 2014 at 12:33:53 PM Chris Lattner <clattner at apple.com> wrote:
> On Oct 20, 2014, at 10:41 PM, Eric Christopher <echristo at gmail.com> wrote:
> >>> So the storage for DataLayout right now is on a per-subtarget basis.
> >>> I.e. if you don't construct one in the module the backend will make
> >>> one up based on information in
2014 Oct 20
2
[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?
On Mon, Oct 20, 2014 at 9:51 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Oct 19, 2014, at 1:22 AM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> > I've just wasted a day chasing my tail because of subtleties introduced
> to handle the optionality of the DataLayout. I would like to never do this
> again. =]
> >
> > We now have
2014 Oct 20
2
[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?
On Mon, Oct 20, 2014 at 1:27 PM, Chandler Carruth <chandlerc at google.com> wrote:
>
> On Mon, Oct 20, 2014 at 1:18 PM, Eric Christopher <echristo at google.com>
> wrote:
>>
>> Agreed. The DataLayout should move (back) to the TargetMachine and live
>> there (I'm doing that part right now). I don't particularly want to put it
>> on the module
2014 Oct 21
3
[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?
On Mon, Oct 20, 2014 at 7:51 PM, Chris Lattner <clattner at apple.com> wrote:
> Hi Eric,
>
> Can you elaborate on your goals and what problem you are trying to solve? As Chandler points out, DataLayout is part of module for a reason.
Which is an interesting point - it's not really. (This was also going
to be part of my talk next week, but since it's been brought up...)
So
2011 Oct 04
1
[LLVMdev] opt and llc use datalayout differently - bug?
It appears llc gives preference to the default target datalayout whereas
opt gives preference to the module datalayout. Is there a reason they
behave differently?
From llc.cpp:
// Add the target data from the target machine, if it exists, or the
module.
if (const TargetData *TD = Target.getTargetData())
PM.add(new TargetData(*TD));
else
PM.add(new TargetData(&mod));
2012 May 28
2
[LLVMdev] Help with Values sign
On May 27, 2012, at 9:15 PM, Santos Merino wrote:
> I have found that the problem is the endianness of Values. For example a 1 it's
> stored as 00000001 00000000 00000000 0000000 instead of 0000000 00000000 0000000
> 00000000 so how can I change how the values are stored and/or load (because I
> suppose that the problem is when I store it or load from memory)
Are you setting up
2010 May 28
0
[LLVMdev] how to get TargetData?
For those targets supported by LLVM, you can get their TargetData by
creating TargetMachine first (take X86 as example):
==== BEGIN CODE SNIPPET ====
const std::string TripleStr = "i686-unknown-linux"; // hard coded for
example
const std::string FeatureStr = ""; // hard coded for example
std::string Err;
const Target* T;
TargetMachine* TM = NULL;
const
2011 Jan 14
2
[LLVMdev] Circular Deps from CMake build using makefile
----- Original Message ----
> From: Óscar Fuentes <ofv at wanadoo.es>
> To: Samuel Crow <samuraileumas at yahoo.com>
> Cc: Óscar Fuentes <ofv at wanadoo.es>; LLVM Developers Mailing List
><llvmdev at cs.uiuc.edu>
> Sent: Fri, January 14, 2011 4:39:57 PM
> Subject: Re: Circular Deps from CMake build using makefile
>
> Samuel Crow <samuraileumas
2010 May 05
5
[LLVMdev] Another bad binutils?
After waiting through about 2 hours of hard drive spinning for Clang to link under my Xubuntu Lucid Lynx Linux setup on VirtualBox, ld finally just gave up trying to link it. I was using CMake's build scripts on version 2.7 release of LLVM and Clang. The version of ld is (GNU Binutils for Ubuntu) 2.20.1-system.20100303. Can anyone confirm this problem? If needed I'll cross-post this to
2014 Aug 25
3
[LLVMdev] Module->getDataLayout returns std::string instead of DataLayout
hey,
so I'm writing in cpp.
the documentation says that TheModule -> getDataLayout should return
const DataLayout, but instead it is returning std::string.
I require it to return DataLayout, as I generalize my function
pass manager to accept the DataLayout constant as an argument, it
being the only thing in common amongst both the ExecutionEngine and
the Module class.
Any pointers to
2011 Jan 14
2
[LLVMdev] Circular Deps from CMake build using makefile
Hello Óscar,
This time the autotools version of LLVM trunk build with Clang trunk compiled in
Debug+Asserts mode without complaint with --enable-bindings=none. I suspect
this makes something fishy looking with the CMake build. Do you need logfiles
from configure?
Thanks again,
--Sam
----- Original Message ----
> From: Óscar Fuentes <ofv at wanadoo.es>
> To: Samuel Crow
2011 Jan 14
0
[LLVMdev] Circular Deps from CMake build using makefile
Samuel Crow <samuraileumas at yahoo.com> writes:
> This time the autotools version of LLVM trunk build with Clang trunk compiled in
> Debug+Asserts mode without complaint with --enable-bindings=none. I suspect
> this makes something fishy looking with the CMake build. Do you need logfiles
> from configure?
I'm clueless about what's happening there. The cyclic