similar to: [LLVMdev] why we assume malloc() always returns a non-null pointer in instruction combing?

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] why we assume malloc() always returns a non-null pointer in instruction combing?"

2015 Mar 31
2
[LLVMdev] why we assume malloc() always returns a non-null pointer in instruction combing?
> I think we can do such optimization with operator new, because new never returns null. This is incorrect in the case of `new (std::nothrow) ...` - the whole point of `(std::nothrow)` is to tell new that it should return NULL in case of failure, rather than throw an exception (bad_alloc). But the point here is not the actual return value, but the fact that the compiler misses that the
2015 Apr 01
2
[LLVMdev] why we assume malloc() always returns a non-null pointer in instruction combing?
Hi Mats, I think Kevin's point is malloc can return 0, if malloc/free pair is optimized way, the semantic of the original would be changed. On the other hand, malloc/free are special functions, but programmers can still define their own versions by not linking std library, so we must assume malloc/free always have side-effect like other common functions, unless we know we will link std
2015 Apr 01
3
[LLVMdev] why we assume malloc() always returns a non-null pointer in instruction combing?
Hi David and Mats, Thanks for your explanation. If my understanding is correct, it means we don't need to consider the side-effect of malloc/free unless compiling with -ffreestanding. Because without -ffreestanding, user defined malloc/free should be compatible with std library. It makes sense to me. My point is, in std library, malloc is allowed to return null if this malloc failed. Why
2017 Aug 14
2
clang-tidy : Modify cert-err60-cpp configuration
We want to modify the aforementioned check so that it does not flag the exceptions that aren't nothrow copy constructible/assignable. This page http://clang.llvm.org/extra/clang-tidy/#using-clang-tidy tells me to dump the configs of all the checks using %clang-tidy -checks=* -dump-config but it does not mention the cert-err60-cpp. How do I modify the configuration of this check so that it
2015 Mar 11
2
[LLVMdev] How to run two loop passes non-interleaved if they are registered one by one?
Hi Hal, James told me that in PassManagerBuilder.cpp, BarrierNoopPass is already used for this kind of purpose(though there's also a fixme saying it's hacking). I think it's a good idea to use this pass here. Thanks, Kevin 2015-03-11 17:05 GMT+08:00 Hal Finkel <hfinkel at anl.gov>: > ----- Original Message ----- > > From: "Kevin Qin" <kevinqindev at
2014 Jul 31
3
[LLVMdev] Should we enable Partial unrolling and Runtime unrolling on AArch64?
Hi all, Partial unrolling and runtime unrolling are enabled by default in aarch64 gcc which is help to get performance better. But these two methods are enabled for only several backends in LLVM which are X86, PowerPC and R600. I don't know the history of these two kinds of unrolling, and why they are not widely used. I also want to know is, for aarch64 backend, is it intentionally to get
2015 Mar 11
2
[LLVMdev] How to run two loop passes non-interleaved if they are registered one by one?
Hi LLVM developers, I want to add LICM pass after loop unrolling pass in current optimization pipeline. Because both of them are loop passes, so if I registered them one by one, they will interleaved go through all loops in bottom up way within same loop pass manager. Loop unroling pass may create new inner loops from partial unrolling, and those newly created loops can be visited only if the
2014 Jun 25
4
[LLVMdev] [cfe-dev] AArch64 Clang CLI interface proposal
Hi Tim, 2014-06-25 15:26 GMT+08:00 Tim Northover <t.p.northover at gmail.com>: > Hi Kevin, > > I assume you've looked at the GCC documentation in this area, since > your ideas are very similar: > https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html. I actually > think that looks like a rational set of conventions too. > > The main difference appears to be
2014 Jul 10
2
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
Hi Daniel,    Thank you your replying.     Yes, the problem is about MIPS backend. You give me this message "There is limited support for the <8 x f16> type when MSA (MIPS SIMD Architecture) is enabled but even then scalar half-precision is not currently supported."  Could you give me some official link or some evidence? Thank you very much. Robin yalong at multicorewareinc.com
2014 Jul 31
2
[LLVMdev] For alias analysis, It's gcc too aggressive or LLVM need to improve?
Hi all, Recently, I found gcc can generate faster codes by localizing global variable inside loop and only write back once before function return. Gcc can do this because its alias analysis think it's safe. But for below case, gcc gives different result from -O0 and -O2. #include <stdio.h> struct heap {int index; int b;}; struct heap **ptr; int aa; int main() { struct heap element;
2015 Jul 06
5
[PATCH] for potential memory leaks
libFLAC has several places like this: if(0 == (ptr = realloc(ptr, size))) return false; which results in memory leaks if realloc fails (the old value of ptr is lost). The patch should fix this. -------------- next part -------------- A non-text attachment was scrubbed... Name: realloc_memleak_fix.patch Type: application/octet-stream Size: 6272 bytes Desc: not available Url :
2014 Jul 10
2
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
Hi Andrea    Thank you your replying.    I do like your letter. Add following to line to MipsISelLowering.cpp. As your words,   @llvm.convert.to.fp16  can compile successfully. However, the runtime is not right. +  setOperationAction(ISD::FP16_TO_FP32, MVT::f32, Expand);+  setOperationAction(ISD::FP32_TO_FP16, MVT::i32, Expand); Robin yalong at multicorewareinc.com  From: Andrea Di
2014 Jul 09
6
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
    Thank you Kevin!!!    If I use fptrunc and bitcast realise NEON vcvtt ( I can sure, "fptrunc  double %tmp to float" is right, but "fptrunc float %tmp to half" is wrong). My target platform is MIPS.  The command as following: NEON:            vcvtt.f16.f32 s2, s0 llvm Code: %Vt_2 = load float* %VFP_s0, align 4 %Vt3_1 = fptrunc float %Vt_2 to half %Vt4_1 = bitcast half
