similar to: [LLVMdev] Verifier should not make any assumptions about calls to "malloc"

Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] Verifier should not make any assumptions about calls to "malloc""

2009 Sep 22
0
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
Duncan, Thanks for brining the Ada issue to my attention. On Sep 22, 2009, at 6:11 AM, Duncan Sands wrote: > Hi Victor, this code from the verifier broke the Ada front-end build: > > const Module* M = CI.getParent()->getParent()->getParent(); > Constant *MallocFunc = M->getFunction("malloc"); > > if (CI.getOperand(0) == MallocFunc) { > const
2009 Sep 22
0
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
On Sep 22, 2009, at 6:11 AM, Duncan Sands wrote: > Hi Victor, this code from the verifier broke the Ada front-end build: > > const Module* M = CI.getParent()->getParent()->getParent(); > Constant *MallocFunc = M->getFunction("malloc"); > > if (CI.getOperand(0) == MallocFunc) { > const PointerType *PTy = > >
2009 Sep 22
1
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
On Sep 22, 2009, at 11:23 AM, Victor Hernandez wrote: > On Sep 22, 2009, at 6:11 AM, Duncan Sands wrote: > >> Hi Victor, this code from the verifier broke the Ada front-end build: >> >> const Module* M = CI.getParent()->getParent()->getParent(); >> Constant *MallocFunc = M->getFunction("malloc"); >> >> if (CI.getOperand(0) ==
2009 Sep 22
1
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
Hi Victor, > What does the Ada front-end declare malloc as? I don't really want to tell you because a correct solution should work no matter what malloc is defined to be :) What I mean by "work" is that if malloc has the standard prototype then you perform transforms on it, and otherwise you should probably just ignore it. That said, Ada outputs malloc as: i32 @malloc(i32)
2010 Jun 25
1
[LLVMdev] redundant checking of terminator in Verifier?
Hi, The checking about that if this is a terminator that it is at the end of the block has been applied twice (bellow). One is at Verifier::visitInstruction, and the other is at Verifier::visitTerminatorInst. Since visitInstruction is called when visiting each instruction, the checking at visitTerminatorInst seems redundant to me. Did I miss any case? void Verifier::visitInstruction(Instruction
2014 Jan 08
3
[LLVMdev] reference to non-static member function must be called
Hi,everyone. I'm writing a pass in which a CallInst to an external function will be inserted. The function is declared like this: void func(int a, unsigned chat *p); and in the Pass(a Function Pass ,and using the InstVistor template ), I wrote like this: void visitStoreInst(StoreInst &SI) { //Get the refference of the types Module *M =
2013 Feb 19
0
[LLVMdev] [RFC] NoBuiltin Attribute
On Feb 18, 2013, at 4:49 PM, Bill Wendling <wendling at apple.com> wrote: >> Hi Bill, >> >> I think the concept of this patch makes sense, but the implementation does not. >> >> I have: >> >> void foo() { >> printf("hello\n"); >> } >> >> and I build with -fno-builtin-puts. If I understand correctly, *foo* will
2016 Feb 07
3
[PATCH] strlen -> strnlen optimization
This addition converts strlen() calls to strnlen() when the result is compared to a constant. For example, the following: strlen(s) < 5 Becomes: strnlen(s, 5) < 5 That way, we don't have to walk through the entire string. There is the added overhead of maintaining a counter when using strnlen(), but I thought I'd start with the general case. It may make sense to only use this
2013 Feb 19
5
[LLVMdev] [RFC] NoBuiltin Attribute
On Feb 18, 2013, at 4:45 PM, Chris Lattner <clattner at apple.com> wrote: > > On Feb 18, 2013, at 1:54 PM, Bill Wendling <wendling at apple.com> wrote: > >> Hi LLVMites! >> >> This patch adds the 'nobuiltin' attribute to to LLVM. This is needed during LTO, which right now ignores this attribute and command line flag. I want to make this an
2008 May 14
4
[LLVMdev] optimization assumes malloc return is non-null
One more question on this. The substitution of malloc() is predicated on the assumption that the compiler knows the implementation of malloc(), and the argument for that seems to rest in part on the specification of the Standard C Library. But I am not aware of any requirement that compliant C code must be linked with the Standard C Library. If this requirement does not exist, then no portion of
2012 Jul 04
2
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
Evening, I was writing some code that tried to insert calls to the llvm.annotation intrinsic function, which has a signature of (i32, i8*, i8*, i32). The code is below. void addAnnotation( BasicBlock *block, Function *F) { string foo = "foo"; string bar = "barr"; Type *charTy = Type::getInt8Ty(block->getContext()); ArrayType *s1Ty =
2010 Dec 15
2
[LLVMdev] The best way to cope with AllocationInst type in old code?
Hi all, I am working on some old code which was compiled against llvm-2.5. Anyway, in some places I, AllocationInst is used (e.g. to ensure the instruction's type). Even in your current documentation (http://llvm.org/docs/ProgrammersManual.html), I found an example that uses this instruction. If I got it correctly, this istruction (AllocationInst) has been removed from llvm instruction set.
2014 Mar 10
2
[LLVMdev] GlobalValues appear in their own use lists?
In the following IR module: – define i8 @foo() #0 { entry: %call0 = call i8 @bar() ret i8 %call0 } declare i8 @bar() #1 – @bar() gets marked as its own user in top-of-tree LLVM. I patched the Verifier to check it (but didn’t commit the patch): – Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp (revision 203468) +++
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language compiler: since I support first-class functions, I've made the types of all functions a standard vararg (so I can box them). The implementation crashes when I try to read out the value of gc.result. Hints as to what might be wrong? Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com> ---
2012 Jul 04
0
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
Andrew Ruef wrote: > Evening, > > I was writing some code that tried to insert calls to the > llvm.annotation intrinsic function, which has a signature of (i32, > i8*, i8*, i32). The code is below. > > void addAnnotation( BasicBlock *block, Function *F) > { > string foo = "foo"; > string bar = "barr"; > > Type
2010 Dec 15
0
[LLVMdev] The best way to cope with AllocationInst type in old code?
Hamid 2C wrote: > Hi all, > > I am working on some old code which was compiled against llvm-2.5. > Anyway, in some places I, AllocationInst is used (e.g. to ensure the > instruction's type). Even in your current documentation > (http://llvm.org/docs/ProgrammersManual.html), I found an example that > uses this instruction. > If I got it correctly, this istruction
2016 Sep 21
2
RFC: module flag for hosted mode
(summarising IRC) Rethinking a little, I would be inclined to agree that combined hosted and freestanding modules should not be compiled in hosted mode. Here's one scenario where we may break: suppose I LTO-link an implementation of memset compiled with -ffreestanding with a program compiled with -fhosted. With the proposed rule, the loop idiom recognizer may transform the body of the memset
2016 Sep 16
2
RFC: module flag for hosted mode
+Eric and Akira (for thoughts on module flags) > On 2016-Sep-16, at 12:47, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> On Sep 16, 2016, at 12:30 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >> >> In PR30403 we've been discussing how to encode -ffreestanding when using LTO. This bit is currently dropped during LTO because its only
2012 Oct 27
2
[LLVMdev] [llvm-commits] [llvm] r166875 - in /llvm/trunk: lib/Transforms/Scalar/LoopIdiomRecognize.cpp test/Transforms/LoopIdiom/basic.ll
On 27.10.2012, at 18:24, Benjamin Kramer <benny.kra at gmail.com> wrote: > > On 27.10.2012, at 18:15, Sean Silva <silvas at purdue.edu> wrote: > >> How does this affect freestanding implementations? > > This transform is disabled with -fno-builtin or -ffreestanding. Thinking a bit more about this, it looks like the way -ffreestanding is implemented in clang is
2016 Sep 16
2
RFC: module flag for hosted mode
In PR30403 we've been discussing how to encode -ffreestanding when using LTO. This bit is currently dropped during LTO because its only representation is in the TargetLibraryInfo created by clang ( http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/BackendUtil.cpp#258). The proposal is to introduce a module flag that we set in any translation unit compiled in hosted (i.e. -fno-freestanding)