First Last Prev Next    No search results available
Details
: [licm] LICM invalidates alias analysis info and uses brok...
Bug#: 420
: libraries
: Scalar Optimizations
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.3
: P2
: normal
: 1.4

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Chris Lattner <sabre@nondot.org>
:

Attachments
Testcase that causes the crash (3.47 KB, text/plain)
2004-08-15 12:22, Chris Lattner
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-08-15 12:19
gccld on 253.perlbmk crashes when run on persephone, because the LICM pass is
promoting a memory location out of a loop, and not updating the alias analysis.

The problem is that LICM uses a call to PromoteMemToReg to do all of the heavy
lifting and insertion of PHI nodes.  Unfortunately, this causes some reasonably
large churn to the code and the alias analysis impl (glocalsmodref-aa in this
case) is not informed.  Later, the stale information is used by LICM and a crash
results.

I will attach a reduced testcase for the problem.

-Chris
------- Comment #1 From Chris Lattner 2004-08-15 12:22:12 -------
Created an attachment (id=164) [details]
Testcase that causes the crash

Reproduce the problem with:

llvm-as bugpoint-reduced-simplified.ll
valgrind opt bugpoint-reduced-simplified.bc -globalsmodref-aa -licm
-disable-output

-Chris
------- Comment #2 From Chris Lattner 2004-09-14 12:14:32 -------
Here is a reduced testcase:

----
%PL_regcomp_parse = internal global sbyte* null

implementation

void %test() {
        br label %Outer
Outer:
        br label %Inner
Inner:
	%tmp.114.i.i.i = load sbyte** %PL_regcomp_parse
	%tmp.115.i.i.i = load sbyte* %tmp.114.i.i.i

	store sbyte* null, sbyte** %PL_regcomp_parse

        br bool false, label %Inner, label %Next
Next:
        br bool false, label %Outer, label %Exit
Exit:
        ret void
}

----

$ llvm-as < PR420.ll | valgrind opt -globalsmodref-aa -licm -disable-output

------- Comment #3 From Chris Lattner 2004-09-14 20:05:24 -------
*** Bug 439 has been marked as a duplicate of this bug. ***
------- Comment #4 From Chris Lattner 2004-09-14 20:07:22 -------
This is now fixed, testcase here:
test/Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx

Patches here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040913/018323.html
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040913/018328.html

-Chris

First Last Prev Next    No search results available