similar to: Early CSE clobbering llvm.assume

Displaying 20 results from an estimated 9000 matches similar to: "Early CSE clobbering llvm.assume"

2016 Jun 11
4
Early CSE clobbering llvm.assume
Daniel, Well then my next (dumb?) question is why aren’t we using source level assert information For optimization ? --Peter Lawrence. From: Daniel Berlin [mailto:dberlin at dberlin.org] Sent: Friday, June 10, 2016 5:39 PM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Early CSE clobbering llvm.assume On Fri, Jun
2016 Jun 11
2
Early CSE clobbering llvm.assume
Daniel, My point is this, If (cond) ---- optimizer takes advantage of knowing cond == true within the “then” part Assert(cond) ---- optimizer takes advantage of knowing cond == true for the rest of the scope Assume(cond) ---- optimizer takes advantage of knowing cond == true for the rest of the scope If we aren’t implementing these in a consistent manner (like using an intrinsic for
2016 Jun 14
4
Early CSE clobbering llvm.assume
> > >> Sanjoy’s argument is faulty, if it were true we would also find our >> handling of “assert” to be unacceptable >> >> but this is not the case, no one is arguing that we need to re-design >> “assert” >> > Sure, but no one should make this argument anyway: assert is not for > optimization. In fact, we don't really want it to be used for
2016 Jun 12
2
Early CSE clobbering llvm.assume
What he said :) It also, representationally, has a related issue our current assume does in terms of figuring out the set of assumptions applied. Given an instruction, in extended SSA, because " assume" produces a value used by things, it's trivial to find the chain of assumptions you can use for it. In a straight control flow representation, it requires finding which side of the
2016 Jun 14
4
Early CSE clobbering llvm.assume
Hal, To simplify this discussion, lets first just focus on code without asserts and assumes, I don’t follow your logic, you seem to be implying we don’t optimize property-propagation through “if-then” and “while-do” well ? --Peter. From: Hal Finkel [mailto:hfinkel at anl.gov] Sent: Tuesday, June 14, 2016 11:12 AM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: llvm-dev
2016 Jun 14
3
Early CSE clobbering llvm.assume
On Tue, Jun 14, 2016 at 10:36 AM, Lawrence, Peter <c_plawre at qca.qualcomm.com > wrote: > Daniel, > > What am I missing in the following chain of logic: > > > > As far as constant-prop, value-prop, range-prop, and general > property-propagation, > > > > 1. the compiler/optimizer **has** to get it right for if-then-else and > while-do or
2016 Jun 12
2
Early CSE clobbering llvm.assume
On Fri, Jun 10, 2016 at 9:58 PM, Mehdi Amini via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi, > > On Jun 10, 2016, at 7:00 PM, Lawrence, Peter via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Daniel, > My point is this, > > If (cond) ---- optimizer takes advantage of knowing cond == true within > the “then” part > Assert(cond)
2016 Jun 10
2
Early CSE clobbering llvm.assume
Yeah, that change is completely unrelated, that is about correctness, this is about optimization. I'm working on a proposal to just fix assume at some point to deal with the former issue. The problem with this testcase is that all the ways assume is propagate expect the variable in the assume to later be used. <This is the main way assume constants are propagated> bool
2016 Jun 10
3
Early CSE clobbering llvm.assume
Maybe. It may not fix it directly because you never use %1 or %2 again. I haven't looked to see how good the lookup is. On Fri, Jun 10, 2016, 3:45 PM Josh Klontz <josh.klontz at gmail.com> wrote: > Thanks Daniel, with that knowledge I think I can at least work around the > issue in my frontend. > > Ignoring GVN for a second though, and just looking at Early CSE, it seems
2016 Jun 10
4
Early CSE clobbering llvm.assume
As of llvm 3.8, the early CSE pass seems to remove llvm.assume intrinsics. Is this the expected behavior? I've attached as small-ish example of this happening in my production code. $ opt -early-cse before-early-cse.ll -S > after-early-cse.ll Note the use of the assume intrinsic indicating that the loaded value %channels equals 3. In a later pass I replace the load instruction with
2018 Mar 23
1
stack dump at -early-cse-memssa twice
Hello, while invoking opt with all possible optimization pairs I stumbled over a stack dump when doing -early-cse-memssa twice: $ clang -Xclang -disable-O0-optnone -S -o fannkuch7.ll -emit-llvm fannkuch7.c $ opt -S -o fannkuch7.ll -early-cse-memssa -early-cse-memssa fannkuch7.ll Questions: Is it illegal to call -early-cse-memssa twice? Are there any other incompatible optimization orders?
2016 Jul 13
2
IPRA, interprocedural register allocation, question
Mehdi, I’m seeing lots of “upgrading” logic, If (UseIPRA) createPass(new DummyCGSCCPass); if (UseIPRA) addPass(createRegUsageInfoPropPass()); if (UseIPRA) addPass(createRegUsageInfoCollector()); ??? --Peter. From: mehdi.amini at
2016 Jul 13
6
IPRA, interprocedural register allocation, question
Vivek, I apologize if you took my original email as a request for implementation, I meant to be asking what is already available, I think the answer to that is the ‘preserves_most’ and ‘preserves_all’ attributes, but I will also Use ‘regmask’ if those prove to be too sub-optimal. I am still interested in figuring out the necessary and sufficient conditions For LLC to do optimal IPRA
2016 Jul 12
2
IPRA, interprocedural register allocation, question
Vivek, Here’s the way I see it, let me know if you agree or disagree, You cannot optimize a function’s calling convention (register-usage) unless You can see and change every caller, and you only know this for non-static functions if you know that all calls to external functions cannot call back into the current compilation unit. #1 gives you the info necessary to change the call-site
2016 Jul 12
3
IPRA, interprocedural register allocation, question
Mehdi, I’m compiling embedded applications which are small enough to do whole-program-compilation. There’s no advantage in breaking them up into separate compilation pieces and linking them, even though in source form they are composed of a couple of separate source files. So for me the compilation unit is always the entire program (and includes main()) Except for some
2016 Jul 12
3
IPRA, interprocedural register allocation, question
Mehdi, I am looking for an understanding of 1) IPRA in general, 2) IPRA in LLVM. Whether I want to use LTO or not is a separate issue. 1) I currently believe it is a true statement that: If all external functions are known to not call back into the “whole-program” Being compiled, then IPRA is free to do anything at all to the functions being
2016 May 26
1
dumb question about tblgen
There is a comment in MachineValueTypes.h in the enum. // If you change this numbering, you must change the values in // ValueTypes.td as well! Other = 0, // This is a non-standard value I don't think the .td include can be fixed easily. Tablegen doesn't support include guards and can only include each file once. Looks like there is a build step that runs
2016 Jul 09
3
IPRA, interprocedural register allocation, question
Vivek, IIUC it seems that we need two pieces of information to do IPRA, 1. what registers the callee clobbers 2. what the callee does to the call-graph And it is #2 that we are missing when we define an external function, Even when we declare it with a preserves or a regmask attribute, So what I / we need is another attribute that says this is a leaf function, At least in my case all
2016 Jul 12
2
IPRA, interprocedural register allocation, question
Mehdi, In my mind at least, “whole program” means no dynamic libraries, so the only external functions are simple runtime support, do you have a suggested term for that ? --Peter. From: mehdi.amini at apple.com [mailto:mehdi.amini at apple.com] Sent: Tuesday, July 12, 2016 12:31 PM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: vivek pandya <vivekvpandya at
2016 May 26
2
dumb question about tblgen
The i32 class is defined in include/llvm/CodeGen/ValueTypes.td along with a class for every type in MachineValueTypes.h On Wed, May 25, 2016 at 8:12 PM, Marcello Maggioni via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I don’t quite follow why you are doing something like this. > > What is the advantage of this instead of just attaching the AddrRegs > regsister class as the