diff --git a/.gitignore b/.gitignore index 70639e367bc68fedc132d3b39f4c606e4f8a532f..a17e2716a5e90ee10ac32c19c3fc2f29f953f286 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ cfg.foo.dot lit.site.cfg *.dot JITTests.exports +*.patch hpvm/build/ hpvm/install/ @@ -34,4 +35,4 @@ hpvm/llvm/ hpvm/llvm-*.src.tar.xz hpvm/llvm-*.src/ hpvm/projects/visc-rt/visc-rt.ll -hpvm/test/parboil/benchmarks/*/build/ +hpvm/test/**/build/ diff --git a/hpvm/llvm_patches/include/Bitcode/LLVMBitCodes.h.patch b/hpvm/llvm_patches/include/Bitcode/LLVMBitCodes.h.patch deleted file mode 100644 index 30da826886261d4bbb2c1d4fec65f5f08b4890a6..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/include/Bitcode/LLVMBitCodes.h.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/include/llvm/Bitcode/LLVMBitCodes.h 2019-07-15 15:02:23.000000000 -0500 -+++ include/Bitcode/LLVMBitCodes.h 2020-01-09 00:27:16.654327975 -0600 -@@ -632,6 +632,9 @@ - ATTR_KIND_NOFREE = 62, - ATTR_KIND_NOSYNC = 63, - ATTR_KIND_SANITIZE_MEMTAG = 64, -+ ATTR_KIND_IN = 65, -+ ATTR_KIND_OUT = 66, -+ ATTR_KIND_INOUT = 67, - }; - - enum ComdatSelectionKindCodes { diff --git a/hpvm/llvm_patches/include/IR/Attributes.td.patch b/hpvm/llvm_patches/include/IR/Attributes.td.patch deleted file mode 100644 index d2dac7ba947f466bb2fa6d543565d51b08f73aa5..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/include/IR/Attributes.td.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/include/llvm/IR/Attributes.td 2019-07-15 15:02:23.000000000 -0500 -+++ include/IR/Attributes.td 2020-01-09 00:27:16.659328383 -0600 -@@ -151,6 +151,17 @@ - /// Sign extended before/after call. - def SExt : EnumAttr<"signext">; - -+/// VISC Attributes -+/// Pointer to read only memory -+def In : EnumAttr<"in">; -+ -+/// Pointer to write only memory -+def Out : EnumAttr<"out">; -+ -+/// Pointer to read/write memory -+def InOut : EnumAttr<"inout">; -+ -+ - /// Alignment of stack for function (3 bits) stored as log2 of alignment with - /// +1 bias 0 means unaligned (different from alignstack=(1)). - def StackAlignment : EnumAttr<"alignstack">; diff --git a/hpvm/llvm_patches/include/IR/Intrinsics.td.patch b/hpvm/llvm_patches/include/IR/Intrinsics.td.patch deleted file mode 100644 index 8f1830459575f9075a96f262f240e16ce390b671..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/include/IR/Intrinsics.td.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/include/llvm/IR/Intrinsics.td 2019-07-17 10:15:43.000000000 -0500 -+++ include/IR/Intrinsics.td 2020-01-09 00:27:16.663328710 -0600 -@@ -1249,3 +1249,4 @@ - include "llvm/IR/IntrinsicsSystemZ.td" - include "llvm/IR/IntrinsicsWebAssembly.td" - include "llvm/IR/IntrinsicsRISCV.td" -+include "llvm/IR/IntrinsicsVISC.td" diff --git a/hpvm/llvm_patches/include/IR/IntrinsicsVISC.td.patch b/hpvm/llvm_patches/include/IR/IntrinsicsVISC.td.patch deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/hpvm/llvm_patches/include/Support/Debug.h.patch b/hpvm/llvm_patches/include/Support/Debug.h.patch deleted file mode 100644 index 4db5c09045632bc05ec83a0b83f8f49a36883ca5..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/include/Support/Debug.h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/include/llvm/Support/Debug.h 2019-01-19 02:50:56.000000000 -0600 -+++ include/Support/Debug.h 2020-01-09 00:27:16.671329363 -0600 -@@ -121,6 +121,8 @@ - // - #define LLVM_DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X) - -+#define DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X) -+ - } // end namespace llvm - - #endif // LLVM_SUPPORT_DEBUG_H diff --git a/hpvm/llvm_patches/lib/AsmParser/LLLexer.cpp.patch b/hpvm/llvm_patches/lib/AsmParser/LLLexer.cpp.patch deleted file mode 100644 index 2d0a972ea44cbd008bad010aadff69909d99602e..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/AsmParser/LLLexer.cpp.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/AsmParser/LLLexer.cpp 2019-07-15 15:02:23.000000000 -0500 -+++ lib/AsmParser/LLLexer.cpp 2020-01-09 00:27:16.678329935 -0600 -@@ -800,6 +800,11 @@ - KEYWORD(bit); - KEYWORD(varFlags); - -+// VISC parameter attributes -+ KEYWORD(in); -+ KEYWORD(out); -+ KEYWORD(inout); -+ - #undef KEYWORD - - // Keywords for types. diff --git a/hpvm/llvm_patches/lib/AsmParser/LLLexer.h.patch b/hpvm/llvm_patches/lib/AsmParser/LLLexer.h.patch deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/hpvm/llvm_patches/lib/AsmParser/LLParser.cpp.patch b/hpvm/llvm_patches/lib/AsmParser/LLParser.cpp.patch deleted file mode 100644 index 339488ac085525750ac7a621e4d85ba48077170c..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/AsmParser/LLParser.cpp.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/AsmParser/LLParser.cpp 2019-07-15 15:02:23.000000000 -0500 -+++ lib/AsmParser/LLParser.cpp 2020-01-09 00:27:16.690330915 -0600 -@@ -1346,6 +1346,11 @@ - case lltok::kw_swifterror: - case lltok::kw_swiftself: - case lltok::kw_immarg: -+ -+ // VISC Parameter only attributes -+ case lltok::kw_in: -+ case lltok::kw_out: -+ case lltok::kw_inout: - HaveError |= - Error(Lex.getLoc(), - "invalid use of parameter-only attribute on a function"); -@@ -1647,6 +1652,11 @@ - case lltok::kw_zeroext: B.addAttribute(Attribute::ZExt); break; - case lltok::kw_immarg: B.addAttribute(Attribute::ImmArg); break; - -+ // VISC parameter attributes -+ case lltok::kw_in: B.addAttribute(Attribute::In); break; -+ case lltok::kw_out: B.addAttribute(Attribute::Out); break; -+ case lltok::kw_inout: B.addAttribute(Attribute::InOut); break; -+ - case lltok::kw_alignstack: - case lltok::kw_alwaysinline: - case lltok::kw_argmemonly: -@@ -1742,6 +1752,11 @@ - case lltok::kw_swifterror: - case lltok::kw_swiftself: - case lltok::kw_immarg: -+ -+ // VISC Parameter only attributes -+ case lltok::kw_in: -+ case lltok::kw_out: -+ case lltok::kw_inout: - HaveError |= Error(Lex.getLoc(), "invalid use of parameter-only attribute"); - break; - diff --git a/hpvm/llvm_patches/lib/AsmParser/LLParser.h.patch b/hpvm/llvm_patches/lib/AsmParser/LLParser.h.patch deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/hpvm/llvm_patches/lib/AsmParser/LLToken.h.patch b/hpvm/llvm_patches/lib/AsmParser/LLToken.h.patch deleted file mode 100644 index 900be4996d0c3bda9e7e6f0aa0fdebbb8b6e0a57..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/AsmParser/LLToken.h.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/AsmParser/LLToken.h 2019-07-15 15:02:23.000000000 -0500 -+++ lib/AsmParser/LLToken.h 2020-01-09 00:27:16.696331405 -0600 -@@ -351,6 +351,11 @@ - kw_insertvalue, - kw_blockaddress, - -+ // VISC parameter attributes -+ kw_in, -+ kw_out, -+ kw_inout, -+ - // Metadata types. - kw_distinct, - diff --git a/hpvm/llvm_patches/lib/Bitcode/Reader/BitcodeReader.cpp.patch b/hpvm/llvm_patches/lib/Bitcode/Reader/BitcodeReader.cpp.patch deleted file mode 100644 index 82caa0656da00ff05c8eef4997e32aec47b174b3..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/Bitcode/Reader/BitcodeReader.cpp.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/Bitcode/Reader/BitcodeReader.cpp 2019-07-15 15:02:23.000000000 -0500 -+++ lib/Bitcode/Reader/BitcodeReader.cpp 2020-01-09 00:27:16.708332385 -0600 -@@ -1280,6 +1280,12 @@ - return 1ULL << 62; - case Attribute::NoFree: - return 1ULL << 63; -+ -+ // VISC Attributes -+ case Attribute::In: return 3ULL << 0; -+ case Attribute::Out: return 3ULL << 1; -+ case Attribute::InOut: return 3ULL << 2; -+ - case Attribute::NoSync: - llvm_unreachable("nosync attribute not supported in raw format"); - break; diff --git a/hpvm/llvm_patches/lib/Bitcode/Writer/BitcodeWriter.cpp.patch b/hpvm/llvm_patches/lib/Bitcode/Writer/BitcodeWriter.cpp.patch deleted file mode 100644 index d2492681d91ad4de223137c6444341c8a33781eb..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/Bitcode/Writer/BitcodeWriter.cpp.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp 2019-07-15 15:02:23.000000000 -0500 -+++ lib/Bitcode/Writer/BitcodeWriter.cpp 2020-01-09 00:27:16.716333039 -0600 -@@ -725,6 +725,15 @@ - return bitc::ATTR_KIND_IMMARG; - case Attribute::SanitizeMemTag: - return bitc::ATTR_KIND_SANITIZE_MEMTAG; -+ -+ // VISC Attributes -+ case Attribute::In: -+ return bitc::ATTR_KIND_IN; -+ case Attribute::Out: -+ return bitc::ATTR_KIND_OUT; -+ case Attribute::InOut: -+ return bitc::ATTR_KIND_INOUT; -+ - case Attribute::EndAttrKinds: - llvm_unreachable("Can not encode end-attribute kinds marker."); - case Attribute::None: diff --git a/hpvm/llvm_patches/lib/IR/Attributes.cpp.patch b/hpvm/llvm_patches/lib/IR/Attributes.cpp.patch deleted file mode 100644 index 8f112fa2204f47108db4ccd9da2aeec2de004169..0000000000000000000000000000000000000000 --- a/hpvm/llvm_patches/lib/IR/Attributes.cpp.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- /home/akashk4/hpvm/hpvm/llvm/lib/IR/Attributes.cpp 2019-07-15 15:02:23.000000000 -0500 -+++ lib/IR/Attributes.cpp 2020-01-09 00:27:16.722333529 -0600 -@@ -396,6 +396,14 @@ - if (hasAttribute(Attribute::ImmArg)) - return "immarg"; - -+ // VISC attributes for arguments -+ if (hasAttribute(Attribute::In)) -+ return "in"; -+ if (hasAttribute(Attribute::Out)) -+ return "out"; -+ if (hasAttribute(Attribute::InOut)) -+ return "inout"; -+ - if (hasAttribute(Attribute::ByVal)) { - std::string Result; - Result += "byval";