Displaying 20 results from an estimated 100 matches similar to: "Discrepancy between Debug and Release+Asserts versions of Clang/LLVM"
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
I agree that the ArrayRef is likely the issue. I've debugged a crash caused
by a temporary ArrayRef like that a couple times.
Either do what David suggested or use a normal array:
Metadata *mdArray[] = {ConstantInt::get(Int64Ty, 0), newMD};
~Craig
On Thu, Apr 30, 2020 at 9:56 AM David Blaikie via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> On Thu, Apr 30, 2020 at
2020 Apr 09
3
Building libjpeg-turbo with LTO
Adding a couple of lld folks.
I helped Shishir debug this, the link line looked like:
/home/sjessu/build/bin/clang -O0 -flto -o jcstest jcstest.o
./.libs/libjpeg.a
and the issue was that libjpeg.a was created with the system ar instead of
llvm-ar. It worked when recreating libjpeg.a with llvm-ar.
I noticed that the lld code has some special handling for the case
when there is a missing
2020 Apr 08
3
Building libjpeg-turbo with LTO
Hi,
I have tried to build libjpeg-turbo
<https://github.com/libjpeg-turbo/libjpeg-turbo> with LTO in LLVM, using
both clangbut get many errors in lld that look like the following:
ld: error: undefined symbol: jpeg_std_error
>>> referenced by jcstest.c:76
>>> lto.tmp:(main)
ld: error: undefined symbol: jpeg_CreateCompress
>>> referenced by
2016 Jul 26
4
'invalid subroutine type ref' when linking custom metadata
With 3.9, llvm-link tells me 'invalid subroutine type ref' when
linking the two code pieces below, and I don't quite understand why.
It looks like it merges the debug information with the custom
metadata. I've filed a ticket already [1] but as I'm not sure if this
is indeed a bug or if I'm misunderstanding something, I thought I'd
ask here.
Any ideas? Thanks,
Robin
2016 Jul 27
1
'invalid subroutine type ref' when linking custom metadata
> On 2016-Jul-26, at 02:22, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> +CC Duncan```
>
>> On Jul 25, 2016, at 8:53 PM, Robin Sommer via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>>
>> With 3.9, llvm-link tells me 'invalid subroutine type ref' when
>> linking the two code pieces below, and I don't quite understand
2018 Mar 26
1
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
On Mon, Mar 26, 2018 at 09:27:25AM +0000, Daniel Erez wrote:
> You can get it from '.storage.type' on the StorageDomain object.
> E.g.
> sd = connection.system_service().storage_domains_service().list()[0]
> sd.storage.type -> nfs/iscsi/etc
Is there a defined set of what can be returned, and/or a way
to find out if the storage is "block-like" or not?
Alternately
2015 Feb 20
6
[LLVMdev] Questions before moving the new debug info hierarchy into place
I'm getting close to executing the transition to the new debug info
hierarchy. For reference, I've attached two WIP patches (which would be
squashed before commit) and the WIP upgrade script I'm using.
- transition-code.patch: Change the `DIDescriptor` hierarchy to
lightweight wrappers around the subclasses of `DebugNode` (instead
of rather heavier wrappers around
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote:
> Hi John,
>
> On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote:
>
>> Dear All,
>>
>> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip
>> away debug information when such information interferes with
>> optimization. Is this correct,
>>
>
> Yes.
>
>
2020 Jun 09
3
Preventing function call from being optimized out in LTO
Hi David,
Sure! Here's a function in sqlite3 called verifyDbFile, compiled with -O3.
This is what it looks like when the intermediate bitcode is emitted by
clang: link <https://pastebin.com/L3PrK1ac>
And here's what happens after I run opt -O3 (no additional command-line
arguments) on the file containing this function: link
<https://pastebin.com/rZHBm2iU>.
I'm not 100%
2020 Jun 09
3
Preventing function call from being optimized out in LTO
Hi David,
By "dead" do you mean unreachable? My understanding was that the removal of
dead code is simply another optimization, which should be disabled after
adding "optnone" (and adding the function to llvm.used so the function
doesn't later get deleted entirely).
I am instrumenting certain basic blocks in an LLVM pass, and would like to
compile a binary which
2019 Feb 06
2
[DebugInfo][DIBuilder] Good way to pass arguments to createClassType/createMemberType
At least for generating DWARF the scope of of a composite type member should be irrelevant since it will always be nested inside its parent.
-- adrian
> On Feb 6, 2019, at 10:24 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> A good rough rule of thumb here is "what would/does Clang do?" & it looks (to me, on a very cursory glance) like Clang mostly passes the
2020 Jun 09
5
Preventing function call from being optimized out in LTO
Hello,
I am adding function calls to an LLVM link-time optimization (LTO) pass,
using the IRBuilder::CreateCall method. I want these calls to remain in the
final x86 binary at any optimization level, but on levels -O2 and -O3, some
of these calls are being optimized out.
So far, I've tried adding each function in the program (excluding LLVM
intrinsics) to the llvm.used set, and I've also
2019 Sep 30
3
Debugging LowerTypeTests in LLVM Using GDB
Hi,
I am looking into Control-Flow Integrity for indirect function calls,
implemented with jump tables. I want to step through the code that produces
these jump tables in GDB. I have built clang and opt from source with
debugging symbols. I believe this code lives in
llvm/lib/Transforms/LowerTypeTests.cpp, but when I try to debug *opt* by
running the command "run -lowertypetests cfi-icall.bc
2020 Jul 08
2
Extracting the !dbg property from LLVM IR function calls
Hello,
I am compiling a program with debugging information, and am attempting to
extract !dbg numbers from function calls in LLVM IR. However, I've found a
few inconsistencies. For example, this call exists in my module:
%1 = tail call i1 @llvm.type.test(i8* bitcast (i32 (i32)* @_Z5otheri to
i8*), metadata !"_ZTSFiiE") #5, *!dbg !69*, !nosanitize !2
I would like to extract the 69
2020 Mar 16
2
Passing arguments to LLVM pass through Clang
Hello,
I am adding to an LLVM pass that requires a filename as input. I am able to
input this filename as a command line argument when I invoke this pass
using opt, but I ultimately need to pass this argument to my code when I
compile code with clang.
How can I pass this argument to clang so that I can use it in my LLVM pass?
Thanks for your help!
Best,
Shishir Jessu
-------------- next part
2019 Dec 03
2
Using different opt with clang
Hi,
I have made some changes in the LowerTypeTests Pass of opt, and would like
to use these changes with the clang version I have downloaded.
I compiled clang and llvm from scratch, made my changes in
LowerTypeTests.cpp, and recompiled clang and opt. When I run clang with the
appropriate flags to invoke the pass, it invokes the pass as originally
written, but when I run opt on the relevant
2013 Oct 07
1
[LLVMdev] Typecasting int32ty to int64ty
I have something like this on my code :-
vector<Value*> args3;
args3.push_back(instr->getOperand(0)); //where 'instr' is store instruction
Now when I check the Type of instr->getOperand(0).
It varies to i32 and i64, depending on the operand(0) of instruction.
Due to which my vector<Value*> has different Type of Value*.
How can I convert i32 to i64 type before pushing
2020 Jan 14
2
sizeof implementation: how to get size as a constantInt?
I'm implementing c style "sizeof()", and I did as
http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
illuarstrated,
and it works find, here's an example of my implementation:
auto *p = builder.CreateGEP(structTy,
llvm::ConstantPointerNull::get(pointerTy),
constint1);
auto *size =
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
Hello,
I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but
I'm running into troubles because of various problems with casts
between pointers and integers. Is there anybody who succeeded in this
task? Az I see, some of the problems can be fixed with an appropriate
typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel
bitmanipulation is used, to mark
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
Hi Zsombor,
Thanks for the patch! Unfortunately I can't apply it because the llvm
API has moved from BinaryOperator::create to BinaryOperator::Create. Are
you using svn head?
Now on the x86_64 part. There has been very little work on porting vmkit
on x86_64. If you're having compilation problems, I suppose it's in the
garbage collector directory (GCMmap2). If you could make the