similar to: [LLVMdev] Floating-point range checks

Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] Floating-point range checks"

2015 Jan 08
3
[LLVMdev] Floating-point range checks
Thanks for the pointers. Looks like LazyValueInfo has the sort of infrastructure I had in mind. LVILatticeVal could be extended to floating point. (The comment "this can be made a lot more rich in the future" is an invitation :-). I'm thinking a simple lattice would address most cases of interest for floating-point checks. The lattice points for floating-point could be all
2015 Jan 08
2
[LLVMdev] Floating-point range checks
> Checks against 1.0 are also common. Why not just add a FP range class, like our constant range, and go from there? That's certainly another way to go. My worry is that a more complicated lattice gets us deeper into rounding-mode issues and considerably more work for smaller gain. I like the idea of creating an FPRange class. We could start with a simple one and extend it as experience
2015 Jan 08
2
[LLVMdev] Floating-point range checks
With floating point, won't you need to model a partial order for the end points? I thought there were pairs of floating point values which are incomparable. Not sure if partial order is the right abstraction, but I'm pretty sure a total order isn't. This may make implementing the range comparisons (which are themselves partially ordered) a bit tricky... Philip (Who knows just
2015 Jan 08
2
[LLVMdev] Floating-point range checks
Yes, the modeling of floating-point is trickier. The wrap-around trick used by ConstantRange seems less applicable, and there are the unordered NaNs. Though in all cases, the key abstraction is a lattice of values, so an instance of FPRange should be thought of as a point on a lattice, not an interval. The lattice needs to be complicated enough the cover the cases of interest, but not so
2015 Jan 13
2
[LLVMdev] Floating-point range checks
After writing a simple FPRange, I've hit a stumbling block. I don't know what LLVM code should be extended to use it. I was initially thinking of extending LazyValueInfo, but it appears to be used for passes that don’t address the case that I need for Julia. I’m now wondering if I’m better off extending SimplifyFCmpInst to handle the few cases in question instead of trying to be more
2014 Dec 10
2
[LLVMdev] Best way for JIT to query whether llvm.fma.* is fast?
Thanks! That’s probably close enough for practical purposes. I looked at the overrides on various targets, and they all return true if the FMA hardware exists. - Arch From: Jingyue Wu [mailto:jingyue at google.com] Sent: Wednesday, December 10, 2014 2:56 PM To: Robison, Arch Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Best way for JIT to query whether llvm.fma.* is fast? Does
2014 Dec 10
2
[LLVMdev] Best way for JIT to query whether llvm.fma.* is fast?
For the Julia language JIT, we'd like be able to tell whether the llvm.fma.* intrinsic has hardware support. What's the best way to query LLVM (JIT) for this information? The information would be used in situations where the user wants to use different algorithms depending on whether FMA hardware is present or not. - Arch D. Robison -------------- next part -------------- An HTML
2014 Apr 04
3
[LLVMdev] Why "I = ++I" instead of "++I" in COFFDump.cpp ?
tools/llvm-objdump/COFFDump.cpp has two loops that advance the loop iterator using "I = ++I" instead of the usual "++I". For example: import_directory_iterator I = Obj->import_directory_begin(); import_directory_iterator E = Obj->import_directory_end(); if (I == E) return; outs() << "The Import Tables:\n"; for (; I != E; I = ++I) {
2015 Jul 06
5
[LLVMdev] Why can't comparisons with negative zero be simplified?
In InstCombineCompares.cpp, routine InstCombiner::FoldFCmp_IntToFP_Cst, there are these lines: // Comparisons with zero are a special case where we know we won't lose // information. bool IsCmpZero = RHS.isPosZero(); // If the conversion would lose info, don't hack on this. if ((int)InputSize > MantissaWidth && !IsCmpZero) return nullptr; Why check for positive
2014 Sep 29
2
[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"
Yes, I think the 2 outcomes are: - the current spec is unclear and will be clarified - in order to support safelen() and even the simd construct itself, LLVM will require infrastructure work to know when a lexically backwards dependence may have been introduced. Jon -----Original Message----- From: Tian, Xinmin [mailto:xinmin.tian at intel.com] Sent: Monday, September 29, 2014 10:43 AM To:
2014 Apr 07
3
[LLVMdev] Why "I = ++I" instead of "++I" in COFFDump.cpp ?
Oops, meant to send this to the mailing list instead of to Reid privately. (Why cc the mailing list instead of just sending to the mailing list?) In article <CACs=tyJ6zaHeiS0eNhBkdcZE--JY4k7yH9_P1yFbGqod6uymMw at mail.gmail.com>, Reid Kleckner <rnk at google.com> writes: > Looks like a bug. This can probably be simplified with C++11. > > On Fri, Apr 4, 2014 at 10:39
2014 Aug 13
2
[LLVMdev] setAlreadyVectorized does not delete obsolete metadata?
I noticed that LoopVectorizeHints::setAlreadyVectorized never deletes old "llvm.loop...." metadata. It just appends more, possibly contradicting the old metadata. E.g., after vectorization, a loop previously marked with llvm.loop.vectorize.width ends up with *two* such annotations, like this: br i1 %exitcond.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !8
2014 Aug 28
2
[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"
It's a problem in the OpenMP specification. The authors (including some from Intel) intended that the OpenMP simd construct assert no lexically backward dependences exist, but as you say, it's not obvious from the spec. One of our OpenMP community members is going to bring up the ambiguity with the OpenMP committee. - Arch -----Original Message----- From: Humphreys, Jonathan
2014 Aug 20
6
[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"
> I recommend that you send patches for an implementation > (including the Loop::GetAnnotatedVectorSafelen function > and associated updates to the vectorizer) for review. I expect to send the patches for review later this week. > Make sure to remember LangRef updates! Thanks for the reminder. > Also, looking at the original proposal again, I see no reason > to restrict
2014 Apr 17
2
[LLVMdev] Extend SLPVectorizer to struct operations that are isomorphic to vector operations?
While playing with SLPVectorizer, I notice that it will happily vectorize cases involving extractelement/insertelement, but won't vectorize isomorphic cases involving extractvalue/insertvalue (such as the attached example). Is that something that could be straightforward to add to SLPVectorizer, or are there some hard issue? In particular, the transformation would seem to require casts of
2014 Sep 28
2
[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"
More precisely, for a simd loop, if the safelen(VL) clause is specified, there should have no loop-carried lexical backward data dependency within the specified safe vector length VL. We will make this clear in the OpenMP 4.1 spec. Xinmin Tian (Intel) -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Hal Finkel Sent:
2017 Mar 20
2
Is it a valid fp transformation?
This C program produces different results with -O0 and -O3 optimization levels. #include <stdio.h> float test(unsigned int arg) { return (float)((int)(arg * 58)) + 1; } int main() { printf("%d\n", (int)test((unsigned int)-831710640)); } O0 result is -994576896 O3 result is -994576832 It happens because LLVM (specifically instcombine) does the following transformation:
2014 Aug 20
4
[LLVMdev] Proposal for ""llvm.mem.vectorize.safelen"
----- Original Message ----- > From: "Arnold Schwaighofer" <aschwaighofer at apple.com> > To: "Johannes Doerfert" <doerfert at cs.uni-saarland.de> > Cc: llvmdev at cs.uiuc.edu, "Arch Robison" <arch.robison at intel.com> > Sent: Wednesday, August 20, 2014 11:29:16 AM > Subject: Re: [LLVMdev] Proposal for
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
Hi all, Running LLVM 3.4 to create a custom pass for OpenCL transformations. I am attempting to GEP into a struct using IRBuilder's CreateStructGEP, but I keep getting this assert: aoc: ../../../../../../compiler/llvm/include/llvm/Instructions.h:703: llvm::Type* llvm::checkGEPType(llvm::Type*): Assertion `Ty && "Invalid GetElementPtrInst indices for type!"' failed.
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
cB->getType()->getPointerElementType()->dump(); gives: %struct.RB = type opaque2189 x_idx = builder.CreateStructGEP(cB, 0); cB->dump() gives: %struct.RB addrspace(1)* %cB $1 = void //To undo confusion, the last cB is the function arg name. For this example I unfortunately chose the same name for my argument Value* as the argument name. //Also one correction. I am running