search for: sccpsolver

Displaying 17 results from an estimated 17 matches for "sccpsolver".

2006 May 10
2
[LLVMdev] SCCP
...nalysis pass, I'm interested in reading the lattice values >> calculated by SCCP. Should I split the current SCCP optimization into an >> analysis piece and the optimization that depends on it, so that I can >> use its analysis results? > > SCCP is already split into an SCCPSolver class that is used by the SCCP > and IPSCCP classes. You should just be able to use SCCPSolver. Note > that it is not a pass, just a class you can use. Thanks. I thought SCCPSolver was just a helper. I suppose then I should just move its class declaration into a header so it can be seen fr...
2006 May 10
0
[LLVMdev] SCCP
...;m interested in reading the lattice values >>> calculated by SCCP. Should I split the current SCCP optimization into an >>> analysis piece and the optimization that depends on it, so that I can >>> use its analysis results? >> >> SCCP is already split into an SCCPSolver class that is used by the SCCP >> and IPSCCP classes. You should just be able to use SCCPSolver. Note >> that it is not a pass, just a class you can use. > > Thanks. I thought SCCPSolver was just a helper. I suppose then I should > just move its class declaration into a heade...
2006 May 10
2
[LLVMdev] SCCP
...t;>> calculated by SCCP. Should I split the current SCCP optimization >>>> into an >>>> analysis piece and the optimization that depends on it, so that I can >>>> use its analysis results? >>> >>> >>> SCCP is already split into an SCCPSolver class that is used by the SCCP >>> and IPSCCP classes. You should just be able to use SCCPSolver. Note >>> that it is not a pass, just a class you can use. >> >> >> Thanks. I thought SCCPSolver was just a helper. I suppose then I should >> just move its c...
2006 May 10
2
[LLVMdev] SCCP
For an analysis pass, I'm interested in reading the lattice values calculated by SCCP. Should I split the current SCCP optimization into an analysis piece and the optimization that depends on it, so that I can use its analysis results? Nick Lewycky
2006 May 10
0
[LLVMdev] SCCP
...y wrote: > For an analysis pass, I'm interested in reading the lattice values > calculated by SCCP. Should I split the current SCCP optimization into an > analysis piece and the optimization that depends on it, so that I can > use its analysis results? SCCP is already split into an SCCPSolver class that is used by the SCCP and IPSCCP classes. You should just be able to use SCCPSolver. Note that it is not a pass, just a class you can use. -Chris -- http://nondot.org/sabre/ http://llvm.org/
2010 May 20
1
[LLVMdev] crash in 2.7: SCCPSolver::ResolvedUndefsIn
Are there any known issues with the ResolvedUndefsIn in 2.7? We've hit this particular stack a couple times now in the JIT. I've copied the failing bitcode to disk and doesn't crash opt or llc. It doesn't repro easily in the JIT either, but the stack is always the same... hoping it's a known issue. Thanks! TerminatorInst *TI = BB->getTerminator(); >>>>if
2009 Nov 10
2
[LLVMdev] Bugfix: SCCP
The SCCP pass was failing an assertion that I traced back to SCCPSolver::visitExtractValueInst. getStructValueState was used on the aggregate operand even if it had no structure type. I added a check to use getStructValueState for structs and getValueState for other operands. This behavior was introduced in r85793. Please note that I'm not sure whether my changes...
2006 May 10
0
[LLVMdev] SCCP
On Tue, 9 May 2006, Nick Lewycky wrote: >> You could do that, but SCCPSolver isn't really useful to mainline LLVM >> for anything other than SCCP and IPSCCP, so we don't need it in a public >> header. Out of curiosity, what are you looking to use the latice values >> for? Why not just run SCCP and then look at the transformed code? > > I wa...
2006 May 10
2
[LLVMdev] SCCP
Chris Lattner wrote: > On Tue, 9 May 2006, Nick Lewycky wrote: > >>> You could do that, but SCCPSolver isn't really useful to mainline LLVM >>> for anything other than SCCP and IPSCCP, so we don't need it in a public >>> header. Out of curiosity, what are you looking to use the latice values >>> for? Why not just run SCCP and then look at the transformed code? &g...
2009 Nov 10
0
[LLVMdev] Bugfix: SCCP
On Nov 10, 2009, at 6:58 AM, Stephan Reiter wrote: > The SCCP pass was failing an assertion that I traced back to > SCCPSolver::visitExtractValueInst. getStructValueState was used on the > aggregate operand even if it had no structure type. I added a check to > use getStructValueState for structs and getValueState for other > operands. > > This behavior was introduced in r85793. Please note that I'm not...
2019 Jun 28
2
Conflicts with custom passes
...573cfa) #1 0x00000000015721dc llvm::sys::RunSignalHandlers() (/usr/local/bin/clang-8+0x15721dc) #2 0x0000000001572347 SignalHandler(int) (/usr/local/bin/clang-8+0x1572347) #3 0x00007f8d810e7390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #4 0x0000000001497e69 (anonymous namespace)::SCCPSolver::getValueState(llvm::Value*) (.constprop.510) (/usr/local/bin/clang-8+0x1497e69) … I have two questions: - Is there any guide line to write a custom pass to avoid such a conflict? - Is there any existing framework to print out dynamic path in LLVM-IR format? I would appreciate if some of you can...
2016 Dec 31
0
SCCP is not always correct in presence of undef (+ proposed fix)
...t;undef", which is wrong. Why is changing that not the fix? That is, some variant of diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 8a6be97..45f1241 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -908,8 +908,18 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) { } // If something is undef, wait for it to resolve. - if (!V1State.isOverdefined() && !V2State.isOverdefined()) - return; + if (!V1State.isOverdefined() && !V2State.isOverdefined()) { + Constant *L = UndefValue::get(I.getOper...
2006 May 10
2
[LLVMdev] SCCP
...ight-forward to teach the instcombine pass to turn a > load from an invalid location (in this case, off the end of the array) > into an undef value. If you wanted to tackle this, it should be > straight-forward and would be a worthwhile addition to the LLVM > optimizer. In SCCPSolver::visitGetElementPtrInst, it would fall through to the final markConstant call at the end of the function. Someone should be doing a check with indexValid to see if instead it should be marking as undefined. I can try to produce such a patch. >> I thought this might be because the optimizer...
2006 May 10
0
[LLVMdev] SCCP
On Wed, 10 May 2006, Nick Lewycky wrote: >> Then just run the SCCP pass, and check to see if any operands satisfy >> the predicate "isa<UndefValue>(V)". LLVM explicitly represents >> undefined values. > > I have a case where it doesn't, but perhaps the SCCP pass isn't to blame: > > extern void write_char(int); > > const char foo[4] =
2016 Dec 31
4
SCCP is not always correct in presence of undef (+ proposed fix)
...ide discovered, there are bugs open with the same cause. > > diff --git a/lib/Transforms/Scalar/SCCP.cpp > b/lib/Transforms/Scalar/SCCP.cpp > index 8a6be97..45f1241 100644 > --- a/lib/Transforms/Scalar/SCCP.cpp > +++ b/lib/Transforms/Scalar/SCCP.cpp > @@ -908,8 +908,18 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) { > } > > // If something is undef, wait for it to resolve. > - if (!V1State.isOverdefined() && !V2State.isOverdefined()) > - return; > + if (!V1State.isOverdefined() && !V2State.isOverdefined()) { > + Const...
2016 Dec 31
0
SCCP is not always correct in presence of undef (+ proposed fix)
...Davide -- can you point me to those? >> diff --git a/lib/Transforms/Scalar/SCCP.cpp >> b/lib/Transforms/Scalar/SCCP.cpp >> index 8a6be97..45f1241 100644 >> --- a/lib/Transforms/Scalar/SCCP.cpp >> +++ b/lib/Transforms/Scalar/SCCP.cpp >> @@ -908,8 +908,18 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) >> { >> } >> >> // If something is undef, wait for it to resolve. >> - if (!V1State.isOverdefined() && !V2State.isOverdefined()) >> - return; >> + if (!V1State.isOverdefined() && !V2State.i...
2016 Dec 30
5
SCCP is not always correct in presence of undef (+ proposed fix)
Hi. I'm sending this email to -dev as this may be of interest of many/people may have opinions/want to try the change before it goes in to report problems. I've been recently working on a patch to integrate `undef` in the SCCP solver, in the hope of fixing a tail of latent bugs in SCCP which remained uncovered for many years. I think this is a decent time to propose, so that it can