Hi, Could a gatekeeper review the patch for bug #933? Thank you very much.
This patch is used to support GCC extension - variable length array in struct (VLA/VLS). There are 3 major kinds of changes in the patch: 1. Set the static TY size of VLA/VLS from 0 to -1. 2. Change all component offset in wgen_expr.cxx from WN_OFFSET to WN*. For constant offset, the operator of WN* is INTCONST. For variable offset, it's an integer expression. 2. Wrap WN_CreateIload/WN_CreateIIStore/WN_CreateLdid/WN_CreateStid for variable offset. If the offset is constant, the offset will be attached onto the WN directly. Otherwise, an ADD node will be generated for the address used by the load/store. So far there are still several limitation on this patch: 1. don't support the copy between variable length object. 2. don't support passing the variable length object by parameter or return value. This one requires to patch the ABI part in BE and is planed to fix later. I tested this patch with two methods: 1. Tested the gcc regression. There is no regression found. The following VLA/VLS test cases can pass now: gcc.c-torture/compile/20050801-2.c gcc.c-torture/compile/920428-4.c gcc.c-torture/compile/920501-16.c gcc.c-torture/execute/20040308-1.c gcc.c-torture/execute/20040423-1.c gcc.c-torture/execute/20041218-2.c gcc.dg/pr19345.c gcc.dg/pr30189.c gcc.dg/vla-2.c The following cases still fails due to the limitation #2 mentioned above: gcc.c-torture/compile/20010605-1.c gcc.c-torture/compile/20030224-1.c gcc.c-torture/execute/20020412-1.c gcc.dg/compat/struct-by-value-22 2. Compile the test case without VLA/VLS by different WGEN (one is original and the other is with this patch) and compare the .B file dump. There is no difference found in the IR generated by the two WGENs. -- Regards, Lai Jian-Xin
vls-0117.patch
Description: Binary data
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel