Implement new naming scheme for --target.

Now targets are named like "<isa>-i<mask size>x<gang size>", e.g.
"sse4-i8x16", or "avx2-i32x16".

The old target names are still supported.
This commit is contained in:
Matt Pharr
2013-08-08 19:23:44 -07:00
parent 1d76f74b16
commit 0c5742b6f8
7 changed files with 163 additions and 100 deletions

View File

@@ -79,8 +79,8 @@
compiler under a debuffer; in this case, just return a reasonable
default.
*/
static int
lTerminalWidth() {
int
TerminalWidth() {
if (g->disableLineWrap)
return 1<<30;
@@ -228,8 +228,8 @@ lFindIndent(int numColons, const char *buf) {
/** Print the given string to the given FILE, assuming the given output
column width. Break words as needed to avoid words spilling past the
last column. */
static void
lPrintWithWordBreaks(const char *buf, int indent, int columnWidth, FILE *out) {
void
PrintWithWordBreaks(const char *buf, int indent, int columnWidth, FILE *out) {
#ifdef ISPC_IS_WINDOWS
fputs(buf, out);
fputs("\n", out);
@@ -375,7 +375,7 @@ lPrint(const char *type, bool isError, SourcePos p, const char *fmt,
return;
printed.insert(formattedBuf);
lPrintWithWordBreaks(formattedBuf, indent, lTerminalWidth(), stderr);
PrintWithWordBreaks(formattedBuf, indent, TerminalWidth(), stderr);
lPrintFileLineContext(p);
free(errorBuf);