Files
revng-revng/include/revng-c/PromoteStackPointer/InstrumentStackAccessesPass.h
T
Alessandro Di Federico 330d2b6cc7 Model: rework how we name things
This commit:

* Introduces `_` as a prefix for all non-user entities we emit in
  decompiled code.
  Also, some names have been changed to be more concise.
  Specifically, the following entities have changed:
  `_ENUM_UNDERLYING`, `_ABI`, `_REG`, `_padding_at_`,
  `_artificial_struct_`, `_artificial_wrapper_`, `_stack`,
  `_break_from_loop_`, `_var_`, `_stack_arguments`,
  `_artificial_struct_returned_`, `_enum_max_value_`.
* Introduce _PACKED for `__attribute__((packed))`.
* `EnumEntry` name: drop the `EnumType` name prefix.
2023-08-23 16:37:39 +02:00

29 lines
793 B
C++

#pragma once
//
// Copyright (c) rev.ng Labs Srl. See LICENSE.md for details.
//
#include "llvm/Pass.h"
#include "revng/Support/FunctionTags.h"
/// Wrap stack accesses into StackOffsetMarker-tagged calls
///
/// stack_offset is an identity-like function with a second argument
/// representing the range of offsets from SP0 that the pointer passed in as the
/// first argument can assume.
///
/// \note This pass looks for all the users of `_init_local_sp`, therefore
/// it needs to be run *after* `PromoteStackPointerPass`
struct InstrumentStackAccessesPass : public llvm::ModulePass {
public:
static char ID;
InstrumentStackAccessesPass() : llvm::ModulePass(ID) {}
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
bool runOnModule(llvm::Module &M) override;
};