2014 Jul 09
4
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
On 07/09/2014 12:41 PM, Matt Arsenault wrote: > On 07/09/2014 03:30 PM, yalong at multicorewareinc.com wrote: >> Thank you Kevin!!! >> If I use fptrunc and bitcast realise NEON vcvtt ( I can sure, >> "fptrunc double %tmp to float" is right, but "fptrunc float %tmp to >> half" is wrong). My target platform is MIPS. The command as following:
2012 Sep 03
1
combing list objects
Hi, I am trying to combine a long list but I can't work out how to do it, for example: abun<-list(rep(0,5),rep(0,7),rep(0,4),rep(0,10)) nb<-c(5,5,1,8) fill.abun <- function(x, y) { set <- sample(1:length(x), size = y) x[set] <- rlnorm(length(set)) return(x) } abun <- mapply(fill.abun, abun, nb) abun ## I want all the data in one
2016 Nov 01
3
PVS-Studio analysis of LLVM code
Hi, Jonas! On Tue, Nov 1, 2016 at 3:26 AM, Jonas Wagner <jonas.wagner at epfl.ch> wrote: > Hi Eugene, > > I think this is really cool! You've convinced me to try out PVS on some of > my own projects :) > > Of all the warnings presented in the article, there was one for which I > thought it's a false positive. By default, LLVM is compiled without RTTI and >
2008 Nov 10
1
Combing xyplot and curve() plot via print
All, I'm trying to put an xyplot and a plot produced via curve() on the same page. It seems that mfrow and layout don't work, and now I'm trying print but that does not work either. Any suggestions much appreciated. Cheers, David p.11 = xyplot(1:10 ~ 1:10) curve(sin, 0,3, ylim=c(-3,3), ylab="sin and cos", lty = 1) curve(cos, 0,3, ylim=c(-3,3), lty = 5, add=TRUE)
2011 Jan 26
0
Combing forest plots
Hi All, I am trying to combine two forest plots on the same page using the "forestplot" function in the rmeta package. Once I use the par() function to combine my plots on the same page, I find that my two plots are overlaying each other. Does anyone have any suggestions on how to fix this? Thanks! ________________________________ PHRI DISCLAIMER This information is directed in
2010 Mar 29
2
Combing
Hi all, I want to combine two data sets (ZA and ZB to get ZAB). The common variable between the two data sets is ID. Data ZA ID F M 1 0 0 2 0 0 3 1 2 4 1 0 5 3 2 6 5 4 Data ZB ID v1 v2 v3 3 2.5 3.4 302 4 8.6 2.9 317 5 9.7 4.0 325 6 7.5 1.9 296 Output (ZAB) ID F M v1 v2 v3 1 0 0 -9 -9 -9 2 0 0 -9 -9 -9 3 1 2 2.5 3.4 302 4 1 0 8.6 2.9 317 5 3 2 9.7
2010 May 11
1
comparing and combing files
Hello, I have two tab-delimited files which I would like to combine. In the first one I have gene IDs (Unique) on column 1 and than various experimental results from microarray analysis (see attached files list1 ) the second arrays have the same genes IDs (more and in a different order, some are double) (see attached files list2 ) What I would like to do is to search in the second list for gene