File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
compiler_gym/envs/llvm/service Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ cc_binary(
308
308
genrule (
309
309
name = "strip-optnone-bin" ,
310
310
srcs = [":strip-optnone-attribute-prelinked" ],
311
- outs = ["strip-optnone" ],
311
+ outs = ["strip-optnone-attribute " ],
312
312
cmd = select ({
313
313
"@llvm//:darwin" : (
314
314
"cp $(location :strip-optnone-attribute-prelinked) $@"
Original file line number Diff line number Diff line change @@ -34,12 +34,15 @@ namespace {
34
34
35
35
BenchmarkHash getModuleHash (const llvm::Module& module ) {
36
36
BenchmarkHash hash;
37
- llvm::SmallVector<char , 256 > buffer;
37
+ Bitcode bitcode;
38
+
38
39
// Writing the entire bitcode to a buffer that is then discarded is
39
40
// inefficient.
40
- llvm::BitcodeWriter writer (buffer);
41
- writer.writeModule (module , /* ShouldPreserveUseListOrder=*/ false ,
42
- /* Index=*/ nullptr , /* GenerateHash=*/ true , &hash);
41
+ llvm::raw_svector_ostream ostream (bitcode);
42
+ llvm::WriteBitcodeToFile (module , ostream,
43
+ /* ShouldPreserveUseListOrder=*/ false ,
44
+ /* Index=*/ nullptr , /* GenerateHash=*/ true , &hash);
45
+
43
46
return hash;
44
47
}
45
48
Original file line number Diff line number Diff line change 9
9
#include < iostream>
10
10
11
11
#include " compiler_gym/envs/llvm/service/BenchmarkFactory.h"
12
- #include " compiler_gym/envs/llvm/service/Observation.h"
13
- #include " compiler_gym/envs/llvm/service/ObservationSpaces.h"
14
12
#include " compiler_gym/service/proto/compiler_gym_service.pb.h"
15
13
#include " compiler_gym/util/GrpcStatusMacros.h"
16
14
#include " llvm/IR/Module.h"
You can’t perform that action at this time.
0 commit comments