Skip to content

Commit

Permalink
[SOL] Advance llvm commit (#92)
Browse files Browse the repository at this point in the history
* Advance llvm commit
  • Loading branch information
LucasSte authored Jul 19, 2024
1 parent 696ef74 commit 16d248c
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ panic_unwind = { path = "../panic_unwind", optional = true }
panic_abort = { path = "../panic_abort" }
core = { path = "../core", public = true }
libc = { version = "0.2.150", default-features = false, features = ['rustc-dep-of-std'], public = true }
compiler_builtins = { version = "0.1.103" }
compiler_builtins = { version = "=0.1.103" }
profiler_builtins = { path = "../profiler_builtins", optional = true }
unwind = { path = "../unwind" }
hashbrown = { version = "0.14", default-features = false, features = ['rustc-dep-of-std'] }
Expand Down
56 changes: 28 additions & 28 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use std::process::Command;
use std::str::FromStr;

use crate::core::build_steps::compile::CODEGEN_BACKEND_PREFIX;
use crate::core::build_steps::llvm;
use crate::core::config::flags::{Color, Flags, Warnings};
use crate::utils::cache::{Interned, INTERNER};
use crate::utils::channel::{self, GitInfo};
Expand Down Expand Up @@ -2110,34 +2109,35 @@ impl Config {

fn parse_download_ci_llvm(
&self,
download_ci_llvm: Option<StringOrBool>,
asserts: bool,
_download_ci_llvm: Option<StringOrBool>,
_asserts: bool,
) -> bool {
match download_ci_llvm {
None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
Some(StringOrBool::Bool(b)) => b,
Some(StringOrBool::String(s)) if s == "if-available" => {
llvm::is_ci_llvm_available(&self, asserts)
}
Some(StringOrBool::String(s)) if s == "if-unchanged" => {
// Git is needed to track modifications here, but tarball source is not available.
// If not modified here or built through tarball source, we maintain consistency
// with '"if available"'.
if !self.rust_info.is_from_tarball()
&& self
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
.is_none()
{
// there are some untracked changes in the the given paths.
false
} else {
llvm::is_ci_llvm_available(&self, asserts)
}
}
Some(StringOrBool::String(other)) => {
panic!("unrecognized option for download-ci-llvm: {:?}", other)
}
}
// match download_ci_llvm {
// None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
// Some(StringOrBool::Bool(b)) => b,
// Some(StringOrBool::String(s)) if s == "if-available" => {
// llvm::is_ci_llvm_available(&self, asserts)
// }
// Some(StringOrBool::String(s)) if s == "if-unchanged" => {
// // Git is needed to track modifications here, but tarball source is not available.
// // If not modified here or built through tarball source, we maintain consistency
// // with '"if available"'.
// if !self.rust_info.is_from_tarball()
// && self
// .last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
// .is_none()
// {
// // there are some untracked changes in the the given paths.
// false
// } else {
// llvm::is_ci_llvm_available(&self, asserts)
// }
// }
// Some(StringOrBool::String(other)) => {
// panic!("unrecognized option for download-ci-llvm: {:?}", other)
// }
// }
false
}

/// Returns the last commit in which any of `modified_paths` were changed,
Expand Down
46 changes: 23 additions & 23 deletions src/bootstrap/src/tests/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ fn parse(config: &str) -> Config {
})
}

#[test]
fn download_ci_llvm() {
if crate::core::build_steps::llvm::is_ci_llvm_modified(&parse("")) {
eprintln!("Detected LLVM as non-available: running in CI and modified LLVM in this change");
return;
}

let parse_llvm = |s| parse(s).llvm_from_ci;
let if_available = parse_llvm("llvm.download-ci-llvm = \"if-available\"");

assert!(parse_llvm("llvm.download-ci-llvm = true"));
assert!(!parse_llvm("llvm.download-ci-llvm = false"));
assert_eq!(parse_llvm(""), if_available);
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_available);
assert!(!parse_llvm("rust.channel = \"stable\""));
assert!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""));
assert!(parse_llvm(
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-available\""
));
assert!(!parse_llvm(
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\""
));
}
// #[test]
// fn download_ci_llvm() {
// if crate::core::build_steps::llvm::is_ci_llvm_modified(&parse("")) {
// eprintln!("Detected LLVM as non-available: running in CI and modified LLVM in this change");
// return;
// }

