Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/compiler architecture update #323

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
[submodule "pugixml"]
path = ext/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "abseil-cpp"]
path = ext/abseil/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ dist-hook:
rm $(distdir)/configure
rm $(distdir)/depcomp
rm $(distdir)/etc/macros/ltversion.m4
rm $(distdir)/ext/abseil-cpp/aclocal.m4
rm $(distdir)/ext/abseil-cpp/configure
rm $(distdir)/ext/abseil/aclocal.m4
rm $(distdir)/ext/abseil/configure
rm $(distdir)/ext/flopoco/aclocal.m4
rm $(distdir)/ext/flopoco/configure
rm $(distdir)/ext/flopoco/m4/ltversion.m4
Expand Down
2 changes: 1 addition & 1 deletion Makefile.init
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ distclean :
@rm -rf etc/macros/libtool.m4 etc/macros/lt~obsolete.m4 etc/macros/ltoptions.m4 etc/macros/ltsugar.m4 etc/macros/ltversion.m4
@rm -rf etc/scripts/.test_panda.py.swp
@rm -rf ext/autoreconf_log ext/config.h.in ext/config.h.in~ ext/configure
@rm -rf ext/abseil-cpp/configure
@rm -rf ext/abseil/configure
@rm -rf ext/Coin-Cbc/missing
@rm -rf ext/flopoco/config.h.in ext/flopoco/config.h.in~ ext/flopoco/configure ext/flopoco/configure.ac ext/flopoco/m4 ext/flopoco/Makefile.am ext/flopoco/src/FPExpressions/ExpressionParser.h ext/flopoco/src/FPExpressions/FlopocoScanner.h ext/flopoco/src/Makefile.am
@rm -rf ext/libfplll-4.0.3/config.h.in ext/libfplll-4.0.3/config.h.in~ ext/libfplll-4.0.3/configure
Expand Down
2 changes: 1 addition & 1 deletion QTCreator-PandA-GitHub.includes
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ext/Coin-Cbc/Clp/src
ext/Coin-Cbc/CoinUtils/src
ext/Coin-Cbc/Osi/src/Osi
ext/Coin-Cbc/ThirdParty/Glpk
ext/abseil-cpp
ext/abseil/abseil-cpp
ext/flopoco/src
ext/flopoco/src/FPExpAttic
ext/flopoco/src/FPExpressions
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,13 @@ fi

################################# ABSEIL stuff ################################
if test "x$panda_USE_ABSEIL" = xyes; then
$TOPSRCDIR/etc/macros/panda_config_subdir.sh ext/abseil-cpp $ac_configure_args "'CXXFLAGS=${CXXFLAGS_EXT}'" "'CFLAGS=${CFLAGS_EXT}'" "'LDFLAGS=$LDFLAGS'"
$TOPSRCDIR/etc/macros/panda_config_subdir.sh ext/abseil $ac_configure_args "'CXXFLAGS=${CXXFLAGS_EXT}'" "'CFLAGS=${CFLAGS_EXT}'" "'LDFLAGS=$LDFLAGS'"
if test $? != 0; then
AC_MSG_ERROR("Error in abseil configuration")
fi
AC_DEFINE(HAVE_ABSEIL, 1, "Define if abseil is used")
ABSEIL_DIR="$TOPSRCDIR/ext/abseil-cpp"
ABSEIL_OBJDIR="ext/abseil-cpp"
ABSEIL_DIR="$TOPSRCDIR/ext/abseil/abseil-cpp"
ABSEIL_OBJDIR="ext/abseil"
fi
AM_CONDITIONAL(BUILD_ABSEIL, test "x$panda_USE_ABSEIL" = xyes)
AC_SUBST(ABSEIL_DIR)
Expand Down
9 changes: 8 additions & 1 deletion etc/clang_plugin/dumpGimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4089,7 +4089,12 @@ namespace llvm

void DumpGimpleRaw::DumpVersion(llvm::raw_fd_ostream& stream)
{
stream << "COMPILER_VERSION: \"Clang " __clang_version__ "\"\nPLUGIN_VERSION: \"" PANDA_PLUGIN_VERSION "\"\n";
auto node_count_str = std::to_string(last_used_index);
node_count_str = std::string(10 - node_count_str.size(), ' ') + node_count_str;
stream.seek(0);
stream << "COMPILER_VERSION: \"Clang " __clang_version__ "\"\nPLUGIN_VERSION: \"" PANDA_PLUGIN_VERSION
"\"\nNODE_COUNT: "
<< node_count_str << "\n";
}

void DumpGimpleRaw::serialize_int(const char* field, int i)
Expand Down Expand Up @@ -6516,6 +6521,8 @@ namespace llvm
}
#endif

DumpVersion(stream);

// M.print(llvm::errs(), nullptr);
return res;
}
Expand Down
11 changes: 8 additions & 3 deletions etc/gcc_plugin/dumpGimple.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,10 @@ void DumpGimpleInit(char* _outdir_name)
static void DumpVersion(FILE* stream)
{
int version = __GNUC__, minor = __GNUC_MINOR__, patchlevel = __GNUC_PATCHLEVEL__;
fprintf(stream, "COMPILER_VERSION: \"GCC %d.%d.%d\"\nPLUGIN_VERSION: \"" PANDA_PLUGIN_VERSION "\"\n", version, minor,
patchlevel);
fseek(stream, 0, SEEK_SET);
fprintf(stream,
"COMPILER_VERSION: \"GCC %d.%d.%d\"\nPLUGIN_VERSION: \"" PANDA_PLUGIN_VERSION "\"\nNODE_COUNT: %10u\n",
version, minor, patchlevel, di_local_index);
}

/**
Expand All @@ -425,7 +427,9 @@ static void DumpVersion(FILE* stream)
*/
void SerializeGimpleBegin(char* name)
{
serialize_gimple_info.stream = fopen(name, serialize_state < 0 ? "w" : "a");
serialize_gimple_info.stream = fopen(name, serialize_state < 0 ? "w" : "r+");
if(serialize_state >= 0)
fseek(serialize_gimple_info.stream, 0, SEEK_END);
serialize_gimple_info.node = 0;
serialize_gimple_info.column = 0;
serialize_gimple_info.queue = 0;
Expand Down Expand Up @@ -608,6 +612,7 @@ void SerializeGimpleEnd()
free(dq);
}
serialize_gimple_info.cfg_list = 0;
DumpVersion(serialize_gimple_info.stream);
fclose(serialize_gimple_info.stream);
}

Expand Down
4 changes: 2 additions & 2 deletions ext/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,8 @@ or-tools/ortools/graph/linear_assignment.h\
or-tools/ortools/graph/assignment.h


SUBDIRS = abseil-cpp
DIST_SUBDIRS = abseil-cpp
SUBDIRS = abseil
DIST_SUBDIRS = abseil

if BUILD_COIN_OR
SUBDIRS += Coin-Cbc
Expand Down
4 changes: 0 additions & 4 deletions ext/abseil-cpp/.clang-format

This file was deleted.

18 changes: 0 additions & 18 deletions ext/abseil-cpp/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions ext/abseil-cpp/ABSEIL_ISSUE_TEMPLATE.md

This file was deleted.

6 changes: 0 additions & 6 deletions ext/abseil-cpp/AUTHORS

This file was deleted.

25 changes: 0 additions & 25 deletions ext/abseil-cpp/BUILD.bazel

This file was deleted.

Loading
Loading