================
@@ -424,11 +490,129 @@ def run_creduce(self):
print("\n\nctrl-c detected, killed reduction tool")
p.kill()
+ def run_llvm_reduce(self):
+ full_llvm_reduce_cmd = [
+ llvm_reduce_cmd,
+ f"--test={self.testfile}",
+ self.ir_file,
+ ]
+ print("\nRunning llvm-reduce tool...")
+ verbose_print(quote_cmd(full_llvm_reduce_cmd))
+ try:
+ p = subprocess.Popen(full_llvm_reduce_cmd)
+ p.communicate()
+ except KeyboardInterrupt:
+ print("\n\nctrl-c detected, killed reduction tool")
+ p.kill()
+
+ def classify_crash(self) -> FailureType:
+ print("Classifying crash ...")
+ if self.check_expected_output(args=self.clang_args +
["-fsyntax-only"]):
+ print("Found Frontend Crash")
+ return FailureType.FrontEnd
+
+ print("Found Middle/Backend failure")
+
+ self.opt_level = extract_opt_level(self.clang_args) or "-O2"
+ backend_result = self.check_backend()
+ if backend_result == FailureType.BackEnd:
+ return backend_result
+
+ # Try running w/ -emit-llvm to generate an IR file,
----------------
aeubanks wrote:
+1, at some point if llc doesn't repro the backend crash we should also attempt
to run this through `clang -Xclang -disable-llvm-passes -c -o /dev/null` which
skips the opt pipeline and only runs the codegen pipeline
https://github.com/llvm/llvm-project/pull/163282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits