Skip to content

Commit

Permalink
Recover from and report unknown instructions and directives (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
vosen authored Nov 2, 2024
1 parent 3870a96 commit b4cb3ad
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 92 deletions.
2 changes: 2 additions & 0 deletions llvm_zluda/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fn main() {
let mut cmake = Config::new(r"../ext/llvm-project/llvm");
try_use_ninja(&mut cmake);
cmake
// It's not like we can do anything about the warnings
.define("LLVM_ENABLE_WARNINGS", "OFF")
// For some reason Rust always links to release MSVCRT
.define("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreadedDLL")
.define("LLVM_ENABLE_TERMINFO", "OFF")
Expand Down
6 changes: 3 additions & 3 deletions llvm_zluda/src/lib.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <llvm-c/Core.h>
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Instructions.h"
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Type.h>
#include <llvm/IR/Instructions.h>

using namespace llvm;

Expand Down
4 changes: 2 additions & 2 deletions ptx_parser/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,9 @@ pub enum SetpCompareFloat {
}

impl TryFrom<(RawSetpCompareOp, ScalarKind)> for SetpCompareInt {
type Error = PtxError;
type Error = PtxError<'static>;

fn try_from((value, kind): (RawSetpCompareOp, ScalarKind)) -> Result<Self, PtxError> {
fn try_from((value, kind): (RawSetpCompareOp, ScalarKind)) -> Result<Self, PtxError<'static>> {
match (value, kind) {
(RawSetpCompareOp::Eq, _) => Ok(SetpCompareInt::Eq),
(RawSetpCompareOp::Ne, _) => Ok(SetpCompareInt::NotEq),
Expand Down
Loading

0 comments on commit b4cb3ad

Please sign in to comment.