// let parse_llvm = |s| parse(s).llvm_from_ci;
// let if_available = parse_llvm("llvm.download-ci-llvm = \"if-available\"");

// assert!(parse_llvm("llvm.download-ci-llvm = true"));
// assert!(!parse_llvm("llvm.download-ci-llvm = false"));
// assert_eq!(parse_llvm(""), if_available);
// assert_eq!(parse_llvm("rust.channel = \"dev\""), if_available);
// assert!(!parse_llvm("rust.channel = \"stable\""));
// assert!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""));
// assert!(parse_llvm(
// "llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-available\""
// ));
// assert!(!parse_llvm(
// "llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\""
// ));
// }

// FIXME(onur-ozkan): extend scope of the test
// refs:
Expand Down
2 changes: 1 addition & 1 deletion src/ci/scripts/run-build-from-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IFS=$'\n\t'

source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

export CI="true"
#export CI="true"
export SRC=.

echo "::add-matcher::src/ci/github-actions/problem_matchers.json"
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
Submodule llvm-project updated 37 files
+9 −4 .github/workflows/llvm-project-tests.yml
+1 −0 llvm/lib/Target/SBF/CMakeLists.txt
+1 −151 llvm/lib/Target/SBF/SBFAdjustOpt.cpp
+1 −48 llvm/lib/Target/SBF/SBFCheckAndAdjustIR.cpp
+28 −0 llvm/lib/Target/SBF/SBFFunctionInfo.cpp
+32 −0 llvm/lib/Target/SBF/SBFFunctionInfo.h
+0 −57 llvm/lib/Target/SBF/SBFISelDAGToDAG.cpp
+74 −51 llvm/lib/Target/SBF/SBFISelLowering.cpp
+1 −0 llvm/lib/Target/SBF/SBFInstrFormats.td
+43 −29 llvm/lib/Target/SBF/SBFInstrInfo.cpp
+1 −0 llvm/lib/Target/SBF/SBFInstrInfo.td
+46 −10 llvm/lib/Target/SBF/SBFRegisterInfo.cpp
+4 −0 llvm/lib/Target/SBF/SBFRegisterInfo.h
+5 −1 llvm/lib/Target/SBF/SBFSelectionDAGInfo.cpp
+1 −7 llvm/lib/Target/SBF/SBFSubtarget.cpp
+6 −1 llvm/lib/Target/SBF/SBFSubtarget.h
+4 −2 llvm/lib/Target/SBF/SBFTargetFeatures.td
+9 −1 llvm/lib/Target/SBF/SBFTargetMachine.cpp
+4 −0 llvm/lib/Target/SBF/SBFTargetMachine.h
+0 −3 llvm/test/CodeGen/BPF/intrinsics.ll
+26 −0 llvm/test/CodeGen/SBF/32-bit-subreg-alu.ll
+0 −98 llvm/test/CodeGen/SBF/adjust-opt-icmp2.ll
+0 −85 llvm/test/CodeGen/SBF/adjust-opt-icmp3.ll
+0 −85 llvm/test/CodeGen/SBF/adjust-opt-icmp4.ll
+0 −71 llvm/test/CodeGen/SBF/adjust-opt-icmp5.ll
+0 −71 llvm/test/CodeGen/SBF/adjust-opt-icmp6.ll
+46 −0 llvm/test/CodeGen/SBF/func_call_error.ll
+0 −100 llvm/test/CodeGen/SBF/intrinsics.ll
+115 −0 llvm/test/CodeGen/SBF/many_args_new_conv.ll
+2 −4 llvm/test/CodeGen/SBF/memcpy-expand-in-order.ll
+92 −0 llvm/test/CodeGen/SBF/memcpy_16.ll
+17 −0 llvm/test/CodeGen/SBF/mod-64.ll
+5 −10 llvm/test/CodeGen/SBF/pqr-class.ll
+1 −1 llvm/test/CodeGen/SBF/stack_args_v2.ll
+5 −4 llvm/test/CodeGen/SBF/warn-stack.ll
+14 −0 llvm/test/MC/Disassembler/SBF/sbf-alu.txt
+17 −0 llvm/test/MC/SBF/sbf-alu.s

0 comments on commit 16d248c

Please sign in to comment.