mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
ng_small_literal_set: pre-check for narrow reach
This commit is contained in:
parent
92c28d28c1
commit
fe2654b086
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -33,8 +33,8 @@
|
||||
#include "ng_small_literal_set.h"
|
||||
|
||||
#include "grey.h"
|
||||
#include "ng_util.h"
|
||||
#include "ng_holder.h"
|
||||
#include "ng_util.h"
|
||||
#include "rose/rose_build.h"
|
||||
#include "util/compare.h"
|
||||
#include "util/compile_context.h"
|
||||
@ -222,6 +222,11 @@ bool handleSmallLiteralSets(RoseBuild &rose, const NGHolder &g,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!hasNarrowReachVertex(g, MAX_LITERAL_SET_SIZE * 2 + 1)) {
|
||||
DEBUG_PRINTF("vertex with wide reach found\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_PRINTF("looking for literals\n");
|
||||
|
||||
map<sls_literal, ue2::flat_set<ReportID>> literals;
|
||||
|
Loading…
x
Reference in New Issue
Block a user