[PATCH] D65843: Added Reduce as Dependency to Tests & fixed warnings
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 18:53:25 PDT 2019
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL368117: Added Tool as Dependency to tests & fixed warnings (authored by diegotf30, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D65843?vs=213779&id=213780#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65843/new/
https://reviews.llvm.org/D65843
Files:
llvm/trunk/test/CMakeLists.txt
llvm/trunk/tools/llvm-reduce/deltas/Delta.cpp
llvm/trunk/tools/llvm-reduce/deltas/Delta.h
llvm/trunk/tools/llvm-reduce/deltas/RemoveFunctions.cpp
llvm/trunk/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
Index: llvm/trunk/tools/llvm-reduce/deltas/Delta.h
===================================================================
--- llvm/trunk/tools/llvm-reduce/deltas/Delta.h
+++ llvm/trunk/tools/llvm-reduce/deltas/Delta.h
@@ -28,8 +28,8 @@
using namespace llvm;
struct Chunk {
- int begin;
- int end;
+ unsigned begin;
+ unsigned end;
/// Operator when populating CurrentChunks in Generic Delta Pass
friend bool operator!=(const Chunk &C1, const Chunk &C2) {
@@ -66,7 +66,7 @@
/// Other implementations of the Delta Debugging algorithm can also be found in
/// the CReduce, Delta, and Lithium projects.
void runDeltaPass(
- TestRunner &Test, int Targets,
+ TestRunner &Test, unsigned Targets,
std::function<std::unique_ptr<Module>(std::vector<Chunk>, Module *)>
ExtractChunksFromModule);
Index: llvm/trunk/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
===================================================================
--- llvm/trunk/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
+++ llvm/trunk/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
@@ -21,7 +21,7 @@
// Get GVs inside desired chunks
std::set<GlobalVariable *> GVsToKeep;
- int I = 0, GVCount = 1;
+ unsigned I = 0, GVCount = 1;
for (auto &GV : Clone->globals()) {
if (GV.hasInitializer() && I < ChunksToKeep.size()) {
if (GVCount >= ChunksToKeep[I].begin && GVCount <= ChunksToKeep[I].end)
Index: llvm/trunk/tools/llvm-reduce/deltas/Delta.cpp
===================================================================
--- llvm/trunk/tools/llvm-reduce/deltas/Delta.cpp
+++ llvm/trunk/tools/llvm-reduce/deltas/Delta.cpp
@@ -85,7 +85,7 @@
if (C.end - C.begin == 0)
NewChunks.push_back(C);
else {
- int Half = (C.begin + C.end) / 2;
+ unsigned Half = (C.begin + C.end) / 2;
NewChunks.push_back({C.begin, Half});
NewChunks.push_back({Half + 1, C.end});
SplitOne = true;
@@ -100,7 +100,7 @@
}
void llvm::runDeltaPass(
- TestRunner &Test, int Targets,
+ TestRunner &Test, unsigned Targets,
std::function<std::unique_ptr<Module>(std::vector<Chunk>, Module *)>
ExtractChunksFromModule) {
if (!Targets)
Index: llvm/trunk/tools/llvm-reduce/deltas/RemoveFunctions.cpp
===================================================================
--- llvm/trunk/tools/llvm-reduce/deltas/RemoveFunctions.cpp
+++ llvm/trunk/tools/llvm-reduce/deltas/RemoveFunctions.cpp
@@ -23,7 +23,7 @@
// Get functions inside desired chunks
std::set<Function *> FuncsToKeep;
- int I = 0, FunctionCount = 1;
+ unsigned I = 0, FunctionCount = 1;
for (auto &F : *Clone) {
if (!F.isDeclaration() && I < ChunksToKeep.size()) {
if (FunctionCount >= ChunksToKeep[I].begin &&
Index: llvm/trunk/test/CMakeLists.txt
===================================================================
--- llvm/trunk/test/CMakeLists.txt
+++ llvm/trunk/test/CMakeLists.txt
@@ -89,6 +89,7 @@
llvm-rc
llvm-readobj
llvm-readelf
+ llvm-reduce
llvm-rtdyld
llvm-size
llvm-split
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65843.213780.patch
Type: text/x-patch
Size: 3090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190807/db638d72/attachment.bin>
More information about the llvm-commits
mailing list