Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMPStaticAnalyzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
SMPStaticAnalyzer
Commits
0b899273
Commit
0b899273
authored
2 years ago
by
Clark Coleman
Browse files
Options
Downloads
Patches
Plain Diff
Short circuiting analyses not needed for DEADREGS annotations.
parent
0578a732
No related branches found
No related tags found
1 merge request
!25
Faster deadregs
Pipeline
#17793
passed
2 years ago
Stage: clean
Stage: build
Stage: test
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/interfaces/abstract/STARSProgram.h
+3
-0
3 additions, 0 deletions
include/interfaces/abstract/STARSProgram.h
src/base/SMPProgram.cpp
+273
-266
273 additions, 266 deletions
src/base/SMPProgram.cpp
src/interfaces/abstract/STARSProgram.cpp
+1
-0
1 addition, 0 deletions
src/interfaces/abstract/STARSProgram.cpp
with
277 additions
and
266 deletions
include/interfaces/abstract/STARSProgram.h
+
3
−
0
View file @
0b899273
...
...
@@ -93,6 +93,7 @@ class STARS_Program_t
void
SetLoopAnalysesFlag
(
bool
FlagValue
)
{
STARS_PerformDeepLoopAnalyses
=
FlagValue
;
};
void
SetConstantPropagationFlag
(
bool
FlagValue
)
{
STARS_PerformConstantPropagation
=
FlagValue
;
};
void
SetSPARKFlag
(
bool
FlagValue
)
{
STARS_TranslateToSPARKAda
=
FlagValue
;
};
void
SetFastDeadRegsFlag
(
bool
FlagValue
)
{
STARS_FastDeadRegs
=
FlagValue
;
};
void
SetRootFileName
(
std
::
string
NewName
)
{
RootFileName
=
NewName
;
AnnotFileName
=
NewName
+
".annot"
;
InfoAnnotFileName
=
NewName
+
".infoannot"
;
};
void
IncrementOptCount
(
std
::
size_t
OptCategory
)
{
++
OptCount
[
OptCategory
];
};
// increment optimizing annotation count
void
IncrementAnnotationCount
(
std
::
size_t
OptCategory
)
{
++
AnnotationCount
[
OptCategory
];
};
// increment total annotation count
...
...
@@ -112,6 +113,7 @@ class STARS_Program_t
bool
ShouldSTARSPerformDeepLoopAnalyses
(
void
)
const
{
return
STARS_PerformDeepLoopAnalyses
;
};
bool
ShouldSTARSPerformConstantPropagation
(
void
)
const
{
return
STARS_PerformConstantPropagation
;
};
bool
ShouldSTARSTranslateToSPARKAda
(
void
)
const
{
return
STARS_TranslateToSPARKAda
;
};
bool
ShouldSTARSDoFastDeadRegs
(
void
)
const
{
return
STARS_FastDeadRegs
;
};
bool
IsIDAProDriverMode
(
void
)
const
{
return
IDAProDriver
;
};
bool
IsSharedObject
(
void
)
const
{
return
SharedObjectFlag
;
};
bool
IsLocationWhitelisted
(
ZST_SysCallType
CallType
,
std
::
string
LocationName
)
const
;
...
...
@@ -225,6 +227,7 @@ class STARS_Program_t
bool
STARS_PerformDeepLoopAnalyses
;
// analyze loop induction vars, iteration counts, memory ranges
bool
STARS_PerformConstantPropagation
;
// perform constant propagation; results available to loop, CFG, and shadowing
bool
STARS_TranslateToSPARKAda
;
// emit translation of code to SPARK Ada with proof contracts
bool
STARS_FastDeadRegs
;
// After analysis for DEADREGS annotation completes, skip remaining analyses.
// Total code size for the program in bytes.
unsigned
long
long
STARS_TotalCodeSize
;
...
...
This diff is collapsed.
Click to expand it.
src/base/SMPProgram.cpp
+
273
−
266
View file @
0b899273
This diff is collapsed.
Click to expand it.
src/interfaces/abstract/STARSProgram.cpp
+
1
−
0
View file @
0b899273
...
...
@@ -358,6 +358,7 @@ void STARS_Program_t::InitData(void) {
this->STARS_PerformDeepLoopAnalyses = false;
this->STARS_PerformConstantPropagation = false;
this->STARS_TranslateToSPARKAda = false;
this->STARS_FastDeadRegs = false;
this->DataReferentID = 1;
this->ShadowID = 1;
this->ExprSerialNumber = 0;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment