[LLVMbugs] [Bug 11224] New: Enhancement: "notnull" modifier for a value

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 24 00:50:13 PDT 2011


           Summary: Enhancement: "notnull" modifier for a value
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: s3734770 at mail.zih.tu-dresden.de
                CC: llvmbugs at cs.uiuc.edu

Iave a language feature called "auto class creation". when a pointer is null
and i access this field, the field is filled with values.
One problem i have is that this check is done every time i access a field
The problem is that a allocated memory is not null, but llvm dosent know that
So it checks it against 0 again and again
The other problem is the allocation. in some cases (the start of a function),
the probability that the mem should be allocated is 100%, in other cases the
probability is very low. so the allocation should not be inlined
(and maybe the basic block for the mem allocation should be at the end of the
function so that no jump is required)

So the solution is a "notnull" flag to constant fold "icmp eq %type* %value,
null" to "i1 0"

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list