search for: is_constant

Displaying 4 results from an estimated 4 matches for "is_constant".

Did you mean: ir_constant
2014 Oct 21
3
[LLVMdev] Optimization hints for "constant" loads
...u often need the later. Andy seems to be arguing in favour of data flow mostly because it's easier for the optimizer. Unless I'm misreading, there's nothing preventing us from using control flow for the same patterns. For example: p1 = ... *p1 = 5 p2 = llvm.safe_cast p1 p3 = select is_constant p2, p1 load p3 Is isomorphic with: p1 = ... *p1 = 5 if is_constant: invariant.start(p1) load p1 Andy, is this correct? Or am I missing something? (p.s. You guys seem to be throwing around the terms "!invariant" and "invariant load" without clearly defining them. I'm...
2014 Oct 21
2
[LLVMdev] Optimization hints for "constant" loads
Thank you for the explanation, I think I misunderstood your solution initially. Is it accurate to say: by making the definition of the source pointer of an !invariant load control (or data) dependent on some initialization event, you can effectively separate the initialization event (where the location is not invariant) and the rest of the execution (where the location is invariant). This
2014 Dec 02
2
[LLVMdev] TBAA vs !invariant.load metadata semantics
...ame semantics as !invariant.load. > > The only uncertainty here is that a Location is clearly (??) position/Instruction specific. Does that also imply that the Location is control dependent? What is the semantics of the following code? > if (is_known_invariant) { > load %p, !tbaa is_constant=true > } > > Is the optimizer allowed to lift the load above the conditional? (Assuming it can prove the location is known dereferenceable.) The semantics for !invariant.load clearly allow this, but do the semantics for TBAA's constant flag? > > I think the answer to these...
2014 Sep 10
7
[LLVMdev] Optimization hints for "constant" loads
I'm looking at how to optimize IR which contains reads from a field which is known to be initialized exactly once. I've got an idea on how to approach this, but wanted to see if others have alternate ideas or similar problems which might spark discussion. It feels like there's a potentially generally useful optimization hint here if we can generalize it sufficiently without