(original) (raw)
Hi All,
We would like to contribute to Fixing bugs in detecting memory alignments in SuperWord.
The contribution Bug ID: 8085932.
Please review this patch:
Bug-id: https://bugs.openjdk.java.net/browse/JDK-8085932
webrev: http://cr.openjdk.java.net/\~kvn/8085932/webrev.00/
Description: Fixing bugs in detecting memory alignments in SuperWord
Fixing bugs in detecting memory alignments in SuperWord:
SWPointer::scaled\_iv\_plus\_offset (fixing here a bug in detection of "scale"),
SWPointer::offset\_plus\_k (fixing here a bug in detection of "invariant"),
Add tracing output to the code that deal with memory alignment. The following routines are traceable:
SWPointer::scaled\_iv\_plus\_offset
SWPointer::offset\_plus\_k
SWPointer::scaled\_iv,
WPointer::SWPointer,
SuperWord::memory\_alignment
Tracing is done only for NOT\_PRODUCT. Currently tracing is controlled by VectorizeDebug:
#ifndef PRODUCT
if (\_phase->C->method() != NULL) {
\_phase->C->method()->has\_option\_value("VectorizeDebug", \_vector\_loop\_debug);
}
#endif
And VectorizeDebug may take any combination (bitwise OR) of the following values:
bool is\_trace\_alignment() { return (\_vector\_loop\_debug & 2) > 0; }
bool is\_trace\_mem\_slice() { return (\_vector\_loop\_debug & 4) > 0; }
bool is\_trace\_loop() { return (\_vector\_loop\_debug & 8) > 0; }
bool is\_trace\_adjacent() { return (\_vector\_loop\_debug & 16) > 0; }